geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r918360 - in /geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main: java/org/apache/geronimo/shell/deploy/EncryptCommand.java resources/OSGI-INF/blueprint/shell-deploy.xml
Date Wed, 03 Mar 2010 08:07:00 GMT
Author: genspring
Date: Wed Mar  3 08:07:00 2010
New Revision: 918360

URL: http://svn.apache.org/viewvc?rev=918360&view=rev
Log:
GERONIMO-3003 create karaf command wraaper for encryptCommand,  patch from Vanessa Wang.

Added:
    geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/EncryptCommand.java
  (with props)
Modified:
    geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/resources/OSGI-INF/blueprint/shell-deploy.xml

Added: geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/EncryptCommand.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/EncryptCommand.java?rev=918360&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/EncryptCommand.java
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/EncryptCommand.java
Wed Mar  3 08:07:00 2010
@@ -0,0 +1,35 @@
+package org.apache.geronimo.shell.deploy;
+
+import java.io.PrintWriter;
+
+import org.apache.felix.gogo.commands.Argument;
+import org.apache.felix.gogo.commands.Command;
+import org.apache.geronimo.cli.deployer.BaseCommandArgs;
+import org.apache.geronimo.deployment.cli.AbstractCommand;
+import org.apache.geronimo.deployment.cli.CommandEncrypt;
+import org.apache.geronimo.deployment.cli.ConsoleReader;
+import org.apache.geronimo.deployment.cli.ServerConnection;
+import org.apache.geronimo.deployment.cli.StreamConsoleReader;
+
+@Command(scope = "deploy", name = "encrypt", description = "Encrypt strings")
+public class EncryptCommand extends ConnectCommand{
+    
+    @Argument(required = true, description = "Encrypted Message")
+    String message;
+    
+    @Override
+    protected Object doExecute() throws Exception {
+        ServerConnection connection = connect();
+
+        AbstractCommand command = new CommandEncrypt();
+
+        ConsoleReader consoleReader = new StreamConsoleReader(session.getKeyboard(),new PrintWriter(session.getConsole(),true));
+
+        BaseCommandArgs args = new BaseCommandArgs(message.split(" "));
+
+        command.execute(consoleReader, connection, args);
+
+        return null;
+    }
+
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/EncryptCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/resources/OSGI-INF/blueprint/shell-deploy.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/resources/OSGI-INF/blueprint/shell-deploy.xml?rev=918360&r1=918359&r2=918360&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/resources/OSGI-INF/blueprint/shell-deploy.xml
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/resources/OSGI-INF/blueprint/shell-deploy.xml
Wed Mar  3 08:07:00 2010
@@ -89,6 +89,10 @@
             <action class="org.apache.geronimo.shell.deploy.UndeployModuleCommand">
             </action>
         </command>
+        <command name="deploy/ecrypty">
+            <action class="org.apache.geronimo.shell.deploy.EncryptCommand">
+            </action>
+        </command>
     </command-bundle>
 
 </blueprint>



Mime
View raw message