|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ManagedRepositoryContent
ManagedRepositoryContent interface for interacting with a managed repository in an abstract way, without the need for processing based on filesystem paths, or working with the database.
Method Summary | |
---|---|
void |
deleteVersion(org.apache.maven.archiva.model.VersionedReference reference)
Delete from the managed repository all files / directories associated with the provided version reference. |
java.lang.String |
getId()
Convenience method to get the repository id. |
java.util.Set<org.apache.maven.archiva.model.ArtifactReference> |
getRelatedArtifacts(org.apache.maven.archiva.model.ArtifactReference reference)
Gather up the list of related artifacts to the ArtifactReference provided. |
java.lang.String |
getRepoRoot()
Convenience method to get the repository (on disk) root directory. |
org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration |
getRepository()
Get the repository configuration associated with this repository content. |
java.util.Set<java.lang.String> |
getVersions(org.apache.maven.archiva.model.ProjectReference reference)
Given a specific ProjectReference , return the list of available versions for
that project reference. |
java.util.Set<java.lang.String> |
getVersions(org.apache.maven.archiva.model.VersionedReference reference)
Given a specific VersionedReference , return the list of available versions for that
versioned reference. |
boolean |
hasContent(org.apache.maven.archiva.model.ArtifactReference reference)
Determines if the artifact referenced exists in the repository. |
boolean |
hasContent(org.apache.maven.archiva.model.ProjectReference reference)
Determines if the project referenced exists in the repository. |
boolean |
hasContent(org.apache.maven.archiva.model.VersionedReference reference)
Determines if the version reference exists in the repository. |
void |
setRepository(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration 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.io.File |
toFile(ArchivaArtifact reference)
Given an ArchivaArtifact , return the file reference to the artifact. |
java.io.File |
toFile(org.apache.maven.archiva.model.ArtifactReference reference)
Given an ArtifactReference , return the file reference to the artifact. |
java.lang.String |
toMetadataPath(org.apache.maven.archiva.model.ProjectReference reference)
Given a ProjectReference , return the path to the metadata for
the project. |
java.lang.String |
toMetadataPath(org.apache.maven.archiva.model.VersionedReference reference)
Given a VersionedReference , return the path to the metadata for
the specific version of the project. |
java.lang.String |
toPath(ArchivaArtifact reference)
Given an ArchivaArtifact , return the relative path to the artifact. |
java.lang.String |
toPath(org.apache.maven.archiva.model.ArtifactReference reference)
Given an ArtifactReference , return the relative path to the artifact. |
Method Detail |
---|
void deleteVersion(org.apache.maven.archiva.model.VersionedReference reference) throws ContentNotFoundException
reference
- the version reference to delete.
ContentNotFoundException
java.lang.String getId()
Convenience method to get the repository id.
Equivalent to calling .getRepository().getId()
java.util.Set<org.apache.maven.archiva.model.ArtifactReference> getRelatedArtifacts(org.apache.maven.archiva.model.ArtifactReference reference) throws ContentNotFoundException
Gather up the list of related artifacts to the ArtifactReference provided. This typically inclues the pom files, and those things with classifiers (such as doc, source code, test libs, etc...)
NOTE: Some layouts (such as maven 1 "legacy") are not compatible with this query.
reference
- the reference to work off of.
ContentNotFoundException
- if the initial artifact reference does not exist within the repository.
LayoutException
java.lang.String getRepoRoot()
Convenience method to get the repository (on disk) root directory.
Equivalent to calling .getRepository().getLocation()
org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration getRepository()
java.util.Set<java.lang.String> getVersions(org.apache.maven.archiva.model.ProjectReference reference) throws ContentNotFoundException, LayoutException
ProjectReference
, return the list of available versions for
that project reference.
reference
- the project reference to work off of.
ContentNotFoundException
- if the project reference does nto exist within the repository.
LayoutException
java.util.Set<java.lang.String> getVersions(org.apache.maven.archiva.model.VersionedReference reference) throws ContentNotFoundException
Given a specific VersionedReference
, return the list of available versions for that
versioned reference.
NOTE: This is really only useful when working with SNAPSHOTs.
reference
- the versioned reference to work off of.
ContentNotFoundException
- if the versioned reference does not exist within the repository.
LayoutException
boolean hasContent(org.apache.maven.archiva.model.ArtifactReference reference)
reference
- the artifact reference to check for.
boolean hasContent(org.apache.maven.archiva.model.ProjectReference reference)
reference
- the project reference to check for.
boolean hasContent(org.apache.maven.archiva.model.VersionedReference reference)
reference
- the version reference to check for.
void setRepository(org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration repo)
repo
- the repository to associate with this repository content.org.apache.maven.archiva.model.ArtifactReference toArtifactReference(java.lang.String path) throws LayoutException
VersionedReference
object suitable for the path.
path
- the path relative to the repository base dir for the artifact.
ArtifactReference
representing the path. (or null if path cannot be converted to
a ArtifactReference
)
LayoutException
- if there was a problem converting the path to an artifact.java.io.File toFile(org.apache.maven.archiva.model.ArtifactReference reference)
ArtifactReference
, return the file reference to the artifact.
reference
- the artifact reference to use.
java.io.File toFile(ArchivaArtifact reference)
ArchivaArtifact
, return the file reference to the artifact.
reference
- the archiva artifact to use.
java.lang.String toMetadataPath(org.apache.maven.archiva.model.ProjectReference reference)
ProjectReference
, return the path to the metadata for
the project.
reference
- the reference to use.
java.lang.String toMetadataPath(org.apache.maven.archiva.model.VersionedReference reference)
VersionedReference
, return the path to the metadata for
the specific version of the project.
reference
- the reference to use.
java.lang.String toPath(org.apache.maven.archiva.model.ArtifactReference reference)
ArtifactReference
, return the relative path to the artifact.
reference
- the artifact reference to use.
java.lang.String toPath(ArchivaArtifact reference)
ArchivaArtifact
, return the relative path to the artifact.
reference
- the archiva artifact to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |