1 package org.apache.maven.artifact.handler.manager; 2 3 18 19 import org.apache.maven.artifact.handler.ArtifactHandler; 20 import org.apache.maven.artifact.handler.DefaultArtifactHandler; 21 22 import java.util.Map ; 23 import java.util.Set ; 24 25 30 public class DefaultArtifactHandlerManager 31 implements ArtifactHandlerManager 32 { 33 private Map artifactHandlers; 34 35 public ArtifactHandler getArtifactHandler( String type ) 36 { 37 ArtifactHandler handler = (ArtifactHandler) artifactHandlers.get( type ); 38 39 if ( handler == null ) 40 { 41 handler = new DefaultArtifactHandler( type ); 42 } 43 44 return handler; 45 } 46 47 public void addHandlers( Map handlers ) 48 { 49 artifactHandlers.putAll( handlers ); 50 } 51 52 public Set getHandlerTypes() 53 { 54 return artifactHandlers.keySet(); 55 } 56 } 57 | Popular Tags |