Package org.xwiki.extension.repository
Interface CoreExtensionRepository
-
- All Superinterfaces:
AdvancedSearchable,ExtensionRepository,Searchable
@Role public interface CoreExtensionRepository extends ExtensionRepository, AdvancedSearchable
Virtual extension repository containing core extensions.- Since:
- 4.0M1
- Version:
- $Id: f8efd8bc11d44955d6202516949da59c548bc250 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountExtensions()booleanexists(String feature)CoreExtensiongetCoreExtension(String feature)Collection<CoreExtension>getCoreExtensions()CoreExtensiongetEnvironmentExtension()Return the extension corresponding to the current environment if any.CoreExtensionresolve(ExtensionDependency extensionDependency)Return extension descriptor from the repository.CoreExtensionresolve(ExtensionId extensionId)Return extension descriptor from the repository.-
Methods inherited from interface org.xwiki.extension.repository.search.AdvancedSearchable
isFilterable, isSortable, search
-
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:ExtensionRepositoryReturn extension descriptor from the repository. If the extension can't be found aResolveExceptionis thrown.- Specified by:
resolvein interfaceExtensionRepository- 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
-
resolve
CoreExtension resolve(ExtensionId extensionId) throws ResolveException
Description copied from interface:ExtensionRepositoryReturn extension descriptor from the repository. If the extension can't be found aResolveExceptionis thrown.- Specified by:
resolvein interfaceExtensionRepository- 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
-
-