FileDocCategorySizeDatePackage
ConnectionInterfaceExistence.javaAPI DocGlassfish v2 API4235Fri May 04 22:33:30 BST 2007com.sun.enterprise.tools.verifier.tests.connector.cci

ConnectionInterfaceExistence

public class ConnectionInterfaceExistence extends ConnectionTest implements com.sun.enterprise.tools.verifier.tests.connector.ConnectorCheck
Verify that the interface declared in the deployment descriptor connection-interface is actually contained in the archive
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
public com.sun.enterprise.tools.verifier.Resultcheck(com.sun.enterprise.deployment.ConnectorDescriptor descriptor)

Verify that the interface declared in the deployment descriptor connection-interface is actually contained in the archive

paramm
descriptor deployment descriptor for the rar file
return
result object containing the result of the individual test performed


    Result result = getInitializedResult();
    ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
    if(isCCIImplemented(descriptor, result))
    {
      String interfaceName = getConnectionInterface(descriptor, result);
      if (interfaceName == null) {
        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString
            (getClass().getName() + ".nonexist",
             "Error: The deployment descriptor for the resource adapter do not define a connection-interface"));        
      }        
      isClassLoadable(interfaceName, result); 
    }
    else
    {
      // test is NA
      result.addNaDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}));
      result.notApplicable(smh.getLocalString
          ("com.sun.enterprise.tools.verifier.tests.connector.cci.notApp",
           "The CCI interfaces do not seem to be implemented by this resource adapter"));
    }
    return result;