FileDocCategorySizeDatePackage
ConnectorCheckMgrImpl.javaAPI DocGlassfish v2 API5527Fri May 04 22:33:26 BST 2007com.sun.enterprise.tools.verifier.connector

ConnectorCheckMgrImpl

public class ConnectorCheckMgrImpl extends com.sun.enterprise.tools.verifier.CheckMgr implements com.sun.enterprise.tools.verifier.JarCheck

This manager is responsible for performing compliance tests on rar files. rar files contains resource adpaters.

author
Jerome Dochez

Fields Summary
private static final String
testsListFileName
name of the file containing the list of tests for the connector architecture
private static final String
sunONETestsListFileName
Constructors Summary
public ConnectorCheckMgrImpl(com.sun.enterprise.tools.verifier.FrameworkContext frameworkContext)


       
        this.frameworkContext = frameworkContext;
    
Methods Summary
public voidcheck(com.sun.enterprise.deployment.Descriptor descriptor)

        // run the ParseDD test
        if (getSchemaVersion(descriptor).compareTo("1.5") < 0) { // NOI18N
            ConnectorDeploymentDescriptorFile ddf = new ConnectorDeploymentDescriptorFile();
            File file = new File(getAbstractArchiveUri(descriptor),
                    ddf.getDeploymentDescriptorPath());
            FileInputStream is = new FileInputStream(file);
            try {
                if (is != null) {
                    Result result = new ParseDD().validateConnectorDescriptor(is);
                    result.setComponentName(getArchiveUri(descriptor));
                    setModuleName(result);
                    frameworkContext.getResultManager().add(result);
                }
            } finally {
               try {
                    if(is!=null)
                        is.close();
                } catch(Exception e) {}
            }
        }

        super.check(descriptor);
    
protected com.sun.enterprise.tools.verifier.tests.ComponentNameConstructorgetComponentNameConstructor(com.sun.enterprise.deployment.Descriptor descriptor)

        return new ComponentNameConstructor((ConnectorDescriptor)descriptor);
    
protected java.lang.StringgetSchemaVersion(com.sun.enterprise.deployment.Descriptor descriptor)

        return ((ConnectorDescriptor) descriptor).getSpecVersion();
    
protected java.lang.StringgetSunONETestsListFileName()
return the configuration file name for the list of tests pertinent to the connector architecture (SunONE)

return
String filename containing the list of tests

        if ((System.getProperty("verifier.tests.sunconnector", "false")).equals(
                "true")) // NOI18N
            return sunONETestsListFileName;
        else
            return null;
    
protected java.lang.StringgetTestsListFileName()
return the configuration file name for the list of tests pertinent to the connector architecture

return
String filename containing the list of tests

        return testsListFileName;
    
protected voidsetModuleName(com.sun.enterprise.tools.verifier.Result r)

        r.setModuleName(Result.CONNECTOR);