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: d0e8063338e1d0e1bd535c73ff7560035cec9f4d $

Method Summary
 boolean exists(ExtensionId extensionId)
           
 ExtensionRepositoryDescriptor getDescriptor()
           
 ExtensionRepositoryId getId()
          Deprecated. since 4.3M1 use getDescriptor() instead
 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

@Deprecated
ExtensionRepositoryId getId()
Deprecated. since 4.3M1 use getDescriptor() instead

Returns:
the repository identifier.

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 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-2013 XWiki. All Rights Reserved.