|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.archiva.repository.content.legacy.AbstractLegacyRepositoryContent
org.apache.archiva.repository.content.legacy.ManagedLegacyRepositoryContent
@Service(value="managedRepositoryContent#legacy") @Scope(value="prototype") public class ManagedLegacyRepositoryContent
ManagedLegacyRepositoryContent
Field Summary | |
---|---|
private FileTypes |
filetypes
|
private ManagedRepository |
repository
|
Constructor Summary | |
---|---|
ManagedLegacyRepositoryContent()
|
Method Summary | |
---|---|
void |
deleteArtifact(ArtifactReference artifactReference)
delete a specified artifact from the repository |
void |
deleteGroupId(String groupId)
|
void |
deleteProject(String namespace,
String projectId)
|
private void |
deleteSupportFile(File repoFile,
String supportExtension)
|
private void |
deleteSupportFiles(File repoFile)
|
void |
deleteVersion(VersionedReference reference)
Delete from the managed repository all files / directories associated with the provided version reference. |
private void |
deleteVersions(File typeDir,
VersionedReference reference)
|
String |
getId()
Convenience method to get the repository id. |
private void |
getProjectVersions(File typeDir,
ProjectReference reference,
Set<String> foundVersions)
|
Set<ArtifactReference> |
getRelatedArtifacts(ArtifactReference reference)
Gather up the list of related artifacts to the ArtifactReference provided. |
private void |
getRelatedArtifacts(File typeDir,
ArtifactReference reference,
Set<ArtifactReference> foundArtifacts)
|
String |
getRepoRoot()
Convenience method to get the repository (on disk) root directory. |
ManagedRepository |
getRepository()
Get the repository configuration associated with this repository content. |
private void |
getVersionedVersions(File typeDir,
VersionedReference reference,
Set<String> foundVersions)
|
Set<String> |
getVersions(ProjectReference reference)
Given a specific ProjectReference , return the list of available versions for
that project reference. |
Set<String> |
getVersions(VersionedReference reference)
Given a specific VersionedReference , return the list of available versions for that
versioned reference. |
boolean |
hasContent(ArtifactReference reference)
Determines if the artifact referenced exists in the repository. |
boolean |
hasContent(ProjectReference reference)
Determines if the project referenced exists in the repository. |
boolean |
hasContent(VersionedReference reference)
Determines if the version reference exists in the repository. |
void |
setFileTypes(FileTypes fileTypes)
|
void |
setRepository(ManagedRepository repository)
Set the repository configuration to associate with this repository content. |
ArtifactReference |
toArtifactReference(String path)
Convert a path to an artifact reference. |
File |
toFile(ArchivaArtifact reference)
Given an ArchivaArtifact , return the file reference to the artifact. |
File |
toFile(ArtifactReference reference)
Given an ArtifactReference , return the file reference to the artifact. |
String |
toMetadataPath(ProjectReference reference)
Given a ProjectReference , return the path to the metadata for
the project. |
String |
toMetadataPath(VersionedReference reference)
Given a VersionedReference , return the path to the metadata for
the specific version of the project. |
Methods inherited from class org.apache.archiva.repository.content.legacy.AbstractLegacyRepositoryContent |
---|
setLegacyPathParser, 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.ManagedRepositoryContent |
---|
toPath, toPath |
Field Detail |
---|
@Inject private FileTypes filetypes
private ManagedRepository repository
Constructor Detail |
---|
public ManagedLegacyRepositoryContent()
Method Detail |
---|
public void deleteVersion(VersionedReference reference) throws ContentNotFoundException
ManagedRepositoryContent
deleteVersion
in interface ManagedRepositoryContent
reference
- the version reference to delete.
ContentNotFoundException
private void deleteVersions(File typeDir, VersionedReference reference)
public void deleteProject(String namespace, String projectId) throws RepositoryException
deleteProject
in interface ManagedRepositoryContent
namespace
- groupId for mavenprojectId
- artifactId for maven
ContentNotFoundException
RepositoryException
private void deleteSupportFiles(File repoFile)
private void deleteSupportFile(File repoFile, String supportExtension)
public String getId()
ManagedRepositoryContent
Convenience method to get the repository id.
Equivalent to calling .getRepository().getId()
getId
in interface ManagedRepositoryContent
public Set<ArtifactReference> getRelatedArtifacts(ArtifactReference reference) throws ContentNotFoundException
ManagedRepositoryContent
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.
getRelatedArtifacts
in interface ManagedRepositoryContent
reference
- the reference to work off of.
ContentNotFoundException
- if the initial artifact reference does not exist within the repository.public String getRepoRoot()
ManagedRepositoryContent
Convenience method to get the repository (on disk) root directory.
Equivalent to calling .getRepository().getLocation()
getRepoRoot
in interface ManagedRepositoryContent
public ManagedRepository getRepository()
ManagedRepositoryContent
getRepository
in interface ManagedRepositoryContent
public Set<String> getVersions(ProjectReference reference) throws ContentNotFoundException
ManagedRepositoryContent
ProjectReference
, return the list of available versions for
that project reference.
getVersions
in interface ManagedRepositoryContent
reference
- the project reference to work off of.
ContentNotFoundException
- if the project reference does nto exist within the repository.public Set<String> getVersions(VersionedReference reference) throws ContentNotFoundException
ManagedRepositoryContent
Given a specific VersionedReference
, return the list of available versions for that
versioned reference.
NOTE: This is really only useful when working with SNAPSHOTs.
getVersions
in interface ManagedRepositoryContent
reference
- the versioned reference to work off of.
ContentNotFoundException
- if the versioned reference does not exist within the repository.public boolean hasContent(ArtifactReference reference)
ManagedRepositoryContent
hasContent
in interface ManagedRepositoryContent
reference
- the artifact reference to check for.
public boolean hasContent(ProjectReference reference)
ManagedRepositoryContent
hasContent
in interface ManagedRepositoryContent
reference
- the project reference to check for.
public boolean hasContent(VersionedReference reference)
ManagedRepositoryContent
hasContent
in interface ManagedRepositoryContent
reference
- the version reference to check for.
public void setRepository(ManagedRepository repository)
ManagedRepositoryContent
setRepository
in interface ManagedRepositoryContent
repository
- the repository to associate with this repository content.public ArtifactReference toArtifactReference(String path) throws LayoutException
toArtifactReference
in interface ManagedRepositoryContent
toArtifactReference
in class AbstractLegacyRepositoryContent
path
- the path to convert. (relative or full location path)
ArtifactReference
representing the path. (or null if path cannot be converted to
a ArtifactReference
)
LayoutException
- if the path cannot be converted to an artifact reference.public File toFile(ArchivaArtifact reference)
ManagedRepositoryContent
ArchivaArtifact
, return the file reference to the artifact.
toFile
in interface ManagedRepositoryContent
reference
- the archiva artifact to use.
public File toFile(ArtifactReference reference)
ManagedRepositoryContent
ArtifactReference
, return the file reference to the artifact.
toFile
in interface ManagedRepositoryContent
reference
- the artifact reference to use.
public String toMetadataPath(ProjectReference reference)
ManagedRepositoryContent
ProjectReference
, return the path to the metadata for
the project.
toMetadataPath
in interface ManagedRepositoryContent
reference
- the reference to use.
public String toMetadataPath(VersionedReference reference)
ManagedRepositoryContent
VersionedReference
, return the path to the metadata for
the specific version of the project.
toMetadataPath
in interface ManagedRepositoryContent
reference
- the reference to use.
private void getProjectVersions(File typeDir, ProjectReference reference, Set<String> foundVersions)
private void getRelatedArtifacts(File typeDir, ArtifactReference reference, Set<ArtifactReference> foundArtifacts)
private void getVersionedVersions(File typeDir, VersionedReference reference, Set<String> foundVersions)
public void setFileTypes(FileTypes fileTypes)
public void deleteArtifact(ArtifactReference artifactReference) throws ContentNotFoundException
ManagedRepositoryContent
deleteArtifact
in interface ManagedRepositoryContent
ContentNotFoundException
public void deleteGroupId(String groupId) throws ContentNotFoundException
deleteGroupId
in interface ManagedRepositoryContent
ContentNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |