@Name(value="deleteActions") @Scope(value=EVENT) @Install(precedence=10) public class DeleteActionsBean extends Object implements DeleteActions, Serializable
Modifier and Type | Field and Description |
---|---|
protected RepositoryLocation |
currentServerLocation |
protected Principal |
currentUser |
protected CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected LockActions |
lockActions |
protected Map<String,String> |
messages |
protected NavigationContext |
navigationContext |
protected static int |
OP_DELETE |
protected static int |
OP_PURGE |
protected static int |
OP_UNDELETE |
protected TrashManager |
trashManager |
protected TrashService |
trashService |
protected WebActions |
webActions |
Constructor and Description |
---|
DeleteActionsBean() |
Modifier and Type | Method and Description |
---|---|
protected String |
actOnSelection(int op,
List<DocumentModel> docs) |
boolean |
checkDeletePermOnParents(List<DocumentModel> docs) |
void |
create() |
String |
deleteSelection()
Moves to trash (delete state) the selected documents.
|
String |
deleteSelection(List<DocumentModel> docs)
Moves to trash (delete state) the documents.
|
String |
deleteSelectionSections()
Moves to trash (delete state) the selected sections.
|
void |
destroy() |
String |
emptyTrash() |
List<Action> |
getActionsForTrashSelection() |
boolean |
getCanDelete() |
boolean |
getCanDelete(String listName) |
boolean |
getCanDeleteItem(DocumentModel container) |
boolean |
getCanDeleteSections() |
boolean |
getCanEmptyTrash() |
boolean |
getCanPurge() |
boolean |
getCanRestoreCurrentDoc()
Checks if the document is "deleted".
|
protected TrashService |
getTrashService() |
boolean |
isTrashManagementEnabled() |
String |
purgeSelection()
Definitively deletes selected documents.
|
String |
purgeSelection(List<DocumentModel> docs)
Definitively deletes param documents.
|
String |
purgeSelection(String listName)
Definitively deletes selected documents of the given
listName . |
boolean |
restoreActionDisplay() |
void |
restoreCurrentDocument()
Undeletes the current document and its children and his deleted parents.
|
String |
undeleteSelection()
Undeletes the selected documents from trash (recycle bin).
|
String |
undeleteSelection(List<DocumentModel> docs)
Undeletes the args docs from trash (recycle bin).
|
@In(create=true, required=false) protected org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true, required=false) protected transient CoreSession documentManager
@In(create=true, required=false) protected RepositoryLocation currentServerLocation
@In(create=true) protected transient DocumentsListsManager documentsListsManager
@In(create=true) protected NavigationContext navigationContext
@In(create=true) protected transient TrashManager trashManager
@In(create=true) protected transient LockActions lockActions
@In(create=true) protected transient WebActions webActions
@In protected transient Principal currentUser
protected transient TrashService trashService
protected static final int OP_DELETE
protected static final int OP_PURGE
protected static final int OP_UNDELETE
public DeleteActionsBean()
protected TrashService getTrashService()
public boolean getCanDeleteItem(DocumentModel container)
getCanDeleteItem
in interface DeleteActions
public boolean getCanDelete()
getCanDelete
in interface DeleteActions
public boolean getCanDelete(String listName)
getCanDelete
in interface DeleteActions
public boolean getCanDeleteSections()
getCanDeleteSections
in interface DeleteActions
public boolean getCanPurge()
getCanPurge
in interface DeleteActions
public boolean getCanEmptyTrash()
public boolean checkDeletePermOnParents(List<DocumentModel> docs)
checkDeletePermOnParents
in interface DeleteActions
public String deleteSelection()
DeleteActions
deleteSelection
in interface DeleteActions
public String deleteSelectionSections()
DeleteActions
deleteSelectionSections
in interface DeleteActions
public String deleteSelection(List<DocumentModel> docs)
DeleteActions
deleteSelection
in interface DeleteActions
public String emptyTrash()
public String purgeSelection()
DeleteActions
purgeSelection
in interface DeleteActions
public String purgeSelection(String listName)
DeleteActions
listName
.purgeSelection
in interface DeleteActions
public String purgeSelection(List<DocumentModel> docs)
DeleteActions
purgeSelection
in interface DeleteActions
public String undeleteSelection()
DeleteActions
undeleteSelection
in interface DeleteActions
public String undeleteSelection(List<DocumentModel> docs)
DeleteActions
undeleteSelection
in interface DeleteActions
protected String actOnSelection(int op, List<DocumentModel> docs)
public boolean isTrashManagementEnabled()
isTrashManagementEnabled
in interface DeleteActions
public List<Action> getActionsForTrashSelection()
public void create()
create
in interface DeleteActions
public void destroy()
destroy
in interface DeleteActions
public void restoreCurrentDocument()
DeleteActions
restoreCurrentDocument
in interface DeleteActions
public boolean getCanRestoreCurrentDoc()
DeleteActions
getCanRestoreCurrentDoc
in interface DeleteActions
public boolean restoreActionDisplay()
Copyright © 2015 Nuxeo SA. All rights reserved.