harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r412919 - in /incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool: ArgumentsParser.java KeytoolParameters.java Main.java
Date Fri, 09 Jun 2006 04:05:47 GMT
Author: mloenko
Date: Thu Jun  8 21:05:47 2006
New Revision: 412919

URL: http://svn.apache.org/viewvc?rev=412919&view=rev
Log:
keytool stubs from HARMONY-576

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/ArgumentsParser.java
    incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/KeytoolParameters.java
    incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/Main.java

Added: incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/ArgumentsParser.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/ArgumentsParser.java?rev=412919&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/ArgumentsParser.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/ArgumentsParser.java
Thu Jun  8 21:05:47 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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.harmony.tools.keytool;
+
+/**
+ * The class to interact with the user - parse the program arguments, ask for
+ * confirmations, and necessary parameters which haven't been set in the command
+ * line.
+ */
+
+class ArgumentsParser {
+    /**
+     * The method finds known options in args which is usually taken from
+     * command line and sets the corresponding fields of the returned
+     * KeytoolParameters object to given values.
+     */
+    static KeytoolParameters parseArgs(String[] args){
+        // TODO
+        throw new RuntimeException("The method is not implemented yet.");
+    }
+
+    /**
+     * Checks if the needed values are set and, if not, prompts for them.
+     */
+    static void getAdditionalParameters(KeytoolParameters param){
+        // TODO
+        throw new RuntimeException("The method is not implemented yet.");
+    }
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/KeytoolParameters.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/KeytoolParameters.java?rev=412919&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/KeytoolParameters.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/KeytoolParameters.java
Thu Jun  8 21:05:47 2006
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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.harmony.tools.keytool;
+
+/**
+ * The class encapsulates paramaters for Keytool most of which are ususally given
+ * in command line.
+ */
+public class KeytoolParameters {
+    // TODO
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/Main.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/Main.java?rev=412919&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/Main.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/tools/src/main/java/org/apache/harmony/tools/keytool/Main.java
Thu Jun  8 21:05:47 2006
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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.harmony.tools.keytool;
+
+/**
+ * The main class that bundles command line parsing, interaction with the user
+ * and work with keys and certificates.
+ *
+ * Class that implements the functionality of the key and certificate management
+ * tool.
+ */
+public class Main {
+
+    /**
+     * Does the actual work with keys and certificates, based on the parameter
+     * param. If something goes wrong an exception is thrown.
+     */
+    static void doWork(KeytoolParameters param) throws Exception {
+        // TODO
+        throw new RuntimeException("The method is not implemented yet.");
+    }
+
+    /**
+     * The main method to run from another program.
+     * 
+     * @param args -
+     *            command line with options.
+     */
+    public static void run(String[] args) throws Exception {
+        // TODO
+        throw new RuntimeException("The method is not implemented yet.");
+    }
+
+    /**
+     * The main method to run from command line.
+     * 
+     * @param args -
+     *            command line with options.
+     */
+    public static void main(String[] args) {
+        try {
+            run(args);
+        } catch (Exception e) {
+            // System.out.println("Keytool error: " + e);
+            e.printStackTrace();
+        }
+    }
+}



Mime
View raw message