|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentTrashService
Controls trashing, restoring and purging Content
from the instance.
Nested Class Summary | |
---|---|
static interface |
ContentTrashService.Validator
Provides methods for validating the trash, restore and purge methods. |
Method Summary | |
---|---|
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. |
Method Detail |
---|
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
and ContentType.BLOG_POST
support trashing.
content
- the content to be trashed
NotFoundException
- 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 invalid
PermissionException
- if the current user is not permitted to trash the contentContent restore(Content content)
content
- the content to be restored
NotFoundException
- if no stored content matches the supplied content
BadRequestException
- if the supplied content is invalid
PermissionException
- if the current user is not permitted to restore the contentvoid purge(Content content)
There are two main cases:
content
- the content to be purged
NotFoundException
- 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 invalid
PermissionException
- if the current user is not permitted to purge the contentContentTrashService.Validator validator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |