@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 RepositoryStorage
public 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 RepositoryStorage
RepositoryStorageRuntimeException
public Collection<String> listNamespaces(String repoId, String namespace, Filter<String> filter) throws RepositoryStorageRuntimeException
listNamespaces
in interface RepositoryStorage
RepositoryStorageRuntimeException
public Collection<String> listProjects(String repoId, String namespace, Filter<String> filter) throws RepositoryStorageRuntimeException
listProjects
in interface RepositoryStorage
RepositoryStorageRuntimeException
public Collection<String> listProjectVersions(String repoId, String namespace, String projectId, Filter<String> filter) throws RepositoryStorageRuntimeException
listProjectVersions
in interface RepositoryStorage
RepositoryStorageRuntimeException
public Collection<ArtifactMetadata> readArtifactsMetadata(ReadMetadataRequest readMetadataRequest) throws RepositoryStorageRuntimeException
readArtifactsMetadata
in interface RepositoryStorage
RepositoryStorageRuntimeException
public ArtifactMetadata readArtifactMetadataFromPath(String repoId, String path) throws RepositoryStorageRuntimeException
readArtifactMetadataFromPath
in interface RepositoryStorage
RepositoryStorageRuntimeException
public void applyServerSideRelocation(ManagedRepository managedRepository, ArtifactReference artifact) throws ProxyDownloadException
RepositoryStorage
For such clients, archiva does server-side relocation by reading itself the <relocation> element in metadatas and serving the expected artifact.
applyServerSideRelocation
in interface RepositoryStorage
managedRepository
- the used managed repositoryartifact
- the artifact referenceProxyDownloadException
public String getFilePath(String requestPath, ManagedRepository managedRepository)
RepositoryStorage
getFilePath
in interface RepositoryStorage
requestPath
- 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 RepositoryStorage
RelocationException
XMLException
IOException
public PathParser getPathParser()
public void setPathParser(PathParser pathParser)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.