org.xwiki.extension.repository
Interface ExtensionRepository

All Known Subinterfaces:
CoreExtensionRepository, InstalledExtensionRepository, LocalExtensionRepository
All Known Implementing Classes:
AbstractExtensionRepository, WrappingExtensionRepository

public interface ExtensionRepository

A repository containing extensions.

Since:
4.0M1
Version:
$Id$

Method Summary
 boolean exists(ExtensionId extensionId)
           
 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.
 

Method Detail

getId

ExtensionRepositoryId getId()
Returns:
the repository identifier.

resolve

Extension resolve(ExtensionId extensionId)
                  throws ResolveException
Return extension descriptor from the repository. If the extension can't be found a ResolveException is thrown.

Parameters:
extensionId - the extension identifier
Returns:
the found extension descriptor
Throws:
ResolveException - 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 a ResolveException is thrown.

Parameters:
extensionDependency - the target extension as a dependency
Returns:
the found extension descriptor
Throws:
ResolveException - 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 versions
offset - the offset from where to start returning versions
nb - the maximum number of versions to return
Returns:
the versions of the provided extension id
Throws:
ResolveException - 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


Copyright © 2004-2012 XWiki. All Rights Reserved.