@Unstable public class WikiMacroBinding extends HashMap<String,Object> implements Bindings
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
WikiMacroBinding(org.xwiki.rendering.macro.descriptor.MacroDescriptor descriptor,
WikiMacroParameters parameters,
String content,
org.xwiki.rendering.transformation.MacroTransformationContext transformationContext)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getContent() |
org.xwiki.rendering.transformation.MacroTransformationContext |
getContext() |
org.xwiki.rendering.macro.descriptor.MacroDescriptor |
getDescriptor() |
WikiMacroParameters |
getParameters() |
Object |
getResult() |
void |
replaceAll(WikiMacroBinding wikiMacroBinding)
Replace all the content of the current binding with the given binding.
|
protected void |
setContent(String content) |
protected void |
setContext(org.xwiki.rendering.transformation.MacroTransformationContext context) |
protected void |
setDescriptor(org.xwiki.rendering.macro.descriptor.MacroDescriptor descriptor) |
protected void |
setParameters(WikiMacroParameters parameters) |
void |
setResult(Object result)
Allows to set a result during the execution of the macro, which can be retrieved with
getResult() . |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
public WikiMacroBinding(org.xwiki.rendering.macro.descriptor.MacroDescriptor descriptor, WikiMacroParameters parameters, String content, org.xwiki.rendering.transformation.MacroTransformationContext transformationContext)
descriptor
- the macro descriptor to set for the binding.parameters
- the parameters to set for the binding.content
- the input macro content to set for the binding.transformationContext
- the transformation context used for that wikimacro, is null if the
transformation is done asynchronously.public WikiMacroParameters getParameters()
protected void setParameters(WikiMacroParameters parameters)
public String getContent()
protected void setContent(String content)
public org.xwiki.rendering.macro.descriptor.MacroDescriptor getDescriptor()
protected void setDescriptor(org.xwiki.rendering.macro.descriptor.MacroDescriptor descriptor)
public Object getResult()
public void setResult(Object result)
getResult()
.result
- the result to set.public org.xwiki.rendering.transformation.MacroTransformationContext getContext()
protected void setContext(org.xwiki.rendering.transformation.MacroTransformationContext context)
public void replaceAll(WikiMacroBinding wikiMacroBinding)
wikiMacroBinding
- the macro binding values to use as replacement.Copyright © 2004–2019 XWiki. All rights reserved.