Package org.osgi.service.feature
Interface FeatureService
-
@ProviderType public interface FeatureService
The Feature service is the primary entry point for interacting with the feature model.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BuilderFactory
getBuilderFactory()
Get a factory which can be used to build feature model entities.ID
getID(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
Obtain an ID.ID
getID(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type)
Obtain an ID.ID
getID(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.lang.String classifier)
Obtain an ID.ID
getIDfromMavenCoordinates(java.lang.String coordinates)
Obtain an ID from a Maven Coordinates formatted string.Feature
readFeature(java.io.Reader jsonReader)
Read a Feature from JSONvoid
writeFeature(Feature feature, java.io.Writer jsonWriter)
Write a Feature Model to JSON
-
-
-
Method Detail
-
getBuilderFactory
BuilderFactory getBuilderFactory()
Get a factory which can be used to build feature model entities.- Returns:
- A builder factory.
-
getIDfromMavenCoordinates
ID getIDfromMavenCoordinates(java.lang.String coordinates)
Obtain an ID from a Maven Coordinates formatted string. The supported syntax is as follows:groupId ':' artifactId ( ':' type ( ':' classifier )? )? ':' version
- Parameters:
coordinates
- The Maven Coordinates.- Returns:
- the ID.
-
getID
ID getID(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
Obtain an ID.- Parameters:
groupId
- The group ID (notnull
, not empty).artifactId
- The artifact ID (notnull
, not empty).version
- The version (notnull
, not empty).- Returns:
- The ID.
-
getID
ID getID(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type)
Obtain an ID.- Parameters:
groupId
- The group ID (notnull
, not empty).artifactId
- The artifact ID (notnull
, not empty).version
- The version (notnull
, not empty).type
- The type (notnull
, not empty).- Returns:
- The ID.
-
getID
ID getID(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String type, java.lang.String classifier)
Obtain an ID.- Parameters:
groupId
- The group ID (notnull
, not empty).artifactId
- The artifact ID (notnull
, not empty).version
- The version (notnull
, not empty).type
- The type (notnull
, not empty).classifier
- The classifier (notnull
, not empty).- Returns:
- The ID.
-
readFeature
Feature readFeature(java.io.Reader jsonReader) throws java.io.IOException
Read a Feature from JSON- Parameters:
jsonReader
- A Reader to the JSON input- Returns:
- The Feature represented by the JSON
- Throws:
java.io.IOException
- When reading fails
-
writeFeature
void writeFeature(Feature feature, java.io.Writer jsonWriter) throws java.io.IOException
Write a Feature Model to JSON- Parameters:
feature
- the Feature to write.jsonWriter
- A Writer to which the Feature should be written.- Throws:
java.io.IOException
- When writing fails.
-
-