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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.