@Role public interface Transformation extends Comparable<Transformation>
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.Modifier and Type | Method and Description |
---|---|
int |
getPriority()
The priority of execution relative to the other transformations.
|
void |
transform(Block block,
TransformationContext context)
Transform the passed XDOM and modifies it.
|
void |
transform(XDOM dom,
Syntax syntax)
Deprecated.
since 2.4M1 use
transform(Block, TransformationContext) instead |
compareTo
int getPriority()
@Deprecated void transform(XDOM dom, Syntax syntax) throws TransformationException
transform(Block, TransformationContext)
insteaddom
- the AST representing the content in Blockssyntax
- the Syntax of the contentTransformationException
- if the transformation fails for any reasonvoid transform(Block block, TransformationContext context) throws TransformationException
block
- the block to transform (can be an XDOM
)context
- the context of the transformation process (syntax, transformation id, etc)TransformationException
- if the transformation fails for any reasonCopyright © 2004–2021 XWiki. All rights reserved.