Class FlavorManagerScriptService

java.lang.Object
org.xwiki.extension.script.AbstractExtensionScriptService
org.xwiki.platform.flavor.script.FlavorManagerScriptService
All Implemented Interfaces:
org.xwiki.script.service.ScriptService

@Component @Named("flavor") @Singleton public class FlavorManagerScriptService extends AbstractExtensionScriptService
Script service to find flavors.
Since:
7.1M2
Version:
$Id: 69d3e0f25059da7d41033b21255a97bbfb9416e3 $
  • Field Details

  • Constructor Details

    • FlavorManagerScriptService

      public FlavorManagerScriptService()
  • Method Details

    • createFlavorQuery

      public FlavorQuery createFlavorQuery()
      Creates a flavor query.
      Returns:
      a new flavor query
    • createFlavorQuery

      public FlavorQuery createFlavorQuery(String query)
      Creates a flavor query.
      Parameters:
      query - the query to execute
      Returns:
      a new flavor query
    • getFlavors

      @Deprecated public org.xwiki.extension.repository.result.IterableResult<org.xwiki.extension.Extension> getFlavors(FlavorQuery query)
      Deprecated.
      since 8.0RC1, use searchFlavors(FlavorQuery) instead
      Get all flavors matching a query.
      Parameters:
      query - query to execute
      Returns:
      flavors matching the query
    • searchFlavors

      public org.xwiki.extension.repository.result.IterableResult<org.xwiki.extension.Extension> searchFlavors(FlavorQuery query)
      Search for all flavors matching a query.
      Parameters:
      query - query to execute
      Returns:
      flavors matching the query
      Since:
      8.0RC1
    • getSearchValidFlavorsStatus

      public org.xwiki.platform.flavor.internal.job.FlavorSearchStatus getSearchValidFlavorsStatus(String namespace)
      Parameters:
      namespace - the namespace where to validate the flavors
      Returns:
      the status of the current or last flavor search
      Since:
      8.0
    • getSearchValidFlavorsStatus

      public org.xwiki.platform.flavor.internal.job.FlavorSearchStatus getSearchValidFlavorsStatus()
      Returns:
      the status of the current or last flavor search
      Since:
      8.0
    • getSearchValidFlavorsStatusURL

      public String getSearchValidFlavorsStatusURL(String namespace)
      Parameters:
      namespace - the namespace where to validate the flavors
      Returns:
      the REST URL to access the job status
      Since:
      8.0
    • getValidExtensions

      public List<org.xwiki.extension.Extension> getValidExtensions()
      Returns:
      the valid flavors found in the currently running job status
    • getValidExtensions

      public List<org.xwiki.extension.Extension> getValidExtensions(String namespace)
      Parameters:
      namespace - the namespace where to validate the flavors
      Returns:
      the valid flavors found in the currently running job status
      Since:
      9.5
    • getSearchValidFlavorsStatusURL

      public String getSearchValidFlavorsStatusURL()
      Returns:
      the REST URL to access the job status
      Since:
      8.0
    • searchValidFlavors

      public org.xwiki.job.Job searchValidFlavors(String namespace)
      Start searching for valid flavors.
      Parameters:
      namespace - the namespace where to validate the flavors
      Returns:
      the Job searching the flavors
      Since:
      8.0RC1
    • searchValidFlavors

      public org.xwiki.job.Job searchValidFlavors()
      Start searching for valid flavors in the context of the current wiki.
      Returns:
      the Job searching the flavors
      Since:
      8.0
    • getFlavorOfWiki

      public org.xwiki.extension.ExtensionId getFlavorOfWiki(String wikiId)
      Get the flavor installed on a given wiki.
      Parameters:
      wikiId - id of the wiki
      Returns:
      the id of the flavor installed on the given wiki or null if there is no flavor installed
    • getFlavorExtension

      public org.xwiki.extension.InstalledExtension getFlavorExtension(org.xwiki.component.namespace.Namespace namespace)
      Get the flavor installed on a given namespace.
      Parameters:
      namespace - the namespace where to search for the flavor
      Returns:
      the installed flavor extension
      Since:
      9.5
    • getKnownFlavors

      public Collection<org.xwiki.extension.ExtensionId> getKnownFlavors()
      Get the flavors know to be compatible with the distribution.

      Each ExtensionId always contains the flavor id but version might be null.

      Returns:
      the already known flavors
      Since:
      9.5
    • getKnownInvalidFlavors

      public Collection<String> getKnownInvalidFlavors()
      Get the flavors identifiers know to be incompatible with the distribution.
      Returns:
      the already known flavors
      Since:
      9.5