Class MappingSupport
java.lang.Object
org.sonatype.maven.polyglot.mapping.MappingSupport
- All Implemented Interfaces:
Mapping
- Direct Known Subclasses:
XmlMapping
Support for
Mapping
implementations.- Since:
- 0.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
private String[]
private org.codehaus.plexus.PlexusContainer
private static final String[]
private String[]
private float
private org.apache.maven.model.io.ModelReader
private String
private org.apache.maven.model.io.ModelWriter
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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests weather this mapping accepts the given optionString[]
String[]
getLocation
(Map<?, ?> options) String[]
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 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
-
Field Details
-
EMPTY
-
roleHint
-
pomNames
-
acceptOptionKeys
-
acceptLocationExtensions
-
priority
private float priority -
container
@Requirement private org.codehaus.plexus.PlexusContainer container -
reader
private org.apache.maven.model.io.ModelReader reader -
writer
private org.apache.maven.model.io.ModelWriter writer
-
-
Constructor Details
-
MappingSupport
-
-
Method Details
-
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
-
setAcceptLocationExtensions
-
getAcceptOptionKeys
-
setAcceptOptionKeys
-
getPomNames
-
setPomNames
-
locatePom
Description copied from interface:Mapping
Locates the pom in the given directory -
accept
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) -
getLocation
-