org.apache.archiva.rest.services
Class DefaultSearchService

java.lang.Object
  extended by org.apache.archiva.rest.services.AbstractRestService
      extended by org.apache.archiva.rest.services.DefaultSearchService
All Implemented Interfaces:
SearchService

@Service(value="searchService#rest")
public class DefaultSearchService
extends AbstractRestService
implements SearchService

Author:
Olivier Lamy

Field Summary
private  RepositorySearch repositorySearch
           
 
Fields inherited from class org.apache.archiva.rest.services.AbstractRestService
archivaAdministration, config, httpServletRequest, log, managedRepositoryAdmin, repositoryContentFactory, repositorySessionFactory, repositoryTaskScheduler, userRepositories
 
Constructor Summary
DefaultSearchService()
           
 
Method Summary
 GroupIdList getAllGroupIds(List<String> selectedRepos)
          this method applies on Maven Indexer lucene index, so datas not yet indexed won't be available
 List<Artifact> getArtifactByChecksum(String checksum)
           
protected  List<Artifact> getArtifacts(SearchResults searchResults)
           
 List<Artifact> getArtifactVersions(String groupId, String artifactId, String packaging)
          search will be apply on all repositories the current user has karma
 List<Dependency> getDependencies(String groupId, String artifactId, String version)
           
 StringList getObservablesRepoIds()
           
 List<Artifact> quickSearch(String queryString)
           
 List<Artifact> quickSearchWithRepositories(SearchRequest searchRequest)
          if not repositories in SearchRequest: search will be apply on all repositories the current user has karma
 List<Artifact> searchArtifacts(SearchRequest searchRequest)
          If searchRequest contains repositories, the search will be done only on those repositories.
 
Methods inherited from class org.apache.archiva.rest.services.AbstractRestService
buildArtifacts, doScanRepository, getArtifactUrl, getAuditInformation, getAuditListeners, getBaseUrl, getBeansOfType, getObservableRepos, getPrincipal, setAuditListeners, triggerAuditEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositorySearch

@Inject
private RepositorySearch repositorySearch
Constructor Detail

DefaultSearchService

public DefaultSearchService()
Method Detail

quickSearch

public List<Artifact> quickSearch(String queryString)
                           throws ArchivaRestServiceException
Specified by:
quickSearch in interface SearchService
Throws:
ArchivaRestServiceException

quickSearchWithRepositories

public List<Artifact> quickSearchWithRepositories(SearchRequest searchRequest)
                                           throws ArchivaRestServiceException
Description copied from interface: SearchService
if not repositories in SearchRequest: search will be apply on all repositories the current user has karma

Specified by:
quickSearchWithRepositories in interface SearchService
Throws:
ArchivaRestServiceException

getArtifactVersions

public List<Artifact> getArtifactVersions(String groupId,
                                          String artifactId,
                                          String packaging)
                                   throws ArchivaRestServiceException
Description copied from interface: SearchService
search will be apply on all repositories the current user has karma

Specified by:
getArtifactVersions in interface SearchService
Throws:
ArchivaRestServiceException

searchArtifacts

public List<Artifact> searchArtifacts(SearchRequest searchRequest)
                               throws ArchivaRestServiceException
Description copied from interface: SearchService
If searchRequest contains repositories, the search will be done only on those repositories. if no repositories, the search will be apply on all repositories the current user has karma

Specified by:
searchArtifacts in interface SearchService
Throws:
ArchivaRestServiceException

getAllGroupIds

public GroupIdList getAllGroupIds(List<String> selectedRepos)
                           throws ArchivaRestServiceException
Description copied from interface: SearchService
this method applies on Maven Indexer lucene index, so datas not yet indexed won't be available

Specified by:
getAllGroupIds in interface SearchService
Throws:
ArchivaRestServiceException

getDependencies

public List<Dependency> getDependencies(String groupId,
                                        String artifactId,
                                        String version)
                                 throws ArchivaRestServiceException
Throws:
ArchivaRestServiceException

getArtifactByChecksum

public List<Artifact> getArtifactByChecksum(String checksum)
                                     throws ArchivaRestServiceException
Throws:
ArchivaRestServiceException

getObservablesRepoIds

public StringList getObservablesRepoIds()
                                 throws ArchivaRestServiceException
Specified by:
getObservablesRepoIds in interface SearchService
Throws:
ArchivaRestServiceException

getArtifacts

protected List<Artifact> getArtifacts(SearchResults searchResults)
                               throws ArchivaRestServiceException
Throws:
ArchivaRestServiceException


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.