Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.action
Class DeleteActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.webapp.base.InputController
      extended by org.nuxeo.ecm.webapp.action.DeleteActionsBean
All Implemented Interfaces:
Serializable, EventListener, ResultsProviderFarm, SelectDataModelListener, DeleteActions

@Name(value="deleteActions")
@Scope(value=EVENT)
@Install(precedence=10)
public class DeleteActionsBean
extends InputController
implements DeleteActions, Serializable, SelectDataModelListener, ResultsProviderFarm

See Also:
Serialized Form

Field Summary
static String BOARD_USER_DELETED
           
static String DELETE_OUTCOME
           
static String DELETED_CHILDREN_BY_COREAPI
           
 
Constructor Summary
DeleteActionsBean()
           
 
Method Summary
 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()
           
 List<Action> getActionsForTrashSelection()
           
 boolean getCanDelete()
           
 boolean getCanDeleteItem(DocumentModel container)
           
 boolean getCanDeleteSections()
           
 boolean getCanPurge()
           
 boolean getCanRestoreCurrentDoc()
          Checks if the document is "deleted".
 DocumentModelList getCurrentDocumentDeletedChildrenPage()
           
 SelectDataModel getDeletedChildrenSelectModel()
           
 PagedDocumentsProvider getResultsProvider(String name)
          Makes a new, fresh instance of the named results provider.
 PagedDocumentsProvider getResultsProvider(String name, SortInfo sortInfo)
           
 Boolean getSearchDeletedDocuments()
           
 boolean isTrashManagementEnabled()
           
 void processSelectRowEvent(SelectDataModelRowEvent event)
          Listener method - not used for now because the binding is not used but might be used after the refactoring.
 String purgeSelection()
          Definitively deletes selected documents.
 String purgeSelection(List<DocumentModel> docs)
          Definitively deletes param documents.
 void resetProviderCache()
           
 void restoreCurrentDocument()
          Undeletes the current document and its children and his deleted parents.
 void setSearchDeletedDocuments(Boolean searchDeletedDocuments)
           
 String undeleteSelection()
          Undeletes the selected documents from trash (recycle bin).
 String undeleteSelection(List<DocumentModel> docs)
          Undeletes the args docs from trash (recycle bin).
 
Methods inherited from class org.nuxeo.ecm.webapp.base.InputController
computeOutcome, getAdministrator, logDocumentWithName, logDocumentWithTitle, removeDocumentFromList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETED_CHILDREN_BY_COREAPI

public static final String DELETED_CHILDREN_BY_COREAPI
See Also:
Constant Field Values

BOARD_USER_DELETED

public static final String BOARD_USER_DELETED
See Also:
Constant Field Values

DELETE_OUTCOME

public static final String DELETE_OUTCOME
See Also:
Constant Field Values
Constructor Detail

DeleteActionsBean

public DeleteActionsBean()
Method Detail

getCanDeleteItem

public boolean getCanDeleteItem(DocumentModel container)
                         throws ClientException
Specified by:
getCanDeleteItem in interface DeleteActions
Throws:
ClientException

getCanDelete

public boolean getCanDelete()
Specified by:
getCanDelete in interface DeleteActions

getCanDeleteSections

public boolean getCanDeleteSections()
Specified by:
getCanDeleteSections in interface DeleteActions

getCanPurge

public boolean getCanPurge()
                    throws ClientException
Specified by:
getCanPurge in interface DeleteActions
Throws:
ClientException

checkDeletePermOnParents

public boolean checkDeletePermOnParents(List<DocumentModel> docs)
Specified by:
checkDeletePermOnParents in interface DeleteActions

deleteSelection

public String deleteSelection()
                       throws ClientException
Description copied from interface: DeleteActions
Moves to trash (delete state) the selected documents.

Specified by:
deleteSelection in interface DeleteActions
Throws:
ClientException

deleteSelectionSections

public String deleteSelectionSections()
                               throws ClientException
Description copied from interface: DeleteActions
Moves to trash (delete state) the selected sections.

Specified by:
deleteSelectionSections in interface DeleteActions
Throws:
ClientException

deleteSelection

public String deleteSelection(List<DocumentModel> docs)
                       throws ClientException
Description copied from interface: DeleteActions
Moves to trash (delete state) the documents.

