Class CreateWorkflowValidator

java.lang.Object
de.hybris.platform.cmsfacades.workflow.validator.CreateWorkflowValidator
All Implemented Interfaces:
org.springframework.validation.Validator

public class CreateWorkflowValidator extends Object implements org.springframework.validation.Validator
Validates fields of CMSWorkflowData for a create operation
  • Constructor Details

    • CreateWorkflowValidator

      public CreateWorkflowValidator()
  • Method Details

    • supports

      public boolean supports(Class<?> clazz)
      Specified by:
      supports in interface org.springframework.validation.Validator
    • validate

      public void validate(Object objToValidate, org.springframework.validation.Errors errors)
      Specified by:
      validate in interface org.springframework.validation.Validator
    • validateAttachment

      protected void validateAttachment(String itemUuid, CMSWorkflowData cmsWorkflowData, CatalogVersionModel catalogVersion, org.springframework.validation.Errors errors)
      This method validates each CmsItem that will be added as a workflow attachment.
      Parameters:
      itemUuid - - The unique identifier of the CmsItem
      cmsWorkflowData - - The object that contains the data of the workflow to create
      catalogVersion - - The catalog version where the workflow instance will be created.
      errors - - Object that keeps track of the validation errors.
    • getItemModelExistsPredicate

      protected BiPredicate<String,Class<?>> getItemModelExistsPredicate()
    • setItemModelExistsPredicate

      public void setItemModelExistsPredicate(BiPredicate<String,Class<?>> itemModelExistsPredicate)
    • getLabelExistsInCMSVersionsPredicate

      protected BiPredicate<String,String> getLabelExistsInCMSVersionsPredicate()
    • setLabelExistsInCMSVersionsPredicate

      public void setLabelExistsInCMSVersionsPredicate(BiPredicate<String,String> labelExistsInCMSVersionsPredicate)
    • getCmsItemExistsInCatalogVersionPredicate

      protected BiPredicate<String,CatalogVersionModel> getCmsItemExistsInCatalogVersionPredicate()
    • setCmsItemExistsInCatalogVersionPredicate

      public void setCmsItemExistsInCatalogVersionPredicate(BiPredicate<String,CatalogVersionModel> cmsItemExistsInCatalogVersionPredicate)
    • getCmsAdminSiteService

      protected CMSAdminSiteService getCmsAdminSiteService()
    • setCmsAdminSiteService

      public void setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)
    • getIsAnyItemAlreadyInWorkflowPredicate

      protected Predicate<List<String>> getIsAnyItemAlreadyInWorkflowPredicate()
    • setIsAnyItemAlreadyInWorkflowPredicate

      public void setIsAnyItemAlreadyInWorkflowPredicate(Predicate<List<String>> isAnyItemAlreadyInWorkflowPredicate)
    • getCmsWorkflowTemplateExistsPredicate

      protected Predicate<String> getCmsWorkflowTemplateExistsPredicate()
    • setCmsWorkflowTemplateExistsPredicate

      public void setCmsWorkflowTemplateExistsPredicate(Predicate<String> cmsWorkflowTemplateExistsPredicate)