org.xwiki.extension.repository
Interface CoreExtensionRepository

All Superinterfaces:
ExtensionRepository, Searchable

@Role
public interface CoreExtensionRepository
extends ExtensionRepository, Searchable

Virtual extension repository containing core extensions.

Since:
4.0M1
Version:
$Id: 8a37a52db66a08255a48f69fba87501d8e04e0e5 $

Method Summary
 int countExtensions()
           
 boolean exists(String feature)
           
 CoreExtension getCoreExtension(String feature)
           
 Collection<CoreExtension> getCoreExtensions()
           
 CoreExtension getEnvironmentExtension()
          Return the extension corresponding to the current environment if any.
 CoreExtension resolve(ExtensionDependency extensionDependency)
          Return extension descriptor from the repository.
 CoreExtension resolve(ExtensionId extensionId)
          Return extension descriptor from the repository.
 
Methods inherited from interface org.xwiki.extension.repository.ExtensionRepository
exists, getDescriptor, getId, resolveVersions
 
Methods inherited from interface org.xwiki.extension.repository.search.Searchable
search
 

Method Detail

countExtensions

int countExtensions()
Returns:
the number of core extensions

getCoreExtensions

Collection<CoreExtension> getCoreExtensions()
Returns:
all the core extensions

getEnvironmentExtension

CoreExtension getEnvironmentExtension()
Return the extension corresponding to the current environment if any. Generally used to get the current XWiki distribution.

Returns:
the core extension associated to the environment

getCoreExtension

CoreExtension getCoreExtension(String feature)
Parameters:
feature - the feature provided by the extension including its identifier (version is not needed since there can be only one version of a core extension)
Returns:
the core extension, null if none is found

exists

boolean exists(String feature)
Parameters:
feature - the feature provided by the extension including its identifier (version is not needed since there can be only one version of a core extension)
Returns:
true if the extension exists, false otherwise

resolve

CoreExtension 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

resolve

CoreExtension 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


Copyright © 2004-2013 XWiki. All Rights Reserved.