Package org.ametys.plugins.userdirectory
Class DeleteUserComponent
java.lang.Object
org.ametys.plugins.userdirectory.AbstractDeleteUDContentComponent
org.ametys.plugins.userdirectory.DeleteUserComponent
- All Implemented Interfaces:
Component,Configurable,Serviceable
Delete user component
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentHelperThe content helperprotected ContentWorkflowHelperThe content workflow helperprotected I18nUtilsThe i18n utilsprotected UserDirectoryHelperThe user directory helperstatic final StringThe avalon role.Fields inherited from class org.ametys.plugins.userdirectory.AbstractDeleteUDContentComponent
_currentUserProvider, _observationManager, _removeReferenceActionId, _resolver, _smartHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_checkBeforeDeletion(Content content, Map<String, String> rights, Map<String, Object> results, Logger logger) Check that deletion can be performed without blocking errorsprotected boolean_checkOrgUnitsBeforeDeletion(Content content, Map<String, Object> results) True if the parent content is not locked_getContentIdsToDelete(Content content, Map<String, Object> parameters, Map<String, String> rights, Map<String, Object> results, Logger logger) Get the id of children to be deleted.protected booleanRemove relationsbooleanisContentReferenced(Content content, Logger logger) True if the content is referencedvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.userdirectory.AbstractDeleteUDContentComponent
_canDeleteContent, _deleteContent, _finalizeDeleteContents, _getEventParametersForDeletion, _hasRight, _isLocked, _processContentDeletion, configure, deleteContents, deleteContentsWithLog
-
Field Details
-
ROLE
The avalon role. -
_udHelper
The user directory helper -
_contentHelper
The content helper -
_contentWorkflowHelper
The content workflow helper -
_i18nUtils
The i18n utils
-
-
Constructor Details
-
DeleteUserComponent
public DeleteUserComponent()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractDeleteUDContentComponent- Throws:
ServiceException
-
isContentReferenced
Description copied from class:AbstractDeleteUDContentComponentTrue if the content is referenced- Specified by:
isContentReferencedin classAbstractDeleteUDContentComponent- Parameters:
content- the contentlogger- The logger- Returns:
- true if the content is referenced
-
_checkBeforeDeletion
protected boolean _checkBeforeDeletion(Content content, Map<String, String> rights, Map<String, Object> results, Logger logger) Description copied from class:AbstractDeleteUDContentComponentCheck that deletion can be performed without blocking errors- Specified by:
_checkBeforeDeletionin classAbstractDeleteUDContentComponent- Parameters:
content- The initial content to deleterights- the map of rights id with its prefixresults- The resultslogger- The logger- Returns:
- true if the deletion can be performed
-
_checkOrgUnitsBeforeDeletion
True if the parent content is not locked- Parameters:
content- the parent contentresults- the results map- Returns:
- true if the parent content is not locked
-
_removeRelations
Description copied from class:AbstractDeleteUDContentComponentRemove relations- Specified by:
_removeRelationsin classAbstractDeleteUDContentComponent- Parameters:
content- the contentparameters- the additional parameterslogger- The logger- Returns:
trueif all relations have been removed
-
_getContentIdsToDelete
protected Set<String> _getContentIdsToDelete(Content content, Map<String, Object> parameters, Map<String, String> rights, Map<String, Object> results, Logger logger) Description copied from class:AbstractDeleteUDContentComponentGet the id of children to be deleted. All children shared with other contents which are not part of deletion, will be not deleted.- Specified by:
_getContentIdsToDeletein classAbstractDeleteUDContentComponent- Parameters:
content- The content to deleteparameters- the additional parametersrights- the map of rights id with its prefixresults- The resultslogger- The logger- Returns:
- The id of contents to be deleted
-