Package org.xwiki.wiki.template
Interface WikiTemplateManager
-
@Role public interface WikiTemplateManagerComponent in charge of managing wiki templates and creating new wiki from these templates.- Since:
- 5.3M2
- Version:
- $Id: e93aa9ef7dd94ef623963b1aacbec0e783641c29 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description WikiProvisioningJobapplyTemplate(String wikiId, String templateId)Deprecated.since 7.0M2WikiProvisioningJobcreateWikiFromTemplate(String newWikiId, String newWikiAlias, String templateId, String ownerId, boolean failOnExist)Deprecated.since 7.0M2, useorg.xwiki.platform.wiki.creationjob.WikiCreator#createWiki(WikiCreationRequest request)insteadCollection<WikiDescriptor>getTemplates()Get the list of all wiki templates.WikiProvisioningJobgetWikiProvisioningJob(List<String> jobId)Deprecated.since 7.0M2booleanisTemplate(String wikiId)voidsetTemplate(String wikiId, boolean value)Set if the specified wiki is a template or not.
-
-
-
Method Detail
-
getTemplates
Collection<WikiDescriptor> getTemplates() throws WikiTemplateManagerException
Get the list of all wiki templates.- Returns:
- list of wiki templates
- Throws:
WikiTemplateManagerException- if problems occur
-
setTemplate
void setTemplate(String wikiId, boolean value) throws WikiTemplateManagerException
Set if the specified wiki is a template or not.- Parameters:
wikiId- the ID of the wiki to specifyvalue- whether or not the wiki is a template- Throws:
WikiTemplateManagerException- if problems occur
-
isTemplate
boolean isTemplate(String wikiId) throws WikiTemplateManagerException
- Parameters:
wikiId- The id of the wiki to test- Returns:
- if the wiki is a template or not
- Throws:
WikiTemplateManagerException- if problems occur
-
createWikiFromTemplate
@Deprecated WikiProvisioningJob createWikiFromTemplate(String newWikiId, String newWikiAlias, String templateId, String ownerId, boolean failOnExist) throws WikiTemplateManagerException
Deprecated.since 7.0M2, useorg.xwiki.platform.wiki.creationjob.WikiCreator#createWiki(WikiCreationRequest request)insteadCreate a new wiki from the specified template.- Parameters:
newWikiId- ID of the wiki to createnewWikiAlias- Default alias of the wiki to createtemplateId- Id of the template to useownerId- Id of the wiki ownerfailOnExist- fail if the wiki id is not available- Returns:
- the job that provisions the new wiki with the template content
- Throws:
WikiTemplateManagerException- if problems occur
-
applyTemplate
@Deprecated WikiProvisioningJob applyTemplate(String wikiId, String templateId) throws WikiTemplateManagerException
Deprecated.since 7.0M2Apply a template to an existing wiki.- Parameters:
wikiId- if of the wiki on which the template will be installedtemplateId- id of the template to use- Returns:
- the job that provisions the wiki with the template content
- Throws:
WikiTemplateManagerException- if problems occur- Since:
- 5.4RC1
-
getWikiProvisioningJob
@Deprecated WikiProvisioningJob getWikiProvisioningJob(List<String> jobId) throws WikiTemplateManagerException
Deprecated.since 7.0M2Get the wiki provisioning job.- Parameters:
jobId- id of wiki provisioning job- Returns:
- the job
- Throws:
WikiTemplateManagerException- if problem occurs
-
-