Interface TrashManagerInternal
- All Superinterfaces:
TrashManager
- All Known Implementing Classes:
DefaultTrashManager
DMZ operations on trash; see the package-info.java for rationale.
- Since:
- 9.0
-
Method Summary
Modifier and TypeMethodDescriptionfindTrashDate(Content content) Trash date is only available since Confluence 7.14.Trash date is only available since Confluence 7.14.getTrashedEntities(long contentIdOffset, int limit) Fetch a batch of trashed content entitiesvoidmigrateTrashDate(String spaceKey, Instant trashTime) Add trash date to existing items in the trash for a spacevoidmigrateTrashDate(Instant trashTime) Add trash date to all existing items in the trashvoidpurge(List<SpaceContentEntityObject> trashedEntities) Delete a list of trashed entitiesMethods inherited from interface com.atlassian.confluence.pages.TrashManager
emptyTrash, getNumberOfItemsInTrash, getTrashContents, getTrashContents, getTrashDateMigrationTime, purge
-
Method Details
-
migrateTrashDate
Add trash date to all existing items in the trash- Parameters:
trashTime- timestamp to use as trash date
-
migrateTrashDate
Add trash date to existing items in the trash for a space- Parameters:
spaceKey- key of the space to apply trash datetrashTime- timestamp to use as trash date
-
findTrashDate
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 beOptional.empty()2. If it has a contentproperty namedtrash-date, trash date will betrash-date3. 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 beOptional.empty()- Parameters:
ceo- a content entity object to determine trash date- Returns:
- when
ceowas added to the trash if that data is available
-
findTrashDate
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 beOptional.empty()2. If it has a contentproperty namedtrash-date, trash date will betrash-date3. 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 beOptional.empty()- Parameters:
content- a com.atlassian.confluence.api.model.content.Content to determine trash date- Returns:
- when
contentwas 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 valuelimit- maximum number of entities to return
-
purge
Delete a list of trashed entities- Parameters:
trashedEntities- trashed entities to be deleted from trash
-