Class StateObjectFactory.StateObjectFactoryProxy
java.lang.Object
org.eclipse.osgi.service.resolver.StateObjectFactory.StateObjectFactoryProxy
- All Implemented Interfaces:
StateObjectFactory
- Enclosing interface:
StateObjectFactory
public static class StateObjectFactory.StateObjectFactoryProxy
extends Object
implements StateObjectFactory
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.osgi.service.resolver.StateObjectFactory
StateObjectFactory.StateObjectFactoryProxy -
Field Summary
Fields inherited from interface org.eclipse.osgi.service.resolver.StateObjectFactory
defaultFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBundleDescription(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.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.createBundleDescription(long id, String symbolicName, Version version, String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, String[] providedPackages, boolean singleton) Deprecated.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.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.createBundleDescription(Dictionary<String, String> manifest, String location, long id) Deprecated.createBundleDescription(BundleDescription original) Creates a bundle description that is a copy of the given description.createBundleDescription(State state, Dictionary<String, String> manifest, String location, long id) Returns a bundle description based on the information in the supplied manifest dictionary.createBundleSpecification(String requiredSymbolicName, VersionRange requiredVersionRange, boolean export, boolean optional) Creates a bundle specification from the given parameters.createBundleSpecification(BundleSpecification original) Creates a bundle specification that is a copy of the given constraint.createBundleSpecifications(String declaration) Creates bundle specifications from the given declaration.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.Creates an export package specification that is a copy of the given constraintcreateExportPackageDescriptions(String declaration) Creates export package descriptions from the given declaration.Deprecated.createGenericDescription(String type, Map<String, ?> attributes, Map<String, String> directives, BundleDescription supplier) Creates a generic description from the given parameterscreateGenericDescriptions(String declaration) Creates generic descriptions from the given declaration.createGenericSpecification(String name, String type, String matchingFilter, boolean optional, boolean multiple) Creates a generic specification from the given parameterscreateGenericSpecifications(String declaration) Creates generic specifications from the given declaration.createHostSpecification(String hostSymbolicName, VersionRange hostVersionRange) Creates a host specification from the given parameters.createHostSpecification(HostSpecification original) Creates a host specification that is a copy of the given constraint.createHostSpecifications(String declaration) Creates host specifications from the given declaration.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.Creates an import package specification that is a copy of the given import packagecreateImportPackageSpecifications(String declaration) Creates an import package specifications from the given declaration.createNativeCodeDescription(String[] nativePaths, String[] processors, String[] osNames, VersionRange[] osVersions, String[] languages, String filter) Creates a native code description from the given parameterscreateNativeCodeSpecification(NativeCodeDescription[] nativeCodeDescriptions, boolean optional) Creates a native code specification from the given parametersDeprecated.createState(boolean resolver) Creates an empty state with or without a resolver.createState(State state) Creates a new state that is a copy of the given state.readState(DataInputStream stream) Deprecated.Reads a persisted state from the given directory.readState(InputStream stream) Deprecated.voidwriteState(State state, DataOutputStream stream) Deprecated.voidwriteState(State state, File stateDirectory) Persists the given state in the given directory.voidwriteState(State state, OutputStream stream) Deprecated.
-
Constructor Details
-
StateObjectFactoryProxy
public StateObjectFactoryProxy()
-
-
Method Details
-
createState
Deprecated.Description copied from interface:StateObjectFactoryCreates an empty state. The returned state does not have an attached resolver.- Specified by:
createStatein interfaceStateObjectFactory- Returns:
- the created state
-
createState
Description copied from interface:StateObjectFactoryCreates an empty state with or without a resolver.- Specified by:
createStatein interfaceStateObjectFactory- Parameters:
resolver- true if the created state should be initialized with a resolver.- Returns:
- the created state
-
createState
Description copied from interface:StateObjectFactoryCreates a new state that is a copy of the given state. The returned state will contain copies of all bundle descriptions in the given state. The user objects from the original bundle descriptions is not copied and no data pertaining to resolution is copied. The returned state will have a new resolver attached to it.- Specified by:
createStatein interfaceStateObjectFactory- Parameters:
state- a state to be copied- Returns:
- the created state
-
createBundleDescription
@Deprecated public BundleDescription createBundleDescription(long id, String symbolicName, Version version, String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, String[] providedPackages, boolean singleton) Deprecated.Description copied from interface:StateObjectFactoryCreates a bundle description from the given parameters.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
id- id for the bundlesymbolicName- symbolic name for the bundle (may benull)version- version for the bundle (may benull)location- location for the bundle (may benull)required- version constraints for all required bundles (may benull)host- version constraint specifying the host for the bundle to be created. Should benullif the bundle is not a fragmentimports- version constraints for all packages imported (may benull)exports- package descriptions of all the exported packages (may benull)providedPackages- the list of provided packages (may benull)singleton- whether the bundle created should be a singleton- Returns:
- the created bundle description
-
createBundleDescription
@Deprecated 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) Deprecated.Description copied from interface:StateObjectFactoryCreates a bundle description from the given parameters.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
id- id for the bundlesymbolicName- symbolic name for the bundle (may benull)version- version for the bundle (may benull)location- location for the bundle (may benull)required- version constraints for all required bundles (may benull)host- version constraint specifying the host for the bundle to be created. Should benullif the bundle is not a fragmentimports- version constraints for all packages imported (may benull)exports- package descriptions of all the exported packages (may benull)providedPackages- the list of provided packages (may benull)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 benull)executionEnvironment- the execution environment (may benull)genericRequires- the version constraints for all required capabilities (may benull)genericCapabilities- the specifications of all the capabilities of the bundle (may benull)- Returns:
- the created bundle description
-
createBundleDescription
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) Description copied from interface:StateObjectFactoryCreates a bundle description from the given parameters.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
id- id for the bundlesymbolicName- symbolic name for the bundle (may benull)version- version for the bundle (may benull)location- location for the bundle (may benull)required- version constraints for all required bundles (may benull)host- version constraint specifying the host for the bundle to be created. Should benullif the bundle is not a fragmentimports- version constraints for all packages imported (may benull)exports- package descriptions of all the exported packages (may benull)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 benull)executionEnvironments- the execution environment (may benull)genericRequires- the version constraints for all required capabilities (may benull)genericCapabilities- the specifications of all the capabilities of the bundle (may benull)- Returns:
- the created bundle description
-
createBundleDescription
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) Description copied from interface:StateObjectFactoryCreates a bundle description from the given parameters.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
id- id for the bundlesymbolicName- symbolic name for the bundle (may benull)version- version for the bundle (may benull)location- location for the bundle (may benull)required- version constraints for all required bundles (may benull)host- version constraint specifying the host for the bundle to be created. Should benullif the bundle is not a fragmentimports- version constraints for all packages imported (may benull)exports- package descriptions of all the exported packages (may benull)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 benull)executionEnvironments- the execution environment (may benull)genericRequires- the version constraints for all required capabilities (may benull)genericCapabilities- the specifications of all the capabilities of the bundle (may benull)nativeCode- the native code specification of the bundle (may benull)- Returns:
- the created bundle description
-
createBundleDescription
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) Description copied from interface:StateObjectFactoryCreates a bundle description from the given parameters.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
id- 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 benull)location- location for the bundle (may benull)required- version constraints for all required bundles (may benull)host- version constraint specifying the host for the bundle to be created. Should benullif the bundle is not a fragmentimports- version constraints for all packages imported (may benull)exports- package descriptions of all the exported packages (may benull)platformFilter- the platform filter (may benull)executionEnvironments- the execution environment (may benull)genericRequires- the version constraints for all required capabilities (may benull)genericCapabilities- the specifications of all the capabilities of the bundle (may benull)nativeCode- the native code specification of the bundle (may benull)- Returns:
- the created bundle description
-
createBundleDescription
public BundleDescription createBundleDescription(State state, Dictionary<String, String> manifest, String location, long id) throws BundleExceptionDescription copied from interface:StateObjectFactoryReturns a bundle description based on the information in the supplied manifest dictionary. The manifest should contain String keys and String values which correspond to proper OSGi manifest headers and values.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
state- the state for which the description is being createdmanifest- a collection of OSGi manifest headers and valueslocation- the URL location of the bundle (may benull)id- the id of the bundle- Returns:
- a bundle description derived from the given information
- Throws:
BundleException- if an error occurs while reading the manifest
-
createBundleDescription
@Deprecated public BundleDescription createBundleDescription(Dictionary<String, String> manifest, String location, long id) throws BundleExceptionDeprecated.Description copied from interface:StateObjectFactoryReturns a bundle description based on the information in the supplied manifest dictionary. The manifest should contain String keys and String values which correspond to proper OSGi manifest headers and values.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
manifest- a collection of OSGi manifest headers and valueslocation- the URL location of the bundle (may benull)id- the id of the bundle- Returns:
- a bundle description derived from the given information
- Throws:
BundleException- if an error occurs while reading the manifest
-
createBundleDescription
Description copied from interface:StateObjectFactoryCreates a bundle description that is a copy of the given description. The user object of the original bundle description is not copied.- Specified by:
createBundleDescriptionin interfaceStateObjectFactory- Parameters:
original- the bundle description to be copied- Returns:
- the created bundle description
-
createBundleSpecification
public BundleSpecification createBundleSpecification(String requiredSymbolicName, VersionRange requiredVersionRange, boolean export, boolean optional) Description copied from interface:StateObjectFactoryCreates a bundle specification from the given parameters.- Specified by:
createBundleSpecificationin interfaceStateObjectFactory- Parameters:
requiredSymbolicName- the symbolic name for the required bundlerequiredVersionRange- the required version range (may benull)export- whether the required bundle should be re-exportedoptional- whether the constraint should be optional- Returns:
- the created bundle specification
- See Also:
-
createBundleSpecification
Description copied from interface:StateObjectFactoryCreates a bundle specification that is a copy of the given constraint.- Specified by:
createBundleSpecificationin interfaceStateObjectFactory- Parameters:
original- the constraint to be copied- Returns:
- the created bundle specification
-
createBundleSpecifications
Description copied from interface:StateObjectFactoryCreates bundle specifications from the given declaration. The declaration uses the bundle manifest syntax for the Require-Bundle header.- Specified by:
createBundleSpecificationsin interfaceStateObjectFactory- Parameters:
declaration- a string declaring bundle specifications- Returns:
- the bundle specifications
-
createHostSpecification
public HostSpecification createHostSpecification(String hostSymbolicName, VersionRange hostVersionRange) Description copied from interface:StateObjectFactoryCreates a host specification from the given parameters.- Specified by:
createHostSpecificationin interfaceStateObjectFactory- Parameters:
hostSymbolicName- the symbolic name for the host bundlehostVersionRange- the version range for the host bundle (may benull)- Returns:
- the created host specification
- See Also:
-
createHostSpecifications
Description copied from interface:StateObjectFactoryCreates host specifications from the given declaration. The declaration uses the bundle manifest syntax for the Fragment-Host header.- Specified by:
createHostSpecificationsin interfaceStateObjectFactory- Parameters:
declaration- a string declaring host specifications- Returns:
- the host specifications
-
createHostSpecification
Description copied from interface:StateObjectFactoryCreates a host specification that is a copy of the given constraint.- Specified by:
createHostSpecificationin interfaceStateObjectFactory- Parameters:
original- the constraint to be copied- Returns:
- the created host specification
-
createImportPackageSpecification
public ImportPackageSpecification createImportPackageSpecification(String packageName, VersionRange versionRange, String bundleSymbolicName, VersionRange bundleVersionRange, Map<String, ?> directives, Map<String, ?> attributes, BundleDescription importer) Description copied from interface:StateObjectFactoryCreates an import package specification from the given parameters.- Specified by:
createImportPackageSpecificationin interfaceStateObjectFactory- Parameters:
packageName- the package nameversionRange- the package versionRange (may benull).bundleSymbolicName- the Bundle-SymbolicName of the bundle that must export the package (may benull)bundleVersionRange- the bundle versionRange (may benull).directives- the directives for this package (may benull)attributes- the arbitrary attributes for the package import (may benull)importer- the importing bundle (may benull)- Returns:
- the created package specification
-
createImportPackageSpecification
public ImportPackageSpecification createImportPackageSpecification(ImportPackageSpecification original) Description copied from interface:StateObjectFactoryCreates an import package specification that is a copy of the given import package- Specified by:
createImportPackageSpecificationin interfaceStateObjectFactory- Parameters:
original- the import package to be copied- Returns:
- the created package specification
-
createImportPackageSpecifications
Description copied from interface:StateObjectFactoryCreates an import package specifications from the given declaration. The declaration uses the bundle manifest syntax for the Import-Package header.- Specified by:
createImportPackageSpecificationsin interfaceStateObjectFactory- Parameters:
declaration- a string declaring import package specifications- Returns:
- the import package specifications
-
createExportPackageDescription
public ExportPackageDescription createExportPackageDescription(String packageName, Version version, Map<String, ?> directives, Map<String, ?> attributes, boolean root, BundleDescription exporter) Description copied from interface:StateObjectFactoryUsed by the Resolver to dynamically create ExportPackageDescription objects during the resolution process. The Resolver needs to create ExportPackageDescriptions dynamically for a host when a fragment exports a package.- Specified by:
createExportPackageDescriptionin interfaceStateObjectFactory- Parameters:
packageName- the package nameversion- the version of the package (may benull)directives- the directives for the package (may benull)attributes- the attributes for the package (may benull)root- whether the package is a root packageexporter- the exporter of the package (may benull)- Returns:
- the created package
-
createGenericDescription
@Deprecated public GenericDescription createGenericDescription(String name, String type, Version version, Map<String, ?> attributes) Deprecated.Description copied from interface:StateObjectFactoryCreates a generic description from the given parameters- Specified by:
createGenericDescriptionin interfaceStateObjectFactory- Parameters:
name- the name of the generic descriptiontype- the type of the generic description (may benull)version- the version of the generic description (may benull)attributes- the attributes for the generic description (may benull)- Returns:
- the created generic description
-
createGenericDescription
public GenericDescription createGenericDescription(String type, Map<String, ?> attributes, Map<String, String> directives, BundleDescription supplier) Description copied from interface:StateObjectFactoryCreates a generic description from the given parameters- Specified by:
createGenericDescriptionin interfaceStateObjectFactory- Parameters:
type- the type of the generic description (may benull)attributes- the attributes for the generic description (may benull)directives- the directives for the generic description (may benull)supplier- the supplier of the generic description (may benull)- Returns:
- the created generic description
-
createGenericDescriptions
Description copied from interface:StateObjectFactoryCreates generic descriptions from the given declaration. The declaration uses the bundle manifest syntax for the Provide-Capability header.- Specified by:
createGenericDescriptionsin interfaceStateObjectFactory- Parameters:
declaration- a string declaring generic descriptions- Returns:
- the generic descriptions
-
createGenericSpecification
public GenericSpecification createGenericSpecification(String name, String type, String matchingFilter, boolean optional, boolean multiple) throws InvalidSyntaxException Description copied from interface:StateObjectFactoryCreates a generic specification from the given parameters- Specified by:
createGenericSpecificationin interfaceStateObjectFactory- Parameters:
name- the name of the generic specificationtype- the type of the generic specification (may benull)matchingFilter- the matching filter (may benull)optional- whether the specification is optionalmultiple- whether the specification allows for multiple suppliers- Returns:
- the created generic specification
- Throws:
InvalidSyntaxException- if the matching filter is invalid
-
createGenericSpecifications
Description copied from interface:StateObjectFactoryCreates generic specifications from the given declaration. The declaration uses the bundle manifest syntax for the Require-Capability header.- Specified by:
createGenericSpecificationsin interfaceStateObjectFactory- Parameters:
declaration- a string declaring generic specifications- Returns:
- the generic specifications
-
createNativeCodeSpecification
public NativeCodeSpecification createNativeCodeSpecification(NativeCodeDescription[] nativeCodeDescriptions, boolean optional) Description copied from interface:StateObjectFactoryCreates a native code specification from the given parameters- Specified by:
createNativeCodeSpecificationin interfaceStateObjectFactory- Parameters:
nativeCodeDescriptions- the native code descriptorsoptional- whether the specification is optional- Returns:
- the created native code specification
-
createNativeCodeDescription
public NativeCodeDescription createNativeCodeDescription(String[] nativePaths, String[] processors, String[] osNames, VersionRange[] osVersions, String[] languages, String filter) throws InvalidSyntaxException Description copied from interface:StateObjectFactoryCreates a native code description from the given parameters- Specified by:
createNativeCodeDescriptionin interfaceStateObjectFactory- Parameters:
nativePaths- the native code paths (may benull)processors- the supported processors (may benull)osNames- the supported operating system names (may benull)osVersions- the supported operating system version ranges (may benull)languages- the supported languages (may benull)filter- the selection filter (may benull)- Returns:
- the created native code description
- Throws:
InvalidSyntaxException- if the selection filter is invalid
-
createExportPackageDescription
Description copied from interface:StateObjectFactoryCreates an export package specification that is a copy of the given constraint- Specified by:
createExportPackageDescriptionin interfaceStateObjectFactory- Parameters:
original- the export package to be copied- Returns:
- the created package
-
createExportPackageDescriptions
Description copied from interface:StateObjectFactoryCreates export package descriptions from the given declaration. The declaration uses the bundle manifest syntax for the Export-Package header.- Specified by:
createExportPackageDescriptionsin interfaceStateObjectFactory- Parameters:
declaration- a string declaring export package descriptions- Returns:
- the export package descriptions
-
writeState
Deprecated.Description copied from interface:StateObjectFactoryPersists the given state in the given output stream. Closes the stream.- Specified by:
writeStatein interfaceStateObjectFactory- Parameters:
state- the state to be writtenstream- the stream where to write the state to- Throws:
IOException- if an IOException happens while writing the state to the stream
-
writeState
Deprecated.Description copied from interface:StateObjectFactoryPersists the given state in the given output stream. Closes the stream.- Specified by:
writeStatein interfaceStateObjectFactory- Parameters:
state- the state to be writtenstream- the stream where to write the state to- Throws:
IOException- if an IOException happens while writing the state to the stream- See Also:
-
writeState
Description copied from interface:StateObjectFactoryPersists the given state in the given directory.- Specified by:
writeStatein interfaceStateObjectFactory- Parameters:
state- the state to be writtenstateDirectory- the directory where to write the state to- Throws:
IOException- if an IOException happens while writing the state to the stream
-
readState
Deprecated.Description copied from interface:StateObjectFactoryReads a persisted state from the given stream. Closes the stream.- Specified by:
readStatein interfaceStateObjectFactory- Parameters:
stream- the stream where to read the state from- Returns:
- the state read
- Throws:
IOException- if an IOException happens while reading the state from the stream
-
readState
Deprecated.Description copied from interface:StateObjectFactoryReads a persisted state from the given stream. Closes the stream.- Specified by:
readStatein interfaceStateObjectFactory- Parameters:
stream- the stream where to read the state from- Returns:
- the state read
- Throws:
IOException- if an IOException happens while reading the state from the stream- See Also:
-
readState
Description copied from interface:StateObjectFactoryReads a persisted state from the given directory.- Specified by:
readStatein interfaceStateObjectFactory- Parameters:
stateDirectory- the directory where to read the state from- Returns:
- the state read
- Throws:
IOException- if an IOException happens while reading the state from the stream
-