com.springsource.util.osgi.manifest.internal
Class StandardImportedBundle

java.lang.Object
  extended by com.springsource.util.osgi.manifest.internal.BaseParameterised
      extended by com.springsource.util.osgi.manifest.internal.BaseCompoundHeaderEntry
          extended by com.springsource.util.osgi.manifest.internal.BaseImported
              extended by com.springsource.util.osgi.manifest.internal.StandardImportedBundle
All Implemented Interfaces:
Imported, ImportedBundle, Parameterised, Parseable

 class StandardImportedBundle
extends BaseImported
implements ImportedBundle

Concurrent Semantics
Not thread-safe.


Field Summary
private static java.lang.String IMPORT_SCOPE_APPLICATION
           
private static java.lang.String IMPORT_SCOPE_DIRECTIVE
           
private static java.lang.String SHARING_CLONE
           
private static java.lang.String SHARING_DIRECTIVE
           
private static java.lang.String SHARING_SHARE
           
 
Fields inherited from class com.springsource.util.osgi.manifest.internal.BaseParameterised
name
 
Constructor Summary
StandardImportedBundle(HeaderParser parser, java.lang.String name)
           
 
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.
(package private)  HeaderDeclaration parse(HeaderParser parser, java.lang.String parseString)
          
 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 class com.springsource.util.osgi.manifest.internal.BaseImported
getResolution, getVersion, setResolution, setVersion
 
Methods inherited from class com.springsource.util.osgi.manifest.internal.BaseParameterised
equals, getAttributes, getDirectives, hashCode, resetFromParseString, toParseString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

SHARING_SHARE

private static final java.lang.String SHARING_SHARE
See Also:
Constant Field Values

SHARING_CLONE

private static final java.lang.String SHARING_CLONE
See Also:
Constant Field Values

SHARING_DIRECTIVE

private static final java.lang.String SHARING_DIRECTIVE
See Also:
Constant Field Values

IMPORT_SCOPE_APPLICATION

private static final java.lang.String IMPORT_SCOPE_APPLICATION
See Also:
Constant Field Values

IMPORT_SCOPE_DIRECTIVE

private static final java.lang.String IMPORT_SCOPE_DIRECTIVE
See Also:
Constant Field Values
Constructor Detail

StandardImportedBundle

public StandardImportedBundle(HeaderParser parser,
                              java.lang.String name)
Method Detail

parse

HeaderDeclaration parse(HeaderParser parser,
                        java.lang.String parseString)

Specified by:
parse in class BaseParameterised

isApplicationImportScope

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

Specified by:
isApplicationImportScope in interface ImportedBundle
Returns:
true if and only if the import-scope directive has a value of application

getBundleSymbolicName

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

Specified by:
getBundleSymbolicName in interface ImportedBundle
Returns:
the imported bundle's symbolic name.

getSharing

public 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.

Specified by:
getSharing in interface ImportedBundle
Returns:
the value of the import's sharing directive.

setApplicationImportScope

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

Specified by:
setApplicationImportScope in interface ImportedBundle
Parameters:
applicationImportScope - Whether or not the import's scope is application

setBundleSymbolicName

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

Specified by:
setBundleSymbolicName in interface ImportedBundle
Parameters:
bundleSymbolicName - the imported bundle's symbolic name

setSharing

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

Specified by:
setSharing in interface ImportedBundle
Parameters:
sharing - the value of the import's sharing directive