Methods Summary |
---|
private final void | checkConfigRefValidity(com.sun.enterprise.config.ConfigContextEvent cce, com.sun.enterprise.config.serverbeans.validation.Result result)
checkConfigRefValidity(getCluster(cce).getConfigRef(), result);
|
private void | checkConfigRefValidity(java.lang.String config_ref, com.sun.enterprise.config.serverbeans.validation.Result result)
if (config_ref.equals(StaticTest.DAS_CONFIG_NAME)){
result.failed(smh.getLocalString(getClass().getName()+".cannotHaveDASasConfig",
"The configuration of the Domain Administration Server (named {0}) cannot be referenced by a cluster",
new Object[]{StaticTest.DAS_CONFIG_NAME}));
} else if (config_ref.equals(StaticTest.CONFIG_TEMPLATE_NAME)){
result.failed(smh.getLocalString(getClass().getName()+".cannotHaveTemplateConfig",
"The default configuration template (named {0}) cannot be referenced by a cluster",
new Object[]{StaticTest.CONFIG_TEMPLATE_NAME}));
}
|
void | checkNameNotDomain(com.sun.enterprise.config.ConfigContextEvent cce, com.sun.enterprise.config.serverbeans.validation.Result result)
final Cluster c = getCluster(cce);
if ("domain".equals(c.getName())){
result.failed(smh.getLocalString(getClass().getName() + ".illegalClusterName",
"Illegal Cluster Name: {0}", new Object[]{c.getName()}));
}
|
private com.sun.enterprise.config.serverbeans.Cluster | getCluster(com.sun.enterprise.config.ConfigContextEvent cce)
return (Cluster) cce.getValidationTarget();
|
private final void | preventInvalidConfigRef(com.sun.enterprise.config.ConfigContextEvent cce, com.sun.enterprise.config.serverbeans.validation.Result result)
if (cce.getName().equals(ServerTags.CONFIG_REF)){
checkConfigRefValidity((String) cce.getObject(), result);
}
|
public com.sun.enterprise.config.serverbeans.validation.Result | validate(com.sun.enterprise.config.ConfigContextEvent cce)
Result result = super.validate(cce); // Before doing custom validation do basic validation
boolean flag = false;
String choice = cce.getChoice();
try {
if (choice.equals(StaticTest.UPDATE)){
validateUpdate(cce, result);
} else if (choice.equals(StaticTest.ADD)){
validateAdd(cce, result);
}
}
catch (ConfigException ce){
_logger.log(Level.WARNING, "domainxmlverifier.exception", ce);
}
return result;
|
void | validateAdd(com.sun.enterprise.config.ConfigContextEvent cce, com.sun.enterprise.config.serverbeans.validation.Result result)
checkNameNotDomain(cce, result);
checkConfigRefValidity(cce, result);
|
void | validateUpdate(com.sun.enterprise.config.ConfigContextEvent cce, com.sun.enterprise.config.serverbeans.validation.Result result)
checkNameNotDomain(cce, result);
preventInvalidConfigRef(cce, result);
|