Specified by:
deleteSelection in interface DeleteActions
Throws:
ClientException

purgeSelection

public String purgeSelection()
                      throws ClientException
Description copied from interface: DeleteActions
Definitively deletes selected documents.

Specified by:
purgeSelection in interface DeleteActions
Throws:
ClientException

purgeSelection

public String purgeSelection(List<DocumentModel> docs)
                      throws ClientException
Description copied from interface: DeleteActions
Definitively deletes param documents.

Specified by:
purgeSelection in interface DeleteActions
Throws:
ClientException

undeleteSelection

public String undeleteSelection()
                         throws ClientException
Description copied from interface: DeleteActions
Undeletes the selected documents from trash (recycle bin).

Specified by:
undeleteSelection in interface DeleteActions
Throws:
ClientException

undeleteSelection

public String undeleteSelection(List<DocumentModel> docs)
                         throws ClientException
Description copied from interface: DeleteActions
Undeletes the args docs from trash (recycle bin).

Specified by:
undeleteSelection in interface DeleteActions
Throws:
ClientException

isTrashManagementEnabled

public boolean isTrashManagementEnabled()
Specified by:
isTrashManagementEnabled in interface DeleteActions

getDeletedChildrenSelectModel

public SelectDataModel getDeletedChildrenSelectModel()
                                              throws ClientException
Specified by:
getDeletedChildrenSelectModel in interface DeleteActions
Throws:
ClientException

getCurrentDocumentDeletedChildrenPage

public DocumentModelList getCurrentDocumentDeletedChildrenPage()
                                                        throws ClientException
Specified by:
getCurrentDocumentDeletedChildrenPage in interface DeleteActions
Throws:
ClientException

processSelectRowEvent

public void processSelectRowEvent(SelectDataModelRowEvent event)
Listener method - not used for now because the binding is not used but might be used after the refactoring.

Specified by:
processSelectRowEvent in interface SelectDataModelListener

getActionsForTrashSelection

public List<Action> getActionsForTrashSelection()

create

public void create()
Specified by:
create in interface DeleteActions

destroy

public void destroy()
Specified by:
destroy in interface DeleteActions

getResultsProvider

public PagedDocumentsProvider getResultsProvider(String name)
                                          throws ClientException,
                                                 ResultsProviderFarmUserException
Description copied from interface: ResultsProviderFarm
Makes a new, fresh instance of the named results provider.

Specified by:
getResultsProvider in interface ResultsProviderFarm
Parameters:
name - the name of the ResultsProvider instance to create
Returns:
a PagedDocumentsProvider
Throws:
ClientException
ResultsProviderFarmUserException

getResultsProvider

public PagedDocumentsProvider getResultsProvider(String name,
                                                 SortInfo sortInfo)
                                          throws ClientException,
                                                 ResultsProviderFarmUserException
Specified by:
getResultsProvider in interface ResultsProviderFarm
Parameters:
name - the name of the ResultsProvider instance to create
sortInfo - an object containing the sort details
Throws:
ClientException
ResultsProviderFarmUserException

getSearchDeletedDocuments

public Boolean getSearchDeletedDocuments()
Specified by:
getSearchDeletedDocuments in interface DeleteActions
Returns:
the searchDeletedDocuments.

setSearchDeletedDocuments

public void setSearchDeletedDocuments(Boolean searchDeletedDocuments)
                               throws ClientException
Specified by:
setSearchDeletedDocuments in interface DeleteActions
Parameters:
searchDeletedDocuments - the searchDeletedDocuments to set.
Throws:
ClientException

restoreCurrentDocument

public void restoreCurrentDocument()
                            throws ClientException
Description copied from interface: DeleteActions
Undeletes the current document and its children and his deleted parents.

Specified by:
restoreCurrentDocument in interface DeleteActions
Throws:
ClientException

getCanRestoreCurrentDoc

public boolean getCanRestoreCurrentDoc()
                                throws ClientException
Description copied from interface: DeleteActions
Checks if the document is "deleted".

Specified by:
getCanRestoreCurrentDoc in interface DeleteActions
Throws:
ClientException

resetProviderCache

@Observer(value="folderishDocumentSelectionChanged")
@BypassInterceptors
public void resetProviderCache()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.