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
public class DeleteODFContentHelper extends AbstractLogEnabled implements Component, Serviceable
Helper to delete an ODF content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeleteODFContentHelper.DeleteModeEnumeration for the mode of deletion
-
Constructor Summary
Constructors Constructor Description DeleteODFContentHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>deleteContents(List<String> contentsId, String modeParam)Delete ODF contentsMap<String,Object>deleteContents(List<String> contentsId, String modeParam, boolean ignoreRights)Delete ODF contentsMap<String,Object>deleteContentsWithLog(List<String> contentsId, String modeParam)Delete ODF contentsMap<String,Object>deleteContentsWithLog(List<String> contentsId, String modeParam, boolean ignoreRights)Delete ODF contentsbooleanhasRight(Content content)Determines if the user has sufficient right for the given contentbooleanisContentReferenced(Content content)Test if content is still referenced before removing itvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
DeleteODFContentHelper
public DeleteODFContentHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
deleteContents
public Map<String,Object> deleteContents(List<String> contentsId, String modeParam)
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
public Map<String,Object> deleteContentsWithLog(List<String> contentsId, String modeParam)
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
public boolean isContentReferenced(Content content)
Test if content is still referenced before removing it- Parameters:
content- The content to remove- Returns:
- true if content is still referenced
-
-