Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

The following variables are automatically available in the script.  Refer to the Confluence API documentation for how to use these many of these variables.

Macro parameters

All macro parameters are also defined as variables for the script.

Error formatting macro: csv: java.lang.NullPointerException

Variable, Available, Discussion
out, All, Standard output - stdout. It is a Use to output macro result. Do not use System.out
err, All, Standard error - stderr. It is a Shown if showErrorOutput=true
context, All, PageContext for the current page
contentEntityObject, All, ContentEntityObject for the current content
request, All, http servlet request
session, All, http servlet session
contextPath, All, String representing the context path
confluenceHome, All, String representing path to confluence home directory
confluenceDomain, All, String representing base url for this instance.
bandanaManager, All,
labelManager, All,
pageManager, All,
spaceManager, All,
permissionManager, All,
contentPermissionManager, All,
attachmentManager, All,
commentManager, All, 
userManager, All,
userAccessor, All, Since 4.3
settingsManager, All,
searchManager, All,
contentEntityManager, All, 
webResourceManager, All, Since 4.1
conversionContext, All, Since 4.0
xhtmlContent, All, Since 4.0
html, Groovy
Gant, Groovy markup builder
binding, Groovy

Looking for something else

Open an issue if you would like to see additional variables provided. This list is occasionally updated make it easier to write simple scripts. The following technique can also be used to get access to additional Confluence components:

UserAccessor userAccessor = (UserAccessor)ContainerManager.getComponent("userAccessor");





  • No labels