The content below is for Apache Syncope <= 1.2 - for later versions the Reference Guide is available.
An attribute validator class is used to validate the value to be assigned to an attribute.
This wiki page aims to show hot to implement and deploy a new attribute validator class.
An attribute validator class must extend AbstractValidator class.
Conditions must be evaluated into the method doValidate(...).
In case of an attribute value not valid an InvalidAttrValueException exception must be thrown.
A sample validator has been provided below.
An attribute validator class can be deployed:
- at project definition time
by adding own implementation into the overlay project, before to build Syncope.
- at run-time
by including into the container classpath own implementation (container must be re-started to reload the classpath).