Class BundleInfo
java.lang.Object
org.eclipse.equinox.frameworkadmin.BundleInfo
This object represents information of a bundle.
- Since:
- 2.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate a new BundleInfo objectBundleInfo
(String symbolic, String version, URI location, int startLevel, boolean started) Create a new BundleInfo objectBundleInfo
(URI location) Create a new BundleInfo objectBundleInfo
(URI location, int startLevel, boolean started) Create a new BundleInfo object -
Method Summary
Modifier and TypeMethodDescriptionboolean
The base location An absolute URI which may be used to resolve relativegetLocation()
URIslong
Get the bundle idReturn the host if this bundle is a fragmentThe location of this bundle.The manifest for this bundleint
The start level for this bundleThe Bundle-SymbolicName for this bundle.Return the versionint
hashCode()
boolean
Whether or not this bundle is marked to be started Default is falseboolean
Whether or not this bundle is resolved Default is falsevoid
setBaseLocation
(URI baseLocation) Set a base location against which relativegetLocation()
URIs may be resolvedvoid
setBundleId
(long bundleId) Set the bundle id.void
setFragmentHost
(String fragmentHost) Set the host if this bundle is a fragmentvoid
setLocation
(URI location) Set the location for this bundle.void
setManifest
(String manifest) Set the manifest for this bundlevoid
setMarkedAsStarted
(boolean markedAsStarted) Set whether or not this bundle should be startedvoid
setResolved
(boolean resolved) Set whether or not the bundle is resolvedvoid
setStartLevel
(int level) Set the start level.void
setSymbolicName
(String symbolicName) Set the Bundle-SymbolicNamevoid
setVersion
(String value) Set the version, should be a validVersion
stringtoString()
-
Field Details
-
EMPTY_VERSION
- See Also:
-
NO_LEVEL
public static final int NO_LEVEL- See Also:
-
NO_BUNDLEID
public static final int NO_BUNDLEID- See Also:
-
-
Constructor Details
-
BundleInfo
public BundleInfo()Create a new BundleInfo object -
BundleInfo
Create a new BundleInfo object- Parameters:
location
- - the location of the bundle
-
BundleInfo
Create a new BundleInfo object- Parameters:
location
- - the location of the bundlestartLevel
- - the start to be used orNO_LEVEL
started
- - whether or not the bundle should be started
-
BundleInfo
Create a new BundleInfo object- Parameters:
symbolic
- The Bundle-SymbolicName name for this bundleversion
- - The version for this bundle, this must be a validVersion
string, if null is passedEMPTY_VERSION
will be used insteadlocation
- - the location of the bundlestartLevel
- - the start level of the bundle orNO_LEVEL
started
- - whether or not the bundle should be started
-
-
Method Details
-
getBundleId
public long getBundleId()Get the bundle id- Returns:
- the bundle id or
NO_BUNDLEID
-
getBaseLocation
The base location An absolute URI which may be used to resolve relativegetLocation()
URIs- Returns:
- absolute URI or null if not set
-
getLocation
The location of this bundle. A location is required if this bundle will be persisted into a configuration file- Returns:
- URI location or null if not set
-
getManifest
The manifest for this bundle- Returns:
- the manifest or null if not set
-
getStartLevel
public int getStartLevel()The start level for this bundle- Returns:
- the start level or
NO_LEVEL
-
getSymbolicName
The Bundle-SymbolicName for this bundle. A symbolic name is required if this bundle will be persisted into a configuration file- Returns:
- the symbolic name or null if not set
-
getVersion
Return the version- Returns:
- an
Version
string, or "0.0.0" if not set
-
getFragmentHost
Return the host if this bundle is a fragment- Returns:
- the host, or null if this is not a fragment
-
isMarkedAsStarted
public boolean isMarkedAsStarted()Whether or not this bundle is marked to be started Default is false- Returns:
- boolean
-
isResolved
public boolean isResolved()Whether or not this bundle is resolved Default is false- Returns:
- boolean
-
setBundleId
public void setBundleId(long bundleId) Set the bundle id.- Parameters:
bundleId
- The bundle id.
-
setBaseLocation
Set a base location against which relativegetLocation()
URIs may be resolved- Parameters:
baseLocation
- - an absolute URI
-
setLocation
Set the location for this bundle.- Parameters:
location
- The location of the bundle.
-
setManifest
Set the manifest for this bundle- Parameters:
manifest
- The manifest.
-
setMarkedAsStarted
public void setMarkedAsStarted(boolean markedAsStarted) Set whether or not this bundle should be started- Parameters:
markedAsStarted
- Whether the bundle should be started.
-
setResolved
public void setResolved(boolean resolved) Set whether or not the bundle is resolved- Parameters:
resolved
- If the bundle is resolved or not.
-
setStartLevel
public void setStartLevel(int level) Set the start level.- Parameters:
level
- if a value < 0 is passed, the start level will be set toNO_LEVEL
-
setSymbolicName
Set the Bundle-SymbolicName- Parameters:
symbolicName
- The Bundle-SymbolicName.
-
setVersion
Set the version, should be a validVersion
string- Parameters:
value
- The version. A validVersion
string.
-
setFragmentHost
Set the host if this bundle is a fragment- Parameters:
fragmentHost
- The host for this fragment.
-
toString
-
hashCode
public int hashCode() -
equals
-