Class DefaultConstraintsExtractor
java.lang.Object
de.hybris.platform.validation.extractor.impl.DefaultConstraintsExtractor
- All Implemented Interfaces:
ConstraintsExtractor
Extracts constraints using JAXB marshalling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractConstraint(AbstractConstraintModel constraint) Creates OutputStream from list of ConstraintMappingsTypes from createConstraintMappingType(constraint) method.Creates OutputStream from list of ConstraintMappingsTypes from createConstraintMappingType() method.voidsetConstraintMappingsTypeConverter(ConstraintConverter<List<AbstractConstraintModel>, ConstraintMappingsType> constraintMappingsTypeConverter) voidsetConstraintModelValidator(ConstraintModelValidator constraintModelValidator) voidsetConstraintService(ConstraintService constraintService) voidsetSkipOnErrorConstraintMappingsTypeConverter(ConstraintConverter<List<AbstractConstraintModel>, ConstraintMappingsType> skipOnErrorConstraintMappingsTypeConverter)
-
Constructor Details
-
DefaultConstraintsExtractor
public DefaultConstraintsExtractor()
-
-
Method Details
-
extractConstraints
Creates OutputStream from list of ConstraintMappingsTypes from createConstraintMappingType() method. This stream is used when adding mappings to validation configuration.Note that errors during constraints conversion are skipped rather than being thrown by this method. For testing individual constraints please use
extractConstraint(AbstractConstraintModel)instead.- Specified by:
extractConstraintsin interfaceConstraintsExtractor
-
extractConstraint
Creates OutputStream from list of ConstraintMappingsTypes from createConstraintMappingType(constraint) method. This stream is used when adding mappings to test validation configuration.- Specified by:
extractConstraintin interfaceConstraintsExtractor
-
setConstraintService
-
setConstraintMappingsTypeConverter
public void setConstraintMappingsTypeConverter(ConstraintConverter<List<AbstractConstraintModel>, ConstraintMappingsType> constraintMappingsTypeConverter) -
setConstraintModelValidator
-
setSkipOnErrorConstraintMappingsTypeConverter
public void setSkipOnErrorConstraintMappingsTypeConverter(ConstraintConverter<List<AbstractConstraintModel>, ConstraintMappingsType> skipOnErrorConstraintMappingsTypeConverter)
-