-
- Type Parameters:
T
- The type of the value.
- All Superinterfaces:
ValueHolder
- All Known Implementing Classes:
Param
,PathParam
,SimpleParam
public interface ParamHolder<T> extends ValueHolder
This interface represents a (request) parameter holder which extendsValueHolder
withgetName()
method to obtain the parameter name associated with the parameter value and changes thegetLocalValue()
method to return the original, unconverted value and changes thegetValue()
method to return the value converted toString
. This is used in among others theFaces.getBookmarkableURL(String, java.util.Collection, boolean)
.- Since:
- 1.7
- Author:
- Bauke Scholtz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Converter<T>
getConverter()
Returns the converter, if any.T
getLocalValue()
Returns the original, unconverted value of the parameter.String
getName()
Returns the name of the parameter.String
getValue()
Returns the value of the parameter asString
.-
Methods inherited from interface jakarta.faces.component.ValueHolder
setConverter, setValue
-
-
-
-
Method Detail
-
getName
String getName()
Returns the name of the parameter.- Returns:
- The name of the parameter.
-
getLocalValue
T getLocalValue()
Returns the original, unconverted value of the parameter.- Specified by:
getLocalValue
in interfaceValueHolder
- Returns:
- The original, unconverted value of the parameter.
-
getConverter
Converter<T> getConverter()
Returns the converter, if any.- Specified by:
getConverter
in interfaceValueHolder
- Returns:
- The converter, if any.
-
getValue
String getValue()
Returns the value of the parameter asString
. If the converter is set, or if any converter is available byApplication.createConverter(Class)
, passing the value's class, then return the result ofConverter.getAsString(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent, Object)
, otherwise return theObject.toString()
of the value.- Specified by:
getValue
in interfaceValueHolder
- Returns:
- The value of the parameter as
String
. - See Also:
Converter.getAsString(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent, Object)
-
-