Class ConstraintsFactory

java.lang.Object
com.elo.gradle.osgi.constraints.ConstraintsFactory

public class ConstraintsFactory extends Object
Factory class for creating constraints definitions
  • Method Details

    • createMetadata

      public MetaData createMetadata(Object config)
      Creates the metadata for a json configuration
      Parameters:
      config - the Json configuration
      Returns:
      the created metadata
    • createAssemblableConstraints

      public AssemblableConstraints createAssemblableConstraints(MetaData metaData, Object config, Map<String,?> properties)
      Creates a constraints definition using the metadata and a json configuration.
      Parameters:
      metaData - the metadata
      config - the configuration
      properties - possible properties
      Returns:
      the created constraints definition
      Throws:
      IllegalArgumentException - if no constraints definition could be created for the metadata
    • createAssembleStrategy

      public AssembleStrategy createAssembleStrategy(String type)
      Creates a strategy for merging constraints definitions.
      Parameters:
      type - the type of the strategy
      Returns:
      the strategy created
      Throws:
      IllegalArgumentException - if the strategy does not exist for the given type
    • newInstance

      public static ConstraintsFactory newInstance()