Package org.xwiki.rendering.executor
Interface ContentExecutor<T>
-
- Type Parameters:
T
- the context to use to execute the content (e.g. Macro Transformation Context)
@Role public interface ContentExecutor<T>
Parse the passed content and execute it.- Since:
- 8.4RC1
- Version:
- $Id: 4a5c87d36ef394fcb5042c75cc205b610350941d $
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterizedType
TYPE_MACRO_TRANSFORMATION
Type instance forContentExecutor<MacroTransformationContext>
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.xwiki.rendering.block.XDOM
execute(String content, org.xwiki.rendering.syntax.Syntax syntax, EntityReference source, T context)
Parse and execute content.org.xwiki.rendering.block.XDOM
execute(String content, org.xwiki.rendering.syntax.Syntax syntax, T context)
Parse and execute content.
-
-
-
Field Detail
-
TYPE_MACRO_TRANSFORMATION
static final ParameterizedType TYPE_MACRO_TRANSFORMATION
Type instance forContentExecutor<MacroTransformationContext>
.- Since:
- 12.0RC1, 11.10.3, 11.3.7
-
-
Method Detail
-
execute
org.xwiki.rendering.block.XDOM execute(String content, org.xwiki.rendering.syntax.Syntax syntax, T context) throws org.xwiki.rendering.parser.ParseException, MissingParserException, ContentExecutorException
Parse and execute content.- Parameters:
content
- the content to parse and executesyntax
- the syntax in which the content is written.context
- the context to use to execute the content (e.g. Macro Transformation Context)- Returns:
- the XDOM corresponding to the executed content.
- Throws:
org.xwiki.rendering.parser.ParseException
- when a parsing error occurs.MissingParserException
- when no parser has been found.ContentExecutorException
- when the execution failed in some way
-
execute
org.xwiki.rendering.block.XDOM execute(String content, org.xwiki.rendering.syntax.Syntax syntax, EntityReference source, T context) throws org.xwiki.rendering.parser.ParseException, MissingParserException, ContentExecutorException
Parse and execute content.- Parameters:
content
- the content to parse and executesyntax
- the syntax in which the content is written.source
- the source entity (mostly a Document Reference) containing the parsed content.context
- the context to use to execute the content (e.g. Macro Transformation Context)- Returns:
- the XDOM corresponding to the executed content with source metadata set to source.
- Throws:
org.xwiki.rendering.parser.ParseException
- when a parsing error occurs.MissingParserException
- when no parser has been found.ContentExecutorException
- when the execution failed in some way
-
-