Interface ContentTemplateService.Validator
- Enclosing interface:
- ContentTemplateService
public static interface ContentTemplateService.Validator
-
Method Summary
Modifier and TypeMethodDescriptionvalidateCreate
(ContentTemplate newContentTemplate) Validate that the specified contentTemplate can be created by the current user.default ValidationResult
Validate instance is legit to create draft/page instance.validateDelete
(ContentTemplateId contentTemplateId) Validate that a piece of contentTemplate can be deleted, including permission checks.validateGet
(ContentTemplateId contentTemplateId) Validate that current user has permission to view a particular template.validateUpdate
(ContentTemplate contentTemplate)
-
Method Details
-
validateDelete
Validate that a piece of contentTemplate can be deleted, including permission checks."Deletion" here refers to the operation
ContentTemplateService.delete(ContentTemplateId)
- Parameters:
contentTemplateId
- the content to be deleted- Returns:
- an immutable Validation result.
-
validateCreate
Validate that the specified contentTemplate can be created by the current user.- Parameters:
newContentTemplate
- the content to be created- Returns:
- an immutable Validation result.
- Throws:
ServiceException
-
validateUpdate
-
validateGet
Validate that current user has permission to view a particular template.- Parameters:
contentTemplateId
-- Returns:
-
validateCreateInstance
Validate instance is legit to create draft/page instance. instance must have a templateId of ContentTemplateIdWithId type. content of Instance must have title, space set, Current user must have Edit permission on the space.TODO CRA-1266 change default method to interface after Blueprint service in CC plugin implemented this interface.
- Parameters:
instance
-- Returns:
-