Interface ContentService.Validator
- All Known Implementing Classes:
ContentServiceImpl.ValidatorImpl
- Enclosing interface:
- ContentService
public static interface ContentService.Validator
Provides methods for validating the create, update and delete methods.
-
Method Summary
Modifier and TypeMethodDescriptionvalidateCreate
(Content newContent) Validate that a piece of content can be included, including permission checks.validateDelete
(Content content) Validate that a piece of content can be deleted, including permission checks.
-
Method Details
-
validateDelete
Validate that a piece of content can be deleted, including permission checks."Deletion" here refers to the operation
ContentService.delete(Content)
which may have different outcomes based on the type of content being deleted and its current status.- Parameters:
content
- the content to be deleted- Returns:
- an immutable Validation result.
-
validateCreate
Validate that a piece of content can be included, including permission checks.- Parameters:
newContent
- the content to be created- Returns:
- an immutable Validation result.
- Throws:
ServiceException
-