|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.internal.resolver.StateObjectFactoryImpl
public class StateObjectFactoryImpl
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.osgi.service.resolver.StateObjectFactory |
|---|
defaultFactory |
| Constructor Summary | |
|---|---|
StateObjectFactoryImpl()
|
|
| Method Summary | |
|---|---|
BundleDescription |
createBundleDescription(BundleDescription original)
Creates a bundle description that is a copy of the given description. |
BundleDescription |
createBundleDescription(Dictionary<String,String> manifest,
String location,
long id)
Deprecated. |
BundleDescription |
createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
String platformFilter,
String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities)
Creates a bundle description from the given parameters. |
BundleDescription |
createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
String platformFilter,
String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities,
NativeCodeSpecification nativeCode)
Creates a bundle description from the given parameters. |
BundleDescription |
createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
String[] providedPackages,
boolean singleton)
Deprecated. |
BundleDescription |
createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
String[] providedPackages,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
String platformFilter,
String executionEnvironment,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities)
Deprecated. |
BundleDescription |
createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
String platformFilter,
String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities,
NativeCodeSpecification nativeCode)
Creates a bundle description from the given parameters. |
BundleDescription |
createBundleDescription(State state,
Dictionary<String,String> manifest,
String location,
long id)
Returns a bundle description based on the information in the supplied manifest dictionary. |
BundleSpecification |
createBundleSpecification(BundleSpecification original)
Creates a bundle specification that is a copy of the given constraint. |
BundleSpecification |
createBundleSpecification(String requiredSymbolicName,
VersionRange requiredVersionRange,
boolean export,
boolean optional)
Creates a bundle specification from the given parameters. |
List<BundleSpecification> |
createBundleSpecifications(String declaration)
Creates bundle specifications from the given declaration. |
ExportPackageDescription |
createExportPackageDescription(ExportPackageDescription original)
Creates an export package specification that is a copy of the given constraint |
ExportPackageDescription |
createExportPackageDescription(String packageName,
Version version,
Map<String,?> directives,
Map<String,?> attributes,
boolean root,
BundleDescription exporter)
Used by the Resolver to dynamically create ExportPackageDescription objects during the resolution process. |
List<ExportPackageDescription> |
createExportPackageDescriptions(String declaration)
Creates export package descriptions from the given declaration. |
GenericDescription |
createGenericDescription(String type,
Map<String,?> attributes,
Map<String,String> directives,
BundleDescription supplier)
Creates a generic description from the given parameters |
GenericDescription |
createGenericDescription(String name,
String type,
Version version,
Map<String,?> attributes)
Deprecated. |
List<GenericDescription> |
createGenericDescriptions(String declaration)
Creates generic descriptions from the given declaration. |
GenericSpecification |
createGenericSpecification(String name,
String type,
String matchingFilter,
boolean optional,
boolean multiple)
Creates a generic specification from the given parameters |
List<GenericSpecification> |
createGenericSpecifications(String declaration)
Creates generic specifications from the given declaration. |
HostSpecification |
createHostSpecification(HostSpecification original)
Creates a host specification that is a copy of the given constraint. |
HostSpecification |
createHostSpecification(String hostSymbolicName,
VersionRange versionRange)
Creates a host specification from the given parameters. |
List<HostSpecification> |
createHostSpecifications(String declaration)
Creates host specifications from the given declaration. |
ImportPackageSpecification |
createImportPackageSpecification(ImportPackageSpecification original)
Creates an import package specification that is a copy of the given import package |
ImportPackageSpecification |
createImportPackageSpecification(String packageName,
VersionRange versionRange,
String bundleSymbolicName,
VersionRange bundleVersionRange,
Map<String,?> directives,
Map<String,?> attributes,
BundleDescription importer)
Creates an import package specification from the given parameters. |
List<ImportPackageSpecification> |
createImportPackageSpecifications(String declaration)
Creates an import package specifications from the given declaration. |
NativeCodeDescription |
createNativeCodeDescription(String[] nativePaths,
String[] processors,
String[] osNames,
VersionRange[] osVersions,
String[] languages,
String filter)
Creates a native code description from the given parameters |
NativeCodeSpecification |
createNativeCodeSpecification(NativeCodeDescription[] nativeCodeDescriptions,
boolean optional)
Creates a native code specification from the given parameters |
State |
createState()
Deprecated. |
State |
createState(boolean createResolver)
Creates an empty state with or without a resolver. |
State |
createState(State original)
Creates a new state that is a copy of the given state. |
SystemState |
createSystemState(BundleContext context)
|
void |
internalWriteStateDeprecated(State state,
DataOutputStream stream)
|
State |
readState(DataInputStream stream)
Deprecated. |
State |
readState(File stateDirectory)
Reads a persisted state from the given directory. |
State |
readState(InputStream stream)
Deprecated. |
SystemState |
readSystemState(BundleContext context,
File stateFile,
File lazyFile,
boolean lazyLoad,
long expectedTimeStamp)
|
void |
writeState(State state,
DataOutputStream stream)
Deprecated. |
void |
writeState(State state,
File stateDirectory)
Persists the given state in the given directory. |
void |
writeState(State state,
File stateFile,
File lazyFile)
|
void |
writeState(State state,
OutputStream stream)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StateObjectFactoryImpl()
| Method Detail |
|---|
public BundleDescription createBundleDescription(Dictionary<String,String> manifest,
String location,
long id)
throws BundleException
StateObjectFactory
createBundleDescription in interface StateObjectFactorymanifest - a collection of OSGi manifest headers and valueslocation - the URL location of the bundle (may be null)id - the id of the bundle
BundleException - if an error occurs while reading the manifest
public BundleDescription createBundleDescription(State state,
Dictionary<String,String> manifest,
String location,
long id)
throws BundleException
StateObjectFactory
createBundleDescription in interface StateObjectFactorystate - the state for which the description is being createdmanifest - a collection of OSGi manifest headers and valueslocation - the URL location of the bundle (may be null)id - the id of the bundle
BundleException - if an error occurs while reading the manifest
public BundleDescription createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
String[] providedPackages,
boolean singleton)
StateObjectFactory
createBundleDescription in interface StateObjectFactoryid - id for the bundlesymbolicName - symbolic name for the bundle (may be
null)version - version for the bundle (may be null)location - location for the bundle (may be null)required - version constraints for all required bundles (may be
null)host - version constraint specifying the host for the bundle to be
created. Should be null if the bundle is not a fragmentimports - version constraints for all packages imported
(may be null)exports - package descriptions of all the exported packages
(may be null)providedPackages - the list of provided packages (may be null)singleton - whether the bundle created should be a singleton
public BundleDescription createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
String[] providedPackages,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
String platformFilter,
String executionEnvironment,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities)
StateObjectFactory
createBundleDescription in interface StateObjectFactoryid - id for the bundlesymbolicName - symbolic name for the bundle (may be
null)version - version for the bundle (may be null)location - location for the bundle (may be null)required - version constraints for all required bundles (may be
null)host - version constraint specifying the host for the bundle to be
created. Should be null if the bundle is not a fragmentimports - version constraints for all packages imported
(may be null)exports - package descriptions of all the exported packages
(may be null)providedPackages - the list of provided packages (may be null)singleton - whether the bundle created should be a singletonattachFragments - whether the bundle allows fragments to attachdynamicFragments - whether the bundle allows fragments to dynamically attachplatformFilter - the platform filter (may be null)executionEnvironment - the execution environment (may be null)genericRequires - the version constraints for all required capabilities (may be null)genericCapabilities - the specifications of all the capabilities of the bundle (may be null)
public BundleDescription createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
String platformFilter,
String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities)
StateObjectFactory
createBundleDescription in interface StateObjectFactoryid - id for the bundlesymbolicName - symbolic name for the bundle (may be null)version - version for the bundle (may be null)location - location for the bundle (may be null)required - version constraints for all required bundles (may be null)host - version constraint specifying the host for the bundle to be created. Should be null if the bundle is not a fragmentimports - version constraints for all packages imported (may be null)exports - package descriptions of all the exported packages (may be null)singleton - whether the bundle created should be a singletonattachFragments - whether the bundle allows fragments to attachdynamicFragments - whether the bundle allows fragments to dynamically attachplatformFilter - the platform filter (may be null)executionEnvironments - the execution environment (may be null)genericRequires - the version constraints for all required capabilities (may be null)genericCapabilities - the specifications of all the capabilities of the bundle (may be null)
public BundleDescription createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
String platformFilter,
String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities,
NativeCodeSpecification nativeCode)
StateObjectFactory
createBundleDescription in interface StateObjectFactoryid - id for the bundlesymbolicName - symbolic name for the bundle (may be null)version - version for the bundle (may be null)location - location for the bundle (may be null)required - version constraints for all required bundles (may be null)host - version constraint specifying the host for the bundle to be created. Should be null if the bundle is not a fragmentimports - version constraints for all packages imported (may be null)exports - package descriptions of all the exported packages (may be null)singleton - whether the bundle created should be a singletonattachFragments - whether the bundle allows fragments to attachdynamicFragments - whether the bundle allows fragments to dynamically attachplatformFilter - the platform filter (may be null)executionEnvironments - the execution environment (may be null)genericRequires - the version constraints for all required capabilities (may be null)genericCapabilities - the specifications of all the capabilities of the bundle (may be null)nativeCode - the native code specification of the bundle (may be null)
public BundleDescription createBundleDescription(long id,
String symbolicName,
Version version,
String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
String platformFilter,
String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities,
NativeCodeSpecification nativeCode)
StateObjectFactory
createBundleDescription in interface StateObjectFactoryid - id for the bundlesymbolicName - the symbolic name of the bundle. This may include directives and/or attributes encoded using the Bundle-SymbolicName header.version - version for the bundle (may be null)location - location for the bundle (may be null)required - version constraints for all required bundles (may be null)host - version constraint specifying the host for the bundle to be created. Should be null if the bundle is not a fragmentimports - version constraints for all packages imported (may be null)exports - package descriptions of all the exported packages (may be null)platformFilter - the platform filter (may be null)executionEnvironments - the execution environment (may be null)genericRequires - the version constraints for all required capabilities (may be null)genericCapabilities - the specifications of all the capabilities of the bundle (may be null)nativeCode - the native code specification of the bundle (may be null)
public BundleDescription createBundleDescription(BundleDescription original)
StateObjectFactory
createBundleDescription in interface StateObjectFactoryoriginal - the bundle description to be copied
public BundleSpecification createBundleSpecification(String requiredSymbolicName,
VersionRange requiredVersionRange,
boolean export,
boolean optional)
StateObjectFactory
createBundleSpecification in interface StateObjectFactoryrequiredSymbolicName - the symbolic name for the required bundlerequiredVersionRange - the required version range (may be null)export - whether the required bundle should be re-exportedoptional - whether the constraint should be optional
for information on the available match rulespublic BundleSpecification createBundleSpecification(BundleSpecification original)
StateObjectFactory
createBundleSpecification in interface StateObjectFactoryoriginal - the constraint to be copied
public HostSpecification createHostSpecification(String hostSymbolicName,
VersionRange versionRange)
StateObjectFactory
createHostSpecification in interface StateObjectFactoryhostSymbolicName - the symbolic name for the host bundleversionRange - the version range for the host bundle (may be null)
for information on the available match rulespublic HostSpecification createHostSpecification(HostSpecification original)
StateObjectFactory
createHostSpecification in interface StateObjectFactoryoriginal - the constraint to be copied
public ImportPackageSpecification createImportPackageSpecification(String packageName,
VersionRange versionRange,
String bundleSymbolicName,
VersionRange bundleVersionRange,
Map<String,?> directives,
Map<String,?> attributes,
BundleDescription importer)
StateObjectFactory
createImportPackageSpecification in interface StateObjectFactorypackageName - the package nameversionRange - the package versionRange (may be null).bundleSymbolicName - the Bundle-SymbolicName of the bundle that must export the package (may be null)bundleVersionRange - the bundle versionRange (may be null).directives - the directives for this package (may be null)attributes - the arbitrary attributes for the package import (may be null)importer - the importing bundle (may be null)
public ImportPackageSpecification createImportPackageSpecification(ImportPackageSpecification original)
StateObjectFactory
createImportPackageSpecification in interface StateObjectFactoryoriginal - the import package to be copied
public ExportPackageDescription createExportPackageDescription(ExportPackageDescription original)
StateObjectFactory
createExportPackageDescription in interface StateObjectFactoryoriginal - the export package to be copied
public ExportPackageDescription createExportPackageDescription(String packageName,
Version version,
Map<String,?> directives,
Map<String,?> attributes,
boolean root,
BundleDescription exporter)
StateObjectFactory
createExportPackageDescription in interface StateObjectFactorypackageName - the package nameversion - the version of the package (may be null)directives - the directives for the package (may be null)attributes - the attributes for the package (may be null)root - whether the package is a root packageexporter - the exporter of the package (may be null)
public GenericDescription createGenericDescription(String name,
String type,
Version version,
Map<String,?> attributes)
StateObjectFactory
createGenericDescription in interface StateObjectFactoryname - the name of the generic descriptiontype - the type of the generic description (may be null)version - the version of the generic description (may be null)attributes - the attributes for the generic description (may be null)
public GenericDescription createGenericDescription(String type,
Map<String,?> attributes,
Map<String,String> directives,
BundleDescription supplier)
StateObjectFactory
createGenericDescription in interface StateObjectFactorytype - the type of the generic description (may be null)attributes - the attributes for the generic description (may be null)directives - the directives for the generic description (may be null)supplier - the supplier of the generic description (may be null)
public GenericSpecification createGenericSpecification(String name,
String type,
String matchingFilter,
boolean optional,
boolean multiple)
throws InvalidSyntaxException
StateObjectFactory
createGenericSpecification in interface StateObjectFactoryname - the name of the generic specificationtype - the type of the generic specification (may be null)matchingFilter - the matching filter (may be null)optional - whether the specification is optionalmultiple - whether the specification allows for multiple suppliers
InvalidSyntaxException - if the matching filter is invalid
public NativeCodeDescription createNativeCodeDescription(String[] nativePaths,
String[] processors,
String[] osNames,
VersionRange[] osVersions,
String[] languages,
String filter)
throws InvalidSyntaxException
StateObjectFactory
createNativeCodeDescription in interface StateObjectFactorynativePaths - the native code paths (may be null)processors - the supported processors (may be null)osNames - the supported operating system names (may be null)osVersions - the supported operating system version ranges (may be null)languages - the supported languages (may be null)filter - the selection filter (may be null)
InvalidSyntaxException - if the selection filter is invalid
public NativeCodeSpecification createNativeCodeSpecification(NativeCodeDescription[] nativeCodeDescriptions,
boolean optional)
StateObjectFactory
createNativeCodeSpecification in interface StateObjectFactorynativeCodeDescriptions - the native code descriptorsoptional - whether the specification is optional
public SystemState createSystemState(BundleContext context)
public State createState()
StateObjectFactory
createState in interface StateObjectFactorypublic State createState(boolean createResolver)
StateObjectFactory
createState in interface StateObjectFactorycreateResolver - true if the created state should be initialized with a resolver.
public State createState(State original)
StateObjectFactory
createState in interface StateObjectFactoryoriginal - a state to be copied
public SystemState readSystemState(BundleContext context,
File stateFile,
File lazyFile,
boolean lazyLoad,
long expectedTimeStamp)
throws IOException
IOException
public State readState(InputStream stream)
throws IOException
StateObjectFactory
readState in interface StateObjectFactorystream - the stream where to read the state from
IOException - if an IOException happens while reading the state from
the stream
public State readState(DataInputStream stream)
throws IOException
StateObjectFactory
readState in interface StateObjectFactorystream - the stream where to read the state from
IOException - if an IOException happens while reading the state from
the streamStateObjectFactory.readState(InputStream)
public State readState(File stateDirectory)
throws IOException
StateObjectFactory
readState in interface StateObjectFactorystateDirectory - the directory where to read the state from
IOException - if an IOException happens while reading the state from
the stream
public void writeState(State state,
DataOutputStream stream)
throws IOException
StateObjectFactory
writeState in interface StateObjectFactorystate - the state to be writtenstream - the stream where to write the state to
IOException - if an IOException happens while writing the state to
the streamStateObjectFactory.writeState(State, OutputStream)
public void writeState(State state,
File stateDirectory)
throws IOException
StateObjectFactory
writeState in interface StateObjectFactorystate - the state to be writtenstateDirectory - the directory where to write the state to
IOException - if an IOException happens while writing the state to
the stream
public void writeState(State state,
OutputStream stream)
throws IOException
StateObjectFactory
writeState in interface StateObjectFactorystate - the state to be writtenstream - the stream where to write the state to
IOException - if an IOException happens while writing the state to
the stream
public void writeState(State state,
File stateFile,
File lazyFile)
throws IOException
IOException
public void internalWriteStateDeprecated(State state,
DataOutputStream stream)
throws IOException
IOExceptionpublic List<BundleSpecification> createBundleSpecifications(String declaration)
StateObjectFactory
createBundleSpecifications in interface StateObjectFactorydeclaration - a string declaring bundle specifications
public List<HostSpecification> createHostSpecifications(String declaration)
StateObjectFactory
createHostSpecifications in interface StateObjectFactorydeclaration - a string declaring host specifications
public List<ImportPackageSpecification> createImportPackageSpecifications(String declaration)
StateObjectFactory
createImportPackageSpecifications in interface StateObjectFactorydeclaration - a string declaring import package specifications
public List<GenericDescription> createGenericDescriptions(String declaration)
StateObjectFactory
createGenericDescriptions in interface StateObjectFactorydeclaration - a string declaring generic descriptions
public List<GenericSpecification> createGenericSpecifications(String declaration)
StateObjectFactory
createGenericSpecifications in interface StateObjectFactorydeclaration - a string declaring generic specifications
public List<ExportPackageDescription> createExportPackageDescriptions(String declaration)
StateObjectFactory
createExportPackageDescriptions in interface StateObjectFactorydeclaration - a string declaring export package descriptions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||