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.void
Permanently delete a piece of content.Restore a trashed piece of content.void
Trash a piece of content.com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl.ValidatorImpl
Get 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:ContentTrashService
Trash 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_POST
andContentType.ATTACHMENT
(as of Confluence 5.8) support trashing.- Specified by:
trash
in interfaceContentTrashService
- Parameters:
content
- the content to be trashed
-
restore
Description copied from interface:ContentTrashService
Restore a trashed piece of content.- Specified by:
restore
in interfaceContentTrashService
- Parameters:
content
- the content to be restored- Returns:
- the content after being restored
-
purge
Description copied from interface:ContentTrashService
Permanently 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:
purge
in interfaceContentTrashService
- Parameters:
content
- the content to be purged
-
getTrashContents
public PageResponse<Content> getTrashContents(Space space, LimitedRequest request, Expansion... expansions) Description copied from interface:ContentTrashService
Retrieve a subset of the contents of the trash for a particular space.- Specified by:
getTrashContents
in 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:ContentTrashService
Get the validator view of this service.- Specified by:
validator
in interfaceContentTrashService
- Returns:
- a Validator that can be used to validate service requests.
-