Hi all, I am developing a Confluence plugin(type macro) and need change MacroDefinition of this macro in execute method.
public String execute(Map<String, String> params, String s, ConversionContext conversionContext)
I get this info
MacroDefinition macroDefinition = (MacroDefinition)conversionContext.getProperty("macroDefinition");
and try to change like this
String pageString = xhtmlContent.updateMacroDefinitions(ceo.getBodyAsString(), c, new MacroDefinitionUpdater()
{
@Override
public MacroDefinition update(MacroDefinition macroDefinition)
{
macroDefinition.setParameter("test", "test");
return macroDefinition;
}
});
ceo.setBodyAsString(pageString);
or
just
MacroDefinition macroDefinition = (MacroDefinition)conversionContext.getProperty("macroDefinition");
macroDefinition.setParameter("test", "test");
but in time of next call execute method macroDefinition in the same state, how I cant change and save it?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.