public class DeleteOrgUnitComponent extends AbstractDeleteUDContentComponent
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected ContentWorkflowHelper |
_contentWorkflowHelper
The content workflow helper
|
protected I18nUtils |
_i18nUtils
The i18n utils
|
protected OrganisationChartPageHandler |
_oCPageHandler
The organisation chart page handler
|
static String |
ROLE
The avalon role.
|
_currentUserProvider, _observationManager, _removeReferenceActionId, _resolver, _smartHelper, _solrIndexer
Constructor and Description |
---|
DeleteOrgUnitComponent() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_checkBeforeDeletion(Content content,
Map<String,String> rights,
Map<String,Object> results,
Logger logger)
Check that deletion can be performed without blocking errors
|
protected boolean |
_checkChildrenBeforeDeletion(Content contentToCheck,
Map<String,String> rights,
Map<String,Object> results,
Logger logger)
Browse children to check if deletion could succeed
|
protected boolean |
_checkParentBeforeDeletion(Content content,
Map<String,Object> results)
True if the parent content is not locked
|
protected boolean |
_checkUsersBeforeDeletion(Content content,
Map<String,Object> results)
True if the users content is not locked
|
protected Set<String> |
_getContentIdsToDelete(Content content,
Map<String,String> rights,
Map<String,Object> results,
Logger logger)
Get the id of children to be deleted.
|
protected boolean |
_removeRelations(Content content,
Logger logger)
Remove relations
|
protected boolean |
_removeUsersRelation(Content content,
Logger logger)
Remove users relation
|
boolean |
isContentReferenced(Content content,
Logger logger)
True if the content is referenced
|
void |
service(ServiceManager smanager) |
_canDeleteContent, _commitAllChanges, _deleteContent, _finalizeDeleteContents, _getEventParametersForDeletion, _hasRight, _isLocked, _processContentDeletion, configure, deleteContents, deleteContentsWithLog
protected OrganisationChartPageHandler _oCPageHandler
protected ContentHelper _contentHelper
protected I18nUtils _i18nUtils
protected ContentWorkflowHelper _contentWorkflowHelper
public DeleteOrgUnitComponent()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class AbstractDeleteUDContentComponent
ServiceException
public boolean isContentReferenced(Content content, Logger logger)
AbstractDeleteUDContentComponent
isContentReferenced
in class AbstractDeleteUDContentComponent
content
- the contentlogger
- The loggerprotected boolean _checkBeforeDeletion(Content content, Map<String,String> rights, Map<String,Object> results, Logger logger)
AbstractDeleteUDContentComponent
_checkBeforeDeletion
in class AbstractDeleteUDContentComponent
content
- The initial content to deleterights
- the map of rights id with its prefixresults
- The resultslogger
- The loggerprotected boolean _checkParentBeforeDeletion(Content content, Map<String,Object> results)
content
- the contentresults
- the results mapprotected boolean _checkUsersBeforeDeletion(Content content, Map<String,Object> results)
content
- the contentresults
- the results mapprotected boolean _checkChildrenBeforeDeletion(Content contentToCheck, Map<String,String> rights, Map<String,Object> results, Logger logger)
contentToCheck
- The current content to checkresults
- The resultrights
- the map of rights id with its prefixlogger
- The loggerprotected boolean _removeRelations(Content content, Logger logger)
AbstractDeleteUDContentComponent
_removeRelations
in class AbstractDeleteUDContentComponent
content
- the contentlogger
- The loggertrue
if all relations have been removedprotected Set<String> _getContentIdsToDelete(Content content, Map<String,String> rights, Map<String,Object> results, Logger logger)
AbstractDeleteUDContentComponent
_getContentIdsToDelete
in class AbstractDeleteUDContentComponent
content
- The content to deleterights
- the map of rights id with its prefixresults
- The resultslogger
- The loggerprotected boolean _removeUsersRelation(Content content, Logger logger)
content
- the orgunit contentlogger
- The logger