You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/09/18 14:47:07 UTC
svn commit: r1387124 - in
/karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr:
ObrMBean.java internal/ObrMBeanImpl.java
Author: jbonofre
Date: Tue Sep 18 12:47:07 2012
New Revision: 1387124
URL: http://svn.apache.org/viewvc?rev=1387124&view=rev
Log:
[KARAF-1830] For migration purpose, OBRMBean uses URLs and Bundles attributes
Modified:
karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/ObrMBean.java
karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/internal/ObrMBeanImpl.java
Modified: karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/ObrMBean.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/ObrMBean.java?rev=1387124&r1=1387123&r2=1387124&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/ObrMBean.java (original)
+++ karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/ObrMBean.java Tue Sep 18 12:47:07 2012
@@ -24,13 +24,71 @@ import java.util.List;
*/
public interface ObrMBean {
+ /**
+ * Get the URLs registered in the OBR service.
+ *
+ * @return the list of URLs in the OBR service.
+ * @throws Exception
+ */
+ List<String> getUrls() throws Exception;
+
+ /**
+ * @deprecated use getUrls() instead.
+ */
List<String> listUrls() throws Exception;
+
+ /**
+ * Add a new URL in the OBR service.
+ *
+ * @param url the URL to add in the OBR service
+ * @throws Exception
+ */
void addUrl(String url) throws Exception;
+
+ /**
+ * Remove an URL from the OBR service.
+ *
+ * @param url the URL to remove from the OBR service.
+ * @throws Exception
+ */
void removeUrl(String url) throws Exception;
+
+ /**
+ * Refresh an URL in the OBR service.
+ *
+ * @param url the URL to refresh in the OBR service.
+ * @throws Exception
+ */
void refreshUrl(String url) throws Exception;
+ /**
+ * Get the bundles available in the OBR service.
+ *
+ * @return the list of bundles available in the OBR service.
+ * @throws Exception
+ */
+ TabularData getBundles() throws Exception;
+
+ /**
+ * @deprecated use getBundles() instead.
+ */
TabularData list() throws Exception;
+
+ /**
+ * Deploy a bundle available in the OBR service.
+ *
+ * @param bundle the bundle to deploy.
+ * @throws Exception
+ */
void deploy(String bundle) throws Exception;
+
+ /**
+ * Deploy a bundle available in the OBR service and eventually start it.
+ *
+ * @param bundle the bundle to deploy.
+ * @param start true to start the bundle, false else.
+ * @throws Exception
+ */
void deploy(String bundle, boolean start) throws Exception;
}
Modified: karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/internal/ObrMBeanImpl.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/internal/ObrMBeanImpl.java?rev=1387124&r1=1387123&r2=1387124&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/internal/ObrMBeanImpl.java (original)
+++ karaf/branches/karaf-2.3.x/management/mbeans/obr/src/main/java/org/apache/karaf/management/mbeans/obr/internal/ObrMBeanImpl.java Tue Sep 18 12:47:07 2012
@@ -43,7 +43,7 @@ public class ObrMBeanImpl extends Standa
super(ObrMBean.class);
}
- public List<String> listUrls() throws Exception {
+ public List<String> getUrls() throws Exception {
Repository[] repositories = repositoryAdmin.listRepositories();
List<String> urls = new ArrayList<String>();
for (int i = 0; i < repositories.length; i++) {
@@ -52,6 +52,13 @@ public class ObrMBeanImpl extends Standa
return urls;
}
+ /**
+ * @deprecated use getUrls() instead.
+ */
+ public List<String> listUrls() throws Exception {
+ return getUrls();
+ }
+
public void addUrl(String url) throws Exception {
repositoryAdmin.addRepository(url);
}
@@ -64,7 +71,7 @@ public class ObrMBeanImpl extends Standa
repositoryAdmin.addRepository(url);
}
- public TabularData list() throws Exception {
+ public TabularData getBundles() throws Exception {
CompositeType bundleType = new CompositeType("OBR Resource", "Bundle available in the OBR",
new String[]{"presentationname", "symbolicname", "version"},
new String[]{"Presentation Name", "Symbolic Name", "Version"},
@@ -88,6 +95,13 @@ public class ObrMBeanImpl extends Standa
return table;
}
+ /**
+ * @deprecated use getBundles() instead.
+ */
+ public TabularData list() throws Exception {
+ return getBundles();
+ }
+
public void deploy(String bundle) throws Exception {
deploy(bundle, false);
}