1 23 24 package com.sun.enterprise.admin.servermgmt; 25 26 import com.sun.enterprise.util.i18n.StringManager; 27 28 31 public class StringValidator extends Validator 32 { 33 36 private static final StringManager strMgr = 37 StringManager.getManager(StringValidator.class); 38 39 43 public StringValidator(String name) 44 { 45 super(name, java.lang.String .class); 46 } 47 48 54 public void validate(Object str) throws InvalidConfigException 55 { 56 super.validate(str); 57 int length = ((String )str).length(); 58 if (length == 0) 59 { 60 throw new InvalidConfigException( 61 strMgr.getString("validator.invalid_value", getName(), str)); 62 } 63 } 64 } 65 | Popular Tags |