Interface ContentTemplateService.Validator

Enclosing interface:
ContentTemplateService

public static interface ContentTemplateService.Validator
  • Method Details

    • validateDelete

      ValidationResult validateDelete(ContentTemplateId contentTemplateId)
      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

      ValidationResult validateCreate(ContentTemplate newContentTemplate) throws ServiceException
      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

      ValidationResult validateUpdate(ContentTemplate contentTemplate)
    • validateGet

      ValidationResult validateGet(ContentTemplateId contentTemplateId)
      Validate that current user has permission to view a particular template.
      Parameters:
      contentTemplateId -
      Returns:
    • validateCreateInstance

      default ValidationResult validateCreateInstance(ContentBlueprintInstance instance)
      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: