Skip navigation links

Oracle Role Manager Java API Reference
10g (10.1.4)
E12031-02


oracle.iam.rm.server_api.model
Class Validator

java.lang.Object
  extended by oracle.iam.rm.server_api.model.Validator

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CompositeValidator, EnumeratedValueValidator, NonNullValidator, NumericValidator, StringLengthValidator, StringPatternValidator, WhitespaceValidator

public class Validator
extends java.lang.Object
implements java.io.Serializable

A generic validator for arguments and attributes.

See Also:
Serialized Form

Constructor Summary
  Validator()
          Creates a "blanket" validator.
protected Validator(java.lang.String violationMessage)
          Creates a validator with the provided violation message.

 

Method Summary
protected  java.lang.String getViolationMessage()
          Gets the violation message to use if the validation fails.
 boolean isRequired()
          Determines whether this value is required.
protected  boolean isValid(java.lang.Object value)
          Determines whether the provided value is valid according to this validator.
 java.lang.String validate(java.lang.Object value)
          Validates the value based on the constraint represented by this validator.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Validator

public Validator()
Creates a "blanket" validator.

Validator

protected Validator(java.lang.String violationMessage)
Creates a validator with the provided violation message.
Parameters:
violationMessage - violation message to use if the validation fails

Method Detail

validate

public java.lang.String validate(java.lang.Object value)
Validates the value based on the constraint represented by this validator.
Parameters:
value - Object representing the value to validate
Returns:
null if the value is valid or a localized validation problem message if the value is invalid

isValid

protected boolean isValid(java.lang.Object value)
Determines whether the provided value is valid according to this validator.
Parameters:
value - value to validate
Returns:
Boolean true if the value is valid, otherwise .

isRequired

public boolean isRequired()
Determines whether this value is required.
Returns:
Boolean true if this value is required, otherwise .

getViolationMessage

protected java.lang.String getViolationMessage()
Gets the violation message to use if the validation fails.
Returns:
String representing the violation message to use if the validation fails.

Skip navigation links

Oracle Role Manager Java API Reference
10g (10.1.4)
E12031-02


Copyright © 2007, 2008 Oracle. All Rights Reserved.