Class MappingSupport
- java.lang.Object
-
- org.sonatype.maven.polyglot.mapping.MappingSupport
-
- All Implemented Interfaces:
Mapping
- Direct Known Subclasses:
AtomMapping
,XmlMapping
,XMLMapping
public abstract class MappingSupport extends Object implements Mapping
Support forMapping
implementations.- Since:
- 0.7
- Author:
- Jason Dillon
-
-
Field Summary
-
Fields inherited from interface org.sonatype.maven.polyglot.mapping.Mapping
ARTIFACT_ID_PROPERTY, DESCRIPTION_PROPERTY, GROUP_ID_PROPERTY, NAME_PROPERTY, PACKAGING_PROPERTY, PROPERTY_PREFIX, URL_PROPERTY, VERSION_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MappingSupport(String roleHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(Map<String,?> options)
Tests weather this mapping accepts the given optionString[]
getAcceptLocationExtensions()
String[]
getAcceptOptionKeys()
String
getFlavour()
String
getLocation(Map<?,?> options)
String[]
getPomNames()
float
getPriority()
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
getReader()
org.apache.maven.model.io.ModelWriter
getWriter()
File
locatePom(File dir)
Locates the pom in the given directoryvoid
setAcceptLocationExtensions(String... accept)
void
setAcceptOptionKeys(String... accept)
void
setPomNames(String... names)
protected void
setPriority(float priority)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sonatype.maven.polyglot.mapping.Mapping
getEnhancementProperties
-
-
-
-
Constructor Detail
-
MappingSupport
protected MappingSupport(String roleHint)
-
-
Method Detail
-
getFlavour
public String getFlavour()
- Specified by:
getFlavour
in interfaceMapping
- Returns:
- the flavor used to identify this mapping (e.g. xml, json, yaml, ...)
-
getReader
public org.apache.maven.model.io.ModelReader getReader()
- Specified by:
getReader
in interfaceMapping
- Returns:
- the
ModelReader
responsible for reading poms returned by theMapping.locatePom(File)
method
-
getWriter
public org.apache.maven.model.io.ModelWriter getWriter()
- Specified by:
getWriter
in interfaceMapping
- Returns:
- the
ModelWriter
responsible for writing poms returned by theMapping.locatePom(File)
method
-
getAcceptLocationExtensions
public String[] getAcceptLocationExtensions()
-
setAcceptLocationExtensions
public void setAcceptLocationExtensions(String... accept)
-
getAcceptOptionKeys
public String[] getAcceptOptionKeys()
-
setAcceptOptionKeys
public void setAcceptOptionKeys(String... accept)
-
getPomNames
public String[] getPomNames()
-
setPomNames
public void setPomNames(String... names)
-
locatePom
public File locatePom(File dir)
Description copied from interface:Mapping
Locates the pom in the given directory
-
accept
public boolean accept(Map<String,?> options)
Description copied from interface:Mapping
Tests weather this mapping accepts the given option
-
getPriority
public float getPriority()
Description copied from interface:Mapping
get the priority of this mapping, higher priorities are given precedence over those with lower priority, the default priority is 0- Specified by:
getPriority
in interfaceMapping
- Returns:
- the priority
-
setPriority
protected void setPriority(float priority)
-
-