1 23 package com.sun.enterprise.tools.verifier.tests.app; 24 25 import java.util.Iterator ; 26 import com.sun.enterprise.deployment.ConnectorDescriptor; 27 import com.sun.enterprise.deployment.Application; 28 import com.sun.enterprise.tools.verifier.Result; 29 import com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor; 30 import com.sun.enterprise.tools.verifier.tests.app.ApplicationTest; 31 32 37 38 public class ConnectorURI extends ApplicationTest implements AppCheck { 39 40 48 public Result check(Application descriptor) { 49 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 50 Result result = getInitializedResult(); 51 52 for (Iterator itr = descriptor.getRarDescriptors().iterator(); itr.hasNext();) { 53 ConnectorDescriptor cond = (ConnectorDescriptor) itr.next(); 54 55 if (!cond.getModuleDescriptor().getArchiveUri().endsWith(".rar")) { 56 addErrorDetails(result, compName); 57 result.failed 58 (smh.getLocalString 59 (getClass().getName() + ".failed", 60 "Error: [ {0} ] does not specify the URI [ {1} ] of a Connector module, relative to the top level of the application package [ {2} ], or does not end with \".rar\"", 61 new Object [] {cond.getName(), cond.getModuleDescriptor().getArchiveUri(), descriptor.getName()})); 62 } 63 } 64 if(result.getStatus() != Result.FAILED) { 65 addGoodDetails(result, compName); 66 result.passed 67 (smh.getLocalString 68 (getClass().getName() + ".passed", 69 "All the Connector URIs are valid.")); 70 } 71 72 return result; 73 } 74 } 75 | Popular Tags |