Methods Summary |
---|
public void | checkValidName(java.lang.String name)
if (!name.matches(VALID_CHAR))
{
throw new InvalidConfigException(
strMgr.getString("validator.invalid_value", getName(), name));
}
|
public void | checkValidObjectNameToken(java.lang.String name)
try
{
new ObjectName(IAS_NAME + name);
}
catch (Exception e)
{
throw new InvalidConfigException(
strMgr.getString("validator.invalid_value", getName(), name));
}
|
public void | checkValidXmlToken(java.lang.String name)Implementation copied from
com.sun.enterprise.admin.verifier.tests.StaticTest
try
{
//Construct a valid xml string
String xml = XML_1 + name + XML_2;
ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
InputSource is = new InputSource(bais);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
db.parse(is);
}
catch (Exception e)
{
throw new InvalidConfigException(
strMgr.getString("validator.invalid_value", getName(), name));
}
|
public void | validate(java.lang.Object str)Validates the given value for the given entry. This method first invokes
its superclass's validate method and then performs additional validations.
super.validate(str);
checkValidName((String)str);
checkValidXmlToken((String)str);
checkValidObjectNameToken((String)str);
|