FileDocCategorySizeDatePackage
AppClientCheckMgrImpl.javaAPI DocGlassfish v2 API6957Fri May 04 22:33:26 BST 2007com.sun.enterprise.tools.verifier.appclient

AppClientCheckMgrImpl

public class AppClientCheckMgrImpl extends com.sun.enterprise.tools.verifier.CheckMgr implements com.sun.enterprise.tools.verifier.JarCheck
Application Client harness

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


       
        this.frameworkContext = frameworkContext;
    
Methods Summary
public voidcheck(com.sun.enterprise.deployment.Descriptor descriptor)
Check method introduced for WebServices integration

param
descriptor appclient descriptor

        // run persistence tests first.
        checkPersistenceUnits(ApplicationClientDescriptor.class.cast(descriptor));
        //An ApplicationClient can have WebService References
        checkWebServicesClient(descriptor);

        if (frameworkContext.isPartition() &&
                !frameworkContext.isAppClient()) 
            return;
        // run the ParseDD test
        if (getSchemaVersion(descriptor).compareTo("1.4") < 0) { // NOI18N
            AppClientDeploymentDescriptorFile ddf = new AppClientDeploymentDescriptorFile();
            File file = new File(getAbstractArchiveUri(descriptor),
                    ddf.getDeploymentDescriptorPath());
            FileInputStream is = new FileInputStream(file);
            try {
                if (is != null) {
                    Result result = new ParseDD().validateAppClientDescriptor(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 voidcheckWebServicesClient(com.sun.enterprise.deployment.Descriptor descriptor)

        if (frameworkContext.isPartition() &&
                !frameworkContext.isWebServicesClient()) 
            return;
        WebServiceClientCheckMgrImpl webServiceClientCheckMgr = 
                                new WebServiceClientCheckMgrImpl(frameworkContext);
        ApplicationClientDescriptor desc = (ApplicationClientDescriptor) descriptor;
        if (desc.hasWebServiceClients()) {
            Set serviceRefDescriptors = desc.getServiceReferenceDescriptors();
            Iterator it = serviceRefDescriptors.iterator();
            while (it.hasNext()) {
                webServiceClientCheckMgr.setVerifierContext(context);
                webServiceClientCheckMgr.check(
                        (ServiceReferenceDescriptor) it.next());
            }
        } else // set not applicable for all tests in WebServices for this Appclient Bundle 
            webServiceClientCheckMgr.setVerifierContext(context);
    
protected com.sun.enterprise.tools.verifier.tests.ComponentNameConstructorgetComponentNameConstructor(com.sun.enterprise.deployment.Descriptor descriptor)

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

        return ((RootDeploymentDescriptor) descriptor).getSpecVersion();
    
protected java.lang.StringgetSunONETestsListFileName()
return the configuration file name for the list of tests pertinent to the application client architecture

return
String filename containing the list of tests

        return sunONETestsListFileName;
    
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.APPCLIENT);