public class Parser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_SEPARATOR
Final artifact path separator.
|
Constructor and Description |
---|
Parser(java.lang.String path)
Creates a new protocol parser.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getArtifact()
Returns the artifact id.
|
java.lang.String |
getArtifactLocalMetdataPath()
Returns the complete path to artifact local metadata file.
|
java.lang.String |
getArtifactMetdataPath()
Returns the complete path to artifact metadata file.
|
java.lang.String |
getArtifactPath()
Returns the complete path to artifact as stated by Maven 2 repository layout.
|
java.lang.String |
getArtifactPath(java.lang.String version)
Returns the complete path to artifact as stated by Maven 2 repository layout.
|
java.lang.String |
getClassifier()
Returns the artifact classifier.
|
java.lang.String |
getGroup()
Returns the group id of the artifact.
|
MavenRepositoryURL |
getRepositoryURL()
Returns the repository URL if present, null otherwise
|
java.lang.String |
getSnapshotPath(java.lang.String version,
java.lang.String timestamp,
java.lang.String buildnumber)
Returns the complete path to artifact for a snapshot file.
|
java.lang.String |
getSnapshotVersion(java.lang.String version,
java.lang.String timestamp,
java.lang.String buildnumber)
Returns the version for an artifact for a snapshot version.
|
java.lang.String |
getType()
Returns the artifact type.
|
java.lang.String |
getVersion()
Returns the artifact version.
|
java.lang.String |
getVersionLocalMetadataPath(java.lang.String version)
Returns the path to local metdata file corresponding to this artifact version.
|
java.lang.String |
getVersionMetadataPath(java.lang.String version)
Returns the path to metdata file corresponding to this artifact version.
|
static Parser |
parsePathWithSchemePrefix(java.lang.String location)
Lets trim any kind of "mvn:" prefix before parsing
|
public static final java.lang.String FILE_SEPARATOR
public Parser(java.lang.String path) throws java.net.MalformedURLException
path
- the path part of the url (without starting mvn:)java.net.MalformedURLException
- if provided path does not comply to expected syntax or an malformed repository URLpublic static Parser parsePathWithSchemePrefix(java.lang.String location) throws java.net.MalformedURLException
java.net.MalformedURLException
public MavenRepositoryURL getRepositoryURL()
public java.lang.String getGroup()
public java.lang.String getArtifact()
public java.lang.String getVersion()
public java.lang.String getType()
public java.lang.String getClassifier()
public java.lang.String getArtifactPath()
public java.lang.String getArtifactPath(java.lang.String version)
version
- The version of the artifact.public java.lang.String getSnapshotVersion(java.lang.String version, java.lang.String timestamp, java.lang.String buildnumber)
version
- The version of the snapshot.timestamp
- The timestamp of the snapshot.buildnumber
- The buildnumber of the snapshot.public java.lang.String getSnapshotPath(java.lang.String version, java.lang.String timestamp, java.lang.String buildnumber)
version
- The version of the snapshot.timestamp
- The timestamp of the snapshot.buildnumber
- The buildnumber of the snapshot.public java.lang.String getVersionMetadataPath(java.lang.String version)
version
- The version of the the metadata.public java.lang.String getVersionLocalMetadataPath(java.lang.String version)
version
- The version of the the metadata.public java.lang.String getArtifactLocalMetdataPath()
public java.lang.String getArtifactMetdataPath()
Copyright © 2011-2014 Red Hat. All Rights Reserved.