|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.baseadaptor.BaseData
public class BaseData
The BundleData implementation used by the BaseAdaptor.
BaseAdaptor,
BundleData,
StorageHook,
ClassLoadingHook| Field Summary | |
|---|---|
protected BundleFile |
bundleFile
|
protected java.lang.String |
fileName
|
protected java.util.Collection |
loadedNativeCode
|
protected java.util.Dictionary |
manifest
|
| Fields inherited from interface org.eclipse.osgi.framework.adaptor.BundleData |
|---|
TYPE_BOOTCLASSPATH_EXTENSION, TYPE_COMPOSITEBUNDLE, TYPE_EXTCLASSPATH_EXTENSION, TYPE_FRAGMENT, TYPE_FRAMEWORK_EXTENSION, TYPE_SINGLETON, TYPE_SURROGATEBUNDLE |
| Constructor Summary | |
|---|---|
BaseData(long id,
BaseAdaptor adaptor)
Constructs a new BaseData with the specified id for the specified adaptor |
|
| Method Summary | |
|---|---|
void |
close()
Close all resources for this BundleData |
BundleClassLoader |
createClassLoader(ClassLoaderDelegate delegate,
BundleProtectionDomain domain,
java.lang.String[] bundleclasspath)
This method calls all the configured class loading hooks ClassLoadingHook.createClassLoader(ClassLoader, ClassLoaderDelegate, BundleProtectionDomain, BaseData, String[])
methods until on returns a non-null value. |
java.lang.String |
findLibrary(java.lang.String libname)
This method calls each configured classloading hook ClassLoadingHook.findLibrary(BaseData, String) method
until the first one returns a non-null value. |
java.lang.String |
getActivator()
Returns the Bundle-Activator for this BundleData as specified in the bundle manifest file. |
BaseAdaptor |
getAdaptor()
Returns the adaptor for this BaseData |
Bundle |
getBundle()
Returns the bundle object of this BaseData |
BundleFile |
getBundleFile()
Returns the BundleFile for this BaseData. |
long |
getBundleID()
Get the BundleData bundle ID. |
java.lang.String[] |
getClassPath()
Returns the Bundle-ClassPath for this BundleData as specified in the bundle manifest file. |
java.lang.String |
getClassPathString()
|
java.io.File |
getDataFile(java.lang.String path)
Return the bundle data directory. |
java.lang.String |
getDynamicImports()
Returns the DynamicImport-Package for this BundleData as specified in the bundle manifest file. |
java.net.URL |
getEntry(java.lang.String path)
Gets a URL to the bundle entry specified by path. |
java.util.Enumeration |
getEntryPaths(java.lang.String path)
Gets all of the bundle entries that exist under the specified path. |
java.lang.String |
getExecutionEnvironment()
Returns the Bundle-RequiredExecutionEnvironment for this BundleData as specified in the bundle manifest file. |
java.io.File |
getExtractFile(java.lang.String path)
Gets called by BundleFile during BundleFile.getFile(String, boolean). |
long |
getLastModified()
Get the last time this BundleData was modified. |
java.lang.String |
getLocation()
Get the BundleData Location. |
java.util.Dictionary |
getManifest()
Return the Dictionary of manifest headers for the BundleData. |
int |
getStartLevel()
Returns the start level metadata for this BundleData. |
int |
getStatus()
Returns the status metadata for this BundleData. |
StorageHook |
getStorageHook(java.lang.String key)
Returns the storage hook which is keyed by the specified key |
StorageHook[] |
getStorageHooks()
Returns all the storage hooks associated with this BaseData |
java.lang.String |
getSymbolicName()
Returns the Bundle-SymbolicName for this BundleData as specified in the bundle manifest file. |
int |
getType()
Returns the type of bundle this BundleData is for. |
Version |
getVersion()
Returns the Bundle-Version for this BundleData as specified in the bundle manifest file. |
void |
installNativeCode(java.lang.String[] nativepaths)
Installs the native code paths for this BundleData. |
boolean |
isDirty()
Returns true if this bundledata is dirty |
void |
open()
Open the BundleData. |
void |
save()
Persistently stores all the metadata for this BundleData |
void |
setActivator(java.lang.String activator)
Sets the activator of this BaseData |
void |
setBundle(Bundle bundle)
Sets the Bundle object for this BundleData. |
void |
setClassPathString(java.lang.String classpath)
|
void |
setDirty(boolean dirty)
Sets the dirty flag for this BaseData |
void |
setDynamicImports(java.lang.String dynamicImports)
Sets the dynamic imports of this BaseData |
void |
setExecutionEnvironment(java.lang.String executionEnvironment)
Sets the execution environment of this BaseData |
void |
setFileName(java.lang.String fileName)
This is only used to support PDE source lookup. |
void |
setLastModified(long lastModified)
Sets the last modified time stamp of this bundledata |
void |
setLocation(java.lang.String location)
Sets the location of this bundledata |
void |
setStartLevel(int value)
This method calls each configured storage hook StorageHook.forgetStartLevelChange(int) method. |
void |
setStatus(int value)
This method calls each configured storage hook StorageHook.forgetStatusChange(int) method. |
void |
setStorageHooks(StorageHook[] storageHooks)
Sets the instance storage hooks for this base data. |
void |
setSymbolicName(java.lang.String symbolicName)
Sets the symbolic name of this BaseData |
void |
setType(int type)
Sets the type of this BaseData |
void |
setVersion(Version version)
Sets the version of this BaseData |
java.lang.String |
toString()
Return a string representation of the bundle that can be used in debug messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected BundleFile bundleFile
protected java.util.Dictionary manifest
protected java.lang.String fileName
protected java.util.Collection loadedNativeCode
| Constructor Detail |
|---|
public BaseData(long id,
BaseAdaptor adaptor)
id - the id of the BaseDataadaptor - the adaptor of the BaseData| Method Detail |
|---|
public BundleClassLoader createClassLoader(ClassLoaderDelegate delegate,
BundleProtectionDomain domain,
java.lang.String[] bundleclasspath)
ClassLoadingHook.createClassLoader(ClassLoader, ClassLoaderDelegate, BundleProtectionDomain, BaseData, String[])
methods until on returns a non-null value. If none of the class loading hooks returns a non-null value
then the default classloader implementation is used.
createClassLoader in interface BundleDatadelegate - The ClassLoaderDelegate to delegate to.domain - The BundleProtectionDomain to use when defining a class.bundleclasspath - An array of bundle classpaths to use to create this
classloader. This is specified by the Bundle-ClassPath manifest entry.
BundleData.createClassLoader(ClassLoaderDelegate, BundleProtectionDomain, String[])public final java.net.URL getEntry(java.lang.String path)
BundleDataURL to the bundle entry specified by path.
This method must not use the BundleClassLoader to find the
bundle entry since the ClassLoader will delegate to find the resource.
getEntry in interface BundleDatapath - The bundle entry path.
Bundle.getEntry(String)public final java.util.Enumeration getEntryPaths(java.lang.String path)
BundleData
getEntryPaths("/META-INF")
This will return all entries from the /META-INF directory of the bundle.
getEntryPaths in interface BundleDatapath - The path to a directory in the bundle.
Bundle.getEntryPaths(String path)public java.lang.String findLibrary(java.lang.String libname)
ClassLoadingHook.findLibrary(BaseData, String) method
until the first one returns a non-null value.
findLibrary in interface BundleDatalibname - The name of the library to find the absolute path to.
BundleData.findLibrary(String)
public void installNativeCode(java.lang.String[] nativepaths)
throws BundleException
BundleData
installNativeCode in interface BundleDatanativepaths - The array of native code paths to install for
the bundle.
BundleException - If any error occurs during install.public java.io.File getDataFile(java.lang.String path)
BundleData
getDataFile in interface BundleDataBundleContext.getDataFile(String)
public java.util.Dictionary getManifest()
throws BundleException
BundleData
getManifest in interface BundleDataBundleException - if an error occurred while reading the
bundle manifest data.public long getBundleID()
BundleData
getBundleID in interface BundleDatapublic final java.lang.String getLocation()
BundleData
getLocation in interface BundleDatapublic final void setLocation(java.lang.String location)
location - the location of this bundledatapublic final long getLastModified()
BundleData
getLastModified in interface BundleDatapublic final void setLastModified(long lastModified)
lastModified - the last modified time stamp of this bundledata
public void close()
throws java.io.IOException
BundleData
close in interface BundleDatajava.io.IOException - If an error occurs closing.
public void open()
throws java.io.IOException
BundleData
open in interface BundleDatajava.io.IOException - If an error occurs opening.public final void setBundle(Bundle bundle)
BundleData
setBundle in interface BundleDatabundle - The Bundle Object for this BundleData.public final Bundle getBundle()
public int getStartLevel()
BundleData
getStartLevel in interface BundleDatapublic int getStatus()
BundleData
getStatus in interface BundleDatapublic void setStartLevel(int value)
StorageHook.forgetStartLevelChange(int) method.
If one returns true then this bundledata is not marked dirty.
setStartLevel in interface BundleDatavalue - the start level metadataBundleData.setStartLevel(int)public void setStatus(int value)
StorageHook.forgetStatusChange(int) method.
If one returns true then this bundledata is not marked dirty.
setStatus in interface BundleDatavalue - the status metadata.BundleData.setStatus(int)
public void save()
throws java.io.IOException
BundleData
save in interface BundleDatajava.io.IOExceptionpublic boolean isDirty()
public void setDirty(boolean dirty)
dirty - the dirty flagpublic final java.lang.String getSymbolicName()
BundleData
getSymbolicName in interface BundleDatapublic final void setSymbolicName(java.lang.String symbolicName)
symbolicName - the symbolic namepublic final Version getVersion()
BundleData
getVersion in interface BundleDatapublic final void setVersion(Version version)
version - the versionpublic final int getType()
BundleData
getType in interface BundleDatapublic final void setType(int type)
type - the type
public final java.lang.String[] getClassPath()
throws BundleException
BundleData
getClassPath in interface BundleDataBundleExceptionpublic java.lang.String getClassPathString()
public void setClassPathString(java.lang.String classpath)
public final java.lang.String getActivator()
BundleData
getActivator in interface BundleDatapublic final void setActivator(java.lang.String activator)
activator - the activatorpublic final java.lang.String getExecutionEnvironment()
BundleData
getExecutionEnvironment in interface BundleDatapublic void setExecutionEnvironment(java.lang.String executionEnvironment)
executionEnvironment - the execution environmentpublic final java.lang.String getDynamicImports()
BundleData
getDynamicImports in interface BundleDatapublic void setDynamicImports(java.lang.String dynamicImports)
dynamicImports - the dynamic importspublic final BaseAdaptor getAdaptor()
public BundleFile getBundleFile()
throws java.lang.IllegalArgumentException
BaseAdaptor.createBundleFile(Object, BaseData) method is called.
java.lang.IllegalArgumentExceptionpublic StorageHook getStorageHook(java.lang.String key)
key - the key of the storage hook to get
public void setStorageHooks(StorageHook[] storageHooks)
storageHooks - the storage hook to addpublic StorageHook[] getStorageHooks()
public java.io.File getExtractFile(java.lang.String path)
BundleFile.getFile(String, boolean). This method
will allocate a File object where content of the specified path may be
stored for the current generation of the base data. The returned File object may
not exist if the content has not previously be stored.
path - the path to the content to extract from the base data
public void setFileName(java.lang.String fileName)
fileName - an absolute path string to the base bundle file.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||