FileDocCategorySizeDatePackage
LifecycleModuleTest.javaAPI DocGlassfish v2 API3724Fri May 04 22:24:38 BST 2007com.sun.enterprise.config.serverbeans.validation.tests

LifecycleModuleTest

public class LifecycleModuleTest extends com.sun.enterprise.config.serverbeans.validation.GenericValidator
Custom Test for LifecycleModule Element which calls the Generic Validation before performing custom tests
author
Srinivas Krishnan
version
2.0

Fields Summary
Constructors Summary
public LifecycleModuleTest(com.sun.enterprise.config.serverbeans.validation.ValidationDescriptor desc)

        super(desc);
    
Methods Summary
public com.sun.enterprise.config.serverbeans.validation.Resultvalidate(com.sun.enterprise.config.ConfigContextEvent cce)

        final Result result = super.validate(cce); // Before doing custom validation do basic validation
        if(cce.getChoice().equals(StaticTest.UPDATE) || cce.getChoice().equals(StaticTest.VALIDATE)) {
            validateAttribute(cce.getName(), (LifecycleModule) cce.getObject(), result);
        }
        return result;
    
private voidvalidateAttribute(java.lang.String name, com.sun.enterprise.config.serverbeans.LifecycleModule value, com.sun.enterprise.config.serverbeans.validation.Result result)

 
        if(value == null || value.equals(""))
            return;
        if(name.equals(ServerTags.CLASSPATH)) {
            if(!StaticTest.isClassPathValid(value.getClasspath())) {
                result.failed(smh.getLocalString(getClass().getName() + ".invalidClasspath",
                   "Classpath contains invalid path : Check the path"));
            }
        }