|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BundleFileLocatorHelper
From a bundle to its location on the filesystem. Assumes the bundle is not a jar.
Field Summary | |
---|---|
static java.lang.String |
CLASS_NAME
The name of the custom implementation for this interface in a fragment. |
static BundleFileLocatorHelper |
DEFAULT
The default instance supports felix and equinox |
Method Summary | |
---|---|
java.util.Enumeration<java.net.URL> |
findEntries(org.osgi.framework.Bundle bundle,
java.lang.String entryPath)
Helper method equivalent to Bundle#getEntry(String entryPath) except that it searches for entries in the fragments by using the findEntries method. |
java.io.File |
getBundleInstallLocation(org.osgi.framework.Bundle bundle)
Works with equinox, felix, nuxeo and probably more. |
java.io.File |
getFileInBundle(org.osgi.framework.Bundle bundle,
java.lang.String path)
Locate a file inside a bundle. |
java.io.File[] |
locateJarsInsideBundle(org.osgi.framework.Bundle bundle)
If the bundle is a jar, returns the jar. |
Field Detail |
---|
static final java.lang.String CLASS_NAME
static final BundleFileLocatorHelper DEFAULT
Method Detail |
---|
java.io.File getBundleInstallLocation(org.osgi.framework.Bundle bundle) throws java.lang.Exception
Currently only works with bundles that are not jar.
bundle
- The bundle
java.lang.Exception
java.io.File getFileInBundle(org.osgi.framework.Bundle bundle, java.lang.String path) throws java.lang.Exception
bundle
- path
-
java.lang.Exception
java.io.File[] locateJarsInsideBundle(org.osgi.framework.Bundle bundle) throws java.lang.Exception
Good enough for our purpose (TldLocationsCache when it scans for tld files inside jars alone. In fact we only support the second situation for development purpose where the bundle was imported in pde and the classes kept in a jar.
bundle
-
java.lang.Exception
java.util.Enumeration<java.net.URL> findEntries(org.osgi.framework.Bundle bundle, java.lang.String entryPath)
bundle
- entryPath
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |