Knopflerfish OSGi 2.4.0

org.ungoverned.osgi.service.bundlerepository
Class BundleRecord

java.lang.Object
  extended byorg.ungoverned.osgi.service.bundlerepository.BundleRecord

public class BundleRecord
extends java.lang.Object

A simple interface used to hold meta-data about bundles contained in a bundle repository.


Field Summary
static java.lang.String BUNDLE_CATEGORY
           
static java.lang.String BUNDLE_CONTACTADDRESS
           
static java.lang.String BUNDLE_COPYRIGHT
           
static java.lang.String BUNDLE_DESCRIPTION
           
static java.lang.String BUNDLE_DOCURL
           
static java.lang.String BUNDLE_LICENSEURL
           
static java.lang.String BUNDLE_NAME
           
static java.lang.String BUNDLE_NATIVECODE
           
static java.lang.String BUNDLE_REQUIREDEXECUTIONENVIRONMENT
           
static java.lang.String BUNDLE_SOURCEURL
           
static java.lang.String BUNDLE_UPDATELOCATION
           
static java.lang.String BUNDLE_VENDOR
           
static java.lang.String BUNDLE_VERSION
           
static java.lang.String DYNAMICIMPORT_PACKAGE
           
static java.lang.String EXPORT_PACKAGE
           
static java.lang.String IMPORT_PACKAGE
           
static java.lang.String PROVIDE_SERVICE
           
static java.lang.String REQUIRE_SERVICE
           
 
Constructor Summary
BundleRecord(java.util.Map attrMap)
           Constructs a bundle record using the values of the supplied map as the meta-data values for the bundle.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           Returns the value of the specified attribute.
 java.lang.String[] getAttributes()
           Returns an array containing all attribute names associated with the bundle record.
 java.util.Dictionary getDictionary()
           Returns a dictionary object which can be used with org.osgi.framework.Filter, for example.
 void printAttributes(java.io.PrintStream out)
           Dumps the contents of the bundle record to the specified print stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_NAME

public static final java.lang.String BUNDLE_NAME
See Also:
Constant Field Values

BUNDLE_VERSION

public static final java.lang.String BUNDLE_VERSION
See Also:
Constant Field Values

BUNDLE_UPDATELOCATION

public static final java.lang.String BUNDLE_UPDATELOCATION
See Also:
Constant Field Values

BUNDLE_SOURCEURL

public static final java.lang.String BUNDLE_SOURCEURL
See Also:
Constant Field Values

BUNDLE_DOCURL

public static final java.lang.String BUNDLE_DOCURL
See Also:
Constant Field Values

BUNDLE_LICENSEURL

public static final java.lang.String BUNDLE_LICENSEURL
See Also:
Constant Field Values

BUNDLE_DESCRIPTION

public static final java.lang.String BUNDLE_DESCRIPTION
See Also:
Constant Field Values

BUNDLE_CATEGORY

public static final java.lang.String BUNDLE_CATEGORY
See Also:
Constant Field Values

BUNDLE_VENDOR

public static final java.lang.String BUNDLE_VENDOR
See Also:
Constant Field Values

BUNDLE_CONTACTADDRESS

public static final java.lang.String BUNDLE_CONTACTADDRESS
See Also:
Constant Field Values

BUNDLE_COPYRIGHT

public static final java.lang.String BUNDLE_COPYRIGHT
See Also:
Constant Field Values

BUNDLE_REQUIREDEXECUTIONENVIRONMENT

public static final java.lang.String BUNDLE_REQUIREDEXECUTIONENVIRONMENT
See Also:
Constant Field Values

BUNDLE_NATIVECODE

public static final java.lang.String BUNDLE_NATIVECODE
See Also:
Constant Field Values

IMPORT_PACKAGE

public static final java.lang.String IMPORT_PACKAGE
See Also:
Constant Field Values

EXPORT_PACKAGE

public static final java.lang.String EXPORT_PACKAGE
See Also:
Constant Field Values

DYNAMICIMPORT_PACKAGE

public static final java.lang.String DYNAMICIMPORT_PACKAGE
See Also:
Constant Field Values

REQUIRE_SERVICE

public static final java.lang.String REQUIRE_SERVICE
See Also:
Constant Field Values

PROVIDE_SERVICE

public static final java.lang.String PROVIDE_SERVICE
See Also:
Constant Field Values
Constructor Detail

BundleRecord

public BundleRecord(java.util.Map attrMap)

Constructs a bundle record using the values of the supplied map as the meta-data values for the bundle. The supplied map is copied, but its values are not.

Parameters:
attrMap - a map containing attribute-value pairs of meta-data for a bundle.
Method Detail

getDictionary

public java.util.Dictionary getDictionary()

Returns a dictionary object which can be used with org.osgi.framework.Filter, for example. The returned dictionary object is a minimum implementation, where only the get(), size(), and isEmpty() methods do anything useful.

Returns:
a dictionary object for accessing the bundle record attributes.

getAttributes

public java.lang.String[] getAttributes()

Returns an array containing all attribute names associated with the bundle record. The return array is a copy and can be freely modified.

Returns:
an array containing the attribute names contained in the bundle record.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)

Returns the value of the specified attribute. If the value is an array, then a copy is returned.

Parameters:
name - the attribute name for which to retrieve its value.
Returns:
the value of the specified attribute or null if the specified attribute does not exist.

printAttributes

public void printAttributes(java.io.PrintStream out)

Dumps the contents of the bundle record to the specified print stream.

Parameters:
out - the print stream to use for printing.

Knopflerfish OSGi 2.4.0