You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/26 10:43:15 UTC
svn commit: r707960 - in
/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main:
java/org/apache/servicemix/kernel/gshell/osgi/ resources/META-INF/spring/
resources/org/apache/servicemix/kernel/gshell/osgi/
Author: gnodet
Date: Sun Oct 26 02:43:15 2008
New Revision: 707960
URL: http://svn.apache.org/viewvc?rev=707960&view=rev
Log:
SMX4KNL-127: Add osgi/update command, patch provided by David Greco
Added:
servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.java
servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.properties (contents, props changed)
- copied, changed from r707882, servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/InstallBundle.properties
Modified:
servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml
Added: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.java?rev=707960&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.java (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/java/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.java Sun Oct 26 02:43:15 2008
@@ -0,0 +1,39 @@
+/*
+ * 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.servicemix.kernel.gshell.osgi;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.geronimo.gshell.clp.Argument;
+import org.osgi.framework.Bundle;
+
+public class UpdateBundle extends BundleCommand {
+
+ @Argument(required = false, description = "Bundle location", index=1)
+ String location;
+
+ protected void doExecute(Bundle bundle) throws Exception {
+ if (location != null) {
+ InputStream is = new URL(location).openStream();
+ bundle.update(is);
+ } else {
+ bundle.update();
+ }
+ }
+
+}
\ No newline at end of file
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml?rev=707960&r1=707959&r2=707960&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/META-INF/spring/gshell-osgi.xml Sun Oct 26 02:43:15 2008
@@ -53,6 +53,9 @@
<gshell:command name="osgi/refresh">
<gshell:action class="org.apache.servicemix.kernel.gshell.osgi.RefreshBundle" />
</gshell:command>
+ <gshell:command name="osgi/update">
+ <gshell:action class="org.apache.servicemix.kernel.gshell.osgi.UpdateBundle" />
+ </gshell:command>
<gshell:command name="osgi/resolve">
<gshell:action class="org.apache.servicemix.kernel.gshell.osgi.ResolveBundle" />
</gshell:command>
Copied: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.properties (from r707882, servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/InstallBundle.properties)
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.properties?p2=servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.properties&p1=servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/InstallBundle.properties&r1=707882&r2=707960&rev=707960&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/InstallBundle.properties (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.properties Sun Oct 26 02:43:15 2008
@@ -21,7 +21,7 @@
## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
##
-command.description=Install bundle
+command.description=Update bundle
command.manual=\
TODO: about manual
\ No newline at end of file
Propchange: servicemix/smx4/kernel/trunk/gshell/gshell-osgi/src/main/resources/org/apache/servicemix/kernel/gshell/osgi/UpdateBundle.properties
------------------------------------------------------------------------------
svn:mergeinfo =