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 TypeMethodDescriptionvoid
setThemeFieldGroupService
(ThemeFieldGroupService<ThemeFieldGroup> themeFieldGroupService) void
setThemeFieldService
(ThemeFieldService<ThemeField> themeFieldService) boolean
supports
(@NonNull Class<?> clazz, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
validate
(@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 void
validateLabel
(@NonNull org.springframework.validation.Errors errors) protected void
validateName
(@NonNull org.springframework.validation.Errors errors) protected void
validateType
(@NonNull org.springframework.validation.Errors errors) protected void
validateUniqueName
(@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, wait
Methods 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:
supports
in 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:
validate
in 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)
-