public abstract class AbstractFilteredExtensionRepository extends AbstractAdvancedSearchableExtensionRepository
Constructor and Description |
---|
AbstractFilteredExtensionRepository() |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(String field,
Object value,
ExtensionQuery.COMPARISON comparison) |
boolean |
isFilterable() |
boolean |
isSortable() |
Extension |
resolve(ExtensionDependency extensionDependency)
Return extension descriptor from the repository.
|
Extension |
resolve(ExtensionId extensionId)
Return extension descriptor from the repository.
|
IterableResult<Version> |
resolveVersions(String id,
int offset,
int nb)
Return ordered (ascendent) versions for the provided extension id.
|
IterableResult<Extension> |
search(ExtensionQuery inputQuery)
Search extension based of the provided query.
|
search
exists, getDescriptor, getId, setDescriptor, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exists, getDescriptor, getId
public void addFilter(String field, Object value, ExtensionQuery.COMPARISON comparison)
field
- the name of the fieldvalue
- the value to compare tocomparison
- the comparison to applypublic Extension resolve(ExtensionId extensionId) throws ResolveException
ExtensionRepository
ResolveException
is
thrown.extensionId
- the extension identifierExtensionNotFoundException
- when the extension does not exist in the repositoryResolveException
- failed to find extension in the repositorypublic Extension resolve(ExtensionDependency extensionDependency) throws ResolveException
ExtensionRepository
ResolveException
is
thrown.extensionDependency
- the target extension as a dependencyExtensionNotFoundException
- when the dependency does not match any extension in the repositoryResolveException
- failed to find extension in the repositorypublic IterableResult<Version> resolveVersions(String id, int offset, int nb) throws ResolveException
ExtensionRepository
id
- 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 the repositoryResolveException
- fail to find extension for provided idpublic boolean isFilterable()
public boolean isSortable()
public IterableResult<Extension> search(ExtensionQuery inputQuery) throws SearchException
AdvancedSearchable
inputQuery
- the querySearchException
- error when trying to search provided queryCopyright © 2004–2021 XWiki. All rights reserved.