CA Identity Manager
Java SDK r12.5 SP 8

 

com.netegrity.imapi
Interface TaskValidator


public interface TaskValidator

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

With task-level validation, you validate an attribute's value against other attributes in the task. For example, you might validate that an area code for a user's phone number is appropriate for the user's city and state.

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

For more information on task-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 TaskValidator.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(BLTHContext ctx, java.lang.String attrValue, TaskValidator.StringRef updatedValue, TaskValidator.StringRef errorMessage)
          Validates the value specified in attrValue in the context of information in the current task.
 

Method Detail

validate

boolean validate(BLTHContext ctx,
                 java.lang.String attrValue,
                 TaskValidator.StringRef updatedValue,
                 TaskValidator.StringRef errorMessage)
                 throws AttributeValidationException

Validates the value specified in attrValue in the context of information in the current task.

The invocation of this method is triggered by a set... method executed on an attribute in the current task context. The attribute must have a validation rule configured for it in the screen definition for the task.

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:
ctx - Context that provides access to managed objects in the task session, providers, etc.
attrValue - The attribute value to validate. This attribute must be configured with a validation rule in the task screen definition.
updatedValue - (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.