Class CharacteristicValidator
java.lang.Object
com.broadleafcommerce.catalog.service.validation.characteristic.CharacteristicValidator
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
public class CharacteristicValidator
extends Object
implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
Validations for
Characteristic
.- Author:
- Julia Lopez-Pozas (jlopezpozas)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected cz.jirutka.rsql.parser.ast.Node
buildBusinessTypeCharacteristicsMatchFilter
(String characteristicContextId) protected BusinessTypeService<BusinessType>
protected CharacteristicService<Characteristic>
protected List<CharacteristicValueTypeMapping>
protected List<CharacteristicValueValidator>
void
setBusinessTypeService
(BusinessTypeService<BusinessType> businessTypeService) void
setCharacteristicService
(CharacteristicService<Characteristic> characteristicService) void
setCharacteristicValueTypeMappers
(List<CharacteristicValueTypeMapping> characteristicValueTypeMappers) void
setCharacteristicValueValidators
(List<CharacteristicValueValidator> characteristicValueValidators) boolean
supports
(Class<?> serviceClass, 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 void
validateFieldNameUnchanged
(Characteristic characteristic, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
validateForCreate
(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
validateForDelete
(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
validateForReplace
(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
validateForUpdate
(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected void
validateNameAndFieldName
(Characteristic characteristic, org.springframework.validation.Errors errors)
-
Constructor Details
-
CharacteristicValidator
public CharacteristicValidator()
-
-
Method Details
-
supports
public boolean supports(Class<?> serviceClass, 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
-
validateForCreate
public void validateForCreate(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
validateForCreate
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateForUpdate
public void validateForUpdate(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
validateForUpdate
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateForReplace
public void validateForReplace(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
validateForReplace
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateForDelete
public void validateForDelete(@NonNull @NonNull Object businessInstance, @NonNull @NonNull org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
validateNameAndFieldName
protected void validateNameAndFieldName(Characteristic characteristic, org.springframework.validation.Errors errors) -
validateFieldNameUnchanged
protected void validateFieldNameUnchanged(Characteristic characteristic, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
buildBusinessTypeCharacteristicsMatchFilter
protected cz.jirutka.rsql.parser.ast.Node buildBusinessTypeCharacteristicsMatchFilter(@Nullable String characteristicContextId) -
setBusinessTypeService
@Autowired @Lazy public void setBusinessTypeService(BusinessTypeService<BusinessType> businessTypeService) -
getBusinessTypeService
-
setCharacteristicService
@Autowired @Lazy public void setCharacteristicService(CharacteristicService<Characteristic> characteristicService) -
getCharacteristicService
-
setCharacteristicValueTypeMappers
@Autowired @Lazy public void setCharacteristicValueTypeMappers(List<CharacteristicValueTypeMapping> characteristicValueTypeMappers) -
getCharacteristicValueTypeMappers
-
setCharacteristicValueValidators
@Autowired @Lazy public void setCharacteristicValueValidators(List<CharacteristicValueValidator> characteristicValueValidators) -
getCharacteristicValueValidators
-