Package org.apache.wiki.api.plugin

# Interface PluginElement

public interface PluginElement
Exposes the contents of a plugin in a WikiDocument DOM tree.

## Method Summary

Modifier and Type
Method
Description
`void`
`executeParse(Context context)`
Executes the executeParse() method.
`String`
`getParameter(String name)`
Returns a parameter value from the parameter map.
`Map<String,String>`
`getParameters()`
Returns the parameter map given in the constructor.
`String`
`getPluginName()`
Returns the name of the plugin invoked by the DOM element.
`String`
`getText()`
The main invocation for the plugin.
`String`
`getValue()`
Returns the rendered plugin.
`String`
`invoke(Context context)`
Performs plugin invocation and return its contents.

## Method Details

### getPluginName

String getPluginName()
Returns the name of the plugin invoked by the DOM element.

Returns:
  Name of the plugin
Since:
  2.5.7

### getParameter

String getParameter(String name)
Returns a parameter value from the parameter map.

Parameters:
  `name` - the name of the parameter.
Returns:
  The value from the map, or null, if no such parameter exists.

### getParameters

Map<String,String> getParameters()
Returns the parameter map given in the constructor.

Returns:
  The parameter map.

### getValue

String getValue()
Returns the rendered plugin. Only calls getText().

Returns:
  HTML

### getText

String getText()
The main invocation for the plugin. When the getText() is called, it invokes the plugin and returns its contents. If there is no Document yet, only returns the plugin name itself.

Returns:
  The plugin rendered according to the options set in the WikiContext.

### invoke

String invoke(Context context)
Performs plugin invocation and return its contents.

Parameters:
  `context` - WikiContext in which the plugin is executed. Must NOT be null.
Returns:
  plugin contents.

### executeParse

void executeParse(Context context) throws PluginException
Executes the executeParse() method.

Parameters:
  `context` - The WikiContext
Throws:
  `PluginException` - If something goes wrong.