Class WikiMacroBinding

    • Constructor Detail

      • WikiMacroBinding

        public WikiMacroBinding​(org.xwiki.rendering.macro.descriptor.MacroDescriptor descriptor,
                                WikiMacroParameters parameters,
                                String content,
                                org.xwiki.rendering.transformation.MacroTransformationContext transformationContext)
        Default constructor.
        Parameters:
        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.
    • Method Detail

      • getParameters

        public WikiMacroParameters getParameters()
        Returns:
        the parameters of the wikimacro.
      • getContent

        public String getContent()
        Returns:
        the input content of the wikimacro.
      • setContent

        protected void setContent​(String content)
      • getDescriptor

        public org.xwiki.rendering.macro.descriptor.MacroDescriptor getDescriptor()
        Returns:
        the macro descriptor of the wikimacro.
      • setDescriptor

        protected void setDescriptor​(org.xwiki.rendering.macro.descriptor.MacroDescriptor descriptor)
      • getResult

        public Object getResult()
        Returns:
        the result of the wikimacro.
      • setResult

        public void setResult​(Object result)
        Allows to set a result during the execution of the macro, which can be retrieved with getResult().
        Parameters:
        result - the result to set.
      • getContext

        public org.xwiki.rendering.transformation.MacroTransformationContext getContext()
        Returns:
        the transformation context used for this macro, or null in case of asynchronous transformation.
      • setContext

        protected void setContext​(org.xwiki.rendering.transformation.MacroTransformationContext context)
      • replaceAll

        public void replaceAll​(WikiMacroBinding wikiMacroBinding)
        Replace all the content of the current binding with the given binding.
        Parameters:
        wikiMacroBinding - the macro binding values to use as replacement.
        Since:
        11.6.1, 11.7RC1