|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.deploymentadmin.AbstractDeploymentPackage
public abstract class AbstractDeploymentPackage
Base class for various types of deployment packages. Indifferent in regard to how the deployment package data is obtained, this should be handled by extending classes.
Field Summary | |
---|---|
protected static AbstractDeploymentPackage |
emptyPackage
|
Fields inherited from interface org.osgi.service.deploymentadmin.DeploymentPackage |
---|
EVENT_DEPLOYMENTPACKAGE_CURRENTVERSION, EVENT_DEPLOYMENTPACKAGE_NAME, EVENT_DEPLOYMENTPACKAGE_NEXTVERSION, EVENT_DEPLOYMENTPACKAGE_READABLENAME |
Constructor Summary | |
---|---|
AbstractDeploymentPackage(Manifest manifest,
BundleContext bundleContext)
Creates an instance of this class. |
Method Summary | |
---|---|
protected AbstractInfo |
getAbstractInfoByPath(String path)
Determines the info about either a bundle or processed resource based on it's path/resource-id. |
Bundle |
getBundle(String symbolicName)
|
BundleInfoImpl |
getBundleInfoByName(String symbolicName)
Determines the info about a bundle resource based on the bundle symbolic name. |
BundleInfoImpl |
getBundleInfoByPath(String path)
Determines the info about a bundle based on it's path/resource-id. |
BundleInfoImpl[] |
getBundleInfoImpls()
Returns the bundles of this deployment package as an array of BundleInfoImpl objects. |
BundleInfo[] |
getBundleInfos()
|
abstract InputStream |
getBundleStream(String symbolicName)
Determines the data stream of a bundle resource based on the bundle symbolic name |
abstract InputStream |
getCurrentEntryStream()
Determines the data stream to the current entry of this deployment package, use this together with the getNextEntry method. |
String |
getHeader(String header)
|
String |
getName()
|
abstract AbstractInfo |
getNextEntry()
Determines the next resource entry in this deployment package based on the order in which the resources appeared when the package was originally received. |
abstract BundleInfoImpl[] |
getOrderedBundleInfos()
Determines the bundles of this deployment package in the order in which they were originally received. |
abstract ResourceInfoImpl[] |
getOrderedResourceInfos()
Determines the resources of this deployment package in the order in which they were originally received. |
String |
getResourceHeader(String resource,
String header)
|
ResourceInfoImpl |
getResourceInfoByPath(String path)
Determines the info about a processed resource based on it's path/resource-id. |
ResourceInfoImpl[] |
getResourceInfos()
Returns the processed resources of this deployment package as an array of ResourceInfoImpl objects. |
ServiceReference |
getResourceProcessor(String resource)
|
String[] |
getResources()
|
Version |
getVersion()
|
VersionRange |
getVersionRange()
If this deployment package is a fix package this method determines the version range this deployment package can be applied to. |
boolean |
isFixPackage()
Determines whether this deployment package is a fix package. |
boolean |
isStale()
|
void |
uninstall()
|
boolean |
uninstallForced()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.osgi.service.deploymentadmin.DeploymentPackage |
---|
equals, getDisplayName, getIcon, hashCode |
Field Detail |
---|
protected static final AbstractDeploymentPackage emptyPackage
Constructor Detail |
---|
public AbstractDeploymentPackage(Manifest manifest, BundleContext bundleContext) throws DeploymentException
manifest
- The manifest of the deployment package.bundleContext
- The bundle context.
DeploymentException
- Thrown if the specified manifest does not describe a valid deployment package.Method Detail |
---|
public Bundle getBundle(String symbolicName)
getBundle
in interface DeploymentPackage
public BundleInfo[] getBundleInfos()
getBundleInfos
in interface DeploymentPackage
public BundleInfoImpl[] getBundleInfoImpls()
BundleInfoImpl
objects.
BundleInfoImpl
objects for each bundle this deployment package.public ResourceInfoImpl[] getResourceInfos()
ResourceInfoImpl
objects.
ResourceInfoImpl
objects for each processed resource of this deployment package.public boolean isFixPackage()
public String getHeader(String header)
getHeader
in interface DeploymentPackage
public String getName()
getName
in interface DeploymentPackage
public String getResourceHeader(String resource, String header)
getResourceHeader
in interface DeploymentPackage
public ServiceReference getResourceProcessor(String resource)
getResourceProcessor
in interface DeploymentPackage
public String[] getResources()
getResources
in interface DeploymentPackage
public Version getVersion()
getVersion
in interface DeploymentPackage
public VersionRange getVersionRange()
VersionRange
the fix package can be applied to or null
if it is not a fix package.public boolean isStale()
isStale
in interface DeploymentPackage
public void uninstall() throws DeploymentException
uninstall
in interface DeploymentPackage
DeploymentException
public boolean uninstallForced() throws DeploymentException
uninstallForced
in interface DeploymentPackage
DeploymentException
public abstract BundleInfoImpl[] getOrderedBundleInfos()
BundleInfoImpl
objects of the bundles in this deployment package, ordered in the way they appeared when the deployment package was first received.public abstract ResourceInfoImpl[] getOrderedResourceInfos()
ResourceInfoImpl
objects of all processed resources in this deployment package, ordered in the way they appeared when the deployment package was first receivedpublic ResourceInfoImpl getResourceInfoByPath(String path)
path
- String containing a (processed) resource path
ResourceInfoImpl
for the resource identified by the specified path or null if the path is unknown or does not describe a processed resourceprotected AbstractInfo getAbstractInfoByPath(String path)
path
- String containing a resource path (either bundle or processed resource)
AbstractInfoImpl
for the resource identified by the specified path or null if the path is unknownpublic BundleInfoImpl getBundleInfoByPath(String path)
path
- String containing a bundle path
BundleInfoImpl
for the bundle resource identified by the specified path or null if the path is unknown or does not describe a bundle resourcepublic BundleInfoImpl getBundleInfoByName(String symbolicName)
symbolicName
- String containing a bundle symbolic name
BundleInfoImpl
for the bundle identified by the specified symbolic name or null if the symbolic name is unknownpublic abstract InputStream getBundleStream(String symbolicName) throws IOException
symbolicName
- Bundle symbolic name
IOException
- If the bundle can not be properly offered as an inputstreampublic abstract AbstractInfo getNextEntry() throws IOException
AbstractInfo
describing the next resource entry (as determined by the order in which the deployment package was received originally) or null if there is no next entry
IOException
- if the next entry can not be properly determinedpublic abstract InputStream getCurrentEntryStream()
getNextEntry
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |