public interface ContentTrashService
Content from the instance.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ContentTrashService.Validator
Provides methods for validating the trash, restore and purge methods.
|
| Modifier and Type | Method and 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.
|
ContentTrashService.Validator |
validator()
Get the validator view of this service.
|
void trash(Content content)
The purge(Content) method can be used for content that doesn't support trashing.
Currently, only content with types ContentType.PAGE, ContentType.BLOG_POST and
ContentType.ATTACHMENT (as of Confluence 5.8) support trashing.
content - the content to be trashedNotFoundException - if no current content matches the supplied content. If the supplied content is already
trashed, the purge(Content) should be used instead.BadRequestException - if the supplied content is invalidPermissionException - if the current user is not permitted to trash the contentContent restore(Content content)
content - the content to be restoredNotFoundException - if no stored content matches the supplied contentBadRequestException - if the supplied content is invalidPermissionException - if the current user is not permitted to restore the contentvoid purge(Content content)
There are two main cases:
content - the content to be purgedNotFoundException - if no purgable content matches the supplied content. This can happen if no content matches
the id, or if the content found is trashable but not trashed.BadRequestException - if the supplied content is invalidPermissionException - if the current user is not permitted to purge the contentContentTrashService.Validator validator()
Copyright © 2003–2018 Atlassian. All rights reserved.