Interface FeatureService


@ProviderType public interface FeatureService
The Feature service is the primary entry point for interacting with the feature model.
"ThreadSafe"
  • Method Details

    • getBuilderFactory

      BuilderFactory getBuilderFactory()
      Get a factory which can be used to build feature model entities.
      Returns:
      A builder factory.
    • getIDfromMavenCoordinates

      ID getIDfromMavenCoordinates(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(String groupId, String artifactId, String version)
      Obtain an ID.
      Parameters:
      groupId - The group ID (not null, not empty).
      artifactId - The artifact ID (not null, not empty).
      version - The version (not null, not empty).
      Returns:
      The ID.
    • getID

      ID getID(String groupId, String artifactId, String version, String type)
      Obtain an ID.
      Parameters:
      groupId - The group ID (not null, not empty).
      artifactId - The artifact ID (not null, not empty).
      version - The version (not null, not empty).
      type - The type (not null, not empty).
      Returns:
      The ID.
    • getID

      ID getID(String groupId, String artifactId, String version, String type, String classifier)
      Obtain an ID.
      Parameters:
      groupId - The group ID (not null, not empty).
      artifactId - The artifact ID (not null, not empty).
      version - The version (not null, not empty).
      type - The type (not null, not empty).
      classifier - The classifier (not null, not empty).
      Returns:
      The ID.
    • readFeature

      Feature readFeature(Reader jsonReader) throws IOException
      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

      void writeFeature(Feature feature, Writer jsonWriter) throws IOException
      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.