@Name(value="documentActions") @Scope(value=CONVERSATION) public class DocumentActionsBean extends InputController implements DocumentActions, Serializable
Modifier and Type | Field and Description |
---|---|
protected ActionContextProvider |
actionContextProvider |
static String |
BLOB_ACTIONS_CATEGORY |
protected String |
comment |
static String |
DEFAULT_SUMMARY_LAYOUT
Deprecated.
since 5.6: default layout can now be defined on the nxl:documentLayout tag
|
protected DeleteActions |
deleteActions |
protected CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected String |
fileFieldFullName |
protected String |
filename |
protected String |
filenameFieldFullName |
static String |
LIFE_CYCLE_TRANSITION_KEY |
protected Map<String,String> |
messages |
protected NavigationContext |
navigationContext |
protected String |
parentDocumentPath |
protected Boolean |
restoreCurrentTabs
Boolean request parameter used to restore current tabs (current tab and subtab) after edition.
|
protected WebActions |
webActions |
actionManager, currentDocument, currentUser, eventManager, facesMessages, resourcesAccessor, typeManager, typesTool
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.
|
void |
download(DocumentView docView)
Downloads file as described by given document view.
|
String |
downloadFromList()
Deprecated.
|
String |
editDocument()
Deprecated.
|
void |
followTransition(DocumentModel changedDocument) |
List<AppLink> |
getAppLinks(String docId,
String blobXPath) |
List<Action> |
getBlobActions(DocumentModel doc,
String blobXPath,
Blob blob) |
boolean |
getCanUnpublish()
This method is used to test whether the logged user has enough rights for the unpublish support.
|
boolean |
getCanUpdateMainBlob()
Checks if the main blob can be updated by a user-initiated action.
|
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.
|
protected String |
updateDocument(DocumentModel doc) |
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, extractReferences, getAdministrator, logDocumentWithName, logDocumentWithTitle, removeDocumentFromList, setFacesMessage
@Deprecated public static final String DEFAULT_SUMMARY_LAYOUT
public static final String LIFE_CYCLE_TRANSITION_KEY
public static final String BLOB_ACTIONS_CATEGORY
@In(create=true) protected transient NavigationContext navigationContext
@RequestParameter protected String fileFieldFullName
@RequestParameter protected String filenameFieldFullName
@In(create=true, required=false) protected transient CoreSession documentManager
@In(required=false, create=true) protected transient DocumentsListsManager documentsListsManager
@In(create=true) protected transient DeleteActions deleteActions
@In(create=true, required=false) protected transient ActionContextProvider actionContextProvider
@RequestParameter protected Boolean restoreCurrentTabs
This is useful when editing the document from a layout toggled to edit mode from summary-like page.
@In(create=true) protected transient WebActions webActions
@RequestParameter protected String parentDocumentPath
public DocumentActionsBean()
@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()
DocumentActions
editDocument
in interface DocumentActions
public String getFileName(DocumentModel doc)
public void download(DocumentView docView)
DocumentActions
To be used by url pattern descriptors performing a download.
download
in interface DocumentActions
docView
- the document view as generated through the url service@Deprecated public String downloadFromList()
downloadFromList
in interface DocumentActions
public String updateDocument(DocumentModel doc, Boolean restoreCurrentTabs)
DocumentActions
Makes it possible to specify whether current tabs should be restored or not after edition.
updateDocument
in interface DocumentActions
protected String updateDocument(DocumentModel doc)
public String updateCurrentDocument()
DocumentActions
updateCurrentDocument
in interface DocumentActions
@Deprecated public String updateDocument()
DocumentActions
updateDocument
in interface DocumentActions
public String updateDocumentAsNewVersion()
DocumentActions
updateDocumentAsNewVersion
in interface DocumentActions
public String createDocument()
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
public String createDocument(String typeName)
DocumentActions
Returns the create view of given document type.
createDocument
in interface DocumentActions
public String saveDocument()
DocumentActions
saveDocument
in interface DocumentActions
public String saveDocument(DocumentModel newDocument)
DocumentActions
saveDocument
in interface DocumentActions
public boolean getWriteRight()
DocumentActions
getWriteRight
in interface DocumentActions
true
if the user has WRITE permission on current document@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)
followTransition
in interface DocumentActions
public List<Action> getBlobActions(DocumentModel doc, String blobXPath, Blob blob)
@WebRemote public List<AppLink> getAppLinks(String docId, String blobXPath)
public boolean getCanUpdateMainBlob()
Copyright © 2015 Nuxeo SA. All rights reserved.