mirror of https://github.com/apache/archiva.git
use a static final String
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1367108 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3c805f8f2d
commit
67adb61834
|
@ -19,17 +19,17 @@ package org.apache.archiva.repository.content;
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.archiva.model.ArtifactReference;
|
||||
import org.apache.archiva.repository.ManagedRepositoryContent;
|
||||
import org.apache.archiva.repository.layout.LayoutException;
|
||||
import org.apache.archiva.repository.metadata.MetadataTools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* RepositoryRequest is used to determine the type of request that is incoming, and convert it to an appropriate
|
||||
* ArtifactReference.
|
||||
*
|
||||
*
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p/>
|
||||
*/
|
||||
public class RepositoryRequest
|
||||
|
@ -38,7 +38,7 @@ public class RepositoryRequest
|
|||
|
||||
private PathParser legacyPathParser;
|
||||
|
||||
public RepositoryRequest (LegacyPathParser legacyPathParser)
|
||||
public RepositoryRequest( LegacyPathParser legacyPathParser )
|
||||
{
|
||||
this.legacyPathParser = legacyPathParser;
|
||||
}
|
||||
|
@ -104,16 +104,14 @@ public class RepositoryRequest
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param requestedPath
|
||||
* @return true if the requestedPath is likely an archetype catalog request.
|
||||
*/
|
||||
public boolean isArchetypeCatalog( String requestedPath )
|
||||
{
|
||||
//TODO: Make it static final String
|
||||
return requestedPath.endsWith( "/archetype-catalog.xml");
|
||||
return requestedPath.endsWith( "/" + MetadataTools.MAVEN_ARCHETYPE_CATALOG );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Tests the path to see if it conforms to the expectations of a support file request.
|
||||
|
|
|
@ -85,6 +85,8 @@ public class MetadataTools
|
|||
|
||||
public static final String MAVEN_METADATA = "maven-metadata.xml";
|
||||
|
||||
public static final String MAVEN_ARCHETYPE_CATALOG ="archetype-catalog.xml";
|
||||
|
||||
private static final char PATH_SEPARATOR = '/';
|
||||
|
||||
private static final char GROUP_SEPARATOR = '.';
|
||||
|
|
Loading…
Reference in New Issue