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.Object
Allows 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.String
ARTIFACT_TYPE_MAPPING_ELEMENT
private java.util.Map<java.lang.String,java.lang.String>
customMappings
(package private) static java.lang.String
MAPPING_ATTRIBUTE
(package private) static java.lang.String
TYPE_ATTRIBUTE
private 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 void
configure(org.codehaus.plexus.configuration.PlexusConfiguration plexusConfiguration)
java.lang.String
getStandardType(java.lang.String type)
Returns the standard type for the specified type.private void
init()
boolean
isMappedToType(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
-EarPluginException
org.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 UnknownArtifactTypeException
Returns 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()
-
-