T
- the type of the wrapped objectpublic class WrappingExtensionRepository<T extends ExtensionRepository> extends AbstractWrappingObject<T> implements ExtensionRepository
ExtensionRepository
.Constructor and Description |
---|
WrappingExtensionRepository(T repository) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(ExtensionId extensionId) |
ExtensionRepositoryDescriptor |
getDescriptor() |
ExtensionRepositoryId |
getId() |
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.
|
public WrappingExtensionRepository(T repository)
repository
- the wrapped repositorypublic ExtensionRepositoryDescriptor getDescriptor()
getDescriptor
in interface ExtensionRepository
public ExtensionRepositoryId getId()
getId
in interface ExtensionRepository
public Extension resolve(ExtensionId extensionId) throws ResolveException
ExtensionRepository
ResolveException
is
thrown.resolve
in interface ExtensionRepository
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.resolve
in interface ExtensionRepository
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 boolean exists(ExtensionId extensionId)
exists
in interface ExtensionRepository
extensionId
- the extension identifierpublic IterableResult<Version> resolveVersions(String id, int offset, int nb) throws ResolveException
ExtensionRepository
resolveVersions
in interface 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 idCopyright © 2004–2021 XWiki. All rights reserved.