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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetThemeFieldGroupService(ThemeFieldGroupService<ThemeFieldGroup> themeFieldGroupService) voidsetThemeFieldService(ThemeFieldService<ThemeField> themeFieldService) booleansupports(@NonNull Class<?> clazz, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) voidvalidate(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected Optional<ThemeFieldGroup>validateGroup(@NonNull ThemeField field, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected voidvalidateLabel(@NonNull org.springframework.validation.Errors errors) protected voidvalidateName(@NonNull org.springframework.validation.Errors errors) protected voidvalidateType(@NonNull org.springframework.validation.Errors errors) protected voidvalidateUniqueName(@NonNull ThemeField field, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
validateForCreate, validateForReplace, validateForUpdate
-
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:
supportsin interfacecom.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:
validatein interfacecom.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
-
setThemeFieldGroupService
@Autowired @Lazy public void setThemeFieldGroupService(ThemeFieldGroupService<ThemeFieldGroup> themeFieldGroupService)
-