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.
- "ThreadSafe"
-
Method Summary
Modifier and TypeMethodDescriptionGet a factory which can be used to build feature model entities.Obtain an ID.Obtain an ID.Obtain an ID.getIDfromMavenCoordinates(String coordinates) Obtain an ID from a Maven Coordinates formatted string.readFeature(Reader jsonReader) Read a Feature from JSONvoidwriteFeature(Feature feature, Writer jsonWriter) Write a Feature Model to JSON
-
Method Details
-
getBuilderFactory
BuilderFactory getBuilderFactory()Get a factory which can be used to build feature model entities.- Returns:
- A builder factory.
-
getIDfromMavenCoordinates
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
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
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
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
Read a Feature from JSON- Parameters:
jsonReader- A Reader to the JSON input- Returns:
- The Feature represented by the JSON
- Throws:
IOException- When reading fails
-
writeFeature
Write a Feature Model to JSON- Parameters:
feature- the Feature to write.jsonWriter- A Writer to which the Feature should be written.- Throws:
IOException- When writing fails.
-