com.springsource.util.osgi.manifest
Interface RequiredBundle

All Superinterfaces:
Parameterised, Parseable
All Known Implementing Classes:
StandardRequiredBundle

public interface RequiredBundle
extends Parameterised

Representation of a single entry in a Require-Bundle header. Concurrent Semantics
May not be thread-safe.


Nested Class Summary
static class RequiredBundle.Visibility
          Enumeration of the valid values for the header's visibility directive.
 
Method Summary
 java.lang.String getBundleSymbolicName()
          Returns the symbolic name of the bundle that is required, never null.
 VersionRange getBundleVersion()
          Returns the value of the header's bundle-version attribute.
 Resolution getResolution()
          Returns the value of the entry's resolution directive.
 RequiredBundle.Visibility getVisibility()
          Returns the value of the entry's visibility directive.
 void setBundleSymbolicName(java.lang.String bundleSymbolicName)
          Sets the symbolic name of the bundle that is required.
 void setBundleVersion(VersionRange versionRange)
          Sets the value of the header's bundle-version directive.
 void setResolution(Resolution resolution)
          Sets the value of the resolution directive.
 void setVisibility(RequiredBundle.Visibility visibility)
          Sets the value of the visibility directive.
 
Methods inherited from interface com.springsource.util.osgi.manifest.Parameterised
getAttributes, getDirectives
 
Methods inherited from interface com.springsource.util.osgi.manifest.Parseable
resetFromParseString, toParseString
 

Method Detail

getBundleSymbolicName

java.lang.String getBundleSymbolicName()
Returns the symbolic name of the bundle that is required, never null.

Returns:
the required bundle's symbolic name.

setBundleSymbolicName

void setBundleSymbolicName(java.lang.String bundleSymbolicName)
Sets the symbolic name of the bundle that is required.

Parameters:
bundleSymbolicName - the required bundle's symbolic name
Throws:
java.lang.IllegalArgumentException - if the given bundle symbolic name is null

getResolution

Resolution getResolution()
Returns the value of the entry's resolution directive. If no such directive is specified, the default value of Resolution.MANDATORY is returned.

Returns:
the value of the resolution directive

setResolution

void setResolution(Resolution resolution)
Sets the value of the resolution directive. If null is given, sets the value to Resolution.MANDATORY.

Parameters:
resolution - The resolution directive

getVisibility

RequiredBundle.Visibility getVisibility()
Returns the value of the entry's visibility directive. If no such directive is specified, the default value of RequiredBundle.Visibility.PRIVATE is returned.

Returns:
the value of the visibility directive

setVisibility

void setVisibility(RequiredBundle.Visibility visibility)
Sets the value of the visibility directive. If null is given, sets the value to RequiredBundle.Visibility.PRIVATE.

Parameters:
visibility - The value of the visibility directive.

getBundleVersion

VersionRange getBundleVersion()
Returns the value of the header's bundle-version attribute. If no such attribute is specified, returns the default version range of [0, infinity).

Returns:
the value of the bundle-version attribute.

setBundleVersion

void setBundleVersion(VersionRange versionRange)
Sets the value of the header's bundle-version directive.

Parameters:
versionRange - the value for the bundle-version directive.