|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StateObjectFactory
A factory for states and their component objects.
This interface is not intended to be implemented by clients.
Field Summary | |
---|---|
static StateObjectFactory |
defaultFactory
The default object factory that can be used to create, populate and resolve states. |
Method Summary | |
---|---|
BundleDescription |
createBundleDescription(BundleDescription original)
Creates a bundle description that is a copy of the given description. |
BundleDescription |
createBundleDescription(java.util.Dictionary<java.lang.String,java.lang.String> manifest,
java.lang.String location,
long id)
Deprecated. use createBundleDescription(State, Dictionary, String, long) |
BundleDescription |
createBundleDescription(long id,
java.lang.String symbolicName,
org.osgi.framework.Version version,
java.lang.String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
java.lang.String platformFilter,
java.lang.String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities)
Creates a bundle description from the given parameters. |
BundleDescription |
createBundleDescription(long id,
java.lang.String symbolicName,
org.osgi.framework.Version version,
java.lang.String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
java.lang.String platformFilter,
java.lang.String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities,
NativeCodeSpecification nativeCode)
Creates a bundle description from the given parameters. |
BundleDescription |
createBundleDescription(long id,
java.lang.String symbolicName,
org.osgi.framework.Version version,
java.lang.String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
java.lang.String[] providedPackages,
boolean singleton)
Deprecated. use createBundleDescription(long, String, Version, String, BundleSpecification[], HostSpecification, ImportPackageSpecification[], ExportPackageDescription[], boolean, boolean, boolean, String, String[], GenericSpecification[], GenericDescription[]) |
BundleDescription |
createBundleDescription(long id,
java.lang.String symbolicName,
org.osgi.framework.Version version,
java.lang.String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
java.lang.String[] providedPackages,
boolean singleton,
boolean attachFragments,
boolean dynamicFragments,
java.lang.String platformFilter,
java.lang.String executionEnvironment,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities)
Deprecated. use createBundleDescription(long, String, Version, String, BundleSpecification[], HostSpecification, ImportPackageSpecification[], ExportPackageDescription[], boolean, boolean, boolean, String, String[], GenericSpecification[], GenericDescription[]) |
BundleDescription |
createBundleDescription(long id,
java.lang.String symbolicName,
org.osgi.framework.Version version,
java.lang.String location,
BundleSpecification[] required,
HostSpecification host,
ImportPackageSpecification[] imports,
ExportPackageDescription[] exports,
java.lang.String platformFilter,
java.lang.String[] executionEnvironments,
GenericSpecification[] genericRequires,
GenericDescription[] genericCapabilities,
NativeCodeSpecification nativeCode)
Creates a bundle description from the given parameters. |
BundleDescription |
createBundleDescription(State state,
java.util.Dictionary<java.lang.String,java.lang.String> manifest,
java.lang.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(java.lang.String requiredSymbolicName,
VersionRange requiredVersionRange,
boolean export,
boolean optional)
Creates a bundle specification from the given parameters. |
java.util.List<BundleSpecification> |
createBundleSpecifications(java.lang.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(java.lang.String packageName,
org.osgi.framework.Version version,
java.util.Map<java.lang.String,?> directives,
java.util.Map<java.lang.String,?> attributes,
boolean root,
BundleDescription exporter)
Used by the Resolver to dynamically create ExportPackageDescription objects during the resolution process. |
java.util.List<ExportPackageDescription> |
createExportPackageDescriptions(java.lang.String declaration)
Creates export package descriptions from the given declaration. |
GenericDescription |
createGenericDescription(java.lang.String type,
java.util.Map<java.lang.String,?> attributes,
java.util.Map<java.lang.String,java.lang.String> directives,
BundleDescription supplier)
Creates a generic description from the given parameters |
GenericDescription |
createGenericDescription(java.lang.String name,
java.lang.String type,
org.osgi.framework.Version version,
java.util.Map<java.lang.String,?> attributes)
Deprecated. use createGenericDescription(String, String, Version, Map) |
java.util.List<GenericDescription> |
createGenericDescriptions(java.lang.String declaration)
Creates generic descriptions from the given declaration. |
GenericSpecification |
createGenericSpecification(java.lang.String name,
java.lang.String type,
java.lang.String matchingFilter,
boolean optional,
boolean multiple)
Creates a generic specification from the given parameters |
java.util.List<GenericSpecification> |
createGenericSpecifications(java.lang.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(java.lang.String hostSymbolicName,
VersionRange hostVersionRange)
Creates a host specification from the given parameters. |
java.util.List<HostSpecification> |
createHostSpecifications(java.lang.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(java.lang.String packageName,
VersionRange versionRange,
java.lang.String bundleSymbolicName,
VersionRange bundleVersionRange,
java.util.Map<java.lang.String,?> directives,
java.util.Map<java.lang.String,?> attributes,
BundleDescription importer)
Creates an import package specification from the given parameters. |
java.util.List<ImportPackageSpecification> |
createImportPackageSpecifications(java.lang.String declaration)
Creates an import package specifications from the given declaration. |
NativeCodeDescription |
createNativeCodeDescription(java.lang.String[] nativePaths,
java.lang.String[] processors,
java.lang.String[] osNames,
VersionRange[] osVersions,
java.lang.String[] languages,
java.lang.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. use createState(boolean) |
State |
createState(boolean resolver)
Creates an empty state with or without a resolver. |
State |
createState(State state)
Creates a new state that is a copy of the given state. |
State |
readState(java.io.DataInputStream stream)
Deprecated. use readState(File) instead |
State |
readState(java.io.File stateDirectory)
Reads a persisted state from the given directory. |
State |
readState(java.io.InputStream stream)
Deprecated. use readState(File) instead |
void |
writeState(State state,
java.io.DataOutputStream stream)
Deprecated. use writeState(State, File) instead |
void |
writeState(State state,
java.io.File stateDirectory)
Persists the given state in the given directory. |
void |
writeState(State state,
java.io.OutputStream stream)
Deprecated. use writeState(State, File) instead |
Field Detail |
---|
static final StateObjectFactory defaultFactory
Method Detail |
---|
State createState()
createState(boolean)
State createState(boolean resolver)
resolver
- true if the created state should be initialized with a resolver.
State createState(State state)
state
- a state to be copied
BundleDescription createBundleDescription(long id, java.lang.String symbolicName, org.osgi.framework.Version version, java.lang.String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, java.lang.String[] providedPackages, boolean singleton)
createBundleDescription(long, String, Version, String, BundleSpecification[], HostSpecification, ImportPackageSpecification[], ExportPackageDescription[], boolean, boolean, boolean, String, String[], GenericSpecification[], GenericDescription[])
id
- 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
BundleDescription createBundleDescription(long id, java.lang.String symbolicName, org.osgi.framework.Version version, java.lang.String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, java.lang.String[] providedPackages, boolean singleton, boolean attachFragments, boolean dynamicFragments, java.lang.String platformFilter, java.lang.String executionEnvironment, GenericSpecification[] genericRequires, GenericDescription[] genericCapabilities)
createBundleDescription(long, String, Version, String, BundleSpecification[], HostSpecification, ImportPackageSpecification[], ExportPackageDescription[], boolean, boolean, boolean, String, String[], GenericSpecification[], GenericDescription[])
id
- 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
)
BundleDescription createBundleDescription(long id, java.lang.String symbolicName, org.osgi.framework.Version version, java.lang.String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, boolean singleton, boolean attachFragments, boolean dynamicFragments, java.lang.String platformFilter, java.lang.String[] executionEnvironments, GenericSpecification[] genericRequires, GenericDescription[] genericCapabilities)
id
- 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
)
BundleDescription createBundleDescription(long id, java.lang.String symbolicName, org.osgi.framework.Version version, java.lang.String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, boolean singleton, boolean attachFragments, boolean dynamicFragments, java.lang.String platformFilter, java.lang.String[] executionEnvironments, GenericSpecification[] genericRequires, GenericDescription[] genericCapabilities, NativeCodeSpecification nativeCode)
id
- 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
)
BundleDescription createBundleDescription(long id, java.lang.String symbolicName, org.osgi.framework.Version version, java.lang.String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, java.lang.String platformFilter, java.lang.String[] executionEnvironments, GenericSpecification[] genericRequires, GenericDescription[] genericCapabilities, NativeCodeSpecification nativeCode)
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 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
)
BundleDescription createBundleDescription(State state, java.util.Dictionary<java.lang.String,java.lang.String> manifest, java.lang.String location, long id) throws org.osgi.framework.BundleException
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 be null
)id
- the id of the bundle
org.osgi.framework.BundleException
- if an error occurs while reading the manifestBundleDescription createBundleDescription(java.util.Dictionary<java.lang.String,java.lang.String> manifest, java.lang.String location, long id) throws org.osgi.framework.BundleException
createBundleDescription(State, Dictionary, String, long)
manifest
- a collection of OSGi manifest headers and valueslocation
- the URL location of the bundle (may be null
)id
- the id of the bundle
org.osgi.framework.BundleException
- if an error occurs while reading the manifestBundleDescription createBundleDescription(BundleDescription original)
original
- the bundle description to be copied
BundleSpecification createBundleSpecification(java.lang.String requiredSymbolicName, VersionRange requiredVersionRange, boolean export, boolean optional)
requiredSymbolicName
- 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 rules
BundleSpecification createBundleSpecification(BundleSpecification original)
original
- the constraint to be copied
java.util.List<BundleSpecification> createBundleSpecifications(java.lang.String declaration)
declaration
- a string declaring bundle specifications
HostSpecification createHostSpecification(java.lang.String hostSymbolicName, VersionRange hostVersionRange)
hostSymbolicName
- the symbolic name for the host bundlehostVersionRange
- the version range for the host bundle (may be null
)
for information on the available match rules
java.util.List<HostSpecification> createHostSpecifications(java.lang.String declaration)
declaration
- a string declaring host specifications
HostSpecification createHostSpecification(HostSpecification original)
original
- the constraint to be copied
ImportPackageSpecification createImportPackageSpecification(java.lang.String packageName, VersionRange versionRange, java.lang.String bundleSymbolicName, VersionRange bundleVersionRange, java.util.Map<java.lang.String,?> directives, java.util.Map<java.lang.String,?> attributes, BundleDescription importer)
packageName
- 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
)
ImportPackageSpecification createImportPackageSpecification(ImportPackageSpecification original)
original
- the import package to be copied
java.util.List<ImportPackageSpecification> createImportPackageSpecifications(java.lang.String declaration)
declaration
- a string declaring import package specifications
ExportPackageDescription createExportPackageDescription(java.lang.String packageName, org.osgi.framework.Version version, java.util.Map<java.lang.String,?> directives, java.util.Map<java.lang.String,?> attributes, boolean root, BundleDescription exporter)
packageName
- 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
)
GenericDescription createGenericDescription(java.lang.String name, java.lang.String type, org.osgi.framework.Version version, java.util.Map<java.lang.String,?> attributes)
createGenericDescription(String, String, Version, Map)
name
- 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
)
GenericDescription createGenericDescription(java.lang.String type, java.util.Map<java.lang.String,?> attributes, java.util.Map<java.lang.String,java.lang.String> directives, BundleDescription supplier)
type
- 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
)
java.util.List<GenericDescription> createGenericDescriptions(java.lang.String declaration)
declaration
- a string declaring generic descriptions
GenericSpecification createGenericSpecification(java.lang.String name, java.lang.String type, java.lang.String matchingFilter, boolean optional, boolean multiple) throws org.osgi.framework.InvalidSyntaxException
name
- 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
org.osgi.framework.InvalidSyntaxException
- if the matching filter is invalidjava.util.List<GenericSpecification> createGenericSpecifications(java.lang.String declaration)
declaration
- a string declaring generic specifications
NativeCodeSpecification createNativeCodeSpecification(NativeCodeDescription[] nativeCodeDescriptions, boolean optional)
nativeCodeDescriptions
- the native code descriptorsoptional
- whether the specification is optional
NativeCodeDescription createNativeCodeDescription(java.lang.String[] nativePaths, java.lang.String[] processors, java.lang.String[] osNames, VersionRange[] osVersions, java.lang.String[] languages, java.lang.String filter) throws org.osgi.framework.InvalidSyntaxException
nativePaths
- 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
)
org.osgi.framework.InvalidSyntaxException
- if the selection filter is invalidExportPackageDescription createExportPackageDescription(ExportPackageDescription original)
original
- the export package to be copied
java.util.List<ExportPackageDescription> createExportPackageDescriptions(java.lang.String declaration)
declaration
- a string declaring export package descriptions
void writeState(State state, java.io.OutputStream stream) throws java.io.IOException
writeState(State, File)
instead
state
- the state to be writtenstream
- the stream where to write the state to
java.io.IOException
- if an IOException happens while writing the state to
the stream
java.lang.IllegalArgumentException
- if the state provided was not created by
this factoryvoid writeState(State state, java.io.DataOutputStream stream) throws java.io.IOException
writeState(State, File)
instead
state
- the state to be writtenstream
- the stream where to write the state to
java.io.IOException
- if an IOException happens while writing the state to
the stream
java.lang.IllegalArgumentException
- if the state provided was not created by
this factorywriteState(State, OutputStream)
void writeState(State state, java.io.File stateDirectory) throws java.io.IOException
state
- the state to be writtenstateDirectory
- the directory where to write the state to
java.io.IOException
- if an IOException happens while writing the state to
the stream
java.lang.IllegalArgumentException
- if the state provided was not created by
this factoryState readState(java.io.InputStream stream) throws java.io.IOException
readState(File)
instead
stream
- the stream where to read the state from
java.io.IOException
- if an IOException happens while reading the state from
the streamState readState(java.io.DataInputStream stream) throws java.io.IOException
readState(File)
instead
stream
- the stream where to read the state from
java.io.IOException
- if an IOException happens while reading the state from
the streamreadState(InputStream)
State readState(java.io.File stateDirectory) throws java.io.IOException
stateDirectory
- the directory where to read the state from
java.io.IOException
- if an IOException happens while reading the state from
the stream
|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.