A validator is a class that implements the validate
method of the atg.cim.worker.IValidator
. To write your own validator object, you will need to provide the concrete implementation of the methods defined in the IValidator
class.
public interface IValidator { /** * Called by the CIM Framework before calling validate(). * * @return true if the object can validate values */ public boolean canValidate(); /** * Logic to test a condition should be placed in this method. Code should * update the message property so the framework may retrieve the last state of * the component. * * @throws ValidatorException */ public boolean validate() throws ValidatorException; /** * Returns a brief message describing the state of the object. * */ public String getMessage(); }
It is a good practice to end your class name with Validator (such as ATGLicenseValidator
) and include it under the package atg.cim.validator
.