Package org.xwiki.edit
Class AbstractEditor<D>
- java.lang.Object
-
- org.xwiki.edit.AbstractEditor<D>
-
- Type Parameters:
D
- the type of data that can be edited by this editor
- All Implemented Interfaces:
Editor<D>
- Direct Known Subclasses:
AbstractTemplateEditor
public abstract class AbstractEditor<D> extends Object implements Editor<D>
Base class for editors that take their input from theScriptContext
.- Since:
- 8.2RC1
- Version:
- $Id: 2494760104d40ac51376231da6263ebee1eaf88d $
-
-
Constructor Summary
Constructors Constructor Description AbstractEditor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>
getEditContext(D data, Map<String,Object> parameters)
protected abstract String
render()
String
render(D data, Map<String,Object> parameters)
Generates the HTML code needed to edit the given data.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xwiki.edit.Editor
getDescriptor
-
-
-
-
Method Detail
-
render
public String render(D data, Map<String,Object> parameters) throws EditException
Description copied from interface:Editor
Generates the HTML code needed to edit the given data.- Specified by:
render
in interfaceEditor<D>
- Parameters:
data
- the data to editparameters
- editor parameters- Returns:
- the HTML code that displays the editor
- Throws:
EditException
- if the editor fails to be rendered
-
getEditContext
protected Map<String,Object> getEditContext(D data, Map<String,Object> parameters)
-
render
protected abstract String render() throws EditException
- Throws:
EditException
-
-