Result result = super.validate(cce); // Before doing custom validation do basic validation
if(cce.getChoice().equals(StaticTest.VALIDATE)) {
Profiler profiler = (Profiler) cce.getObject();
validateAttribute(ServerTags.CLASSPATH, profiler.getClasspath(), result);
JvmOptionsTest.validateJvmOptions(profiler.getJvmOptions(), result);
}
if(cce.getChoice().equals(StaticTest.UPDATE)) {
validateAttribute(cce.getName(), (String) cce.getObject(), result);
}
else if(cce.getChoice().equals(StaticTest.SET)) {
final String name = cce.getName();
/*
* JvmOptions is an element in domain xml. Hence for JvmOptions we
* need to use camelized name even thouth it is treated as an
* attribute.
*/
if (name.equals("JvmOptions")) {
JvmOptionsTest.validateJvmOptions((String[])cce.getObject(), result);
}
}
return result;