Package com.sun.enterprise.tools.verifier

Examples of com.sun.enterprise.tools.verifier.Result


    private void updateTableRows(Vector results) {
        String status;
        // update display approriately
        for (int i = 0; i < results.size(); i++) {
            Result r = ((Result) results.elementAt(i));
            StringBuffer s = new StringBuffer(
                    "Assertion:" + r.getAssertion() + "\n"); // NOI18N
            switch (r.getStatus()) {
                case Result.PASSED:
                    {
                        status =
                                (smh.getLocalString(
                                        "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                                ".Status_Passed", // NOI18N
                                        "Passed")); // NOI18N
                        Enumeration e = r.getGoodDetails().elements();
                        while (e.hasMoreElements()) {
                            s.append((String) e.nextElement());
                            s.append("\n"); // NOI18N
                        }
                        break;
                    }
                case Result.FAILED:
                    {
                        status =
                                (smh.getLocalString(
                                        "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                                ".Status_Failed", // NOI18N
                                        "FAILED")); // NOI18N
                        Enumeration e = r.getErrorDetails().elements();
                        while (e.hasMoreElements()) {
                            s.append((String) e.nextElement());
                            s.append("\n"); // NOI18N
                        }
                        break;
                    }
                case Result.WARNING:
                    {
                        status =
                                (smh.getLocalString(
                                        "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                                ".Status_Warning", // NOI18N
                                        "WARNING")); // NOI18N
                        Enumeration e = r.getWarningDetails().elements();
                        while (e.hasMoreElements()) {
                            s.append((String) e.nextElement());
                            s.append("\n"); // NOI18N
                        }
                        break;
                    }
                case Result.NOT_APPLICABLE:
                    {
                        status =
                                (smh.getLocalString(
                                        "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                                ".Status_NotApplicable", // NOI18N
                                        "Not Applicable")); // NOI18N
                        Enumeration e = r.getNaDetails().elements();
                        while (e.hasMoreElements()) {
                            s.append((String) e.nextElement());
                            s.append("\n"); // NOI18N
                        }
                        break;
                    }
                case Result.NOT_IMPLEMENTED:
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_NotImplemented", // NOI18N
                                    "Not Implemented")); // NOI18N
                    break;
                case Result.NOT_RUN:
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_NotRun", // NOI18N
                                    "Not Run")); // NOI18N
                    break;
                default:
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_Unknown", // NOI18N
                                    "Unknown")); // NOI18N
                    break;
            }
            details.add(s.toString());
            Object[] row = {r.getComponentName(), r.getTestName(), status};
            tableModel.addRow(row);
        }//for
        table.sizeColumnsToFit(0);
    }
View Full Code Here


    }


    // We are a ChangeListener of the test harness CheckMgrs
    public void testFinished(EventObject evt) {
        Result r = (Result) evt.getSource();
        StringBuffer s = new StringBuffer("Assertion:" + r.getAssertion() + "\n"); // NOI18N
        String status;
        switch (r.getStatus()) {
            case Result.PASSED:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_Passed", // NOI18N
                                    "Passed")); // NOI18N
                    savePassResultsForDisplay(r);
                    Enumeration e = r.getGoodDetails().elements();
                    while (e.hasMoreElements()) {
                        s.append((String) e.nextElement());
                        s.append("\n"); // NOI18N
                    }
                    break;
                }
            case Result.FAILED:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_Failed", // NOI18N
                                    "FAILED")); // NOI18N
                    saveFailResultsForDisplay(r);
                    Enumeration e = r.getErrorDetails().elements();
                    while (e.hasMoreElements()) {
                        s.append((String) e.nextElement());
                        s.append("\n"); // NOI18N
                    }
                    break;
                }
            case Result.WARNING:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_Warning", // NOI18N
                                    "WARNING")); // NOI18N
                    saveWarnResultsForDisplay(r);
                    Enumeration e = r.getWarningDetails().elements();
                    while (e.hasMoreElements()) {
                        s.append((String) e.nextElement());
                        s.append("\n"); // NOI18N
                    }
                    break;
                }
            case Result.NOT_APPLICABLE:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_NotApplicable", // NOI18N
                                    "Not Applicable")); // NOI18N
                    saveNaResultsForDisplay(r);
                    Enumeration e = r.getNaDetails().elements();
                    while (e.hasMoreElements()) {
                        s.append((String) e.nextElement());
                        s.append("\n"); // NOI18N
                    }
                    break;
                }
            case Result.NOT_IMPLEMENTED:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_NotImplemented", // NOI18N
                                    "Not Implemented")); // NOI18N
                    saveNotImplementedResultsForDisplay(r);
                    break;
                }
            case Result.NOT_RUN:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_NotRun", // NOI18N
                                    "Not Run")); // NOI18N
                    saveNotRunResultsForDisplay(r);
                    break;
                }
            default:
                {
                    status =
                            (smh.getLocalString(
                                    "com.sun.enterprise.tools.verifier.gui.ResultsPanel" + // NOI18N
                            ".Status_Unknown", // NOI18N
                                    "Unknown")); // NOI18N
                    saveDefaultResultsForDisplay(r);
                    break;
                }
        }
        // create a table row for this result
        Object[] row = {r.getComponentName(), r.getTestName(), status};
        if (ControlPanel.getReportLevel() == VerifierConstants.FAIL &&
                r.getStatus() == Result.FAILED) {
            details.add(s.toString());
            tableModel.addRow(row);
        }

        if (ControlPanel.getReportLevel() == VerifierConstants.WARN &&
                (r.getStatus() == Result.FAILED ||
                r.getStatus() == Result.WARNING)) {
            details.add(s.toString());
            tableModel.addRow(row);
        }

        if (ControlPanel.getReportLevel() == VerifierConstants.ALL) {
View Full Code Here

            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 {
View Full Code Here

   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {

    // get the connection
    Result result = getInitializedResult();
    ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
    if(isCCIImplemented(descriptor, result))
    {
      Class c = testConnectionImpl(descriptor, result);
      if (c==null) {
        return result;
      }
      // now check the close() method
      Method m = getMethod(c, "close", null);
      if (m!=null) {
        // passed
        result.addGoodDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}))
        result.passed(smh.getLocalString(                       
              getClass().getName() + ".passed",
              "The connection interface [ {0} ] implements the close() method",
              new Object[] {c.getName()} ));                   
      } else {
        result.addErrorDetails(smh.getLocalString
            ("tests.componentNameConstructor",
             "For [ {0} ]",
             new Object[] {compName.toString()}));
        result.failed(smh.getLocalString(                       
              getClass().getName() + ".failed",
              "Error: The connection interface [ {0} ] does not implement the close() method",
              new Object[] {c.getName()} ));                               
      }
    }
    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;
  }
