Enum TransformationContextMode
- java.lang.Object
-
- java.lang.Enum<TransformationContextMode>
-
- org.xwiki.rendering.macro.context.TransformationContextMode
-
- All Implemented Interfaces:
Serializable
,Comparable<TransformationContextMode>
public enum TransformationContextMode extends Enum<TransformationContextMode>
Defines the strategy to use for setting the Transformation Context for the Context Macro. Namely this controls the context for the macros located inside the Context Macro. For example some macros will use as input the other XDOM elements before or after the current Macro block that they correspond to. For example the TOC macro executes late (with a low priority) so that all other macros have a chance to execute and then it looks for all Heading Blocks in the XDOM, from the root.- Since:
- 8.3, 8.4RC1
- Version:
- $Id: cb8ff325b2b2b22cfe494ecae04496ac2172c113 $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CURRENT
The XDOM on which the macros in the Context macro execute is the current document's XDOM.DOCUMENT
The XDOM on which the macros in the Context macro execute is the referenced document's XDOM (but without transformations applied to that XDOM).TRANSFORMATIONS
The XDOM on which the macros in the Context macro execute is the referenced document's XDOM but with transformations applied to that XDOM.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransformationContextMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static TransformationContextMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CURRENT
public static final TransformationContextMode CURRENT
The XDOM on which the macros in the Context macro execute is the current document's XDOM.
-
DOCUMENT
public static final TransformationContextMode DOCUMENT
The XDOM on which the macros in the Context macro execute is the referenced document's XDOM (but without transformations applied to that XDOM).
-
TRANSFORMATIONS
public static final TransformationContextMode TRANSFORMATIONS
The XDOM on which the macros in the Context macro execute is the referenced document's XDOM but with transformations applied to that XDOM. IMPORTANT: This can be dangerous since it means executing macros, and thus also script macros defined in the referenced document. To be used with caution since that have side effects.
-
-
Method Detail
-
values
public static TransformationContextMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransformationContextMode c : TransformationContextMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransformationContextMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-