Return-Path: X-Original-To: apmail-incubator-rat-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-rat-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7EB5896B7 for ; Sun, 15 Apr 2012 10:17:31 +0000 (UTC) Received: (qmail 7163 invoked by uid 500); 15 Apr 2012 10:17:31 -0000 Delivered-To: apmail-incubator-rat-commits-archive@incubator.apache.org Received: (qmail 7140 invoked by uid 500); 15 Apr 2012 10:17:31 -0000 Mailing-List: contact rat-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: rat-dev@incubator.apache.org Delivered-To: mailing list rat-commits@incubator.apache.org Received: (qmail 7133 invoked by uid 99); 15 Apr 2012 10:17:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 10:17:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 10:17:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 84B412388C2D for ; Sun, 15 Apr 2012 10:16:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r813058 [2/8] - in /websites/staging/rat/trunk/content: ./ rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/ rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/ rat/whisker/apache-whisker-cli/apidocs/org/apache/cread... Date: Sun, 15 Apr 2012 10:16:45 -0000 To: rat-commits@incubator.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120415101647.84B412388C2D@eris.apache.org> Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/CommandLineOption.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/CommandLineOption.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/CommandLineOption.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,175 @@ + + + + + + + +Uses of Class org.apache.creadur.whisker.cli.CommandLineOption (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.apache.creadur.whisker.cli.CommandLineOption

+
+ + + + + +
+Uses of CommandLineOption in org.apache.creadur.whisker.cli
+  +

+ + + + + + + + + + + + + +
Methods in org.apache.creadur.whisker.cli that return CommandLineOption
+static CommandLineOptionCommandLineOption.valueOf(String name) + +
+          Returns the enum constant of this type with the specified name.
+static CommandLineOption[]CommandLineOption.values() + +
+          Returns an array containing the constants of this enum type, in +the order they are declared.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2011-2012 Apache Software Foundation. All Rights Reserved. + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/Main.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/Main.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/Main.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,143 @@ + + + + + + + +Uses of Class org.apache.creadur.whisker.cli.Main (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.apache.creadur.whisker.cli.Main

+
+No usage of org.apache.creadur.whisker.cli.Main +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2011-2012 Apache Software Foundation. All Rights Reserved. + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/SystemLog.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/SystemLog.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/class-use/SystemLog.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,143 @@ + + + + + + + +Uses of Class org.apache.creadur.whisker.cli.SystemLog (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Class
org.apache.creadur.whisker.cli.SystemLog

+
+No usage of org.apache.creadur.whisker.cli.SystemLog +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2011-2012 Apache Software Foundation. All Rights Reserved. + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-frame.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-frame.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-frame.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,46 @@ + + + + + + + +org.apache.creadur.whisker.cli (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + +org.apache.creadur.whisker.cli + + + + +
+Classes  + +
+Main +
+SystemLog
+ + + + + + +
+Enums  + +
+CommandLineOption
+ + + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-summary.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-summary.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-summary.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,189 @@ + + + + + + + +org.apache.creadur.whisker.cli (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.apache.creadur.whisker.cli +

+Runs Apache Whisker from the command line. +

+See: +
+          Description +

+ + + + + + + + + + + + + +
+Class Summary
MainCommand line interface for whisker.
SystemLogLogs important messages to system err.
+  + +

+ + + + + + + + + +
+Enum Summary
CommandLineOptionDescribes an option on the command line.
+  + +

+

+Package org.apache.creadur.whisker.cli Description +

+ +

+Runs Apache Whisker from the command line. +

+ +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2011-2012 Apache Software Foundation. All Rights Reserved. + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-tree.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-tree.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-tree.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,160 @@ + + + + + + + +org.apache.creadur.whisker.cli Class Hierarchy (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Hierarchy For Package org.apache.creadur.whisker.cli +

+
+

+Class Hierarchy +

+
    +
  • java.lang.Object
      +
    • org.apache.creadur.whisker.cli.Main
    • org.apache.creadur.whisker.cli.SystemLog (implements org.apache.commons.logging.Log) +
    +
+

+Enum Hierarchy +

+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2011-2012 Apache Software Foundation. All Rights Reserved. + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-use.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-use.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/apidocs/org/apache/creadur/whisker/cli/package-use.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,156 @@ + + + + + + + +Uses of Package org.apache.creadur.whisker.cli (Apache Whisker::Command Line Interface 0.1-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Uses of Package
org.apache.creadur.whisker.cli

+
+ + + + + + + + +
+Classes in org.apache.creadur.whisker.cli used by org.apache.creadur.whisker.cli
CommandLineOption + +
+          Describes an option on the command line.
+  +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2011-2012 Apache Software Foundation. All Rights Reserved. + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/frame-sourcefiles-org.apache.creadur.whisker.cli.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/frame-sourcefiles-org.apache.creadur.whisker.cli.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/frame-sourcefiles-org.apache.creadur.whisker.cli.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,29 @@ + + + + +Coverage Report Classes + + + +
+org.apache.creadur.whisker.cli +
+
 
+
Classes
+ + + + + + + + + + + + +
CommandLineOption (100%)
Main (60%)
SystemLog (3%)
+ + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/frame-summary-org.apache.creadur.whisker.cli.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/frame-summary-org.apache.creadur.whisker.cli.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/frame-summary-org.apache.creadur.whisker.cli.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,46 @@ + + + + +Coverage Report + + + + + + + +
Coverage Report - org.apache.creadur.whisker.cli
+
 
+ + + + + +
Package # Classes Line Coverage Branch Coverage Complexity
org.apache.creadur.whisker.cli3
56%
51/90
92%
13/14
1.263
+ +
 
+ + + + + + + + + + +
Classes in this Package Line Coverage Branch Coverage Complexity
CommandLineOption
100%
32/32
100%
6/6
1.375
Main
60%
18/30
87%
7/8
1.7
SystemLog
3%
1/28
N/A
1
+ + + + Added: websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/org.apache.creadur.whisker.cli.CommandLineOption.html ============================================================================== --- websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/org.apache.creadur.whisker.cli.CommandLineOption.html (added) +++ websites/staging/rat/trunk/content/rat/whisker/apache-whisker-cli/cobertura/org.apache.creadur.whisker.cli.CommandLineOption.html Sun Apr 15 10:16:43 2012 @@ -0,0 +1,304 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.creadur.whisker.cli.CommandLineOption
+
 
+ + + + +
Classes in this File Line Coverage Branch Coverage Complexity
CommandLineOption
100%
32/32
100%
6/6
1.375
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 /**
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements.  See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership.  The ASF licenses this file
 6  
  *  to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  *  with the License.  You may obtain a copy of the License at
 9  
  *
 10  
  *   http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied.  See the License for the
 16  
  * specific language governing permissions and limitations
 17  
  * under the License.
 18  
  */
 19  
 package org.apache.creadur.whisker.cli;
 20  
 
 21  
 import org.apache.commons.cli.CommandLine;
 22  
 import org.apache.commons.cli.Option;
 23  
 import org.apache.commons.cli.OptionBuilder;
 24  
 import org.apache.commons.cli.OptionGroup;
 25  
 import org.apache.commons.cli.Options;
 26  
 
 27  
 /**
 28  
  * Describes an option on the command line.
 29  
  */
 30  46
 public enum CommandLineOption {
 31  
 
 32  
     /** License descriptor command line argument. */
 33  2
     LICENSE_DESCRIPTION("license-descriptor", 'l', 
 34  
             "use given license descriptor", true, "file", false),
 35  
     /** Application source command line argument. */
 36  2
     SOURCE("source", 's', "application source", false, "dir", false),
 37  
     /** Generation command line argument. */
 38  2
     ACT_TO_GENERATE("generate", 'g', 
 39  
             "generate license and notice", false, null, true),
 40  
     /** Audit command line argument. */
 41  2
     ACT_TO_AUDIT("audit", 'a', "report audit details", false, null, true);
 42  
 
 43  
     /**
 44  
      * Creates options for the command line.
 45  
      * @return not null
 46  
      */
 47  
     public static Options options() {
 48  44
         final Options options = new Options();
 49  44
         final OptionGroup acts = new OptionGroup();
 50  44
         acts.setRequired(true);
 51  220
         for (final CommandLineOption option : values()) {
 52  176
             final Option cliOption = option.create();
 53  176
             if (option.isAct) {
 54  88
                 acts.addOption(cliOption);
 55  
             } else {
 56  88
                 options.addOption(cliOption);
 57  
             }
 58  
         }
 59  44
         options.addOptionGroup(acts);
 60  44
         return options;
 61  
     }
 62  
 
 63  
     /** The long name used for this command line argument. */
 64  
     private final String longName;
 65  
     /** The character short for this command line argument.*/
 66  
     private final char shortName;
 67  
     /** A description of this command line argument suitable for user.*/
 68  
     private final String description;
 69  
     /** Is this a mandatory argument? */
 70  
     private final boolean required;
 71  
     /** The argument name. */
 72  
     private final String argument;
 73  
     /** Is this argument within the act group? */
 74  
     private final boolean isAct;
 75  
 
 76  
     /**
 77  
      * Describes one argument.
 78  
      * @param longName not null
 79  
      * @param shortName not null
 80  
      * @param description not null
 81  
      * @param required is this mandatory?
 82  
      * @param argument possibly null
 83  
      * @param isAct is this argument an act?
 84  
      */
 85  
     private CommandLineOption(final String longName,
 86  
             final char shortName,
 87  
             final String description,
 88  
             final boolean required,
 89  
             final String argument,
 90  8
             final boolean isAct) {
 91  8
         this.longName = longName;
 92  8
         this.shortName = shortName;
 93  8
         this.description = description;
 94  8
         this.required = required;
 95  8
         this.argument = argument;
 96  8
         this.isAct = isAct;
 97  8
     }
 98  
 
 99  
     /**
 100  
      * Gets the long name of this command line argument.
 101  
      * @return not null
 102  
      */
 103  
     public String getLongName() {
 104  244
         return longName;
 105  
     }
 106  
 
 107  
     /**
 108  
      * Gets the short name of this command line argument.
 109  
      * @return the character short for this option
 110  
      */
 111  
     public char getShortName() {
 112  370
         return shortName;
 113  
     }
 114  
 
 115  
     /**
 116  
      * Gets the description for this option.
 117  
      * @return not null
 118  
      */
 119  
     public String getDescription() {
 120  178
         return description;
 121  
     }
 122  
 
 123  
     /**
 124  
      * Builds a representation.
 125  
      * @return not null
 126  
      */
 127  
     @SuppressWarnings("static-access")
 128  
     public Option create() {
 129  176
         final OptionBuilder builder = OptionBuilder
 130  
             .isRequired(required)
 131  
             .withDescription(getDescription())
 132  
             .withLongOpt(getLongName());
 133  176
         if (argument != null) {
 134  88
             builder.hasArg().withArgName(argument);
 135  
         }
 136  176
         return builder.create(getShortName());
 137  
     }
 138  
 
 139  
     /**
 140  
      * Gets an option value from the command line.
 141  
      * @param commandLine not null
 142  
      * @return not null
 143  
      */
 144  
     public String getOptionValue(final CommandLine commandLine) {
 145  84
         return commandLine.getOptionValue(getShortName());
 146  
     }
 147  
 
 148  
     /**
 149  
      * Is the short name option set?
 150  
      * @param commandLine not null
 151  
      * @return true when the option is present, false otherwise
 152  
      */
 153  
     public boolean isSetOn(final CommandLine commandLine) {
 154  66
         return commandLine.hasOption(getShortName());
 155  
     }
 156  
 }
+ + + +