org.apache.archiva.repository.content.maven2
Class DefaultPathParser

java.lang.Object
  extended by org.apache.archiva.repository.content.maven2.DefaultPathParser
All Implemented Interfaces:
PathParser

@Service(value="pathParser#default")
public class DefaultPathParser
extends Object
implements PathParser

DefaultPathParser is a parser for maven 2 (default layout) paths to ArtifactReference. TODO: remove in favour of path translator, this is just delegating for the most part, but won't accommodate other extensions like NPanday


Field Summary
private static String INVALID_ARTIFACT_PATH
           
private  RepositoryPathTranslator pathTranslator
           
 
Constructor Summary
DefaultPathParser()
           
 
Method Summary
 ArtifactReference toArtifactReference(String path)
          Take a path and get the ArtifactReference associated with it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_ARTIFACT_PATH

private static final String INVALID_ARTIFACT_PATH
See Also:
Constant Field Values

pathTranslator

private RepositoryPathTranslator pathTranslator
Constructor Detail

DefaultPathParser

public DefaultPathParser()
Method Detail

toArtifactReference

public ArtifactReference toArtifactReference(String path)
                                      throws LayoutException
Take a path and get the ArtifactReference associated with it.

Specified by:
toArtifactReference in interface PathParser
Parameters:
path - the relative path to parse.
Returns:
the ArtifactReference for the provided path. (never null)
Throws:
LayoutException - if there was a problem parsing the path.
See Also:
PathParser.toArtifactReference(String)


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.