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 Details

    • 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:
      ExtensionNotFoundException - when the dependency does not match any extension in the repository
      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:
      ExtensionNotFoundException - when the extension does not exist in the repository
      ResolveException - failed to find extension in the repository