Package org.xwiki.extension.repository
Interface ExtensionRepository
-
- All Known Subinterfaces:
CoreExtensionRepository
,ExtensionIndex
,ExtensionRepositoryManager
,InstalledExtensionRepository
,LocalExtensionRepository
,RatableExtensionRepository
,SearchableExtensionRepository
- All Known Implementing Classes:
AbstractAdvancedSearchableExtensionRepository
,AbstractExtensionRepository
,AbstractFilteredExtensionRepository
,WrappingExtensionRepository
public interface ExtensionRepository
A repository containing extensions.- Since:
- 4.0M1
- Version:
- $Id: 5d9bb33118cae84bc5a00ffe81dda99b037b0630 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
exists(ExtensionId extensionId)
ExtensionRepositoryDescriptor
getDescriptor()
ExtensionRepositoryId
getId()
Deprecated.since 4.3M1 usegetDescriptor()
insteadExtension
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.
-
-
-
Method Detail
-
getDescriptor
ExtensionRepositoryDescriptor getDescriptor()
- Returns:
- the repository descriptor
- Since:
- 4.3M1
-
resolve
Extension resolve(ExtensionId extensionId) throws ResolveException
Return extension descriptor from the repository. If the extension can't be found aResolveException
is thrown.- Parameters:
extensionId
- the extension identifier- Returns:
- the found extension descriptor
- Throws:
ExtensionNotFoundException
- when the extension does not exist in the repositoryResolveException
- failed to find extension in the repository
-
resolve
Extension resolve(ExtensionDependency extensionDependency) throws ResolveException
Return extension descriptor from the repository. If the extension can't be found aResolveException
is thrown.- Parameters:
extensionDependency
- the target extension as a dependency- Returns:
- the found extension descriptor
- Throws:
ExtensionNotFoundException
- when the dependency does not match any extension in the repositoryResolveException
- failed to find extension in the repository
-
resolveVersions
IterableResult<Version> resolveVersions(String id, int offset, int nb) throws ResolveException
Return ordered (ascendent) versions for the provided extension id.- Parameters:
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 return- Returns:
- the versions of the provided extension id
- Throws:
ExtensionNotFoundException
- when the extension does not exist in the repositoryResolveException
- fail to find extension for provided id
-
exists
boolean exists(ExtensionId extensionId)
- Parameters:
extensionId
- the extension identifier- Returns:
- true if the extension exists in the repository
-
getId
@Deprecated ExtensionRepositoryId getId()
Deprecated.since 4.3M1 usegetDescriptor()
instead- Returns:
- the repository identifier.
-
-