Package org.xwiki.displayer
Interface HTMLDisplayerManager
-
@Role public interface HTMLDisplayerManager
Provides a way to access the HTML Displayer for the given type.- Since:
- 10.11RC1
- Version:
- $Id: 7e7a9929cd7491897c585973ef0c49f71e329f20 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> String
display(Type targetType, T value)
<T> String
display(Type targetType, T value, Map<String,String> parameters)
<T> String
display(Type targetType, T value, Map<String,String> parameters, String mode)
<T> HTMLDisplayer<T>
getHTMLDisplayer(Type targetType)
Retrieve the appropriate HTML Displayer based on the given type.<T> HTMLDisplayer<T>
getHTMLDisplayer(Type targetType, String roleHint)
Retrieve the appropriate HTML Displayer based on the given type and hint.
-
-
-
Method Detail
-
getHTMLDisplayer
<T> HTMLDisplayer<T> getHTMLDisplayer(Type targetType) throws HTMLDisplayerException
Retrieve the appropriate HTML Displayer based on the given type.- Type Parameters:
T
- the type of the HTML Displayer- Parameters:
targetType
- the type used to retrieve the HTML Displayer- Returns:
- the HTML Displayer of type
<T>
- Throws:
HTMLDisplayerException
- if the HTML Displayer cannot be found
-
getHTMLDisplayer
<T> HTMLDisplayer<T> getHTMLDisplayer(Type targetType, String roleHint) throws HTMLDisplayerException
Retrieve the appropriate HTML Displayer based on the given type and hint.- Type Parameters:
T
- the type of the HTML Displayer- Parameters:
targetType
- the type used to retrieve the HTML DisplayerroleHint
- the component hint. Could be null for default component- Returns:
- the HTML Displayer of type
<T>
- Throws:
HTMLDisplayerException
- if the HTML Displayer cannot be found
-
display
<T> String display(Type targetType, T value) throws HTMLDisplayerException
- Type Parameters:
T
- the type of the HTML Displayer- Parameters:
targetType
- the type used to retrieve the HTML Displayervalue
- the value on which the display is based on- Returns:
- the html element based on the value and the type
- Throws:
HTMLDisplayerException
- if an error occurs during the display
-
display
<T> String display(Type targetType, T value, Map<String,String> parameters) throws HTMLDisplayerException
- Type Parameters:
T
- the type of the HTML Displayer- Parameters:
targetType
- the type used to retrieve the HTML Displayervalue
- the value on which the display is based onparameters
- parameters used while generating the html. Could be the attributes of an input for instance.- Returns:
- the html element based on the value and the type
- Throws:
HTMLDisplayerException
- if an error occurs during the display
-
display
<T> String display(Type targetType, T value, Map<String,String> parameters, String mode) throws HTMLDisplayerException
- Type Parameters:
T
- the type of the HTML Displayer- Parameters:
targetType
- the type used to retrieve the HTML Displayervalue
- the value on which the display is based onparameters
- parameters used while generating the html. Could be the attributes of an input for instance.mode
- the display mode (view, edit, ...)- Returns:
- the html element based on the value and the type
- Throws:
HTMLDisplayerException
- if an error occurs during the display
-
-