FileDocCategorySizeDatePackage
StringValidator.javaAPI DocGlassfish v2 API3081Fri May 04 22:24:30 BST 2007com.sun.enterprise.admin.servermgmt

StringValidator

public class StringValidator extends Validator
Validator class for domain config entries whose type is java.lang.String.

Fields Summary
private static final com.sun.enterprise.util.i18n.StringManager
strMgr
i18n strings manager object
Constructors Summary
public StringValidator(String name)
Constructs new StringValidator object.

param
name


               
      
    
        super(name, java.lang.String.class);
    
Methods Summary
public voidvalidate(java.lang.Object str)
Validates the given value for the given entry. This method first invokes its superclass's validate method and then checks additional string validations such as 0 length.

throws
InvalidConfigException

        super.validate(str);
        int length = ((String)str).length();
        if (length == 0)
        {
            throw new InvalidConfigException(
                strMgr.getString("validator.invalid_value", getName(), str));
        }