|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.equinox.p2.metadata.MetadataFactory
public final class MetadataFactory
A factory class for instantiating various p2 metadata objects.
Nested Class Summary | |
---|---|
static class |
MetadataFactory.InstallableUnitDescription
A description containing information about an installable unit. |
static class |
MetadataFactory.InstallableUnitFragmentDescription
A description containing information about an installable unit fragment. |
static class |
MetadataFactory.InstallableUnitPatchDescription
A description containing information about an installable unit patch. |
Constructor Summary | |
---|---|
MetadataFactory()
|
Method Summary | |
---|---|
static ICopyright |
createCopyright(URI location,
String body)
Returns a new ICopyright . |
static IInstallableUnit |
createInstallableUnit(MetadataFactory.InstallableUnitDescription description)
Returns an IInstallableUnit based on the given
description. |
static IInstallableUnitFragment |
createInstallableUnitFragment(MetadataFactory.InstallableUnitFragmentDescription description)
Returns an IInstallableUnitFragment based on the given
description. |
static IInstallableUnitPatch |
createInstallableUnitPatch(MetadataFactory.InstallableUnitPatchDescription description)
Returns an IInstallableUnitPatch based on the given
description. |
static ILicense |
createLicense(URI location,
String body)
Return a new ILicense
The body should contain either the full text of the license or an summary for a license
fully specified in the given location. |
static IProvidedCapability |
createProvidedCapability(String namespace,
String name,
Version version)
Returns a IProvidedCapability with the given values. |
static IRequirement |
createRequirement(IMatchExpression<IInstallableUnit> requirement,
IMatchExpression<IInstallableUnit> filter,
int minCard,
int maxCard,
boolean greedy)
Create and return a new requirement ( IRequirement ) with the specified values. |
static IRequirement |
createRequirement(IMatchExpression<IInstallableUnit> requirement,
IMatchExpression<IInstallableUnit> filter,
int minCard,
int maxCard,
boolean greedy,
String description)
Create and return a new requirement ( IRequirement ) with the specified values. |
static IRequirement |
createRequirement(String namespace,
String name,
VersionRange range,
IMatchExpression<IInstallableUnit> filter,
boolean optional,
boolean multiple)
Returns a IRequirement with the given values. |
static IRequirement |
createRequirement(String namespace,
String name,
VersionRange range,
IMatchExpression<IInstallableUnit> filter,
int minCard,
int maxCard,
boolean greedy)
Create and return a new requirement ( IRequirement ) with the specified values. |
static IRequirement |
createRequirement(String namespace,
String name,
VersionRange range,
IMatchExpression<IInstallableUnit> filter,
int minCard,
int maxCard,
boolean greedy,
String description)
Create and return a new requirement ( IRequirement ) with the specified values. |
static IRequirement |
createRequirement(String namespace,
String name,
VersionRange range,
String filter,
boolean optional,
boolean multiple,
boolean greedy)
Create and return a new requirement ( IRequirement ) with the specified values. |
static IRequirementChange |
createRequirementChange(IRequirement applyOn,
IRequirement newValue)
Returns a new requirement change. |
static IInstallableUnit |
createResolvedInstallableUnit(IInstallableUnit unit,
IInstallableUnitFragment[] fragments)
Returns an IInstallableUnit that represents the given
unit bound to the given fragments. |
static ITouchpointData |
createTouchpointData(Map<String,? extends Object> instructions)
Returns an instance of ITouchpointData with the given instructions. |
static ITouchpointInstruction |
createTouchpointInstruction(String body,
String importAttribute)
|
static ITouchpointType |
createTouchpointType(String id,
Version version)
Returns a TouchpointType with the given id and version. |
static IUpdateDescriptor |
createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors,
int severity,
String description,
URI location)
|
static IUpdateDescriptor |
createUpdateDescriptor(String id,
VersionRange range,
int severity,
String description)
|
static IUpdateDescriptor |
createUpdateDescriptor(String id,
VersionRange range,
int severity,
String description,
URI location)
Create and return a new update descriptor IUpdateDescriptor with the specified values. |
static ITouchpointData |
mergeTouchpointData(ITouchpointData initial,
Map<String,ITouchpointInstruction> incomingInstructions)
Merge the given touchpoint instructions with a pre-existing touchpoint data |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetadataFactory()
Method Detail |
---|
public static IInstallableUnit createInstallableUnit(MetadataFactory.InstallableUnitDescription description)
IInstallableUnit
based on the given
description. Once the installable unit has been created, the information is
discarded from the description object.
description
- The description of the unit to create
public static IInstallableUnitFragment createInstallableUnitFragment(MetadataFactory.InstallableUnitFragmentDescription description)
IInstallableUnitFragment
based on the given
description. Once the fragment has been created, the information is
discarded from the description object.
description
- The description of the unit to create
public static IInstallableUnitPatch createInstallableUnitPatch(MetadataFactory.InstallableUnitPatchDescription description)
IInstallableUnitPatch
based on the given
description. Once the patch installable unit has been created, the information is
discarded from the description object.
description
- The description of the unit to create
public static IProvidedCapability createProvidedCapability(String namespace, String name, Version version)
IProvidedCapability
with the given values.
namespace
- The capability namespacename
- The capability nameversion
- The capability versionpublic static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, boolean optional, boolean multiple)
IRequirement
with the given values.
namespace
- The capability namespacename
- The required capability namerange
- The range of versions that are required, or null
to indicate that any version will do.filter
- The filter used to evaluate whether this capability is applicable in the
current environment, or null
to indicate this capability is always applicableoptional
- true
if this required capability is optional,
and false
otherwise.multiple
- true
if this capability can be satisfied by multiple provided capabilities,
or false
if it requires exactly one match
public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy)
IRequirement
) with the specified values.
namespace
- the namespace for the requirement. Must not be null
.name
- the name for the requirement. Must not be null
.range
- the version range. A value of null
is equivalent to VersionRange.emptyRange
and matches all versions.filter
- The filter used to evaluate whether this capability is applicable in the
current environment, or null
to indicate this capability is always applicableminCard
- minimum cardinalitymaxCard
- maximum cardinalitygreedy
- true
if the requirement should be considered greedy and false
otherwise
public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy)
IRequirement
) with the specified values.
requirement
- the match expressionfilter
- The filter used to evaluate whether this capability is applicable in the
current environment, or null
to indicate this capability is always applicableminCard
- minimum cardinalitymaxCard
- maximum cardinalitygreedy
- true
if the requirement should be considered greedy and false
otherwise
public static IRequirement createRequirement(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy)
IRequirement
) with the specified values.
namespace
- the namespace for the requirement. Must not be null
.name
- the name for the requirement. Must not be null
.range
- the version range. A value of null
is equivalent to VersionRange.emptyRange
and matches all versions.filter
- The filter used to evaluate whether this capability is applicable in the
current environment, or null
to indicate this capability is always applicableoptional
- true
if this requirement is optional, and false
otherwise.multiple
- true
if this requirement can be satisfied by multiple provided capabilities, or false
if it requires exactly one matchgreedy
- true
if the requirement should be considered greedy and false
otherwise
public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description)
IRequirement
) with the specified values.
namespace
- the namespace for the requirement. Must not be null
.name
- the name for the requirement. Must not be null
.range
- the version range. A value of null
is equivalent to VersionRange.emptyRange
and matches all versions.filter
- The filter used to evaluate whether this capability is applicable in the
current environment, or null
to indicate this capability is always applicableminCard
- minimum cardinalitymaxCard
- maximum cardinalitygreedy
- true
if the requirement should be considered greedy and false
otherwisedescription
- a String
description of the requirement, or null
public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description)
IRequirement
) with the specified values.
requirement
- the match expressionfilter
- the filter, or null
minCard
- minimum cardinalitymaxCard
- maximum cardinalitygreedy
- true
if the requirement should be considered greedy and false
otherwisedescription
- a String
description of the requirement, or null
public static IRequirementChange createRequirementChange(IRequirement applyOn, IRequirement newValue)
applyOn
- The source of the requirement change - the kind of requirement to apply the change tonewValue
- The result of the requirement change - the requirement to replace the source requirement with
public static ICopyright createCopyright(URI location, String body)
ICopyright
.
location
- the location of a document containing the copyright notice, or null
body
- the copyright body, cannot be null
IllegalArgumentException
- when the body
is null
public static ILicense createLicense(URI location, String body)
ILicense
The body should contain either the full text of the license or an summary for a license
fully specified in the given location.
location
- the location of a document containing the full license, or null
body
- the license body, cannot be null
IllegalArgumentException
- when the body
is null
public static IInstallableUnit createResolvedInstallableUnit(IInstallableUnit unit, IInstallableUnitFragment[] fragments)
IInstallableUnit
that represents the given
unit bound to the given fragments.
unit
- The unit to be boundfragments
- The fragments to be bound
IInstallableUnit.isResolved()
public static ITouchpointData createTouchpointData(Map<String,? extends Object> instructions)
ITouchpointData
with the given instructions.
instructions
- The instructions for the touchpoint data.
public static ITouchpointData mergeTouchpointData(ITouchpointData initial, Map<String,ITouchpointInstruction> incomingInstructions)
initial
- - the initial ITouchpointDataincomingInstructions
- - Map of ITouchpointInstructions to merge into the initial touchpoint data
public static ITouchpointInstruction createTouchpointInstruction(String body, String importAttribute)
public static ITouchpointType createTouchpointType(String id, Version version)
TouchpointType
with the given id and version.
id
- The touchpoint idversion
- The touchpoint version
public static IUpdateDescriptor createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location)
public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description)
public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description, URI location)
IUpdateDescriptor
with the specified values.
id
- the identifiter for the update. Must not be null
.range
- the version range. A null
range is equivalent to VersionRange.emptyRange
and matches all versions.severity
- the severitydescription
- a String
description or null
location
- a URI
specifying the location or null
|
Eclipse Platform Release 3.6 |
|||||||||
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, 2010. All rights reserved.