View Full Code Here

   * @paramm descriptor deployment descriptor for the rar file
   * @return result object containing the result of the individual test
   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {
    Result result = getInitializedResult();
    ComponentNameConstructor compName =
      getVerifierContext().getComponentNameConstructor();
    if(isCCIImplemented(descriptor, result))
    {
      Class c = testConnectionImpl(descriptor, result);
      // failure to load the class are handled in the superclass
      if (c!=null) {
        // now check it does implement the interface
        String interfaceName = getConnectionInterface(descriptor, result);
        testImplementationOf(c, 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;               
  }
View Full Code Here

     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {
       
      Result result = getInitializedResult();
      ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
      if(isCCIImplemented(descriptor, result))
      {
        /*String interfaceName = descriptor.getConnectionFactoryInterface();
        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 connectionfactory-interface"));       
        }*/       
        isClassLoadable("javax.resource.cci.ConnectionFactory", result);
      }
      else
      {
        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;
    }
View Full Code Here

   * @return result object containing the result of the individual test
   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {

    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;
  }
View Full Code Here

     * @return result object containing the result of the individual test
     * performed
     */
    public Result check(ConnectorDescriptor descriptor) {

      Result result = getInitializedResult();
      ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
      if(isCCIImplemented(descriptor, result))
      {
        Class c = testConnectionFactoryImpl(descriptor, result);
        // failure are handled in the superclass
        if (c!=null)
        {
          result.addGoodDetails(smh.getLocalString
              ("tests.componentNameConstructor",
               "For [ {0} ]",
               new Object[] {compName.toString()}))
          result.passed(smh.getLocalString
              (getClass().getName() + ".passed",
               "The class define in the connectionfactory-impl-class tag [ {0} ] is contained in the archive.",
               new Object[] {c.getName()} ));       
        }
      }
      else
      {
        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;       
    }
View Full Code Here

   * @paramm descriptor deployment descriptor for the rar file
   * @return result object containing the result of the individual test
   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {
    Result result = getInitializedResult();
    ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
    if(isCCIImplemented(descriptor, result))
    {
      Class c = testConnectionFactoryImpl(descriptor, result);
      // failure to load the class are handled in the superclass
      if (c!=null) {
        // now check it does implement the interface
        testImplementationOf(c, "javax.resource.Referenceable", 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;               
  }
View Full Code Here

   * @paramm descriptor deployment descriptor for the rar file
   * @return result object containing the result of the individual test
   * performed
   */
  public Result check(ConnectorDescriptor descriptor) {
    Result result = getInitializedResult();
    ComponentNameConstructor compName =
      getVerifierContext().getComponentNameConstructor();
    if(isCCIImplemented(descriptor, result))
    {
      Class c = testConnectionFactoryImpl(descriptor, result);
      if(c != null)
      {
      result.addGoodDetails(smh.getLocalString
          ("tests.componentNameConstructor",
           "For [ {0} ]",
           new Object[] {compName.toString()}));
      result.passed(smh.getLocalString
          ("com.sun.enterprise.tools.verifier.tests.connector.cci.ConnectionFactoryInterfaceImpl.pass1",
           "The class [ {0} ] as defined in the connectionfactory-impl-class deployment descriptor implements javax.resource.cci.ConnectionFactory",
           new Object[] {c.getName()}));
      }
    }
    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"));
    }
    /*Class c = testConnectionFactoryImpl(descriptor, result);
    // failure to load the class are handled in the superclass
View Full Code Here

TOP

Related Classes of com.sun.enterprise.tools.verifier.Result

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.