org.jboss.osgi.resolver.spi
Class AbstractBundleRevision

java.lang.Object
  extended by org.jboss.osgi.resolver.spi.AbstractElement
      extended by org.jboss.osgi.resolver.spi.AbstractResource
          extended by org.jboss.osgi.resolver.spi.AbstractBundleRevision
All Implemented Interfaces:
XAttachmentSupport, XBundleRevision, XElement, XResource, org.osgi.framework.BundleReference, org.osgi.framework.wiring.BundleRevision, org.osgi.resource.Resource

public class AbstractBundleRevision
extends AbstractResource
implements XBundleRevision

The abstract implementation of an XBundleRevision.

Since:
30-May-2012
Author:
thomas.diesler@jboss.com

Field Summary
 
Fields inherited from interface org.osgi.framework.wiring.BundleRevision
BUNDLE_NAMESPACE, HOST_NAMESPACE, PACKAGE_NAMESPACE, TYPE_FRAGMENT
 
Constructor Summary
AbstractBundleRevision()
           
 
Method Summary
 Enumeration<URL> findEntries(String path, String filePattern, boolean recursive)
           
 XBundle getBundle()
          Get the associated XBundle
 List<org.osgi.framework.wiring.BundleCapability> getDeclaredCapabilities(String namespace)
           
 List<org.osgi.framework.wiring.BundleRequirement> getDeclaredRequirements(String namespace)
           
 URL getEntry(String path)
           
 Enumeration<String> getEntryPaths(String path)
           
 org.jboss.modules.ModuleClassLoader getModuleClassLoader()
          Get the associated ModuleIdentifier or null if the revision is not resolved
 org.jboss.modules.ModuleIdentifier getModuleIdentifier()
          Get the associated ModuleIdentifier or null if the revision is not resolved
 URL getResource(String name)
           
 Enumeration<URL> getResources(String name)
           
 String getSymbolicName()
           
 int getTypes()
           
 org.osgi.framework.Version getVersion()
           
 org.osgi.framework.wiring.BundleWiring getWiring()
           
 
Methods inherited from class org.jboss.osgi.resolver.spi.AbstractResource
addCapability, addRequirement, ensureImmutable, ensureMutable, getCapabilities, getIdentityCapability, getRequirements, isFragment, isMutable, makeImmutable, toString, validate
 
Methods inherited from class org.jboss.osgi.resolver.spi.AbstractElement
addAttachment, getAttachment, removeAttachment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.osgi.resolver.XResource
getIdentityCapability, isFragment, isMutable, makeImmutable, validate
 
Methods inherited from interface org.jboss.osgi.resolver.XAttachmentSupport
addAttachment, getAttachment, removeAttachment
 
Methods inherited from interface org.osgi.framework.wiring.BundleRevision
getCapabilities, getRequirements
 
Methods inherited from interface org.osgi.resource.Resource
equals, hashCode
 

Constructor Detail

AbstractBundleRevision

public AbstractBundleRevision()
Method Detail

getSymbolicName

public String getSymbolicName()
Specified by:
getSymbolicName in interface org.osgi.framework.wiring.BundleRevision

getVersion

public org.osgi.framework.Version getVersion()
Specified by:
getVersion in interface org.osgi.framework.wiring.BundleRevision

getDeclaredCapabilities

public List<org.osgi.framework.wiring.BundleCapability> getDeclaredCapabilities(String namespace)
Specified by:
getDeclaredCapabilities in interface org.osgi.framework.wiring.BundleRevision

getDeclaredRequirements

public List<org.osgi.framework.wiring.BundleRequirement> getDeclaredRequirements(String namespace)
Specified by:
getDeclaredRequirements in interface org.osgi.framework.wiring.BundleRevision

getTypes

public int getTypes()
Specified by:
getTypes in interface org.osgi.framework.wiring.BundleRevision

getWiring

public org.osgi.framework.wiring.BundleWiring getWiring()
Specified by:
getWiring in interface org.osgi.framework.wiring.BundleRevision

getBundle

public XBundle getBundle()
Description copied from interface: XBundleRevision
Get the associated XBundle

Specified by:
getBundle in interface XBundleRevision
Specified by:
getBundle in interface org.osgi.framework.BundleReference

getModuleIdentifier

public org.jboss.modules.ModuleIdentifier getModuleIdentifier()
Description copied from interface: XBundleRevision
Get the associated ModuleIdentifier or null if the revision is not resolved

Specified by:
getModuleIdentifier in interface XBundleRevision

getModuleClassLoader

public org.jboss.modules.ModuleClassLoader getModuleClassLoader()
Description copied from interface: XBundleRevision
Get the associated ModuleIdentifier or null if the revision is not resolved

Specified by:
getModuleClassLoader in interface XBundleRevision

findEntries

public Enumeration<URL> findEntries(String path,
                                    String filePattern,
                                    boolean recursive)
Specified by:
findEntries in interface XBundleRevision
See Also:
Bundle#findEntries(String, String, boolean)}

getResource

public URL getResource(String name)
Specified by:
getResource in interface XBundleRevision
See Also:
Bundle#getResource(String)}

getResources

public Enumeration<URL> getResources(String name)
                              throws IOException
Specified by:
getResources in interface XBundleRevision
Throws:
IOException
See Also:
Bundle#getResources(String)}

getEntry

public URL getEntry(String path)
Specified by:
getEntry in interface XBundleRevision
See Also:
Bundle#getEntry(String)}

getEntryPaths

public Enumeration<String> getEntryPaths(String path)
Specified by:
getEntryPaths in interface XBundleRevision
See Also:
Bundle#getEntryPaths(String)}


Copyright © 2012 JBoss by Red Hat. All Rights Reserved.