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 forMappingimplementations.- 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 protectedMappingSupport(String roleHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(Map<String,?> options)Tests weather this mapping accepts the given optionString[]getAcceptLocationExtensions()String[]getAcceptOptionKeys()StringgetFlavour()StringgetLocation(Map<?,?> options)String[]getPomNames()floatgetPriority()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.ModelReadergetReader()org.apache.maven.model.io.ModelWritergetWriter()FilelocatePom(File dir)Locates 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, 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:
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
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:MappingLocates the pom in the given directory
-
accept
public boolean accept(Map<String,?> options)
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)
-
-