org.apache.ace.deployment.provider.filebased
Class FileBasedProvider
java.lang.Object
org.apache.ace.deployment.provider.filebased.FileBasedProvider
- All Implemented Interfaces:
- org.apache.ace.deployment.provider.DeploymentProvider, org.osgi.service.cm.ManagedService
public class FileBasedProvider
- extends Object
- implements org.apache.ace.deployment.provider.DeploymentProvider, org.osgi.service.cm.ManagedService
This class reads data from the filesystem. It contains deployment data in the following format: ///
example : storage-directory/ storage-directory/gateway-a storage-directory/gateway-a/1.0.0
storage-directory/gateway-a/1.0.0/bundle1.jar storage-directory/gateway-a/1.0.0/bundle2.jar storage-directory/gateway-a/1.1.0
storage-directory/gateway-a/1.1.0/bundle2.jar storage-directory/gateway-a/1.1.0/bundle3.jar The versions are in the
org.osgi.framework.Version format.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileBasedProvider
public FileBasedProvider()
getBundleData
public List<org.apache.ace.deployment.provider.ArtifactData> getBundleData(String gatewayId,
String version)
throws IllegalArgumentException
- Get the bundle data from the bundles in the // directory It reads the manifest from all the
.jar files in that directory. If the manifest cannot be found, This method can only parse OSGi R4 bundles
- Specified by:
getBundleData
in interface org.apache.ace.deployment.provider.DeploymentProvider
- Throws:
IllegalArgumentException
getBundleData
public List<org.apache.ace.deployment.provider.ArtifactData> getBundleData(String gatewayId,
String versionFrom,
String versionTo)
throws IllegalArgumentException
- Specified by:
getBundleData
in interface org.apache.ace.deployment.provider.DeploymentProvider
- Throws:
IllegalArgumentException
getVersions
public List<String> getVersions(String gatewayId)
throws IllegalArgumentException
- Look in the baseDirectory for the specified gateway. If it exists, get the list of directories in there and check if they
conform to the
org.osgi.framework.Version
format. If it does, it will be in the list of versions that are
returned. If there are no valid versions, return an empty list. If the gateway cannot be found, an
IllegalArgumentException is thrown. The list will be sorted on version.
- Specified by:
getVersions
in interface org.apache.ace.deployment.provider.DeploymentProvider
- Throws:
IllegalArgumentException
updated
public void updated(Dictionary settings)
throws org.osgi.service.cm.ConfigurationException
- Update the configuration for this bundle. It checks if the basedirectory exists and is a directory.
- Specified by:
updated
in interface org.osgi.service.cm.ManagedService
- Throws:
org.osgi.service.cm.ConfigurationException
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.