com.sun.enterprise.admin.servermgmt
Class Validator

java.lang.Object
  extended by 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 Summary
Validator(String name, Class type)
          Constructs new Validator object.
 
Method Summary
 String getName()
          Returns the name of the entry.
 void validate(Object obj)
          Checks the validity of the given value for the entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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 & type.

Parameters:
obj -
Throws:
InvalidConfigException


Copyright © 2012 GlassFish Community. All Rights Reserved.