|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.archiva.repository.content.RepositoryRequest
public class RepositoryRequest
RepositoryRequest is used to determine the type of request that is incoming, and convert it to an appropriate ArtifactReference.
Constructor Summary | |
---|---|
RepositoryRequest()
|
Method Summary | |
---|---|
boolean |
isDefault(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a default layout request. |
boolean |
isLegacy(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a legacy layout request. |
boolean |
isMetadata(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a metadata request. |
boolean |
isMetadataSupportFile(java.lang.String requestedPath)
|
boolean |
isSupportFile(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a support file request. |
org.apache.maven.archiva.model.ArtifactReference |
toArtifactReference(java.lang.String requestedPath)
Takes an incoming requested path (in "/" format) and gleans the layout and ArtifactReference appropriate for that content. |
java.lang.String |
toNativePath(java.lang.String requestedPath,
ManagedRepositoryContent repository)
Adjust the requestedPath to conform to the native layout of the provided ManagedRepositoryContent . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryRequest()
Method Detail |
---|
public org.apache.maven.archiva.model.ArtifactReference toArtifactReference(java.lang.String requestedPath) throws LayoutException
requestedPath
- the relative path to the content.
LayoutException
- if the request path is not layout valid.public boolean isMetadata(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a metadata request.
NOTE: This does a cursory check on the path's last element. A result of true from this method is not a guarantee that the metadata is in a valid format, or that it even contains data.
requestedPath
- the path to test.
public boolean isSupportFile(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a support file request.
Tests for .sha1
, .md5
, .asc
, and .php
.
NOTE: This does a cursory check on the path's extension only. A result of true from this method is not a guarantee that the support resource is in a valid format, or that it even contains data.
requestedPath
- the path to test.
public boolean isMetadataSupportFile(java.lang.String requestedPath)
public boolean isDefault(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a default layout request.
NOTE: This does a cursory check on the count of path elements only. A result of
true from this method is not a guarantee that the path sections are valid and
can be resolved to an artifact reference. use toArtifactReference(String)
if you want a more complete analysis of the validity of the path.
requestedPath
- the path to test.
public boolean isLegacy(java.lang.String requestedPath)
Tests the path to see if it conforms to the expectations of a legacy layout request.
NOTE: This does a cursory check on the count of path elements only. A result of
true from this method is not a guarantee that the path sections are valid and
can be resolved to an artifact reference. use toArtifactReference(String)
if you want a more complete analysis of the validity of the path.
requestedPath
- the path to test.
public java.lang.String toNativePath(java.lang.String requestedPath, ManagedRepositoryContent repository) throws LayoutException
ManagedRepositoryContent
.
requestedPath
- the incoming requested path.repository
- the repository to adjust to.
LayoutException
- if the path cannot be parsed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |