Class ContentTrashServiceImpl
java.lang.Object
com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl
- All Implemented Interfaces:
ContentTrashService
Default implementations of
ContentTrashService.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.content.ContentTrashService
ContentTrashService.Validator -
Field Summary
Fields inherited from interface com.atlassian.confluence.api.service.content.ContentTrashService
TRASH_CREATED_BY_FULL_NAME_METADATA_KEY, TRASH_CREATED_BY_USERNAME_METADATA_KEY, TRASH_DATE_METADATA_KEY, TRASH_DELETED_BY_FULL_NAME_METADATA_KEY, TRASH_DELETED_BY_USERNAME_METADATA_KEY -
Constructor Summary
ConstructorsConstructorDescriptionContentTrashServiceImpl(PageManager pageManager, PermissionManager permissionManager, PageService pageService, BlogPostService blogPostService, CommentService commentService, Supplier<ContentService> contentServiceSupplier, SpaceManager spaceManager, AttachmentManager attachmentManager, TrashManager trashManager, ModelFactory<ContentEntityObject, Content> contentFactory, SpacePermissionManager spacePermissionManager) -
Method Summary
Modifier and TypeMethodDescriptiongetTrashContents(Space space, LimitedRequest request, Expansion... expansions) Retrieve a subset of the contents of the trash for a particular space.voidPermanently delete a piece of content.Restore a trashed piece of content.voidTrash a piece of content.com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl.ValidatorImplGet the validator view of this service.
-
Constructor Details
-
ContentTrashServiceImpl
public ContentTrashServiceImpl(PageManager pageManager, PermissionManager permissionManager, PageService pageService, BlogPostService blogPostService, CommentService commentService, Supplier<ContentService> contentServiceSupplier, SpaceManager spaceManager, AttachmentManager attachmentManager, TrashManager trashManager, ModelFactory<ContentEntityObject, Content> contentFactory, SpacePermissionManager spacePermissionManager)
-
-
Method Details
-
trash
Description copied from interface:ContentTrashServiceTrash a piece of content.The
ContentTrashService.purge(Content)method can be used for content that doesn't support trashing. Currently, only content with typesContentType.PAGE,ContentType.BLOG_POSTandContentType.ATTACHMENT(as of Confluence 5.8) support trashing.- Specified by:
trashin interfaceContentTrashService- Parameters:
content- the content to be trashed
-
restore
Description copied from interface:ContentTrashServiceRestore a trashed piece of content.- Specified by:
restorein interfaceContentTrashService- Parameters:
content- the content to be restored- Returns:
- the content after being restored
-
purge
Description copied from interface:ContentTrashServicePermanently delete a piece of content.There are two main cases:
- Trashable content (e.g. Pages, BlogPosts) must have status "trashed" to be purged.
- Non-trashable content (e.g. Comments, Attachment) can be purged with status "current".
- Specified by:
purgein interfaceContentTrashService- Parameters:
content- the content to be purged
-
getTrashContents
public PageResponse<Content> getTrashContents(Space space, LimitedRequest request, Expansion... expansions) Description copied from interface:ContentTrashServiceRetrieve a subset of the contents of the trash for a particular space.- Specified by:
getTrashContentsin interfaceContentTrashService- Parameters:
space- the space where the trash contents belong torequest- the pagination request, with a cursor which is an identifier to skip results from a previous query when paginating and limit for the resultexpansions- the optional properties to expand on the result- Returns:
- the contents of the trash, up to the request limit
-
validator
public com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl.ValidatorImpl validator()Description copied from interface:ContentTrashServiceGet the validator view of this service.- Specified by:
validatorin interfaceContentTrashService- Returns:
- a Validator that can be used to validate service requests.
-