public Map < String , Map < String , Map < String , Map < String , ? > > > > addValidationConstraint ( String type , String field , Constraint c ) { if ( StringUtils . isBlank ( type ) || StringUtils . isBlank ( field ) || c == null ) { return Collections . emptyMap ( ) ; } return getEntity ( invokePut ( Utils . formatMessage ( "_constraints/{0}/{1}/{2}" , type , field , c . getName ( ) ) , Entity . json ( c . getPayload ( ) ) ) , Map . class ) ; }
Add a new constraint for a given field .