org.apache.maven.archiva.repository
Interface RemoteRepositoryContent

Package class diagram package RemoteRepositoryContent
All Known Implementing Classes:
RemoteDefaultRepositoryContent, RemoteLegacyRepositoryContent

public interface RemoteRepositoryContent

RemoteRepositoryContent interface for interacting with a remote repository in an abstract way, without the need for processing based on URLs, or working with the database.


Method Summary
 java.lang.String getId()
           Convenience method to get the repository id.
 org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration getRepository()
          Get the repository configuration associated with this repository content.
 RepositoryURL getURL()
           Convenience method to get the repository url.
 void setRepository(org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration repo)
          Set the repository configuration to associate with this repository content.
 org.apache.maven.archiva.model.ArtifactReference toArtifactReference(java.lang.String path)
          Given a repository relative path to a filename, return the VersionedReference object suitable for the path.
 java.lang.String toPath(org.apache.maven.archiva.model.ArtifactReference reference)
          Given an ArtifactReference, return the relative path to the artifact.
 RepositoryURL toURL(org.apache.maven.archiva.model.ArtifactReference reference)
          Given an ArtifactReference, return the url to the artifact.
 

Method Detail

getId

java.lang.String getId()

Convenience method to get the repository id.

Equivalent to calling .getRepository().getId()

Returns:
the repository id.

getRepository

org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration getRepository()
Get the repository configuration associated with this repository content.

Returns:
the repository that is associated with this repository content.

getURL

RepositoryURL getURL()

Convenience method to get the repository url.

Equivalent to calling new RepositoryURL( this.getRepository().getUrl() )

Returns:
the repository url.

setRepository

void setRepository(org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration repo)
Set the repository configuration to associate with this repository content.

Parameters:
repo - the repository to associate with this repository content.

toArtifactReference

org.apache.maven.archiva.model.ArtifactReference toArtifactReference(java.lang.String path)
                                                                     throws LayoutException
Given a repository relative path to a filename, return the VersionedReference object suitable for the path.

Parameters:
path - the path relative to the repository base dir for the artifact.
Returns:
the ArtifactReference representing the path. (or null if path cannot be converted to a ArtifactReference)
Throws:
LayoutException - if there was a problem converting the path to an artifact.

toPath

java.lang.String toPath(org.apache.maven.archiva.model.ArtifactReference reference)
Given an ArtifactReference, return the relative path to the artifact.

Parameters:
reference - the artifact reference to use.
Returns:
the relative path to the artifact.

toURL

RepositoryURL toURL(org.apache.maven.archiva.model.ArtifactReference reference)
Given an ArtifactReference, return the url to the artifact.

Parameters:
reference - the artifact reference to use.
Returns:
the relative path to the artifact.