Class 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 $
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ARTIFACT_TYPE_MAPPING_ELEMENT

        static final java.lang.String ARTIFACT_TYPE_MAPPING_ELEMENT
        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
    • Constructor Detail

      • ArtifactTypeMappingService

        public ArtifactTypeMappingService()
        Create an instance.
    • 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()