@Name(value="documentActions") @Scope(value=CONVERSATION) public class DocumentActionsBean extends InputController implements DocumentActions, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SUMMARY_LAYOUT |
static String |
LIFE_CYCLE_TRANSITION_KEY |
CHILDREN_DOCUMENT_LIST
Constructor and Description |
---|
DocumentActionsBean() |
Modifier and Type | Method and Description |
---|---|
String |
checkCurrentDocAndProcessSelectPage(String providerName,
String listName,
Boolean selection,
String currentDocRef)
Handle complete table selection event after having ensured that the
navigation context stills points to currentDocumentRef to protect
against browsers' back button errors
|
String |
checkCurrentDocAndProcessSelectRow(String docRef,
String providerName,
String listName,
Boolean selection,
String currentDocRef)
Handle complete row selection event after having ensured that the
navigation context stills points to currentDocumentRef to protect
against browsers' back button errors
|
String |
createDocument()
Creates a document with type given by
TypesTool and stores it in
the context as the current changeable document. |
String |
createDocument(String typeName)
Creates a document with given type and stores it in the context as the
current changeable document.
|
String |
download() |
void |
download(DocumentView docView)
Downloads file as described by given document view.
|
String |
downloadFromList() |
String |
editDocument()
Returns the edit view of a document.
|
void |
followTransition(DocumentModel changedDocument) |
boolean |
getCanUnpublish()
This method is used to test whether the logged user has enough rights
for the unpublish support.
|
Type |
getChangeableDocumentType() |
SelectDataModel |
getChildrenSelectModel() |
String |
getComment()
Returns the comment to attach to the document
|
String |
getCurrentDocumentSummaryLayout() |
Type |
getCurrentType() |
String |
getFileName(DocumentModel doc) |
SelectDataModel |
getSectionChildrenSelectModel() |
boolean |
getWriteRight()
Checks the current document write permission.
|
String |
processSelectPage(String providerName,
String listName,
Boolean selection) |
String |
processSelectRow(String docRef,
String providerName,
String listName,
Boolean selection) |
void |
processSelectRowEvent(SelectDataModelRowEvent event) |
String |
saveDocument()
Creates the document from the changeableDocument put in request.
|
String |
saveDocument(DocumentModel newDocument)
Creates the given document.
|
void |
setComment(String comment)
Sets the comment to attach to a document
|
String |
updateCurrentDocument()
Updates document considering that current document model holds edited
values.
|
String |
updateDocument()
Saves changes held by the changeableDocument document model.
|
String |
updateDocumentAsNewVersion()
Saves changes held by the changeableDocument document model in current
version and then create a new current one.
|
computeOutcome, getAdministrator, logDocumentWithName, logDocumentWithTitle, removeDocumentFromList
public static String DEFAULT_SUMMARY_LAYOUT
public static String LIFE_CYCLE_TRANSITION_KEY
@Factory(autoCreate=true, value="currentDocumentSummaryLayout", scope=EVENT) public String getCurrentDocumentSummaryLayout()
getCurrentDocumentSummaryLayout
in interface DocumentActions
@Factory(autoCreate=true, value="currentDocumentType", scope=EVENT) public Type getCurrentType()
getCurrentType
in interface DocumentActions
null
if current
doc is null.public Type getChangeableDocumentType()
getChangeableDocumentType
in interface DocumentActions
public String editDocument() throws ClientException
DocumentActions
editDocument
in interface DocumentActions
ClientException
public String getFileName(DocumentModel doc) throws ClientException
ClientException
public String download() throws ClientException
download
in interface DocumentActions
ClientException
public void download(DocumentView docView) throws ClientException
DocumentActions
To be used by url pattern descriptors performing a download.
download
in interface DocumentActions
docView
- the document view as generated through the url serviceClientException
- when document is not found or file is not
retrieved correctly.public String downloadFromList() throws ClientException
downloadFromList
in interface DocumentActions
ClientException
public String updateCurrentDocument() throws ClientException
DocumentActions
updateCurrentDocument
in interface DocumentActions
ClientException
public String updateDocument() throws ClientException
DocumentActions
updateDocument
in interface DocumentActions
ClientException
public String updateDocumentAsNewVersion() throws ClientException
DocumentActions
updateDocumentAsNewVersion
in interface DocumentActions
ClientException
public String createDocument() throws ClientException
DocumentActions
TypesTool
and stores it in
the context as the current changeable document.
Returns the create view of given document type.
createDocument
in interface DocumentActions
ClientException
public String createDocument(String typeName) throws ClientException
DocumentActions
Returns the create view of given document type.
createDocument
in interface DocumentActions
ClientException
public String saveDocument() throws ClientException
DocumentActions
saveDocument
in interface DocumentActions
ClientException
public String saveDocument(DocumentModel newDocument) throws ClientException
DocumentActions
saveDocument
in interface DocumentActions
ClientException
@Factory(value="currentChildrenSelectModel", scope=EVENT) public SelectDataModel getChildrenSelectModel() throws ClientException
getChildrenSelectModel
in interface DocumentActions
ClientException
public SelectDataModel getSectionChildrenSelectModel() throws ClientException
getSectionChildrenSelectModel
in interface DocumentActions
ClientException
public void processSelectRowEvent(SelectDataModelRowEvent event)
processSelectRowEvent
in interface SelectDataModelListener
@WebRemote public String checkCurrentDocAndProcessSelectRow(String docRef, String providerName, String listName, Boolean selection, String currentDocRef) throws ClientException
DocumentActions
checkCurrentDocAndProcessSelectRow
in interface DocumentActions
ClientException
- if currentDocRef is not a valid document@WebRemote public String processSelectRow(String docRef, String providerName, String listName, Boolean selection)
processSelectRow
in interface DocumentActions
@WebRemote public String checkCurrentDocAndProcessSelectPage(String providerName, String listName, Boolean selection, String currentDocRef) throws ClientException
DocumentActions
checkCurrentDocAndProcessSelectPage
in interface DocumentActions
ClientException
- if currentDocRef is not a valid document@WebRemote public String processSelectPage(String providerName, String listName, Boolean selection)
processSelectPage
in interface DocumentActions
public boolean getWriteRight() throws ClientException
DocumentActions
getWriteRight
in interface DocumentActions
true
if the user has WRITE permission on current
documentClientException
public String getComment()
DocumentActions
getComment
in interface DocumentActions
public void setComment(String comment)
DocumentActions
setComment
in interface DocumentActions
public boolean getCanUnpublish()
DocumentActions
getCanUnpublish
in interface DocumentActions
@Observer(value="beforeDocumentChanged") public void followTransition(DocumentModel changedDocument) throws ClientException
followTransition
in interface DocumentActions
ClientException
Copyright © 2011 Nuxeo SA. All Rights Reserved.