Interface Transformation
- All Superinterfaces:
Comparable<Transformation>
- All Known Implementing Classes:
AbstractTransformation
Performs a transformation on a XDOM (i.e. a tree of
Block. This used for example
for transforming Macro Blocks into other Blocks corresponding to the execution of the Macros. Another example of
transformation would be looking for all words that have an entry on Wikipedia and adding links to them.- Since:
- 1.5M2
- Version:
- $Id: dcc1c1225235b33eb896167b42d68f30f8db2b44 $
-
Method Summary
Modifier and TypeMethodDescriptionintThe priority of execution relative to the other transformations.default voidPrepare a block meant to be cached to be executed several times.voidtransform(Block block, TransformationContext context) Transform the passed XDOM and modifies it.voidDeprecated.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getPriority
int getPriority()The priority of execution relative to the other transformations. The lowest values have the highest priorities and execute first. For example a Transformation with a priority of 100 will execute before one with a priority of 500.- Returns:
- the execution priority
-
transform
Deprecated.since 2.4M1 usetransform(Block, TransformationContext)insteadTransform the passed XDOM and modifies it.- Parameters:
dom- the AST representing the content in Blockssyntax- the Syntax of the content- Throws:
TransformationException- if the transformation fails for any reason
-
transform
Transform the passed XDOM and modifies it.- Parameters:
block- the block to transform (can be anXDOM)context- the context of the transformation process (syntax, transformation id, etc)- Throws:
TransformationException- if the transformation fails for any reason- Since:
- 2.4M1
-
prepare
Prepare a block meant to be cached to be executed several times. The goal is to pre-execute everything that can fit in any context and generally store them in block attributes (which are not serialized).- Parameters:
block- the block to prepare (can be anXDOM)- Since:
- 15.9RC1
-
transform(Block, TransformationContext)instead