@Component @Named(value="wiki.template") @Singleton public class WikiTemplateManagerScript extends Object implements org.xwiki.script.service.ScriptService
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_LASTEXCEPTION
Deprecated.
|
Constructor and Description |
---|
WikiTemplateManagerScript() |
Modifier and Type | Method and Description |
---|---|
boolean |
createWikiFromTemplate(String newWikiId,
String newWikiAlias,
String templateId,
String ownerId,
boolean failOnExist)
Create a new wiki from the specified template.
|
Exception |
getLastError()
Get the error generated while performing the previously called action.
|
Exception |
getLastException()
Deprecated.
since 5.4RC1 use
getLastError() ()} instead |
Collection<org.xwiki.wiki.descriptor.WikiDescriptor> |
getTemplates()
Get the list of all wiki templates.
|
org.xwiki.job.event.status.JobStatus |
getWikiProvisioningJobStatus(List<String> jobId)
Get the status of the wiki creation job.
|
Boolean |
isTemplate(String wikiId) |
boolean |
setTemplate(String wikiId,
boolean value)
Set if the specified wiki is a template or not.
|
@Deprecated public static final String CONTEXT_LASTEXCEPTION
public Exception getLastError()
null
if no exception was thrownpublic Collection<org.xwiki.wiki.descriptor.WikiDescriptor> getTemplates()
public boolean setTemplate(String wikiId, boolean value)
wikiId
- the ID of the wiki to specifyvalue
- whether or not the wiki is a templatepublic Boolean isTemplate(String wikiId)
wikiId
- The id of the wiki to testpublic boolean createWikiFromTemplate(String newWikiId, String newWikiAlias, String templateId, String ownerId, boolean failOnExist)
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 the creation of the wiki id if not available@Deprecated public Exception getLastException()
getLastError()
()} insteadCopyright © 2004–2014 XWiki. All rights reserved.