Filter Stream Script API for instance module
Version 3.1 by Admin on 2021/03/17 10:59
Expose script oriented API to manipulate instance wiki stream |
Type | JAR |
Category | |
Developed by | XWiki Development Team |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Expose script oriented API to manipulate instance wiki stream
Examples
Export the current wiki into a XAR file
{{template name="job_macros.vm"/}}
{{velocity}}
#set($void = $inputProperties.setEntities($entities))
## Export only the current wiki
#set($entities = $services.filter.instance.newEntityReferenceSet())
#set($void = $entities.includes("wiki:$xcontext.database"))
#set($inputProperties = $services.filter.instance.newInstanceInputProperties())
## Indicate the target XAR file name
#set($outputProperties = {
'target' : 'file:/home/tuska/file.xar'
})
## Start the export
#set($job = $services.filter.instance.startExport('xwiki+xar/1.3', $outputProperties, $inputProperties))
## Wait for the job to finish
$job.join()
## Print log
{{html}}
#printStatusLog($job.status)
{{/html}}
{{/velocity}}
{{velocity}}
#set($void = $inputProperties.setEntities($entities))
## Export only the current wiki
#set($entities = $services.filter.instance.newEntityReferenceSet())
#set($void = $entities.includes("wiki:$xcontext.database"))
#set($inputProperties = $services.filter.instance.newInstanceInputProperties())
## Indicate the target XAR file name
#set($outputProperties = {
'target' : 'file:/home/tuska/file.xar'
})
## Start the export
#set($job = $services.filter.instance.startExport('xwiki+xar/1.3', $outputProperties, $inputProperties))
## Wait for the job to finish
$job.join()
## Print log
{{html}}
#printStatusLog($job.status)
{{/html}}
{{/velocity}}
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.platform:xwiki-platform-filter-instance-script 13.1):