Interface TrashManagerInternal

All Superinterfaces:
TrashManager
All Known Implementing Classes:
DefaultTrashManager

@Transactional public interface TrashManagerInternal extends TrashManager
DMZ operations on trash; see the package-info.java for rationale.
Since:
9.0
  • Method Details

    • migrateTrashDate

      void migrateTrashDate(Instant trashTime)
      Add trash date to all existing items in the trash
      Parameters:
      trashTime - timestamp to use as trash date
    • migrateTrashDate

      void migrateTrashDate(String spaceKey, Instant trashTime)
      Add trash date to existing items in the trash for a space
      Parameters:
      spaceKey - key of the space to apply trash date
      trashTime - timestamp to use as trash date
    • findTrashDate

      @Transactional(readOnly=true) Optional<Instant> findTrashDate(ContentEntityObject ceo)
      Trash date is only available since Confluence 7.14. The rules to determine effective trash date for a content entity in general is: 1. If it is not in trash, trash date will be Optional.empty() 2. If it has a contentproperty named trash-date, trash date will be trash-date 3. If it belongs to a space which has a trash-date set in bandana, trash date will be that value 4. If there is a global trash-date set in bandana, trash date will be that value 5. Otherwise, trash date will be Optional.empty()
      Parameters:
      ceo - a content entity object to determine trash date
      Returns:
      when ceo was added to the trash if that data is available
    • findTrashDate

      @Transactional(readOnly=true) Optional<Instant> findTrashDate(Content content)
      Trash date is only available since Confluence 7.14. The rules to determine effective trash date for a content entity in general is: 1. If it is not in trash, trash date will be Optional.empty() 2. If it has a contentproperty named trash-date, trash date will be trash-date 3. If it belongs to a space which has a trash-date set in bandana, trash date will be that value 4. If there is a global trash-date set in bandana, trash date will be that value 5. Otherwise, trash date will be Optional.empty()
      Parameters:
      content - a com.atlassian.confluence.api.model.content.Content to determine trash date
      Returns:
      when content was added to the trash if that data is available
    • getTrashedEntities

      @Transactional(readOnly=true) List<SpaceContentEntityObject> getTrashedEntities(long contentIdOffset, int limit)
      Fetch a batch of trashed content entities
      Parameters:
      contentIdOffset - ids of returned entities must be greater than or equal to this value
      limit - maximum number of entities to return
    • purge

      void purge(List<SpaceContentEntityObject> trashedEntities)
      Delete a list of trashed entities
      Parameters:
      trashedEntities - trashed entities to be deleted from trash