cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1171566 - /cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java
Date Fri, 16 Sep 2011 13:56:16 GMT
Author: simonetripodi
Date: Fri Sep 16 13:56:16 2011
New Revision: 1171566

URL: http://svn.apache.org/viewvc?rev=1171566&view=rev
Log:
first checkin of basic CLI options (print help, debug, print version)

Added:
    cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java  
(with props)

Added: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java?rev=1171566&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java (added)
+++ cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java Fri
Sep 16 13:56:16 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.cli;
+
+import com.beust.jcommander.Parameter;
+
+public final class CliOptions
+{
+
+    @Parameter( names = { "-h", "--help" }, description = "Display help information." )
+    private boolean printHelp;
+
+    @Parameter( names = { "-v", "--version" }, description = "Display version information."
)
+    private boolean printVersion;
+
+    @Parameter( names = { "-X", "--debug" }, description = "Produce execution debug output."
)
+    private boolean debug = false;
+
+    public boolean isPrintHelp()
+    {
+        return printHelp;
+    }
+
+    public boolean isPrintVersion()
+    {
+        return printVersion;
+    }
+
+    public boolean isDebug()
+    {
+        return debug;
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-cli/src/main/java/org/apache/cocoon/cli/CliOptions.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message