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.
  • Field Details

    • ROLE

      public static final String ROLE
      Avalon role.
  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • deleteContents

      public Map<String,Object> deleteContents(List<String> contentsId, String modeParam)
      Delete ODF contents
      Parameters:
      contentsId - The ids of contents to delete
      modeParam - 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 delete
      modeParam - The mode of deletion
      ignoreRights - 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 delete
      modeParam - 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 delete
      modeParam - The mode of deletion
      ignoreRights - 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
    • hasRight

      public boolean hasRight(Content content)
      Determines if the user has sufficient right for the given content
      Parameters:
      content - the content
      Returns:
      true if user has sufficient right