Package org.apache.wiki.parser
Class PluginContent
java.lang.Object
org.jdom2.Content
org.jdom2.Text
org.apache.wiki.parser.PluginContent
- All Implemented Interfaces:
Serializable,Cloneable,PluginElement,org.jdom2.NamespaceAware
Stores the contents of a plugin in a WikiDocument DOM tree.
If the Context.VAR_WYSIWYG_EDITOR_MODE is set to Boolean.TRUE in the context, then the plugin is rendered as WikiMarkup.
This allows an HTML editor to work without rendering the plugin each time as well.
If Context.VAR_EXECUTE_PLUGINS is set to Boolean.FALSE, then the plugin is not executed.
- Since:
- 2.4
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdom2.Content
org.jdom2.Content.CType -
Field Summary
Fields inherited from class org.jdom2.Text
valueFields inherited from class org.jdom2.Content
ctype, parent -
Constructor Summary
ConstructorsConstructorDescriptionPluginContent(String pluginName, Map<String, String> parameters) Creates a new DOM element with the given plugin name and a map of parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteParse(Context context) getParameter(String name) getText()getValue()static PluginContentparsePluginLine(Context context, String commandline, int pos) Parses a plugin invocation and returns a DOM element.Methods inherited from class org.jdom2.Text
append, append, clone, detach, getParent, getTextNormalize, getTextTrim, normalizeString, setParent, setText, toStringMethods inherited from class org.jdom2.Content
equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParentElement, hashCode
-
Constructor Details
-
PluginContent
Creates a new DOM element with the given plugin name and a map of parameters.- Parameters:
pluginName- The FQN of a plugin.parameters- A Map of parameters.
-
-
Method Details
-
getPluginName
- Specified by:
getPluginNamein interfacePluginElement
-
getParameter
- Specified by:
getParameterin interfacePluginElement
-
getParameters
- Specified by:
getParametersin interfacePluginElement
-
getValue
- Specified by:
getValuein interfacePluginElement- Overrides:
getValuein classorg.jdom2.Text
-
getText
- Specified by:
getTextin interfacePluginElement- Overrides:
getTextin classorg.jdom2.Text
-
invoke
- Specified by:
invokein interfacePluginElement
-
executeParse
- Specified by:
executeParsein interfacePluginElement- Throws:
PluginException
-
parsePluginLine
public static PluginContent parsePluginLine(Context context, String commandline, int pos) throws PluginException Parses a plugin invocation and returns a DOM element.- Parameters:
context- The WikiContextcommandline- The line to parsepos- The position in the stream parsing.- Returns:
- A DOM element
- Throws:
PluginException- If plugin invocation is faulty- Since:
- 2.10.0
-