Previous Topic: Java Interface for Task-Level ValidationNext Topic: Exceptions


Java Interface for Directory-Level Validation

The definition of the Java interface for directory-level validation is as follows:

Syntax
public interface IAttributeValidator {
public class StringRef {
   public String reference = new String();
   public String toString(){return reference;}
public boolean validate(
   Object attributeValue,
   StringRef changedValue,
   StringRef errorMessage
   ) throws AttributeValidationException;
}
Parameters
attributeValue

Input parameter

Specifies the value of the attribute being validated.

changedValue

Output parameter

Provides an optional transformation value that replaces the user-supplied value being validated. When no transformation is necessary, pass back null.

errorMessage

Output parameter

If validation fails, it displays a message to the user.

Comments

If the validation operation requires managed objects from the directory, use AttributeValidator. This abstract class implements the IAttributeValidator interface, and includes a method for retrieving the managed object providers.

Returns
Throws

AttributeValidationException.