Class TransformationContext

  • All Implemented Interfaces:
    Cloneable

    public class TransformationContext
    extends Object
    implements Cloneable
    The context of the transformation process. Contains information such as the current XWiki DOM for the parsed content.
    Since:
    2.4M1
    Version:
    $Id: 344d9a5cee21cbd7677bc002149f90197cae0394 $
    • Method Detail

      • getId

        public String getId()
        Returns:
        an id representing the transformation being evaluated. It's a free form name that Transformations can use, for example if they need to perform some caching based on a key. For example the Velocity Macro is using this id to pass it to the underlying Velocity Engine so that it caches macros using this key.
        Since:
        2.4M2
      • setId

        public void setId​(String id)
        Parameters:
        id - the id
        Since:
        2.4M2
        See Also:
        getId()
      • setXDOM

        public void setXDOM​(XDOM xdom)
        Parameters:
        xdom - the complete XDOM of the content currently being transformed.
      • getXDOM

        public XDOM getXDOM()
        Returns:
        the complete XDOM of the content currently being transformed.
      • setSyntax

        public void setSyntax​(Syntax syntax)
        Parameters:
        syntax - the current syntax.
      • getSyntax

        public Syntax getSyntax()
        Returns:
        the current syntax.
      • isRestricted

        public boolean isRestricted()
        Returns:
        indicator of whether the transformation context is restricted or not.
      • setRestricted

        public void setRestricted​(boolean restricted)
        Parameters:
        restricted - set indicator of whether the transformation context is restricted or not.
      • getTargetSyntax

        public Syntax getTargetSyntax()
        Returns:
        the syntax of the renderer
      • setTargetSyntax

        public void setTargetSyntax​(Syntax targetSyntax)
        Parameters:
        targetSyntax - the syntax of the renderer