CA Identity Manager
Java SDK r12.5 SP 8

 

com.netegrity.llsdk6.imsapi.metadata
Interface IAttributeValidator

All Known Implementing Classes:
AttributeValidator

public interface IAttributeValidator

Performs directory-level validation of managed object attributes. This interface is implemented by directory-level validation rules.

With directory-level validation, you validate the attribute itself rather than validating it in the context of other attributes in the task. For example, you might validate that a phone number matches the nnn-nnn-nnnn format used for the attribute in the user directory.

If you need to validate an attribute against information in the user directory, extend the AttributeValidator abstract class.

You can also perform task-level validation of managed object attributes. For information, see TaskValidator.

For more information on directory-level validation and on attribute validation in general (including implementing validation rules through regular expressions and JavaScript), see the CA Identity Manager Configuration Guide.

Since:
IdentityMinder 6.0

Nested Class Summary
static class IAttributeValidator.StringRef
          A data type object that lets you pass an attribute value or error message to Identity Manager through the output parameters of the validate() method.
 
Method Summary
 boolean validate(java.lang.Object attributeValue, IAttributeValidator.StringRef changedValue, IAttributeValidator.StringRef errorMessage)
          Validates the value specified in attributeValue.
 

Method Detail

validate

boolean validate(java.lang.Object attributeValue,
                 IAttributeValidator.StringRef changedValue,
                 IAttributeValidator.StringRef errorMessage)
                 throws AttributeValidationException

Validates the value specified in attributeValue.

This method can throw an AttributeValidationException. If it does, the exception message is defined in the constructor of the exception.

If the method does not throw AttributeValidationException, but returns false, Identity Manager throws AttributeValidationException and includes the the exception message that you define in the errorMessage parameter of validate().

Parameters:
attributeValue - The attribute value to validate.
changedValue - (out) Optionally, you can replace the supplied attribute value with this value if the method returns true.
errorMessage - (out) An error message to present to the user if the method returns false. Any message in this parameter is only used if the custom object does not throw its own AttributeValidationException. If the custom object does throw AttributeValidationException, the error message defined in the message parameter of the exception's constructor is used instead of the errorMessage in this method.
Returns:
true if the attribute is successfully validated or updated, or false if the attribute cannot be validated or updated.
Throws:
AttributeValidationException

CA Identity Manager
Java SDK r12.5 SP 8

06/13/2011

© 2011 CA Technologies, Inc. All rights reserved.