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_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
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 void
purge(Content content)
Permanently delete a piece of content.Content
restore(Content content)
Restore a trashed piece of content.void
trash(Content content)
Trash a piece of content.com.atlassian.confluence.api.impl.service.content.ContentTrashServiceImpl.ValidatorImpl
validator()
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: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
public Content restore(Content content)
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
public void purge(Content content)
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
-
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.
-
-