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

java.lang.Object
  extended by org.apache.archiva.repository.content.maven2.AbstractDefaultRepositoryContent
      extended by org.apache.archiva.repository.content.maven2.RemoteDefaultRepositoryContent
All Implemented Interfaces:
RemoteRepositoryContent

@Service(value="remoteRepositoryContent#default")
@Scope(value="prototype")
public class RemoteDefaultRepositoryContent
extends AbstractDefaultRepositoryContent
implements RemoteRepositoryContent

RemoteDefaultRepositoryContent


Field Summary
private  RemoteRepository repository
           
 
Fields inherited from class org.apache.archiva.repository.content.maven2.AbstractDefaultRepositoryContent
ARTIFACT_SEPARATOR, artifactMappingProviders, GROUP_SEPARATOR, log, MAVEN_METADATA, PATH_SEPARATOR
 
Constructor Summary
RemoteDefaultRepositoryContent()
           
 
Method Summary
 String getId()
           Convenience method to get the repository id.
 RemoteRepository getRepository()
          Get the repository configuration associated with this repository content.
 RepositoryURL getURL()
           Convenience method to get the repository url.
 void setRepository(RemoteRepository repository)
          Set the repository configuration to associate with this repository content.
 ArtifactReference toArtifactReference(String path)
          Convert a path to an artifact reference.
 RepositoryURL toURL(ArtifactReference reference)
          Given an ArtifactReference, return the url to the artifact.
 
Methods inherited from class org.apache.archiva.repository.content.maven2.AbstractDefaultRepositoryContent
initialize, toMetadataPath, toMetadataPath, toPath, toPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.archiva.repository.RemoteRepositoryContent
toPath
 

Field Detail

repository

private RemoteRepository repository
Constructor Detail

RemoteDefaultRepositoryContent

public RemoteDefaultRepositoryContent()
Method Detail

getId

public String getId()
Description copied from interface: RemoteRepositoryContent

Convenience method to get the repository id.

Equivalent to calling .getRepository().getId()

Specified by:
getId in interface RemoteRepositoryContent
Returns:
the repository id.

getRepository

public RemoteRepository getRepository()
Description copied from interface: RemoteRepositoryContent
Get the repository configuration associated with this repository content.

Specified by:
getRepository in interface RemoteRepositoryContent
Returns:
the repository that is associated with this repository content.

getURL

public RepositoryURL getURL()
Description copied from interface: RemoteRepositoryContent

Convenience method to get the repository url.

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

Specified by:
getURL in interface RemoteRepositoryContent
Returns:
the repository url.

setRepository

public void setRepository(RemoteRepository repository)
Description copied from interface: RemoteRepositoryContent
Set the repository configuration to associate with this repository content.

Specified by:
setRepository in interface RemoteRepositoryContent
Parameters:
repository - the repository to associate with this repository content.

toArtifactReference

public ArtifactReference toArtifactReference(String path)
                                      throws LayoutException
Convert a path to an artifact reference.

Specified by:
toArtifactReference in interface RemoteRepositoryContent
Overrides:
toArtifactReference in class AbstractDefaultRepositoryContent
Parameters:
path - the path to convert. (relative or full url path)
Returns:
the ArtifactReference representing the path. (or null if path cannot be converted to a ArtifactReference)
Throws:
LayoutException - if the path cannot be converted to an artifact reference.

toURL

public RepositoryURL toURL(ArtifactReference reference)
Description copied from interface: RemoteRepositoryContent
Given an ArtifactReference, return the url to the artifact.

Specified by:
toURL in interface RemoteRepositoryContent
Parameters:
reference - the artifact reference to use.
Returns:
the relative path to the artifact.


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