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.PlexusContainerprivate static final String[]private String[]private floatprivate org.apache.maven.model.io.ModelReaderprivate Stringprivate org.apache.maven.model.io.ModelWriterFields 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 TypeMethodDescriptionbooleanTests weather this mapping accepts the given optionString[]String[]getLocation(Map<?, ?> options) String[]floatget the priority of this mapping, higher priorities are given precedence over those with lower priority, the default priority is 0org.apache.maven.model.io.ModelReaderorg.apache.maven.model.io.ModelWriterLocates the pom in the given directoryvoidsetAcceptLocationExtensions(String... accept) voidsetAcceptOptionKeys(String... accept) voidsetPomNames(String... names) protected voidsetPriority(float priority) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getFlavourin 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:
getReaderin interfaceMapping- Returns:
- the
ModelReaderresponsible for reading poms returned by theMapping.locatePom(File)method
-
getWriter
public org.apache.maven.model.io.ModelWriter getWriter()- Specified by:
getWriterin interfaceMapping- Returns:
- the
ModelWriterresponsible for writing poms returned by theMapping.locatePom(File)method
-
getAcceptLocationExtensions
-
setAcceptLocationExtensions
-
getAcceptOptionKeys
-
setAcceptOptionKeys
-
getPomNames
-
setPomNames
-
locatePom
Description copied from interface:MappingLocates the pom in the given directory -
accept
Description copied from interface:MappingTests weather this mapping accepts the given option -
getPriority
public float getPriority()Description copied from interface:Mappingget the priority of this mapping, higher priorities are given precedence over those with lower priority, the default priority is 0- Specified by:
getPriorityin interfaceMapping- Returns:
- the priority
-
setPriority
protected void setPriority(float priority) -
getLocation
-