Class ContentTrashServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl
-
- All Implemented Interfaces:
ContentTrashService
public class ContentTrashServiceImpl extends Object implements ContentTrashService
Default implementations ofContentTrashService.
-
-
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_DATE_METADATA_KEY
-
-
Constructor Summary
Constructors Constructor Description ContentTrashServiceImpl(PageManager pageManager, PermissionManager permissionManager, PageService pageService, BlogPostService blogPostService, CommentService commentService, com.google.common.base.Supplier<ContentService> contentServiceSupplier, SpaceManager spaceManager, AttachmentManager attachmentManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpurge(Content content)Permanently delete a piece of content.Contentrestore(Content content)Restore a trashed piece of content.voidtrash(Content content)Trash a piece of content.com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl.ValidatorImplvalidator()Get the validator view of this service.
-
-
-
Constructor Detail
-
ContentTrashServiceImpl
public ContentTrashServiceImpl(PageManager pageManager, PermissionManager permissionManager, PageService pageService, BlogPostService blogPostService, CommentService commentService, com.google.common.base.Supplier<ContentService> contentServiceSupplier, SpaceManager spaceManager, AttachmentManager attachmentManager)
-
-
Method Detail
-
trash
public void trash(Content content)
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
public Content restore(Content content)
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
public void purge(Content content)
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
-
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.
-
-