com.springsource.util.osgi.manifest
Interface ImportedBundle

All Superinterfaces:
Imported, Parameterised, Parseable
All Known Implementing Classes:
StandardImportedBundle

public interface ImportedBundle
extends Imported

Represents a single entry in a bundle's Import-Bundle header.

Concurrent Semantics
May not be thread-safe.

Since:
Jersey

Method Summary
 java.lang.String getBundleSymbolicName()
          Returns the symbolic name of the bundle that is imported, never null.
 Sharing getSharing()
          Returns the value of the import's sharing directive.
 boolean isApplicationImportScope()
          Returns true if the import's import-scope directive is present and has a value of application, otherwise false is returned.
 void setApplicationImportScope(boolean applicationImportScope)
          Sets the import-scope directive
 void setBundleSymbolicName(java.lang.String bundleSymbolicName)
          Sets the symbolic name of the bundle that is imported
 void setSharing(Sharing sharing)
          Sets the value of the import's sharing directive.
 
Methods inherited from interface com.springsource.util.osgi.manifest.Imported
getResolution, getVersion, setResolution, setVersion
 
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 imported, never null.

Returns:
the imported bundle's symbolic name.

setBundleSymbolicName

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

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

getSharing

Sharing getSharing()
Returns the value of the import's sharing directive. If no such directive is specified the default value of Sharing.AUTOMATIC is returned.

Returns:
the value of the import's sharing directive.

setSharing

void setSharing(Sharing sharing)
Sets the value of the import's sharing directive.

Parameters:
sharing - the value of the import's sharing directive

isApplicationImportScope

boolean isApplicationImportScope()
Returns true if the import's import-scope directive is present and has a value of application, otherwise false is returned.

Returns:
true if and only if the import-scope directive has a value of application

setApplicationImportScope

void setApplicationImportScope(boolean applicationImportScope)
Sets the import-scope directive

Parameters:
applicationImportScope - Whether or not the import's scope is application