Wiki source code of XWiki Enterprise Manager Features
Last modified by Vincent Massol on 2012/08/17 12:13
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | List of all features bundled by default with XWiki Enterprise Manager. In addition to these bundled features you can also [[add other extensions>>extensions:Main.WebHome]]. | ||
2 | |||
3 | {{velocity}} | ||
4 | #set ($xwql = "from doc.object(ExtensionCode.ExtensionClass) as extension, doc.object(EXOExtensionCode.ExtensionClass) as exoextension where extension.type = 'xar' and extension.name not like '% Macro' and exoextension.bundledWith like '%manager%'") | ||
5 | #set ($currentDb = $context.database) | ||
6 | #set ($dummy = $context.setDatabase("extensions")) | ||
7 | #set ($extensions = $services.query.xwql($xwql).execute()) | ||
8 | #set ($extraFeatureMap = []) | ||
9 | #foreach ($extension in $extensions) | ||
10 | #set ($extensionDoc = $xwiki.getDocument($extension)) | ||
11 | #set ($dummy = $extensionDoc.use("ExtensionCode.ExtensionClass")) | ||
12 | #set ($icon = $extensionDoc.getValue("icon")) | ||
13 | #if ("$!icon" == "") | ||
14 | #set ($icon = "path:$xwiki.getDocument('ExtensionCode.ExtensionSheet').getAttachmentURL('preferences-system-windows.png')") | ||
15 | #end | ||
16 | ## Remove "Application" suffix if it's there for better integration with other features | ||
17 | #set ($name = $extensionDoc.name) | ||
18 | #if ($name.endsWith("Application")) | ||
19 | #set ($name = $name.substring(0, $mathtool.sub($name.length(), 11))) | ||
20 | #end | ||
21 | #set ($discard = $extraFeatureMap.add({'icon' : "$icon", 'link' : "[[$name>>extensions:$extensionDoc.fullName]]", 'description' : "$extensionDoc.getValue('summary')"})) | ||
22 | #end | ||
23 | #set ($dummy = $context.setDatabase($currentDb)) | ||
24 | {{/velocity}} | ||
25 | |||
26 | {{include document="platform:Features.FeaturesExtract"/}} |