FileDocCategorySizeDatePackage
AppClientURI.javaAPI DocGlassfish v2 API4378Fri May 04 22:33:28 BST 2007com.sun.enterprise.tools.verifier.tests.app

AppClientURI

public class AppClientURI extends com.sun.enterprise.tools.verifier.tests.app.ApplicationTest implements AppCheck
The java element specifies the URI of a java application client module, relative to the top level of the application package.

Fields Summary
Constructors Summary
Methods Summary
public Resultcheck(Application descriptor)
The java element specifies the URI of a java application client module, relative to the top level of the application package.

param
descriptor the Application deployment descriptor
return
Result the results for this assertion

        
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        Result result = getInitializedResult();
        
        // java element specifies the URI of a java application
        // client module, relative to the top level of the application package
        for (Iterator itr = descriptor.getApplicationClientDescriptors().iterator(); itr.hasNext();) {
            ApplicationClientDescriptor acd = (ApplicationClientDescriptor) itr.next();
            
            // not sure what we can do to test this string?
            // as long as it's not blank, pass...
            if (!acd.getModuleDescriptor().getArchiveUri().endsWith(".jar")) {
                addErrorDetails(result, compName);
                result.failed
                        (smh.getLocalString
                        (getClass().getName() + ".failed",
                        "Error: [ {0} ] does not specify the URI [ {1} ] of an ejb-jar, relative to the top level of the application package [ {2} ], or does not end with \".jar\"",
                        new Object[] {acd.getName(), acd.getModuleDescriptor().getArchiveUri(), descriptor.getName()}));
                        
            }
        }
        if(result.getStatus() != Result.FAILED) {
            addGoodDetails(result, compName);
            result.passed
                    (smh.getLocalString
                    (getClass().getName() + ".passed",
                    "All the Application URIs are valid."));
        }
        
        return result;