@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 ClipboardActions
public boolean isInitialized()
isInitialized
in interface ClipboardActions
public void putSelectionInWorkList(Boolean forceAppend)
putSelectionInWorkList
in interface ClipboardActions
public void putSelectionInWorkList()
ClipboardActions
putSelectionInWorkList
in interface ClipboardActions
public void putSelectionInDefaultWorkList()
putSelectionInDefaultWorkList
in interface ClipboardActions
@WebRemote public void putInClipboard(String docId)
putInClipboard
in interface ClipboardActions
public void putSelectionInClipboard()
putSelectionInClipboard
in interface ClipboardActions
public void putSelectionInWorkList(List<DocumentModel> docsList)
ClipboardActions
putSelectionInWorkList
in interface ClipboardActions
public void putSelectionInWorkList(List<DocumentModel> docsList, Boolean forceAppend)
putSelectionInWorkList
in interface ClipboardActions
@Deprecated public void copySelection(List<DocumentModel> copiedDocs)
ClipboardActions
The selection is added to the clipboard and to the WorkingList.
copySelection
in interface ClipboardActions
copiedDocs
- the list of documents we want to copypublic boolean exists(DocumentRef ref)
public String removeWorkListItem(DocumentRef ref)
ClipboardActions
removeWorkListItem
in interface ClipboardActions
public String clearWorkingList()
ClipboardActions
clearWorkingList
in interface ClipboardActions
public String pasteDocumentList(String listName)
ClipboardActions
pasteDocumentList
in interface ClipboardActions
public String pasteDocumentListInside(String listName, String docId)
pasteDocumentListInside
in interface ClipboardActions
public String pasteDocumentList(List<DocumentModel> docPaste)
ClipboardActions
pasteDocumentList
in interface ClipboardActions
docPaste
- the list of doc we want to pastepublic String pasteDocumentListInside(List<DocumentModel> docPaste, String docId)
pasteDocumentListInside
in interface ClipboardActions
public List<DocumentModel> moveDocumentsToNewParent(DocumentModel destFolder, List<DocumentModel> docs)
public String moveDocumentList(String listName, String docId)
public String moveDocumentList(String listName)
public String moveWorkingList()
ClipboardActions
moveWorkingList
in interface ClipboardActions
public String pasteWorkingList()
ClipboardActions
pasteWorkingList
in interface ClipboardActions
public 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 ClipboardActions
protected 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 ClipboardActions
public boolean isWorkListEmpty()
ClipboardActions
isWorkListEmpty
in interface ClipboardActions
public String exportWorklistAsZip()
exportWorklistAsZip
in interface ClipboardActions
public String exportAllBlobsFromWorkingListAsZip()
exportAllBlobsFromWorkingListAsZip
in interface ClipboardActions
public String exportMainBlobFromWorkingListAsZip()
exportMainBlobFromWorkingListAsZip
in interface ClipboardActions
public String exportWorklistAsZip(List<DocumentModel> documents)
exportWorklistAsZip
in interface ClipboardActions
public String exportWorklistAsZip(DocumentModel document)
public boolean getCanCopy()
Condition: the list of selected documents is not empty.
getCanCopy
in interface ClipboardActions
public boolean getCanPaste(String listName)
getCanPaste
in interface ClipboardActions
public boolean getCanPasteInside(String listName, DocumentModel document)
getCanPasteInside
in interface ClipboardActions
public boolean getCanMoveInside(String listName, DocumentModel document)
getCanMoveInside
in interface ClipboardActions
public boolean getCanMove(String listName)
public boolean getCanPasteWorkList()
ClipboardActions
getCanPasteWorkList
in interface ClipboardActions
public boolean getCanMoveWorkingList()
ClipboardActions
getCanMoveWorkingList
in interface ClipboardActions
public boolean getCanPasteFromClipboard()
ClipboardActions
getCanPasteFromClipboard
in interface ClipboardActions
public boolean getCanPasteFromClipboardInside(DocumentModel document)
getCanPasteFromClipboardInside
in interface ClipboardActions
public boolean getCanMoveFromClipboardInside(DocumentModel document)
ClipboardActions
getCanMoveFromClipboardInside
in interface ClipboardActions
public void setCurrentSelectedList(String listId)
ClipboardActions
setCurrentSelectedList
in interface ClipboardActions
public void selectList()
selectList
in interface ClipboardActions
public List<DocumentModel> getCurrentSelectedList()
ClipboardActions
getCurrentSelectedList
in interface ClipboardActions
public String getCurrentSelectedListName()
ClipboardActions
getCurrentSelectedListName
in interface ClipboardActions
public String getCurrentSelectedListTitle()
getCurrentSelectedListTitle
in interface ClipboardActions
public List<String> getAvailableLists()
ClipboardActions
getAvailableLists
in interface ClipboardActions
public List<DocumentsListDescriptor> getDescriptorsForAvailableLists()
ClipboardActions
getDescriptorsForAvailableLists
in interface ClipboardActions
public List<Action> getActionsForCurrentList()
ClipboardActions
getActionsForCurrentList
in interface ClipboardActions
public List<Action> getActionsForSelection()
ClipboardActions
getActionsForSelection
in interface ClipboardActions
public boolean getCanEditSelectedDocs()
ClipboardActions
getCanEditSelectedDocs
in interface ClipboardActions
true
if the current selected docs (from clipboard) are editable by the current user@Deprecated public boolean getCanEditListDocs(String listName)
ClipboardActions
getCanEditListDocs
in interface ClipboardActions
true
if the docs from the specified working list are editable by the current userpublic boolean isCacheEnabled()
isCacheEnabled
in interface ClipboardActions
public String getCacheKey()
getCacheKey
in interface ClipboardActions
public boolean isCacheEnabledForSelection()
isCacheEnabledForSelection
in interface ClipboardActions
public String exportWorklistAsZip(List<DocumentModel> documents, boolean exportAllBlobs)
exportWorklistAsZip
in interface ClipboardActions
Copyright © 2015 Nuxeo SA. All rights reserved.