Package org.ametys.odf.helper
Class DeleteODFContentHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.helper.DeleteODFContentHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Helper to delete an ODF content.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration for the mode of deletion -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteContents
(List<String> contentsId, String modeParam) Delete ODF contentsdeleteContents
(List<String> contentsId, String modeParam, boolean ignoreRights) Delete ODF contentsdeleteContentsWithLog
(List<String> contentsId, String modeParam) Delete ODF contentsdeleteContentsWithLog
(List<String> contentsId, String modeParam, boolean ignoreRights) Delete ODF contentsboolean
Determines if the user has sufficient right for the given contentboolean
isContentReferenced
(Content content) Test if content is still referenced before removing itvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon role.
-
-
Constructor Details
-
DeleteODFContentHelper
public DeleteODFContentHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
deleteContents
Delete ODF contents- Parameters:
contentsId
- The ids of contents to deletemodeParam
- The mode of deletion- Returns:
- the deleted and undeleted contents
-
deleteContents
public Map<String,Object> deleteContents(List<String> contentsId, String modeParam, boolean ignoreRights) Delete ODF contents- Parameters:
contentsId
- The ids of contents to deletemodeParam
- The mode of deletionignoreRights
- If true, bypass the rights check during the deletion- Returns:
- the deleted and undeleted contents
-
deleteContentsWithLog
Delete ODF contents- Parameters:
contentsId
- The ids of contents to deletemodeParam
- The mode of deletion- Returns:
- the deleted and undeleted contents
-
deleteContentsWithLog
public Map<String,Object> deleteContentsWithLog(List<String> contentsId, String modeParam, boolean ignoreRights) Delete ODF contents- Parameters:
contentsId
- The ids of contents to deletemodeParam
- The mode of deletionignoreRights
- If true, bypass the rights check during the deletion- Returns:
- the deleted and undeleted contents
-
isContentReferenced
Test if content is still referenced before removing it- Parameters:
content
- The content to remove- Returns:
- true if content is still referenced
-
hasRight
Determines if the user has sufficient right for the given content- Parameters:
content
- the content- Returns:
- true if user has sufficient right
-