Class BaseTrashHandler

java.lang.Object
com.liferay.trash.BaseTrashHandler
All Implemented Interfaces:
com.liferay.portal.kernel.trash.TrashHandler

@ProviderType public abstract class BaseTrashHandler extends Object implements com.liferay.portal.kernel.trash.TrashHandler
Provides the base implementation of TrashHandler.
See Also:
  • TrashHandler
  • Constructor Details

    • BaseTrashHandler

      public BaseTrashHandler()
  • Method Details

    • addDeletionSystemEvent

      public com.liferay.portal.kernel.model.SystemEvent addDeletionSystemEvent(long userId, long groupId, long classPK, String classUuid, String referrerClassName) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      addDeletionSystemEvent in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkRestorableEntry

      public void checkRestorableEntry(long classPK, long containerModelId, String newName) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      checkRestorableEntry in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkRestorableEntry

      public void checkRestorableEntry(com.liferay.trash.kernel.model.TrashEntry trashEntry, long containerModelId, String newName) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      checkRestorableEntry in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getContainerModel

      public com.liferay.portal.kernel.model.ContainerModel getContainerModel(long containerModelId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getContainerModel in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getContainerModelClassName

      public String getContainerModelClassName(long classPK)
      Specified by:
      getContainerModelClassName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getContainerModelName

      public String getContainerModelName()
      Specified by:
      getContainerModelName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getContainerModels

      public List<com.liferay.portal.kernel.model.ContainerModel> getContainerModels(long classPK, long containerModelId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getContainerModels in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getContainerModelsCount

      public int getContainerModelsCount(long classPK, long containerModelId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getContainerModelsCount in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getDeleteMessage

      public String getDeleteMessage()
      Specified by:
      getDeleteMessage in interface com.liferay.portal.kernel.trash.TrashHandler
    • getDestinationContainerModelId

      public long getDestinationContainerModelId(long classPK, long destinationContainerModelId)
      Specified by:
      getDestinationContainerModelId in interface com.liferay.portal.kernel.trash.TrashHandler
    • getExcludeFilter

      public com.liferay.portal.kernel.search.filter.Filter getExcludeFilter(com.liferay.portal.kernel.search.SearchContext searchContext)
      Specified by:
      getExcludeFilter in interface com.liferay.portal.kernel.trash.TrashHandler
    • getParentContainerModel

      public com.liferay.portal.kernel.model.ContainerModel getParentContainerModel(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getParentContainerModel in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getParentContainerModel

      public com.liferay.portal.kernel.model.ContainerModel getParentContainerModel(com.liferay.portal.kernel.model.TrashedModel trashedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getParentContainerModel in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getParentContainerModels

      public List<com.liferay.portal.kernel.model.ContainerModel> getParentContainerModels(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getParentContainerModels in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRestoreContainedModelLink

      public String getRestoreContainedModelLink(jakarta.portlet.PortletRequest portletRequest, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getRestoreContainedModelLink in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRestoreContainerModelLink

      public String getRestoreContainerModelLink(jakarta.portlet.PortletRequest portletRequest, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getRestoreContainerModelLink in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRestoreMessage

      public String getRestoreMessage(jakarta.portlet.PortletRequest portletRequest, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getRestoreMessage in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getRootContainerModelName

      public String getRootContainerModelName()
      Specified by:
      getRootContainerModelName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getSubcontainerModelName

      public String getSubcontainerModelName()
      Specified by:
      getSubcontainerModelName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getSystemEventClassName

      public String getSystemEventClassName()
      Specified by:
      getSystemEventClassName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getTrashContainedModelName

      public String getTrashContainedModelName()
      Specified by:
      getTrashContainedModelName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getTrashContainedModelsCount

      public int getTrashContainedModelsCount(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getTrashContainedModelsCount in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTrashContainerModelName

      public String getTrashContainerModelName()
      Specified by:
      getTrashContainerModelName in interface com.liferay.portal.kernel.trash.TrashHandler
    • getTrashContainerModelsCount

      public int getTrashContainerModelsCount(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getTrashContainerModelsCount in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTrashedModel

      public com.liferay.portal.kernel.model.TrashedModel getTrashedModel(long classPK)
      Specified by:
      getTrashedModel in interface com.liferay.portal.kernel.trash.TrashHandler
    • getTrashModelsCount

      public int getTrashModelsCount(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getTrashModelsCount in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTrashRenderer

      public com.liferay.portal.kernel.trash.TrashRenderer getTrashRenderer(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getTrashRenderer in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasTrashPermission

      public boolean hasTrashPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, long groupId, long classPK, String trashActionId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      hasTrashPermission in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • isContainerModel

      public boolean isContainerModel()
      Specified by:
      isContainerModel in interface com.liferay.portal.kernel.trash.TrashHandler
    • isDeletable

      public boolean isDeletable(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      isDeletable in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • isMovable

      public boolean isMovable(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      isMovable in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • isRestorable

      public boolean isRestorable(long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      isRestorable in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • moveEntry

      public void moveEntry(long userId, long classPK, long containerModelId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      moveEntry in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • moveTrashEntry

      public void moveTrashEntry(long userId, long classPK, long containerModelId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      moveTrashEntry in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • restoreRelatedTrashEntry

      public void restoreRelatedTrashEntry(String className, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      restoreRelatedTrashEntry in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateTitle

      public void updateTitle(long classPK, String title) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      updateTitle in interface com.liferay.portal.kernel.trash.TrashHandler
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getAssetRendererFactory

      protected com.liferay.asset.kernel.model.AssetRendererFactory<?> getAssetRendererFactory()
    • hasPermission

      protected abstract boolean hasPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, long classPK, String actionId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException