com.ca.jcs.validator.meta
Class PropertyValidator

java.lang.Object
  extended by com.ca.jcs.cfg.Vetoable
      extended by com.ca.jcs.validator.meta.PropertyValidator
All Implemented Interfaces:
AttributeValidator, PropertyValidatorBase
Direct Known Subclasses:
PropertyValueValidator, ReadOnlyPropertyValidator

public abstract class PropertyValidator
extends Vetoable
implements AttributeValidator, PropertyValidatorBase

Validate an attribute given it's type and constraints available in the metadata stored on prop.

Note that implementation has to be driven by metadata rather then the provided attributes to handle cases like "required" where detecting the lack of an attribute identifies an error condition.

Validators are definitely applied to LDAP attribute values flowing into the JCS, but in some cases may also need to applied to information flowing up from connectors before it is converted into the LDAP domain too (for instance when the target system managed by the connector doesn't enforce it's own strict validation natively).


Constructor Summary
PropertyValidator()
           
 
Method Summary
 DataModelType getTargetValueOverride()
          Override to return a type if desired, in which case any AttributeConverter registered against this value will be cleared when this property converter is activated for a property.
abstract  ErrorMessages validate(Attribute attr)
          Create/add case.
abstract  ErrorMessages validate(ModificationItem modItem)
          Update/modify case.
 
Methods inherited from class com.ca.jcs.cfg.Vetoable
isVetoed, setVetoed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyValidator

public PropertyValidator()
Method Detail

getTargetValueOverride

public DataModelType getTargetValueOverride()
Override to return a type if desired, in which case any AttributeConverter registered against this value will be cleared when this property converter is activated for a property.


validate

public abstract ErrorMessages validate(Attribute attr)
Create/add case.

Specified by:
validate in interface AttributeValidator
Parameters:
attr - Attribute whose values are to be validated.
Returns:
Null if all value have desired format, and otherwise one or more error messages where only their msgFormatId field needs to be set.

validate

public abstract ErrorMessages validate(ModificationItem modItem)
Update/modify case.



Created 2011-07-14 13:27 EST