Top Description Fields Constructors Methods
com.sun.faces.cdi

public Class CdiConverter

extends Object
implements Converter, StateHolder
Class Inheritance
All Implemented Interfaces
javax.faces.component.StateHolder, javax.faces.convert.Converter
Imports
javax.faces.component.StateHolder, .UIComponent, javax.faces.context.FacesContext, javax.faces.convert.Converter

A delegate to the CDI managed converter.

Field Summary

Modifier and TypeField and Description
private String
converterId

Stores the converter-id (if any).

private transient Converter<T>
delegate

Stores a transient reference to the CDI managed converter.

private Class<T>
forClass

Stores the for-class (if any).

Constructor Summary

AccessConstructor and Description
public
CdiConverter()

Constructor.

public
CdiConverter(String
the converter id.
converterId
,
Class<T>
the for class.
forClass
,
Converter<T>
the delegate.
delegate
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the object.
getAsObject
(FacesContext
the Faces context.
facesContext
,
UIComponent
the UI component.
component
,
String
the value.
value
)

Implements javax.faces.convert.Converter.getAsObject.

Get the object.
public String

Returns:

the string.
getAsString
(FacesContext
the Faces context.
facesContext
,
UIComponent
the UI component.
component
,
Object
the value.
value
)

Implements javax.faces.convert.Converter.getAsString.

Get the string representation.
private Converter<T>

Returns:

the delegate.
getDelegate
(FacesContext
the Faces context.
facesContext
)

Get the delegate.

public boolean

Returns:

false
isTransient
()

Implements javax.faces.component.StateHolder.isTransient.

Is the converter transient.
public void
restoreState(FacesContext
the Faces context.
facesContext
,
Object
the state.
state
)

Implements javax.faces.component.StateHolder.restoreState.

Restore the state.
public Object

Returns:

the saved object.
saveState
(FacesContext
the Faces context.
facesContext
)

Implements javax.faces.component.StateHolder.saveState.

Save the state.
public void
setTransient(boolean transientValue)

Implements javax.faces.component.StateHolder.setTransient.

Set the converter to transient.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

converterIdback to summary
private String converterId

Stores the converter-id (if any).

delegateback to summary
private transient Converter<T> delegate

Stores a transient reference to the CDI managed converter.

forClassback to summary
private Class<T> forClass

Stores the for-class (if any).

Constructor Detail

CdiConverterback to summary
public CdiConverter()

Constructor.

CdiConverterback to summary
public CdiConverter(String converterId, Class<T> forClass, Converter<T> delegate)

Constructor.

Parameters
converterId:String

the converter id.

forClass:Class<T>

the for class.

delegate:Converter<T>

the delegate.

Method Detail

getAsObjectback to summary
public Object getAsObject(FacesContext facesContext, UIComponent component, String value)

Implements javax.faces.convert.Converter.getAsObject.

Get the object.

Parameters
facesContext:FacesContext

the Faces context.

component:UIComponent

the UI component.

value:String

the value.

Returns:Object

the object.

Annotations
@Override
getAsStringback to summary
public String getAsString(FacesContext facesContext, UIComponent component, Object value)

Implements javax.faces.convert.Converter.getAsString.

Get the string representation.

Parameters
facesContext:FacesContext

the Faces context.

component:UIComponent

the UI component.

value:Object

the value.

Returns:String

the string.

Annotations
@Override
getDelegateback to summary
private Converter<T> getDelegate(FacesContext facesContext)

Get the delegate.

Parameters
facesContext:FacesContext

the Faces context.

Returns:Converter<T>

the delegate.

isTransientback to summary
public boolean isTransient()

Implements javax.faces.component.StateHolder.isTransient.

Is the converter transient.

Returns:boolean

false

Annotations
@Override
restoreStateback to summary
public void restoreState(FacesContext facesContext, Object state)

Implements javax.faces.component.StateHolder.restoreState.

Restore the state.

Parameters
facesContext:FacesContext

the Faces context.

state:Object

the state.

Annotations
@Override
saveStateback to summary
public Object saveState(FacesContext facesContext)

Implements javax.faces.component.StateHolder.saveState.

Save the state.

Parameters
facesContext:FacesContext

the Faces context.

Returns:Object

the saved object.

Annotations
@Override
setTransientback to summary
public void setTransient(boolean transientValue)

Implements javax.faces.component.StateHolder.setTransient.

Set the converter to transient.

We ignore the call as our proxy is always non-transient.

Annotations
@Override