@Service(value="browseService#rest") public class DefaultBrowseService extends AbstractRestService implements BrowseService
Modifier and Type | Field and Description |
---|---|
private RepositoryProxyConnectors |
connectors |
private DependencyTreeBuilder |
dependencyTreeBuilder |
private RepositoryContentFactory |
repositoryContentFactory |
private org.apache.archiva.redback.components.cache.Cache<String,ProjectVersionMetadata> |
versionMetadataCache |
archivaAdministration, config, httpServletRequest, httpServletResponse, log, managedRepositoryAdmin, proxyConnectorAdmin, repositorySessionFactory, repositoryTaskScheduler, userRepositories
Constructor and Description |
---|
DefaultBrowseService() |
Modifier and Type | Method and Description |
---|---|
Boolean |
addMetadata(String groupId,
String artifactId,
String version,
String key,
String value,
String repositoryId) |
Boolean |
artifactAvailable(String groupId,
String artifactId,
String version,
String repositoryId)
verify if an artifact is available locally if not download from proxies will be try
|
Boolean |
artifactAvailable(String groupId,
String artifactId,
String version,
String classifier,
String repositoryId)
verify if an artifact is available locally if not download from proxies will be try
|
BrowseResult |
browseGroupId(String groupId,
String repositoryId) |
private void |
closeQuietly(JarFile jarFile) |
private String |
collapseNamespaces(RepositorySession repositorySession,
MetadataResolver metadataResolver,
Collection<String> repoIds,
String n) |
Boolean |
deleteMetadata(String groupId,
String artifactId,
String version,
String key,
String repositoryId) |
List<ArtifactContentEntry> |
getArtifactContentEntries(String groupId,
String artifactId,
String version,
String classifier,
String type,
String path,
String repositoryId) |
ArtifactContent |
getArtifactContentText(String groupId,
String artifactId,
String version,
String classifier,
String type,
String path,
String repositoryId)
if path is empty content of the file is returned (for pom view)
|
List<Artifact> |
getArtifactDownloadInfos(String groupId,
String artifactId,
String version,
String repositoryId) |
List<Artifact> |
getArtifacts(String repositoryId)
return List of all artifacts from this repository
|
List<Artifact> |
getArtifactsByMetadata(String key,
String value,
String repositoryId)
Return List of artifacts from this repository with artifact metadata key matching value.
|
List<Artifact> |
getArtifactsByProjectVersionMetadata(String key,
String value,
String repositoryId)
Return List of artifacts from this repository with project version level metadata key matching value.
|
List<Artifact> |
getArtifactsByProperty(String key,
String value,
String repositoryId)
Return List of artifacts from this repository with property key matching value.
|
List<Artifact> |
getDependees(String groupId,
String artifactId,
String version,
String repositoryId)
List of artifacts using the artifact passed in parameter.
|
List<Entry> |
getMetadatas(String groupId,
String artifactId,
String version,
String repositoryId) |
ProjectVersionMetadata |
getProjectMetadata(String groupId,
String artifactId,
String version,
String repositoryId) |
ProjectVersionMetadata |
getProjectVersionMetadata(String groupId,
String artifactId,
String repositoryId) |
BrowseResult |
getRootGroups(String repositoryId) |
private String |
getRootPath(String path) |
private List<String> |
getSelectedRepos(String repositoryId) |
private List<ArtifactContentEntry> |
getSmallerDepthEntries(Map<String,ArtifactContentEntry> entries) |
List<TreeEntry> |
getTreeEntries(String groupId,
String artifactId,
String version,
String repositoryId)
return the dependency Tree for an artifacts
the List result has only one entry
|
List<ManagedRepository> |
getUserManagableRepositories() |
List<ManagedRepository> |
getUserRepositories() |
org.apache.archiva.redback.components.cache.Cache |
getVersionMetadataCache() |
private Collection<String> |
getVersions(List<String> selectedRepos,
String groupId,
String artifactId) |
VersionsList |
getVersionsList(String groupId,
String artifactId,
String repositoryId) |
Boolean |
importMetadata(MetadataAddRequest metadataAddRequest,
String repositoryId) |
protected List<ArtifactContentEntry> |
readFileEntries(File file,
String filterPath,
String repoId) |
List<Artifact> |
searchArtifacts(String text,
String repositoryId,
Boolean exact)
Search artifacts with any property matching text.
|
List<Artifact> |
searchArtifacts(String key,
String text,
String repositoryId,
Boolean exact)
Search artifacts with the property specified by key matching text.
|
void |
setVersionMetadataCache(org.apache.archiva.redback.components.cache.Cache versionMetadataCache) |
buildArtifacts, doScanRepository, getArtifactUrl, getArtifactUrl, getAuditInformation, getAuditListeners, getBaseUrl, getBeansOfType, getModelMapper, getObservableRepos, getPrincipal, setAuditListeners, triggerAuditEvent
@Inject private DependencyTreeBuilder dependencyTreeBuilder
@Inject private RepositoryContentFactory repositoryContentFactory
@Inject @Named(value="repositoryProxyConnectors#default") private RepositoryProxyConnectors connectors
@Inject @Named(value="browse#versionMetadata") private org.apache.archiva.redback.components.cache.Cache<String,ProjectVersionMetadata> versionMetadataCache
public DefaultBrowseService()
public BrowseResult getRootGroups(String repositoryId) throws ArchivaRestServiceException
getRootGroups
in interface BrowseService
ArchivaRestServiceException
public BrowseResult browseGroupId(String groupId, String repositoryId) throws ArchivaRestServiceException
browseGroupId
in interface BrowseService
groupId
- groupId to browserepositoryId
- optionnal (repository to browse if null
all available user repositories are used)ArchivaRestServiceException
public VersionsList getVersionsList(String groupId, String artifactId, String repositoryId) throws ArchivaRestServiceException
getVersionsList
in interface BrowseService
ArchivaRestServiceException
private Collection<String> getVersions(List<String> selectedRepos, String groupId, String artifactId) throws MetadataResolutionException
MetadataResolutionException
public ProjectVersionMetadata getProjectMetadata(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException
getProjectMetadata
in interface BrowseService
ArchivaRestServiceException
public ProjectVersionMetadata getProjectVersionMetadata(String groupId, String artifactId, String repositoryId) throws ArchivaRestServiceException
getProjectVersionMetadata
in interface BrowseService
ArchivaRestServiceException
public List<TreeEntry> getTreeEntries(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException
BrowseService
getTreeEntries
in interface BrowseService
ArchivaRestServiceException
public List<ManagedRepository> getUserRepositories() throws ArchivaRestServiceException
getUserRepositories
in interface BrowseService
ArchivaRestServiceException
public List<ManagedRepository> getUserManagableRepositories() throws ArchivaRestServiceException
getUserManagableRepositories
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> getDependees(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException
BrowseService
getDependees
in interface BrowseService
ArchivaRestServiceException
public List<Entry> getMetadatas(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException
getMetadatas
in interface BrowseService
ArchivaRestServiceException
public Boolean addMetadata(String groupId, String artifactId, String version, String key, String value, String repositoryId) throws ArchivaRestServiceException
addMetadata
in interface BrowseService
ArchivaRestServiceException
public Boolean deleteMetadata(String groupId, String artifactId, String version, String key, String repositoryId) throws ArchivaRestServiceException
deleteMetadata
in interface BrowseService
ArchivaRestServiceException
public List<ArtifactContentEntry> getArtifactContentEntries(String groupId, String artifactId, String version, String classifier, String type, String path, String repositoryId) throws ArchivaRestServiceException
getArtifactContentEntries
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> getArtifactDownloadInfos(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException
getArtifactDownloadInfos
in interface BrowseService
ArchivaRestServiceException
public ArtifactContent getArtifactContentText(String groupId, String artifactId, String version, String classifier, String type, String path, String repositoryId) throws ArchivaRestServiceException
BrowseService
getArtifactContentText
in interface BrowseService
ArchivaRestServiceException
public Boolean artifactAvailable(String groupId, String artifactId, String version, String classifier, String repositoryId) throws ArchivaRestServiceException
BrowseService
artifactAvailable
in interface BrowseService
ArchivaRestServiceException
public Boolean artifactAvailable(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException
BrowseService
artifactAvailable
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> getArtifacts(String repositoryId) throws ArchivaRestServiceException
BrowseService
getArtifacts
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> getArtifactsByProjectVersionMetadata(String key, String value, String repositoryId) throws ArchivaRestServiceException
BrowseService
getArtifactsByProjectVersionMetadata
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> getArtifactsByMetadata(String key, String value, String repositoryId) throws ArchivaRestServiceException
BrowseService
getArtifactsByMetadata
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> getArtifactsByProperty(String key, String value, String repositoryId) throws ArchivaRestServiceException
BrowseService
getArtifactsByProperty
in interface BrowseService
ArchivaRestServiceException
public Boolean importMetadata(MetadataAddRequest metadataAddRequest, String repositoryId) throws ArchivaRestServiceException
importMetadata
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> searchArtifacts(String text, String repositoryId, Boolean exact) throws ArchivaRestServiceException
BrowseService
searchArtifacts
in interface BrowseService
ArchivaRestServiceException
public List<Artifact> searchArtifacts(String key, String text, String repositoryId, Boolean exact) throws ArchivaRestServiceException
BrowseService
searchArtifacts
in interface BrowseService
ArchivaRestServiceException
private void closeQuietly(JarFile jarFile)
protected List<ArtifactContentEntry> readFileEntries(File file, String filterPath, String repoId) throws IOException
IOException
private List<ArtifactContentEntry> getSmallerDepthEntries(Map<String,ArtifactContentEntry> entries)
private String getRootPath(String path)
path
- private List<String> getSelectedRepos(String repositoryId) throws ArchivaRestServiceException
ArchivaRestServiceException
private String collapseNamespaces(RepositorySession repositorySession, MetadataResolver metadataResolver, Collection<String> repoIds, String n) throws MetadataResolutionException
MetadataResolutionException
public org.apache.archiva.redback.components.cache.Cache getVersionMetadataCache()
public void setVersionMetadataCache(org.apache.archiva.redback.components.cache.Cache versionMetadataCache)
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.