[jboss-osgi-commits] JBoss-OSGI SVN: r97936 - in projects/jboss-osgi/projects/runtime/deployment/trunk/src: main/java/org/jboss/osgi/deployment/internal and 1 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Thu Dec 17 03:51:43 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-12-17 03:51:42 -0500 (Thu, 17 Dec 2009)
New Revision: 97936
Modified:
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java
Log:
Align deployment with spi with respect to BundleException handling
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/AbstractDeployerService.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -27,6 +27,7 @@
import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.BundleException;
/**
* An abstract base implementation of the DeployerService.
@@ -36,17 +37,17 @@
*/
public abstract class AbstractDeployerService implements DeployerService
{
- public Deployment createDeployment(URL url)
+ public Deployment createDeployment(URL url) throws BundleException
{
return DeploymentFactory.createDeployment(url);
}
- public Deployment createDeployment(VirtualFile file)
+ public Deployment createDeployment(VirtualFile file) throws BundleException
{
return DeploymentFactory.createDeployment(file);
}
- public Deployment createDeployment(BundleInfo info)
+ public Deployment createDeployment(BundleInfo info) throws BundleException
{
return DeploymentFactory.createDeployment(info);
}
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -48,17 +48,17 @@
/**
* Create a deployment from the given location.
*/
- Deployment createDeployment(URL url);
+ Deployment createDeployment(URL url) throws BundleException;
/**
* Create a deployment from the given file.
*/
- Deployment createDeployment(VirtualFile file);
+ Deployment createDeployment(VirtualFile file) throws BundleException;
/**
* Create a deployment from the given bundle info.
*/
- Deployment createDeployment(BundleInfo info);
+ Deployment createDeployment(BundleInfo info) throws BundleException;
/**
* Deploy an array of bundles
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -38,45 +38,55 @@
/**
* Get the root virtual file
*/
- public VirtualFile getRoot();
+ VirtualFile getRoot();
/**
* Get the bundle location
*/
- public String getLocation();
+ String getLocation();
/**
* Get the bundle symbolic name
*/
- public String getSymbolicName();
+ String getSymbolicName();
/**
* Get the bundle version
*/
- public String getVersion();
+ String getVersion();
/**
* Get the manifest header for the given key.
*/
- public String getManifestHeader(String key);
+ String getManifestHeader(String key);
/**
* Get the start level associated with this deployment
*/
- public int getStartLevel();
+ int getStartLevel();
/**
* Set the start level associated with this deployment
*/
- public void setStartLevel(int startLevel);
+ void setStartLevel(int startLevel);
/**
* Get the autostart flag associated with this deployment
*/
- public boolean isAutoStart();
+ boolean isAutoStart();
/**
* Set the autostart flag associated with this deployment
*/
- public void setAutoStart(boolean autoStart);
+ void setAutoStart(boolean autoStart);
+
+ /**
+ * Get the update flag associated with this deployment
+ */
+ boolean isBundleUpdate();
+
+ /**
+ * Set the update flag associated with this deployment
+ */
+ void setBundleUpdate(boolean update);
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentFactory.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -28,6 +28,7 @@
import org.jboss.osgi.deployment.internal.DeploymentImpl;
import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.BundleException;
/**
* A deployment factory.
@@ -42,19 +43,19 @@
{
}
- public static Deployment createDeployment(URL url)
+ public static Deployment createDeployment(URL url) throws BundleException
{
BundleInfo info = BundleInfo.createBundleInfo(url);
return new DeploymentImpl(info);
}
- public static Deployment createDeployment(VirtualFile file)
+ public static Deployment createDeployment(VirtualFile file) throws BundleException
{
BundleInfo info = BundleInfo.createBundleInfo(file);
return new DeploymentImpl(info);
}
- public static Deployment createDeployment(BundleInfo info)
+ public static Deployment createDeployment(BundleInfo info) throws BundleException
{
return new DeploymentImpl(info);
}
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -43,6 +43,7 @@
private BundleInfo info;
private int startLevel;
private boolean autoStart;
+ private boolean update;
public DeploymentImpl(BundleInfo info)
{
@@ -52,78 +53,61 @@
this.info = info;
}
- /**
- * Get the root virtual file
- */
public VirtualFile getRoot()
{
return info.getRoot();
}
- /**
- * Get the bundle location
- */
public String getLocation()
{
return info.getLocation();
}
- /**
- * Get the bundle symbolic name
- */
public String getSymbolicName()
{
return info.getSymbolicName();
}
- /**
- * Get the bundle version
- */
public String getVersion()
{
return info.getVersion().toString();
}
- /**
- * Get the manifest header for the given key.
- */
public String getManifestHeader(String key)
{
return info.getManifestHeader(key);
}
- /**
- * Get the start level associated with this deployment
- */
public int getStartLevel()
{
return startLevel;
}
- /**
- * Set the start level associated with this deployment
- */
public void setStartLevel(int startLevel)
{
this.startLevel = startLevel;
}
- /**
- * Get the autostart flag associated with this deployment
- */
public boolean isAutoStart()
{
return autoStart;
}
- /**
- * Set the autostart flag associated with this deployment
- */
public void setAutoStart(boolean autoStart)
{
this.autoStart = autoStart;
}
+ public boolean isBundleUpdate()
+ {
+ return update;
+ }
+
+ public void setBundleUpdate(boolean update)
+ {
+ this.update = update;
+ }
+
@Override
public boolean equals(Object obj)
{
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java 2009-12-17 08:48:27 UTC (rev 97935)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/test/java/org/jboss/test/osgi/deployment/simple/DeploymentSerializationTestCase.java 2009-12-17 08:51:42 UTC (rev 97936)
@@ -31,7 +31,6 @@
import java.io.File;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.net.MalformedURLException;
import org.jboss.osgi.deployment.deployer.Deployment;
import org.jboss.osgi.deployment.internal.DeploymentImpl;
@@ -83,7 +82,7 @@
assertEquals(dep, res);
}
- private BundleInfo getBundleInfo() throws MalformedURLException
+ private BundleInfo getBundleInfo() throws Exception
{
File file = new File("target/test-libs/simple-bundle.jar");
assertTrue("File exists: " + file, file.exists());
More information about the jboss-osgi-commits
mailing list