Package org.xwiki.platform.flavor.script
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe role hint of this component.static final StringThe id to use in the jobs searching for flavors.Fields inherited from class org.xwiki.extension.script.AbstractExtensionScriptService
authorization, documentAccessBridge, execution, EXTENSIONERROR_KEY, jobExecutor, PROPERTY_CALLERREFERENCE, PROPERTY_CHECKRIGHTS, PROPERTY_CONTEXT_ACTION, PROPERTY_CONTEXT_WIKI, PROPERTY_USERREFERENCE, scriptProvider, WIKI_NAMESPACE_PREFIX, xcontextProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a flavor query.createFlavorQuery(String query) Creates a flavor query.org.xwiki.extension.InstalledExtensiongetFlavorExtension(org.xwiki.component.namespace.Namespace namespace) Get the flavor installed on a given namespace.org.xwiki.extension.ExtensionIdgetFlavorOfWiki(String wikiId) Get the flavor installed on a given wiki.org.xwiki.extension.repository.result.IterableResult<org.xwiki.extension.Extension>getFlavors(FlavorQuery query) Deprecated.Collection<org.xwiki.extension.ExtensionId>Get the flavors know to be compatible with the distribution.Get the flavors identifiers know to be incompatible with the distribution.org.xwiki.platform.flavor.internal.job.FlavorSearchStatusorg.xwiki.platform.flavor.internal.job.FlavorSearchStatusgetSearchValidFlavorsStatus(String namespace) getSearchValidFlavorsStatusURL(String namespace) List<org.xwiki.extension.Extension>List<org.xwiki.extension.Extension>getValidExtensions(String namespace) org.xwiki.extension.repository.result.IterableResult<org.xwiki.extension.Extension>searchFlavors(FlavorQuery query) Search for all flavors matching a query.org.xwiki.job.JobStart searching for valid flavors in the context of the current wiki.org.xwiki.job.JobsearchValidFlavors(String namespace) Start searching for valid flavors.Methods inherited from class org.xwiki.extension.script.AbstractExtensionScriptService
contextualize, fromWikitoNamespace, getCallerDocument, getJobStatus, getLastError, safe, safeWrapError, setError, setRightsProperties, toWikiId, wrapError
-
Field Details
-
ROLEHINT
The role hint of this component.- See Also:
-
SEARCH_ID
The id to use in the jobs searching for flavors.- See Also:
-
-
Constructor Details
-
FlavorManagerScriptService
public FlavorManagerScriptService()
-
-
Method Details
-
createFlavorQuery
Creates a flavor query.- Returns:
- a new flavor query
-
createFlavorQuery
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, usesearchFlavors(FlavorQuery)insteadGet 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
- Parameters:
namespace- the namespace where to validate the flavors- Returns:
- the REST URL to access the job status
- Since:
- 8.0
-
getValidExtensions
- Returns:
- the valid flavors found in the currently running job status
-
getValidExtensions
- Parameters:
namespace- the namespace where to validate the flavors- Returns:
- the valid flavors found in the currently running job status
- Since:
- 9.5
-
getSearchValidFlavorsStatusURL
- Returns:
- the REST URL to access the job status
- Since:
- 8.0
-
searchValidFlavors
Start searching for valid flavors.- Parameters:
namespace- the namespace where to validate the flavors- Returns:
- the
Jobsearching 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
Jobsearching the flavors - Since:
- 8.0
-
getFlavorOfWiki
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
Get the flavors know to be compatible with the distribution.Each
ExtensionIdalways contains the flavor id but version might be null.- Returns:
- the already known flavors
- Since:
- 9.5
-
getKnownInvalidFlavors
Get the flavors identifiers know to be incompatible with the distribution.- Returns:
- the already known flavors
- Since:
- 9.5
-
searchFlavors(FlavorQuery)instead