org.xwiki.extension.wrap
Class WrappingExtensionRepository<T extends ExtensionRepository>
java.lang.Object
org.xwiki.extension.wrap.AbstractWrappingObject<T>
org.xwiki.extension.wrap.WrappingExtensionRepository<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- ExtensionRepository
public class WrappingExtensionRepository<T extends ExtensionRepository>
- extends AbstractWrappingObject<T>
- implements ExtensionRepository
Wrap an ExtensionRepository.
- Since:
- 4.0M1
- Version:
- $Id: 3d32503c37505134c134b1a08e1863d6b1b2f868 $
WrappingExtensionRepository
public WrappingExtensionRepository(T repository)
- Parameters:
repository - the wrapped repository
getDescriptor
public ExtensionRepositoryDescriptor getDescriptor()
- Specified by:
getDescriptor in interface ExtensionRepository
- Returns:
- the repository descriptor
getId
public ExtensionRepositoryId getId()
- Specified by:
getId in interface ExtensionRepository
- Returns:
- the repository identifier.
resolve
public Extension resolve(ExtensionId extensionId)
throws ResolveException
- Description copied from interface:
ExtensionRepository
- Return extension descriptor from the repository. If the extension can't be found a
ResolveException is
thrown.
- Specified by:
resolve in interface ExtensionRepository
- Parameters:
extensionId - the extension identifier
- Returns:
- the found extension descriptor
- Throws:
ResolveException - failed to find extension in the repository
resolve
public Extension resolve(ExtensionDependency extensionDependency)
throws ResolveException
- Description copied from interface:
ExtensionRepository
- Return extension descriptor from the repository. If the extension can't be found a
ResolveException is
thrown.
- Specified by:
resolve in interface ExtensionRepository
- Parameters:
extensionDependency - the target extension as a dependency
- Returns:
- the found extension descriptor
- Throws:
ResolveException - failed to find extension in the repository
exists
public boolean exists(ExtensionId extensionId)
- Specified by:
exists in interface ExtensionRepository
- Parameters:
extensionId - the extension identifier
- Returns:
- true if the extension exists in the repository
resolveVersions
public IterableResult<Version> resolveVersions(String id,
int offset,
int nb)
throws ResolveException
- Description copied from interface:
ExtensionRepository
- Return ordered (ascendent) versions for the provided extension id.
- Specified by:
resolveVersions in interface ExtensionRepository
- 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:
ResolveException - fail to find extension for provided id
Copyright © 2004-2013 XWiki. All Rights Reserved.