public class DefaultConstrainedPropertyAssembler extends Object implements ConstrainedPropertyAssembler
Modifier and Type | Field and Description |
---|---|
protected ClassPropertyFetcher |
classPropertyFetcher |
protected Map<String,ConstrainedProperty> |
constrainedProperties |
protected static String |
IMPORT_FROM_CONSTRAINT |
protected MessageSource |
messageSource |
protected int |
order |
protected static String |
SHARED_CONSTRAINT |
protected Map<String,String> |
sharedConstraints |
protected Class<?> |
targetClass |
Constructor and Description |
---|
DefaultConstrainedPropertyAssembler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addConstraint(ConstrainedProperty cp,
String constraintName,
Object value) |
void |
assemble(Map<String,List<ConstraintDef>> constraints) |
void |
assemble(Object constraints) |
protected void |
assembleConstraint(String property,
List<ConstraintDef> constraints) |
Map<String,ConstrainedProperty> |
getConstrainedProperties() |
String |
getSharedConstraint(String propertyName) |
void |
setTargetClass(Class<?> targetClass) |
protected static final String SHARED_CONSTRAINT
protected static final String IMPORT_FROM_CONSTRAINT
protected Map<String,ConstrainedProperty> constrainedProperties
protected int order
protected Class<?> targetClass
protected ClassPropertyFetcher classPropertyFetcher
@Inject @Named(value="applicationMessageSource") protected MessageSource messageSource
public void setTargetClass(@Nonnull Class<?> targetClass)
setTargetClass
in interface ConstrainedPropertyAssembler
public void assemble(@Nonnull Map<String,List<ConstraintDef>> constraints)
assemble
in interface ConstrainedPropertyAssembler
public void assemble(@Nonnull Object constraints)
assemble
in interface ConstrainedPropertyAssembler
@Nonnull public Map<String,ConstrainedProperty> getConstrainedProperties()
getConstrainedProperties
in interface ConstrainedPropertyAssembler
@Nullable public String getSharedConstraint(@Nonnull String propertyName)
getSharedConstraint
in interface ConstrainedPropertyAssembler
protected void assembleConstraint(@Nonnull String property, @Nonnull List<ConstraintDef> constraints)
protected void addConstraint(ConstrainedProperty cp, String constraintName, Object value)