Package com.elo.gradle.osgi.constraints
Class ConstraintsFactory
java.lang.Object
com.elo.gradle.osgi.constraints.ConstraintsFactory
Factory class for creating constraints definitions
-
Method Summary
Modifier and TypeMethodDescriptioncreateAssemblableConstraints(MetaData metaData, Object config, Map<String, ?> properties) Creates a constraints definition using the metadata and a json configuration.createAssembleStrategy(String type) Creates a strategy for merging constraints definitions.createMetadata(Object config) Creates the metadata for a json configurationstatic ConstraintsFactory
-
Method Details
-
createMetadata
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 metadataconfig- the configurationproperties- possible properties- Returns:
- the created constraints definition
- Throws:
IllegalArgumentException- if no constraints definition could be created for the metadata
-
createAssembleStrategy
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
-