Package org.eclipse.wst.wsi.internal.core.analyzer.config

Examples of org.eclipse.wst.wsi.internal.core.analyzer.config.AssertionResultsOption


          wsdlref.setWSDLElement(wsdlelem);
       
          analyzerconfig.setWSDLReference(wsdlref);
        }

        AssertionResultsOption aro = new AssertionResultsOptionImpl();
        aro.setAssertionResultType(AssertionResultType.newInstance(NOTPASSED));
        aro.setShowAssertionDescription(false);
        aro.setShowFailureDetail(false);
        aro.setShowFailureMessage(false);
        aro.setShowMessageEntry(false);

        // although we don't use a stylesheet for our application it is required or the
        // WS-I tools will fail
        AddStyleSheet addstylesheet = new AddStyleSheetImpl();
View Full Code Here


      wsdlReference.setWSDLLocation(wsdlURI);
      DocumentFactory documentFactory = DocumentFactory.newInstance();
      // Initialize the BasicProfileAnalyzer using an analyzerconfig object
      AnalyzerConfig analyzerconfig = documentFactory.newAnalyzerConfig();

      AssertionResultsOption aro = new AssertionResultsOptionImpl();
      aro.setAssertionResultType(AssertionResultType.newInstance(NOTPASSED));
      aro.setShowAssertionDescription(false);
      aro.setShowFailureDetail(false);
      aro.setShowFailureMessage(false);
      aro.setShowMessageEntry(false);

      // although we don't use a stylesheet for our application it is required or the
      // WS-I tools will fail
      AddStyleSheet addstylesheet = new AddStyleSheetImpl();
View Full Code Here

    // Analyzer config object which will be merged after all of the input parms are processed
    AnalyzerConfig analyzerConfigFromArgs = null;

    // Assertion results option
    AssertionResultsOption assertionResultsOption = null;

    // If no input arguments, then throw exception
    if (args.length == 0)
    {
      // ADD:
      throw new IllegalArgumentException(
        getMessage("usage01", Analyzer.USAGE_MESSAGE));
    }

    // Parse the command line arguments to locate the config file option (if it was specified)
    for (int argCount = 0; argCount < args.length; argCount++)
    {
      // -config
      if ((args[argCount].equalsIgnoreCase("-config"))
        || (args[argCount].equals("-c")))
      {
        argCount++;
        analyzerConfigFromArgs =
          analyzerConfigReader.readAnalyzerConfig(
            getOptionValue(args, argCount));
      }
    }

    // If config file was not specified, then create analyzer config object
    if (analyzerConfigFromArgs == null)
    {
      analyzerConfigFromArgs = new AnalyzerConfigImpl();
      analyzerConfigFromArgs.init(this.messageList);
    }

    // Get assertion results option
    if ((assertionResultsOption =
      analyzerConfigFromArgs.getAssertionResultsOption())
      == null)
    {
      assertionResultsOption = new AssertionResultsOptionImpl();
      analyzerConfigFromArgs.setAssertionResultsOption(assertionResultsOption);
    }

    // Parse all of the command line arguments
    for (int argCount = 0; argCount < args.length; argCount++)
    {
      // -config
      if ((args[argCount].equalsIgnoreCase("-config"))
        || (args[argCount].equals("-c")))
      {
        // Skip this option since it was already processed
        argCount++;
      }

      // -verbose
      else if (
        (args[argCount].equalsIgnoreCase("-verbose"))
          || (args[argCount].equals("-v")))
      {
        argCount++;
        analyzerConfigFromArgs.setVerboseOption(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -assertionResults
      else if (
        (args[argCount].equalsIgnoreCase("-assertionResults"))
          || (args[argCount].equals("-a")))
      {
        argCount++;
        assertionResultsOption.setAssertionResultType(
          AssertionResultType.newInstance(getOptionValue(args, argCount)));
      }

      // -messageEntry
      else if (
        (args[argCount].equalsIgnoreCase("-messageEntry"))
          || (args[argCount].equals("-M")))
      {
        argCount++;
        assertionResultsOption.setShowMessageEntry(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -assertionDescription
      else if (
        (args[argCount].equalsIgnoreCase("-assertionDescription"))
          || (args[argCount].equals("-A")))
      {
        argCount++;
        assertionResultsOption.setShowAssertionDescription(
          Boolean.valueOf(args[argCount]).booleanValue());
      }

      // -failureMessage
      else if (
        (args[argCount].equalsIgnoreCase("-failureMessage"))
          || (args[argCount].equals("-F")))
      {
        argCount++;
        assertionResultsOption.setShowFailureMessage(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -failureDetail
      else if (
        (args[argCount].equalsIgnoreCase("-failureDetail"))
          || (args[argCount].equals("-D")))
      {
        argCount++;
        assertionResultsOption.setShowFailureDetail(
          Boolean.valueOf(getOptionValue(args, argCount)).booleanValue());
      }

      // -logFile
      else if (
View Full Code Here

      // <assertionResults>
      else if (isElement(nextElement, WSIConstants.ELEM_ASSERTION_RESULTS))
      {
        // Create assertion results option object
        AssertionResultsOption assertionResultsOption =
          new AssertionResultsOptionImpl();
        analyzerConfig.setAssertionResultsOption(assertionResultsOption);

        // Set result type
        String resultType =
          XMLUtils.getAttributeValue(nextElement, WSIConstants.ATTR_TYPE);
        assertionResultsOption.setAssertionResultType(
          AssertionResultType.newInstance(resultType));

        // Set show log entry
        assertionResultsOption.setShowMessageEntry(
          XMLUtils.getBooleanValue(
            nextElement,
            WSIConstants.ATTR_MESSAGE_ENTRY,
            assertionResultsOption.getShowMessageEntry()));

        // Set show failure message
        assertionResultsOption.setShowFailureMessage(
          XMLUtils.getBooleanValue(
            nextElement,
            WSIConstants.ATTR_FAILURE_MESSAGE,
            assertionResultsOption.getShowFailureMessage()));

        // Set show failure detail
        assertionResultsOption.setShowFailureDetail(
          XMLUtils.getBooleanValue(
            nextElement,
            WSIConstants.ATTR_FAILURE_DETAIL,
            assertionResultsOption.getShowFailureDetail()));

        // REMOVE: Set show warning message
        //assertionResultsOption.setShowWarningMessage(XMLUtils.getBooleanValue(nextElement,
        //      WSIConstants.ATTR_WARNING_MESSAGE, assertionResultsOption.getShowWarningMessage()));
      }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsi.internal.core.analyzer.config.AssertionResultsOption

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.