Skip to end of banner
Go to start of banner

Beanshell Macro

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

Version 1 Next »

Name

Bean Shell Macro

Plugin

Java Scripting Plugin

Description

Java scripting using BeanShell

  • This is a newer implementation and replacement for the script macro
  • The script macro is retained for upward compatibility with existing source - it is exactly the same as beanshell
    • The beanshell implementation level has been updated with this release of the macro

Documentation

  • Help available in the notation guide.

Common parameters

Pre-defined variables

Additional parameters

  • showJava - Default is false. Set to true to show a panel with the java source. Requires output=wiki.
  • strictJava - Default is false. Set to true to restrict what is considered valid source. This mode attempts to make BeanShell syntax behave as Java syntax, eliminating conveniences like loose variables, etc. When enabled, variables are required to be declared or initialized before use and method arguments are reqired to have types. This mode will become more strict in a future release when classes are interpreted and there is an alternative to scripting objects as method closures.

Usage

{beanshell}
out.println("Hello world");
{beanshell}
{beanshell:output=wiki|script=#userByGroup.bsh|group=confluence-users}
{beanshell}
{beanshell:output=wiki|script=^userByGroup.bsh|showjava=true}
{beanshell}
{script:output=html|script=^myjava.java}
{script}

Other examples

Security

This macro supports Macro Security Plugin.

Open Issues with this component

type key summary reporter assignee priority status

Unable to locate Jira server for this macro. It may be due to Application Link configuration.

Error rendering macro 'jiraissues' : Macro params are invalid
  • No labels