public class BundleRevisionImpl extends java.lang.Object implements BundleRevision, Resource
| Modifier and Type | Field and Description |
|---|---|
static int |
EAGER_ACTIVATION |
static int |
LAZY_ACTIVATION |
private java.util.List<java.lang.String> |
m_activationExcludes |
private java.util.List<java.lang.String> |
m_activationIncludes |
private BundleImpl |
m_bundle |
private Content |
m_content |
private java.util.List<Content> |
m_contentPath |
private int |
m_declaredActivationPolicy |
private java.util.List<BundleCapability> |
m_declaredCaps |
private java.util.List<NativeLibrary> |
m_declaredNativeLibs |
private java.util.List<BundleRequirement> |
m_declaredReqs |
private java.util.Map |
m_headerMap |
private java.lang.String |
m_id |
private boolean |
m_isExtension |
private boolean |
m_isFragment |
private java.lang.String |
m_manifestVersion |
private java.security.ProtectionDomain |
m_protectionDomain |
private static SecureAction |
m_secureAction |
private java.lang.String |
m_symbolicName |
private Version |
m_version |
private BundleWiringImpl |
m_wiring |
BUNDLE_NAMESPACE, HOST_NAMESPACE, PACKAGE_NAMESPACE, TYPE_FRAGMENT| Constructor and Description |
|---|
BundleRevisionImpl(BundleImpl bundle,
java.lang.String id)
This constructor is used by the extension manager, since it needs
a constructor that does not throw an exception.
|
BundleRevisionImpl(BundleImpl bundle,
java.lang.String id,
java.util.Map headerMap,
Content content) |
| Modifier and Type | Method and Description |
|---|---|
(package private) static java.util.List<Capability> |
asCapabilityList(java.util.List reqs) |
(package private) static java.util.List<Requirement> |
asRequirementList(java.util.List reqs) |
private java.util.List |
calculateContentPath(BundleRevision revision,
Content content,
java.util.List<Content> contentList,
boolean searchFragments) |
(package private) void |
close() |
private java.net.URL |
createURL(int port,
java.lang.String path) |
BundleImpl |
getBundle()
Returns the
Bundle object associated with this
BundleReference. |
java.util.List<Capability> |
getCapabilities(java.lang.String namespace)
Returns the capabilities declared by this resource.
|
Content |
getContent() |
(package private) java.util.List<Content> |
getContentPath() |
(package private) int |
getDeclaredActivationPolicy() |
java.util.List<BundleCapability> |
getDeclaredCapabilities(java.lang.String namespace)
Returns the capabilities declared by this bundle revision.
|
java.util.List<NativeLibrary> |
getDeclaredNativeLibraries() |
java.util.List<BundleRequirement> |
getDeclaredRequirements(java.lang.String namespace)
Returns the requirements declared by this bundle revision.
|
java.net.URL |
getEntry(java.lang.String name) |
java.util.Map |
getHeaders() |
java.lang.String |
getId() |
java.io.InputStream |
getInputStream(int index,
java.lang.String urlPath) |
java.net.URL |
getLocalURL(int index,
java.lang.String urlPath) |
java.lang.String |
getManifestVersion() |
java.security.ProtectionDomain |
getProtectionDomain() |
java.util.List<Requirement> |
getRequirements(java.lang.String namespace)
Returns the requirements declared by this bundle resource.
|
(package private) java.net.URL |
getResourceLocal(java.lang.String name) |
(package private) java.util.Enumeration |
getResourcesLocal(java.lang.String name) |
(package private) static SecureAction |
getSecureAction() |
java.lang.String |
getSymbolicName()
Returns the symbolic name for this bundle revision.
|
int |
getTypes()
Returns the special types of this bundle revision.
|
Version |
getVersion()
Returns the version for this bundle revision.
|
BundleWiring |
getWiring()
Returns the bundle wiring which is using this bundle revision.
|
boolean |
hasInputStream(int index,
java.lang.String urlPath) |
private java.util.List<Content> |
initializeContentPath() |
(package private) boolean |
isActivationTrigger(java.lang.String pkgName) |
boolean |
isExtension() |
(package private) void |
resetContent(Content content) |
void |
resolve(BundleWiringImpl wiring) |
void |
setProtectionDomain(java.security.ProtectionDomain pd) |
java.lang.String |
toString() |
public static final int EAGER_ACTIVATION
public static final int LAZY_ACTIVATION
private final java.lang.String m_id
private final java.util.Map m_headerMap
private final java.lang.String m_manifestVersion
private final boolean m_isExtension
private final boolean m_isFragment
private final java.lang.String m_symbolicName
private final Version m_version
private final java.util.List<BundleCapability> m_declaredCaps
private final java.util.List<BundleRequirement> m_declaredReqs
private final java.util.List<NativeLibrary> m_declaredNativeLibs
private final int m_declaredActivationPolicy
private final java.util.List<java.lang.String> m_activationIncludes
private final java.util.List<java.lang.String> m_activationExcludes
private final BundleImpl m_bundle
private Content m_content
private java.util.List<Content> m_contentPath
private java.security.ProtectionDomain m_protectionDomain
private static final SecureAction m_secureAction
private volatile BundleWiringImpl m_wiring
public BundleRevisionImpl(BundleImpl bundle, java.lang.String id)
bundle - id - BundleExceptionBundleRevisionImpl(BundleImpl bundle, java.lang.String id, java.util.Map headerMap, Content content) throws BundleException
BundleExceptionstatic SecureAction getSecureAction()
int getDeclaredActivationPolicy()
boolean isActivationTrigger(java.lang.String pkgName)
public java.lang.String getSymbolicName()
BundleRevisiongetSymbolicName in interface BundleRevisionBundle.getSymbolicName()public Version getVersion()
BundleRevisiongetVersion in interface BundleRevisionVersion.emptyVersion if this bundle revision has no
version information.Bundle.getVersion()public java.util.List<Capability> getCapabilities(java.lang.String namespace)
BundleRevision
This method returns the same value as
BundleRevision.getDeclaredCapabilities(String).
getCapabilities in interface BundleRevisiongetCapabilities in interface Resourcenamespace - The namespace of the declared capabilities to return or
null to return the declared capabilities from all
namespaces.Capabilitys
from the specified namespace. The returned list will be empty if
this resource declares no capabilities in the specified
namespace.static java.util.List<Capability> asCapabilityList(java.util.List reqs)
public java.util.List<BundleCapability> getDeclaredCapabilities(java.lang.String namespace)
BundleRevisiongetDeclaredCapabilities in interface BundleRevisionnamespace - The namespace of the declared capabilities to return or
null to return the declared capabilities from all
namespaces.BundleCapabilitys from the specified namespace. The
returned list will be empty if this bundle revision declares no
capabilities in the specified namespace. The list contains the
declared capabilities in the order they are specified in the
manifest.public java.util.List<Requirement> getRequirements(java.lang.String namespace)
BundleRevision
This method returns the same value as
BundleRevision.getDeclaredRequirements(String).
getRequirements in interface BundleRevisiongetRequirements in interface Resourcenamespace - The namespace of the declared requirements to return or
null to return the declared requirements from all
namespaces.Requirement
s from the specified namespace. The returned list will be empty
if this resource declares no requirements in the specified
namespace.static java.util.List<Requirement> asRequirementList(java.util.List reqs)
public java.util.List<BundleRequirement> getDeclaredRequirements(java.lang.String namespace)
BundleRevisiongetDeclaredRequirements in interface BundleRevisionnamespace - The namespace of the declared requirements to return or
null to return the declared requirements from all
namespaces.BundleRequirements from the specified namespace. The
returned list will be empty if this bundle revision declares no
requirements in the specified namespace. The list contains the
declared requirements in the order they are specified in the
manifest.public int getTypes()
BundleRevisionIf this bundle revision is not one or more of the defined types then 0 is returned.
getTypes in interface BundleRevisionpublic BundleWiring getWiring()
BundleRevisiongetWiring in interface BundleRevisionnull if no bundle wiring is using this bundle revision.BundleWiring.getRevision()public BundleImpl getBundle()
BundleReferenceBundle object associated with this
BundleReference.getBundle in interface BundleReferenceBundle object associated with this
BundleReference.public java.util.Map getHeaders()
public boolean isExtension()
public java.lang.String getManifestVersion()
public java.util.List<NativeLibrary> getDeclaredNativeLibraries()
public java.lang.String getId()
public void resolve(BundleWiringImpl wiring)
public void setProtectionDomain(java.security.ProtectionDomain pd)
public java.security.ProtectionDomain getProtectionDomain()
public Content getContent()
void resetContent(Content content)
java.util.List<Content> getContentPath()
private java.util.List<Content> initializeContentPath() throws java.lang.Exception
java.lang.Exceptionprivate java.util.List calculateContentPath(BundleRevision revision, Content content, java.util.List<Content> contentList, boolean searchFragments) throws java.lang.Exception
java.lang.Exceptionjava.net.URL getResourceLocal(java.lang.String name)
java.util.Enumeration getResourcesLocal(java.lang.String name)
public java.net.URL getEntry(java.lang.String name)
public boolean hasInputStream(int index,
java.lang.String urlPath)
public java.io.InputStream getInputStream(int index,
java.lang.String urlPath)
throws java.io.IOException
java.io.IOExceptionpublic java.net.URL getLocalURL(int index,
java.lang.String urlPath)
private java.net.URL createURL(int port,
java.lang.String path)
void close()
public java.lang.String toString()
toString in class java.lang.Object