@Role public interface ExtensionRepositoryManager extends ExtensionRepository, AdvancedSearchable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRIORITY
The default priority for extension repository ordering.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRepository(ExtensionRepository repository) |
ExtensionRepository |
addRepository(ExtensionRepositoryDescriptor repositoryDescriptor)
Create and add a new repository.
|
default ExtensionRepository |
addRepository(ExtensionRepositoryDescriptor repositoryDescriptor,
int priority)
Create and add a new repository.
|
ExtensionRepository |
addRepository(ExtensionRepositoryId repositoryId)
Deprecated.
since 4.3M1 use
addRepository(ExtensionRepositoryDescriptor) instead |
default void |
addRepository(ExtensionRepository repository,
int priority) |
Collection<ExtensionRepository> |
getRepositories() |
ExtensionRepository |
getRepository(String repositoryId) |
void |
removeRepository(String repositoryId)
Remove a repository form the list.
|
Extension |
resolve(ExtensionDependency extensionDependency)
Get extension descriptor found in one of the repositories.
|
Extension |
resolve(ExtensionId extensionId)
Get extension descriptor found in one of the repositories.
|
IterableResult<Version> |
resolveVersions(String id,
int offset,
int nb)
Return ordered (ascendent) versions for the provided extension id.
|
IterableResult<Extension> |
search(ExtensionQuery query)
Search among all repositories implementing
AdvancedSearchable
interface. |
IterableResult<Extension> |
search(String pattern,
int offset,
int nb)
Search among all repositories implementing
Searchable interface. |
exists, getDescriptor, getIdisFilterable, isSortablestatic final int DEFAULT_PRIORITY
@Deprecated ExtensionRepository addRepository(ExtensionRepositoryId repositoryId) throws ExtensionRepositoryException
addRepository(ExtensionRepositoryDescriptor) insteadrepositoryId - the repository identifierExtensionRepositoryException - failed to create ExtensionRepository for provided identifierExtensionRepository addRepository(ExtensionRepositoryDescriptor repositoryDescriptor) throws ExtensionRepositoryException
repositoryDescriptor - the repository descriptorExtensionRepositoryException - failed to create ExtensionRepository for provided identifierdefault ExtensionRepository addRepository(ExtensionRepositoryDescriptor repositoryDescriptor, int priority) throws ExtensionRepositoryException
priority - the priority in the list of repositoriesrepositoryDescriptor - the repository descriptorExtensionRepositoryException - failed to create ExtensionRepository for provided identifiervoid addRepository(ExtensionRepository repository)
repository - add an existing repositorydefault void addRepository(ExtensionRepository repository, int priority)
priority - the priority in the list of repositoriesrepository - add an existing repositoryvoid removeRepository(String repositoryId)
repositoryId - the repository unique identifierExtensionRepository.getId()ExtensionRepository getRepository(String repositoryId)
repositoryId - the repository unique identifierExtensionRepository.getId()Collection<ExtensionRepository> getRepositories()
Extension resolve(ExtensionId extensionId) throws ResolveException
The proxy search in all repositories and return the first extension it could find.
resolve in interface ExtensionRepositoryextensionId - the extension identifierExtensionNotFoundException - when the extension does not exist in any of the repositoriesResolveException - failed to find extension in the repositoryExtension resolve(ExtensionDependency extensionDependency) throws ResolveException
The proxy search in all repositories and return the first extension it could find.
This method takes ExtensionDependency instead of ExtensionId to allow any implementation of
ExtensionRepository to extension dependencies with filter not supported yet by Extension Manage. As an
example Aether implementation add support from classifiers, excludes and version ranges.
resolve in interface ExtensionRepositoryextensionDependency - the extension dependencyExtensionNotFoundException - when the dependency does not match any extension in any of the repositoriesResolveException - failed to find extension in the repositoryIterableResult<Version> resolveVersions(String id, int offset, int nb) throws ResolveException
resolveVersions in interface ExtensionRepositoryid - the id of the extensions for which to return versionsoffset - the offset from where to start returning versionsnb - the maximum number of versions to returnExtensionNotFoundException - when the extension does not exist in any of the repositoriesResolveException - fail to find extension for provided idIterableResult<Extension> search(String pattern, int offset, int nb) throws SearchException
Searchable interface.search in interface Searchablepattern - the pattern to searchoffset - the offset from where to start returning search results, 0-basednb - the maximum number of search results to return. -1 indicate no limit. 0 indicate that no result will be
returned but it can be used to get the total hits.SearchException - error when trying to search provided patternSearchableIterableResult<Extension> search(ExtensionQuery query) throws SearchException
AdvancedSearchable
interface.search in interface AdvancedSearchablequery - the querySearchException - error when trying to search provided queryAdvancedSearchableCopyright © 2004–2017 XWiki. All rights reserved.