@Service(value="repositoryStorage#maven2") public class Maven2RepositoryStorage extends Object implements RepositoryStorage
Maven 2 repository format storage implementation. This class currently takes parameters to indicate the repository to deal with rather than being instantiated per-repository. FIXME: instantiate one per repository and allocate permanently from a factory (which can be obtained within the session).
The session is passed in as an argument to obtain any necessary resources, rather than the class being instantiated within the session in the context of a single managed repository's resolution needs.
| Constructor and Description |
|---|
Maven2RepositoryStorage() |
public Maven2RepositoryStorage()
@PostConstruct public void initialize()
public ProjectMetadata readProjectMetadata(String repoId, String namespace, String projectId)
readProjectMetadata in interface RepositoryStoragepublic ProjectVersionMetadata readProjectVersionMetadata(ReadMetadataRequest readMetadataRequest) throws RepositoryStorageMetadataNotFoundException, RepositoryStorageMetadataInvalidException, RepositoryStorageRuntimeException
public void setWagonFactory(WagonFactory wagonFactory)
public Collection<String> listRootNamespaces(String repoId, Filter<String> filter) throws RepositoryStorageRuntimeException
listRootNamespaces in interface RepositoryStorageRepositoryStorageRuntimeExceptionpublic Collection<String> listNamespaces(String repoId, String namespace, Filter<String> filter) throws RepositoryStorageRuntimeException
listNamespaces in interface RepositoryStorageRepositoryStorageRuntimeExceptionpublic Collection<String> listProjects(String repoId, String namespace, Filter<String> filter) throws RepositoryStorageRuntimeException
listProjects in interface RepositoryStorageRepositoryStorageRuntimeExceptionpublic Collection<String> listProjectVersions(String repoId, String namespace, String projectId, Filter<String> filter) throws RepositoryStorageRuntimeException
listProjectVersions in interface RepositoryStorageRepositoryStorageRuntimeExceptionpublic Collection<ArtifactMetadata> readArtifactsMetadata(ReadMetadataRequest readMetadataRequest) throws RepositoryStorageRuntimeException
readArtifactsMetadata in interface RepositoryStorageRepositoryStorageRuntimeExceptionpublic ArtifactMetadata readArtifactMetadataFromPath(String repoId, String path) throws RepositoryStorageRuntimeException
readArtifactMetadataFromPath in interface RepositoryStorageRepositoryStorageRuntimeExceptionpublic void applyServerSideRelocation(ManagedRepository managedRepository, ArtifactReference artifact) throws ProxyDownloadException
RepositoryStorageFor such clients, archiva does server-side relocation by reading itself the <relocation> element in metadatas and serving the expected artifact.
applyServerSideRelocation in interface RepositoryStoragemanagedRepository - the used managed repositoryartifact - the artifact referenceProxyDownloadExceptionpublic String getFilePath(String requestPath, ManagedRepository managedRepository)
RepositoryStoragegetFilePath in interface RepositoryStoragerequestPath - the web uri requestmanagedRepository - the used managed repository can be null so last version won't be resolvedpublic String getFilePathWithVersion(String requestPath, ManagedRepositoryContent managedRepositoryContent) throws RelocationException, XMLException, IOException
getFilePathWithVersion in interface RepositoryStorageRelocationExceptionXMLExceptionIOExceptionpublic PathParser getPathParser()
public void setPathParser(PathParser pathParser)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.