Class Validator

java.lang.Object
com.sun.enterprise.admin.servermgmt.Validator
Direct Known Subclasses:
DomainConfigValidator, FileValidator, PortValidator, StringValidator

public class Validator extends Object
Base class for all domain config validators. Validates the non-null ness of a domain config entry and its type.
  • Constructor Details

    • Validator

      public Validator(String name, Class type)
      Constructs new Validator object.
      Parameters:
      name - Name of an entry that is used in case of validation errors. If the name is null "" is used instead.
      type -
  • Method Details

    • getName

      public String getName()
      Returns the name of the entry.
    • validate

      public void validate(Object obj) throws InvalidConfigException
      Checks the validity of the given value for the entry. This method does basic checks such as null ness invalid input: '&' type.
      Parameters:
      obj -
      Throws:
      InvalidConfigException