Package com.iplanet.ums.validation
Class Validation
- java.lang.Object
-
- com.iplanet.ums.validation.Validation
-
public class Validation extends Object
Validation handles all validation routines. This class is constructed using default constructor (no argument constructor) and validateAttribute function is used to validate set of attributes against optional rules passed and validator specific rules. UMSException is throw if there is instanciation problems DataConstraintException is thrown when the attributes fail to validations.
-
-
Constructor Summary
Constructors Constructor Description Validation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidvalidateAttribute(Attr attr, Class cls, Guid guid)Determines whether attribute is valid.static voidvalidateAttribute(Attr attr, String validatorClass, String rule)Determines whether a specific attribute is valid.static voidvalidateAttributes(AttrSet attrSet, Class cls, Guid guid)Determines whether each attribute in the attribute set is valid.static voidvalidateAttributes(ModSet modSet, Class cls, Guid guid)Determines whether each attribute in the ModSet is valid.
-
-
-
Method Detail
-
validateAttribute
public static void validateAttribute(Attr attr, String validatorClass, String rule) throws UMSException, DataConstraintException
Determines whether a specific attribute is valid. Called by validateAttribute(Attr, Class). This method calls the validation method for this attribute.- Parameters:
attr- attribute to testvalidatorClass- the validator class namerule- optional rule applies to the validator- Throws:
UMSException- failureDataConstraintException- data validation failure
-
validateAttribute
public static void validateAttribute(Attr attr, Class cls, Guid guid) throws UMSException, DataConstraintException
Determines whether attribute is valid. Check the attribute if there is a validation method that needs to execute.- Parameters:
attr- attribute to testcls- Class associatd with this attributeguid- the guid of the Organization where the config data is stored- Throws:
UMSException- failureDataConstraintException- data validation failure
-
validateAttributes
public static void validateAttributes(AttrSet attrSet, Class cls, Guid guid) throws UMSException, DataConstraintException
Determines whether each attribute in the attribute set is valid. Iterates though the set checking each element to see if there is a validation method that needs to execute.- Parameters:
attrSet- attribute set to testcls- Class associated with these attribute setguid- the guid of the Organization where the config data is stored- Throws:
UMSException- failureDataConstraintException- data validation failure
-
validateAttributes
public static void validateAttributes(ModSet modSet, Class cls, Guid guid) throws UMSException, DataConstraintException
Determines whether each attribute in the ModSet is valid.- Parameters:
modSet- modSet to testcls- Class associated with these attributesguid- the guid of the Organization where the config data is stored- Throws:
UMSException- failureDataConstraintException- data validation failure
-
-