public class ManagedDefaultRepositoryContent extends AbstractDefaultRepositoryContent implements ManagedRepositoryContent
ARTIFACT_SEPARATOR, artifactMappingProviders, GROUP_SEPARATOR, log, MAVEN_METADATA, PATH_SEPARATOR| Constructor and Description |
|---|
ManagedDefaultRepositoryContent(ManagedRepository repository,
FileTypes fileTypes,
FileLockManager lockManager) |
ManagedDefaultRepositoryContent(ManagedRepository repository,
List<? extends ArtifactMappingProvider> artifactMappingProviders,
FileTypes fileTypes,
FileLockManager lockManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteArtifact(ArtifactReference artifactReference)
delete a specified artifact from the repository
|
void |
deleteGroupId(String groupId) |
void |
deleteProject(String namespace,
String projectId) |
void |
deleteVersion(VersionedReference reference)
Delete from the managed repository all files / directories associated with the
provided version reference.
|
String |
getId()
Convenience method to get the repository id.
|
Set<ArtifactReference> |
getRelatedArtifacts(ArtifactReference reference)
Gather up the list of related artifacts to the ArtifactReference provided.
|
String |
getRepoRoot()
Convenience method to get the repository (on disk) root directory.
|
ManagedRepository |
getRepository()
Get the repository configuration associated with this
repository content.
|
Set<String> |
getVersions(ProjectReference reference)
Gather the Available Versions (on disk) for a specific Project Reference, based on filesystem
information.
|
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 |
setFileTypes(FileTypes fileTypes) |
void |
setRepository(ManagedRepository repo)
Set the repository configuration to associate with this
repository content.
|
ArtifactReference |
toArtifactReference(String path)
Convert a path to an artifact reference.
|
StorageAsset |
toFile(ArchivaArtifact reference)
Given an
ArchivaArtifact, return the file reference to the artifact. |
StorageAsset |
toFile(ArtifactReference reference)
Given an
ArtifactReference, return the file reference to the artifact. |
setArtifactMappingProviders, toMetadataPath, toMetadataPath, toPath, toPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoMetadataPath, toMetadataPath, toPathtoPathpublic ManagedDefaultRepositoryContent(ManagedRepository repository, FileTypes fileTypes, FileLockManager lockManager)
public ManagedDefaultRepositoryContent(ManagedRepository repository, List<? extends ArtifactMappingProvider> artifactMappingProviders, FileTypes fileTypes, FileLockManager lockManager)
public void setFileTypes(FileTypes fileTypes)
public void deleteVersion(VersionedReference reference)
ManagedRepositoryContentdeleteVersion in interface ManagedRepositoryContentreference - the version reference to delete.public void deleteProject(String namespace, String projectId) throws RepositoryException
deleteProject in interface ManagedRepositoryContentnamespace - groupId for mavenprojectId - artifactId for mavenContentNotFoundExceptionRepositoryExceptionpublic void deleteArtifact(ArtifactReference artifactReference)
ManagedRepositoryContentdeleteArtifact in interface ManagedRepositoryContentpublic void deleteGroupId(String groupId) throws ContentNotFoundException
deleteGroupId in interface ManagedRepositoryContentContentNotFoundExceptionpublic String getId()
ManagedRepositoryContentConvenience method to get the repository id.
Equivalent to calling .getRepository().getId()
getId in interface ManagedRepositoryContentpublic Set<ArtifactReference> getRelatedArtifacts(ArtifactReference reference) throws ContentNotFoundException
ManagedRepositoryContentGather 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 ManagedRepositoryContentreference - the reference to work off of.ContentNotFoundException - if the initial artifact reference does not exist within the repository.public String getRepoRoot()
ManagedRepositoryContentConvenience method to get the repository (on disk) root directory.
Equivalent to calling .getRepository().getLocation()
getRepoRoot in interface ManagedRepositoryContentpublic ManagedRepository getRepository()
ManagedRepositoryContentgetRepository in interface ManagedRepositoryContentpublic Set<String> getVersions(ProjectReference reference) throws ContentNotFoundException, LayoutException
getVersions in interface ManagedRepositoryContentreference - the project reference to work off of.LayoutExceptionContentNotFoundException - 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 ManagedRepositoryContentreference - the versioned reference to work off of.ContentNotFoundException - if the versioned reference does not exist within the repository.public boolean hasContent(ArtifactReference reference)
ManagedRepositoryContenthasContent in interface ManagedRepositoryContentreference - the artifact reference to check for.public boolean hasContent(ProjectReference reference)
ManagedRepositoryContenthasContent in interface ManagedRepositoryContentreference - the project reference to check for.public boolean hasContent(VersionedReference reference)
ManagedRepositoryContenthasContent in interface ManagedRepositoryContentreference - the version reference to check for.public void setRepository(ManagedRepository repo)
ManagedRepositoryContentsetRepository in interface ManagedRepositoryContentrepo - the repository to associate with this repository content.public ArtifactReference toArtifactReference(String path) throws LayoutException
toArtifactReference in interface RepositoryContenttoArtifactReference in class AbstractDefaultRepositoryContentpath - 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 StorageAsset toFile(ArtifactReference reference)
ManagedRepositoryContentArtifactReference, return the file reference to the artifact.toFile in interface ManagedRepositoryContentreference - the artifact reference to use.public StorageAsset toFile(ArchivaArtifact reference)
ManagedRepositoryContentArchivaArtifact, return the file reference to the artifact.toFile in interface ManagedRepositoryContentreference - the archiva artifact to use.public void setFiletypes(FileTypes filetypes)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.