1 23 package com.sun.enterprise.tools.verifier.tests.app; 24 25 import com.sun.enterprise.tools.verifier.tests.app.ApplicationTest; 26 import java.util.*; 27 import com.sun.enterprise.deployment.*; 28 import com.sun.enterprise.tools.verifier.*; 29 import com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor; 30 31 36 37 public class AppClientURI extends ApplicationTest implements AppCheck { 38 39 40 48 public Result check(Application descriptor) { 49 50 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 51 Result result = getInitializedResult(); 52 53 for (Iterator itr = descriptor.getApplicationClientDescriptors().iterator(); itr.hasNext();) { 56 ApplicationClientDescriptor acd = (ApplicationClientDescriptor) itr.next(); 57 58 if (!acd.getModuleDescriptor().getArchiveUri().endsWith(".jar")) { 61 addErrorDetails(result, compName); 62 result.failed 63 (smh.getLocalString 64 (getClass().getName() + ".failed", 65 "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\"", 66 new Object [] {acd.getName(), acd.getModuleDescriptor().getArchiveUri(), descriptor.getName()})); 67 68 } 69 } 70 if(result.getStatus() != Result.FAILED) { 71 addGoodDetails(result, compName); 72 result.passed 73 (smh.getLocalString 74 (getClass().getName() + ".passed", 75 "All the Application URIs are valid.")); 76 } 77 78 return result; 79 } 80 } 81 | Popular Tags |