Package org.seedstack.seed.el
Interface ELContextBuilder.ELPropertyProvider
-
- Enclosing interface:
- ELContextBuilder
public static interface ELContextBuilder.ELPropertyProviderGrammar to add properties and methods to an ELContext.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.el.ELContextbuild()ELContextBuilder.ELPropertyProviderwithFunction(String prefix, String localName, Method method)Adds a function which will be available in the EL.ELContextBuilder.ELPropertyProviderwithProperty(String name, Object object)Adds property to the EL.
-
-
-
Method Detail
-
build
javax.el.ELContext build()
- Returns:
- the context used by the service.
-
withProperty
ELContextBuilder.ELPropertyProvider withProperty(String name, Object object)
Adds property to the EL.- Parameters:
name- the name to use in the ELobject- the associated object- Returns:
- ELPropertyProvider
- Throws:
SeedException- if the name is blank
-
withFunction
ELContextBuilder.ELPropertyProvider withFunction(String prefix, String localName, Method method)
Adds a function which will be available in the EL. For instance:.withFunction("maths", "max", Math.class.getMethod("max", double.class, double.class))Provides the function max in the EL usable as follow:
"${maths:max(1,2)}"- Parameters:
prefix- the method prefixlocalName- the method namemethod- the actual method to invoke- Returns:
- ELPropertyProvider
- Throws:
SeedException- if the localName is blank
-
-