Class ThemeFieldValidator

java.lang.Object
com.broadleafcommerce.content.service.validation.ThemeFieldValidator
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator

public class ThemeFieldValidator extends Object implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
Author:
Nathan Moore (nathandmoore)
  • Constructor Details

    • ThemeFieldValidator

      public ThemeFieldValidator()
  • Method Details

    • supports

      public boolean supports(@NonNull @NonNull Class<?> clazz, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      supports in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
    • validate

      public void validate(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Specified by:
      validate in interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
    • validateGroup

      protected Optional<ThemeFieldGroup> validateGroup(@NonNull @NonNull ThemeField field, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • validateName

      protected void validateName(@NonNull @NonNull org.springframework.validation.Errors errors)
    • validateUniqueName

      protected void validateUniqueName(@NonNull @NonNull ThemeField field, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • validateLabel

      protected void validateLabel(@NonNull @NonNull org.springframework.validation.Errors errors)
    • validateType

      protected void validateType(@NonNull @NonNull org.springframework.validation.Errors errors)
    • setThemeFieldService

      @Autowired @Lazy public void setThemeFieldService(ThemeFieldService<ThemeField> themeFieldService)
    • setThemeFieldGroupService

      @Autowired @Lazy public void setThemeFieldGroupService(ThemeFieldGroupService<ThemeFieldGroup> themeFieldGroupService)