@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
Deprecated.
since 5.6: default layout can now be defined on the nxl:documentLayout tag
|
static String |
LIFE_CYCLE_TRANSITION_KEY |
CHILDREN_DOCUMENT_LIST
Constructor and Description |
---|
DocumentActionsBean() |
Modifier and Type | Method and Description |
---|---|
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()
Deprecated.
|
void |
download(DocumentView docView)
Downloads file as described by given document view.
|
String |
downloadFromList()
Deprecated.
|
String |
editDocument()
Deprecated.
|
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() |
String |
getComment()
Deprecated.
|
String |
getCurrentDocumentSummaryLayout()
Deprecated.
|
Type |
getCurrentType() |
String |
getFileName(DocumentModel doc) |
boolean |
getWriteRight()
Checks the current document write permission.
|
String |
saveDocument()
Creates the document from the changeableDocument put in request.
|
String |
saveDocument(DocumentModel newDocument)
Creates the given document.
|
void |
setComment(String comment)
Deprecated.
|
String |
updateCurrentDocument()
Updates document considering that current document model holds edited values.
|
String |
updateDocument()
Deprecated.
|
String |
updateDocument(DocumentModel doc,
Boolean restoreCurrentTabs)
Saves changes held by the given document, and updates the current document context with the new version.
|
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
@Deprecated public static final String DEFAULT_SUMMARY_LAYOUT
public static final String LIFE_CYCLE_TRANSITION_KEY
@Deprecated @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
@Deprecated public String editDocument() throws ClientException
DocumentActions
editDocument
in interface DocumentActions
ClientException
public String getFileName(DocumentModel doc) throws ClientException
ClientException
@Deprecated 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.@Deprecated public String downloadFromList() throws ClientException
downloadFromList
in interface DocumentActions
ClientException
public String updateDocument(DocumentModel doc, Boolean restoreCurrentTabs) throws ClientException
DocumentActions
Makes it possible to specify whether current tabs should be restored or not after edition.
updateDocument
in interface DocumentActions
ClientException
public String updateCurrentDocument() throws ClientException
DocumentActions
updateCurrentDocument
in interface DocumentActions
ClientException
@Deprecated 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
public boolean getWriteRight() throws ClientException
DocumentActions
getWriteRight
in interface DocumentActions
true
if the user has WRITE permission on current documentClientException
@Deprecated public String getComment()
DocumentActions
getComment
in interface DocumentActions
@Deprecated 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 © 2015 Nuxeo SA. All rights reserved.