@Name(value="clipboardActions") @Scope(value=SESSION) public class ClipboardActionsBean extends Object implements ClipboardActions, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected org.jboss.seam.international.LocaleSelector |
localeSelector |
protected Map<String,String> |
messages |
protected NavigationContext |
navigationContext |
protected TypeManager |
typeManager |
protected WebActions |
webActions |
protected String |
workListDocId |
| Constructor and Description |
|---|
ClipboardActionsBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addWarnMessage(StringBuilder sb,
DocumentModel doc) |
protected boolean |
checkDeletedState(DocumentModel doc) |
String |
clearWorkingList()
Called when the "delete all" button is clicked on the clipboard.
|
void |
copySelection(List<DocumentModel> copiedDocs)
Deprecated.
|
boolean |
exists(DocumentRef ref) |
String |
exportAllBlobsFromWorkingListAsZip() |
String |
exportMainBlobFromWorkingListAsZip() |
String |
exportWorklistAsZip() |
String |
exportWorklistAsZip(DocumentModel document) |
String |
exportWorklistAsZip(List<DocumentModel> documents) |
String |
exportWorklistAsZip(List<DocumentModel> documents,
boolean exportAllBlobs) |
boolean |
factoryForIsCurrentWorkListEmpty() |
List<Action> |
getActionsForCurrentList()
Returns the list of available web actions for the currently selected DocumentList.
|
List<Action> |
getActionsForSelection()
Returns the list of available web actions for the currently selected Documents.
|
List<String> |
getAvailableLists()
Returns the list of available lists (ie: the lists from the CLIPBOARD Category).
|
String |
getCacheKey() |
boolean |
getCanCopy()
Checks if copy action is available in the context of the current Document.
|
boolean |
getCanEditListDocs(String listName)
Deprecated.
|
boolean |
getCanEditSelectedDocs()
Checks for documents bulk editing action.
|
boolean |
getCanMove(String listName)
Checks if the Move action is available in the context of the current Document.
|
boolean |
getCanMoveFromClipboardInside(DocumentModel document)
Checks if the documents from the clipboard can be moved into the given document
|
boolean |
getCanMoveInside(String listName,
DocumentModel document)
Checks if the Move action is available in the context of the document document.
|
boolean |
getCanMoveWorkingList()
Checks if there are documents in current worklist can be moved into the current folder.
|
boolean |
getCanPaste(String listName)
Checks if the Paste action is available in the context of the current Document.
|
boolean |
getCanPasteFromClipboard()
Shortcut for getCanPaste on the clipboard.
|
boolean |
getCanPasteFromClipboardInside(DocumentModel document) |
boolean |
getCanPasteInside(String listName,
DocumentModel document) |
boolean |
getCanPasteWorkList()
Shortcut for getCanPaste on the currently selected workList.
|
List<DocumentModel> |
getCurrentSelectedList()
Retries contents of current WorkList.
|
String |
getCurrentSelectedListName()
Returns the name of the current selected WorkList.
|
String |
getCurrentSelectedListTitle() |
List<DocumentsListDescriptor> |
getDescriptorsForAvailableLists()
Returns the list of Descriptors for available lists.
|
protected DocumentModel |
getParent(DocumentModel currentDocument)
Gets the parent document under the paste should be performed.
|
boolean |
isCacheEnabled() |
boolean |
isCacheEnabledForSelection() |
boolean |
isInitialized() |
protected boolean |
isPublishSpace(DocumentModel container)
Check if the container is a publish space.
|
boolean |
isWorkListEmpty()
Checks if the currently selected WorkList is empty.
|
String |
moveClipboardInside(String docId) |
String |
moveDocumentList(String listName) |
String |
moveDocumentList(String listName,
String docId) |
List<DocumentModel> |
moveDocumentsToNewParent(DocumentModel destFolder,
List<DocumentModel> docs) |
String |
moveWorkingList()
Called when the "move all" button is clicked on the clipboard/selection
|
String |
pasteClipboard() |
String |
pasteClipboardInside(String docId) |
String |
pasteDocumentList(List<DocumentModel> docPaste)
Called when the drag and drop is launched in the body fragment.
|
String |
pasteDocumentList(String listName)
Pastes the content of the list listName into the current context document.
|
String |
pasteDocumentListInside(List<DocumentModel> docPaste,
String docId) |
String |
pasteDocumentListInside(String listName,
String docId) |
String |
pasteWorkingList()
Called when the "paste all" button is clicked on the clipboard.
|
void |
putInClipboard(String docId) |
void |
putSelectionInClipboard() |
void |
putSelectionInDefaultWorkList() |
void |
putSelectionInWorkList()
Copies the lists of selected documents into the current WorkList.
|
void |
putSelectionInWorkList(Boolean forceAppend) |
void |
putSelectionInWorkList(List<DocumentModel> docsList)
Copies docsList into the current WorkList.
|
void |
putSelectionInWorkList(List<DocumentModel> docsList,
Boolean forceAppend) |
protected List<DocumentModel> |
recreateDocumentsWithNewParent(DocumentModel parent,
List<DocumentModel> documents)
Creates the documents in the backend under the target parent.
|
void |
releaseClipboardableDocuments() |
String |
removeWorkListItem(DocumentRef ref)
Called when the delete button is clicked on the clipboard.
|
void |
selectList() |
void |
setCurrentSelectedList(String listId)
Sets the current selected WorkList.
|
protected void |
setDeleteState(DocumentModel doc) |
@In(create=true,
required=false)
protected org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true,
required=false)
protected transient CoreSession documentManager
@In(create=true) protected transient DocumentsListsManager documentsListsManager
@In(create=true) protected TypeManager typeManager
@In(create=true) protected NavigationContext navigationContext
@In(create=true) protected transient WebActions webActions
@In(create=true) protected transient org.jboss.seam.international.LocaleSelector localeSelector
@RequestParameter protected String workListDocId
public ClipboardActionsBean()
public void releaseClipboardableDocuments()
releaseClipboardableDocuments in interface ClipboardActionspublic boolean isInitialized()
isInitialized in interface ClipboardActionspublic void putSelectionInWorkList(Boolean forceAppend)
putSelectionInWorkList in interface ClipboardActionspublic void putSelectionInWorkList()
ClipboardActionsputSelectionInWorkList in interface ClipboardActionspublic void putSelectionInDefaultWorkList()
putSelectionInDefaultWorkList in interface ClipboardActions@WebRemote public void putInClipboard(String docId)
putInClipboard in interface ClipboardActionspublic void putSelectionInClipboard()
putSelectionInClipboard in interface ClipboardActionspublic void putSelectionInWorkList(List<DocumentModel> docsList)
ClipboardActionsputSelectionInWorkList in interface ClipboardActionspublic void putSelectionInWorkList(List<DocumentModel> docsList, Boolean forceAppend)
putSelectionInWorkList in interface ClipboardActions@Deprecated public void copySelection(List<DocumentModel> copiedDocs)
ClipboardActionsThe selection is added to the clipboard and to the WorkingList.
copySelection in interface ClipboardActionscopiedDocs - the list of documents we want to copypublic boolean exists(DocumentRef ref)
public String removeWorkListItem(DocumentRef ref)
ClipboardActionsremoveWorkListItem in interface ClipboardActionspublic String clearWorkingList()
ClipboardActionsclearWorkingList in interface ClipboardActionspublic String pasteDocumentList(String listName)
ClipboardActionspasteDocumentList in interface ClipboardActionspublic String pasteDocumentListInside(String listName, String docId)
pasteDocumentListInside in interface ClipboardActionspublic String pasteDocumentList(List<DocumentModel> docPaste)
ClipboardActionspasteDocumentList in interface ClipboardActionsdocPaste - the list of doc we want to pastepublic String pasteDocumentListInside(List<DocumentModel> docPaste, String docId)
pasteDocumentListInside in interface ClipboardActionspublic List<DocumentModel> moveDocumentsToNewParent(DocumentModel destFolder, List<DocumentModel> docs)
public String moveDocumentList(String listName, String docId)
public String moveDocumentList(String listName)
public String moveWorkingList()
ClipboardActionsmoveWorkingList in interface ClipboardActionspublic String pasteWorkingList()
ClipboardActionspasteWorkingList in interface ClipboardActionspublic String pasteClipboard()
pasteClipboard in interface ClipboardActions@WebRemote public String pasteClipboardInside(String docId)
pasteClipboardInside in interface ClipboardActions@WebRemote public String moveClipboardInside(String docId)
moveClipboardInside in interface ClipboardActionsprotected List<DocumentModel> recreateDocumentsWithNewParent(DocumentModel parent, List<DocumentModel> documents)
protected boolean checkDeletedState(DocumentModel doc)
protected void setDeleteState(DocumentModel doc)
protected void addWarnMessage(StringBuilder sb, DocumentModel doc)
protected boolean isPublishSpace(DocumentModel container)
protected DocumentModel getParent(DocumentModel currentDocument)
Rules:
In general the currentDocument is the parent. Exceptions to this rule: when the currentDocument is a domain or null. If Domain then content root is the parent. If null is passed, then the JCR root is taken as parent.
@Factory(value="isCurrentWorkListEmpty",
scope=EVENT)
public boolean factoryForIsCurrentWorkListEmpty()
factoryForIsCurrentWorkListEmpty in interface ClipboardActionspublic boolean isWorkListEmpty()
ClipboardActionsisWorkListEmpty in interface ClipboardActionspublic String exportWorklistAsZip()
exportWorklistAsZip in interface ClipboardActionspublic String exportAllBlobsFromWorkingListAsZip()
exportAllBlobsFromWorkingListAsZip in interface ClipboardActionspublic String exportMainBlobFromWorkingListAsZip()
exportMainBlobFromWorkingListAsZip in interface ClipboardActionspublic String exportWorklistAsZip(List<DocumentModel> documents)
exportWorklistAsZip in interface ClipboardActionspublic String exportWorklistAsZip(DocumentModel document)
public boolean getCanCopy()
Condition: the list of selected documents is not empty.
getCanCopy in interface ClipboardActionspublic boolean getCanPaste(String listName)
getCanPaste in interface ClipboardActionspublic boolean getCanPasteInside(String listName, DocumentModel document)
getCanPasteInside in interface ClipboardActionspublic boolean getCanMoveInside(String listName, DocumentModel document)
getCanMoveInside in interface ClipboardActionspublic boolean getCanMove(String listName)
public boolean getCanPasteWorkList()
ClipboardActionsgetCanPasteWorkList in interface ClipboardActionspublic boolean getCanMoveWorkingList()
ClipboardActionsgetCanMoveWorkingList in interface ClipboardActionspublic boolean getCanPasteFromClipboard()
ClipboardActionsgetCanPasteFromClipboard in interface ClipboardActionspublic boolean getCanPasteFromClipboardInside(DocumentModel document)
getCanPasteFromClipboardInside in interface ClipboardActionspublic boolean getCanMoveFromClipboardInside(DocumentModel document)
ClipboardActionsgetCanMoveFromClipboardInside in interface ClipboardActionspublic void setCurrentSelectedList(String listId)
ClipboardActionssetCurrentSelectedList in interface ClipboardActionspublic void selectList()
selectList in interface ClipboardActionspublic List<DocumentModel> getCurrentSelectedList()
ClipboardActionsgetCurrentSelectedList in interface ClipboardActionspublic String getCurrentSelectedListName()
ClipboardActionsgetCurrentSelectedListName in interface ClipboardActionspublic String getCurrentSelectedListTitle()
getCurrentSelectedListTitle in interface ClipboardActionspublic List<String> getAvailableLists()
ClipboardActionsgetAvailableLists in interface ClipboardActionspublic List<DocumentsListDescriptor> getDescriptorsForAvailableLists()
ClipboardActionsgetDescriptorsForAvailableLists in interface ClipboardActionspublic List<Action> getActionsForCurrentList()
ClipboardActionsgetActionsForCurrentList in interface ClipboardActionspublic List<Action> getActionsForSelection()
ClipboardActionsgetActionsForSelection in interface ClipboardActionspublic boolean getCanEditSelectedDocs()
ClipboardActionsgetCanEditSelectedDocs in interface ClipboardActionstrue if the current selected docs (from clipboard) are editable by the current user@Deprecated public boolean getCanEditListDocs(String listName)
ClipboardActionsgetCanEditListDocs in interface ClipboardActionstrue if the docs from the specified working list are editable by the current userpublic boolean isCacheEnabled()
isCacheEnabled in interface ClipboardActionspublic String getCacheKey()
getCacheKey in interface ClipboardActionspublic boolean isCacheEnabledForSelection()
isCacheEnabledForSelection in interface ClipboardActionspublic String exportWorklistAsZip(List<DocumentModel> documents, boolean exportAllBlobs)
exportWorklistAsZip in interface ClipboardActionsCopyright © 2019 Nuxeo. All rights reserved.