Package com.sun.faces.cdi
Class CdiConverter
- java.lang.Object
-
- com.sun.faces.cdi.CdiConverter
-
- All Implemented Interfaces:
StateHolder
,Converter
public class CdiConverter extends Object implements Converter, StateHolder
A delegate to the CDI managed converter.
-
-
Field Summary
-
Fields inherited from interface jakarta.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
-
-
Constructor Summary
Constructors Constructor Description CdiConverter()
Constructor.CdiConverter(String converterId, Class forClass, Converter delegate)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAsObject(FacesContext facesContext, UIComponent component, String value)
Get the object.String
getAsString(FacesContext facesContext, UIComponent component, Object value)
Get the string representation.boolean
isTransient()
Is the converter transient.void
restoreState(FacesContext facesContext, Object state)
Restore the state.Object
saveState(FacesContext facesContext)
Save the state.void
setTransient(boolean transientValue)
Set the converter to transient.
-
-
-
Method Detail
-
getAsObject
public Object getAsObject(FacesContext facesContext, UIComponent component, String value)
Get the object.- Specified by:
getAsObject
in interfaceConverter
- Parameters:
facesContext
- the Faces context.component
- the UI component.value
- the value.- Returns:
- the object.
-
getAsString
public String getAsString(FacesContext facesContext, UIComponent component, Object value)
Get the string representation.- Specified by:
getAsString
in interfaceConverter
- Parameters:
facesContext
- the Faces context.component
- the UI component.value
- the value.- Returns:
- the string.
-
saveState
public Object saveState(FacesContext facesContext)
Save the state.- Specified by:
saveState
in interfaceStateHolder
- Parameters:
facesContext
- the Faces context.- Returns:
- the saved object.
-
restoreState
public void restoreState(FacesContext facesContext, Object state)
Restore the state.- Specified by:
restoreState
in interfaceStateHolder
- Parameters:
facesContext
- the Faces context.state
- the state.
-
isTransient
public boolean isTransient()
Is the converter transient.- Specified by:
isTransient
in interfaceStateHolder
- Returns:
- false
-
setTransient
public void setTransient(boolean transientValue)
Set the converter to transient.We ignore the call as our proxy is always non-transient.
- Specified by:
setTransient
in interfaceStateHolder
- Parameters:
transientValue
- whether converter should be set to transient
-
-