Package org.apache.maven.plugin.ear.util
Class ArtifactTypeMappingService
- java.lang.Object
-
- org.apache.maven.plugin.ear.util.ArtifactTypeMappingService
-
public class ArtifactTypeMappingService extends java.lang.ObjectAllows to map custom artifact type to standard type.- Version:
- $Id: ArtifactTypeMappingService.java 1645331 2014-12-13 17:31:09Z khmarbaise $
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.StringARTIFACT_TYPE_MAPPING_ELEMENTprivate java.util.Map<java.lang.String,java.lang.String>customMappings(package private) static java.lang.StringMAPPING_ATTRIBUTE(package private) static java.lang.StringTYPE_ATTRIBUTEprivate java.util.Map<java.lang.String,java.util.List<java.lang.String>>typeMappings
-
Constructor Summary
Constructors Constructor Description ArtifactTypeMappingService()Create an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(org.codehaus.plexus.configuration.PlexusConfiguration plexusConfiguration)java.lang.StringgetStandardType(java.lang.String type)Returns the standard type for the specified type.private voidinit()booleanisMappedToType(java.lang.String standardType, java.lang.String customType)Specify whether the customType could be mapped to the standardType.
-
-
-
Field Detail
-
ARTIFACT_TYPE_MAPPING_ELEMENT
static final java.lang.String ARTIFACT_TYPE_MAPPING_ELEMENT
- See Also:
- Constant Field Values
-
TYPE_ATTRIBUTE
static final java.lang.String TYPE_ATTRIBUTE
- See Also:
- Constant Field Values
-
MAPPING_ATTRIBUTE
static final java.lang.String MAPPING_ATTRIBUTE
- See Also:
- Constant Field Values
-
typeMappings
private final java.util.Map<java.lang.String,java.util.List<java.lang.String>> typeMappings
-
customMappings
private final java.util.Map<java.lang.String,java.lang.String> customMappings
-
-
Method Detail
-
configure
public void configure(org.codehaus.plexus.configuration.PlexusConfiguration plexusConfiguration) throws EarPluginException, org.codehaus.plexus.configuration.PlexusConfigurationException- Parameters:
plexusConfiguration-PlexusConfiguration- Throws:
EarPluginException-EarPluginExceptionorg.codehaus.plexus.configuration.PlexusConfigurationException-PlexusConfigurationException
-
isMappedToType
public boolean isMappedToType(java.lang.String standardType, java.lang.String customType)Specify whether the customType could be mapped to the standardType.- Parameters:
standardType- the standard type (ejb, jar, war, ...)customType- a user-defined type- Returns:
- true if the customType could be mapped to the standard type
-
getStandardType
public java.lang.String getStandardType(java.lang.String type) throws UnknownArtifactTypeExceptionReturns the standard type for the specified type. If the specified type is already a standard type, the orignal type is returned.- Parameters:
type- a type- Returns:
- the standard type (ejb, jar, war, ...) for this type
- Throws:
UnknownArtifactTypeException- In case of missing mappings types.
-
init
private void init()
-
-