Interface Mapping
- All Known Implementing Classes:
MappingSupport
,XmlMapping
public interface Mapping
Provides a mapping to polyglot specific models.
- Since:
- 0.7
- Author:
- Jason Dillon
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests weather this mapping accepts the given optiondefault Properties
getEnhancementProperties
(Map<String, ?> options) A properties object can enhance the returned polyglot model by e.g.float
get the priority of this mapping, higher priorities are given precedence over those with lower priority, the default priority is 0org.apache.maven.model.io.ModelReader
org.apache.maven.model.io.ModelWriter
Locates the pom in the given directory
-
Field Details
-
NAME_PROPERTY
- See Also:
-
DESCRIPTION_PROPERTY
- See Also:
-
URL_PROPERTY
- See Also:
-
PACKAGING_PROPERTY
- See Also:
-
VERSION_PROPERTY
- See Also:
-
GROUP_ID_PROPERTY
- See Also:
-
ARTIFACT_ID_PROPERTY
- See Also:
-
PROPERTY_PREFIX
- See Also:
-
-
Method Details
-
locatePom
Locates the pom in the given directory- Parameters:
dir
- the directory to locate the pom for- Returns:
- the located pom or
null
if none was found by this mapping
-
accept
Tests weather this mapping accepts the given option- Parameters:
options
- the options to use- Returns:
true
if options are accepted,false
otherwise
-
getReader
org.apache.maven.model.io.ModelReader getReader()- Returns:
- the
ModelReader
responsible for reading poms returned by thelocatePom(File)
method
-
getWriter
org.apache.maven.model.io.ModelWriter getWriter()- Returns:
- the
ModelWriter
responsible for writing poms returned by thelocatePom(File)
method
-
getPriority
float getPriority()get the priority of this mapping, higher priorities are given precedence over those with lower priority, the default priority is 0- Returns:
- the priority
-
getFlavour
String getFlavour()- Returns:
- the flavor used to identify this mapping (e.g. xml, json, yaml, ...)
-
getEnhancementProperties
A properties object can enhance the returned polyglot model by e.g. a user defined file read by the mapping, supported keys areARTIFACT_ID_PROPERTY
, empty property will be interpreted as not givenGROUP_ID_PROPERTY
, empty property will be interpreted as not givenVERSION_PROPERTY
, empty property will be interpreted as not givenPACKAGING_PROPERTY
, empty property will be interpreted as not givenNAME_PROPERTY
, empty property will be interpreted as not givenDESCRIPTION_PROPERTY
, empty property will be interpreted as not givenURL_PROPERTY
, empty property will be interpreted as not given
PROPERTY_PREFIX
it will be interpreted as an enhancement to the properties of the model by removing the prefix and using its value as-is.- Returns:
- a properties object that enhances the the generated model (e.g. by a user provided file) or
null
if no properties exits
-