Top Description Fields Constructors Methods
jakarta.faces.convert

public Class UUIDConverter

extends Object
implements Converter<UUID>
Class Inheritance
All Implemented Interfaces
jakarta.faces.convert.Converter
Imports
java.util.UUID, jakarta.faces.component.UIComponent, jakarta.faces.context.FacesContext

Converter implementation for java.util.UUID values.

Since
4.1

Field Summary

Modifier and TypeField and Description
public static final String
CONVERTER_ID

The standard converter id for this converter.

public static final String
STRING_ID

The message identifier of the jakarta.faces.application.FacesMessage to be created if the conversion of the UUID value to String fails.

public static final String
UUID_ID

The message identifier of the jakarta.faces.application.FacesMessage to be created if the conversion to UUID fails.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public UUID
getAsObject(FacesContext
FacesContext for the request being processed
context
,
UIComponent
UIComponent with which this model object value is associated
component
,
String
String value to be converted (may be null)
value
)

Implements jakarta.faces.convert.Converter.getAsObject.

Convert the specified string value, which is associated with the specified UIComponent, into a model data object that is appropriate for being stored during the Process Validations phase of the request processing lifecycle.

public String
getAsString(FacesContext
FacesContext for the request being processed
context
,
UIComponent
UIComponent with which this model object value is associated
component
,
UUID
Model object value to be converted (may be null)
value
)

Implements jakarta.faces.convert.Converter.getAsString.

Convert the specified model object value, which is associated with the specified UIComponent, into a String that is suitable for being included in the response generated during the Render Response phase of the request processing lifeycle.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONVERTER_IDback to summary
public static final String CONVERTER_ID

The standard converter id for this converter.

STRING_IDback to summary
public static final String STRING_ID

The message identifier of the jakarta.faces.application.FacesMessage to be created if the conversion of the UUID value to String fails. The message format string for this message may optionally include the following placeholders:

  • {0} relaced by the unconverted value.
  • {1} replaced by a String whose value is the label of the input component that produced this message.
UUID_IDback to summary
public static final String UUID_ID

The message identifier of the jakarta.faces.application.FacesMessage to be created if the conversion to UUID fails. The message format string for this message may optionally include the following placeholders:

  • {0} replaced by the unconverted value.
  • {1} replaced by an example value.
  • {2} replaced by a String whose value is the label of the input component that produced this message.

Constructor Detail

UUIDConverterback to summary
public UUIDConverter()

Method Detail

getAsObjectback to summary
public UUID getAsObject(FacesContext context, UIComponent component, String value)

Implements jakarta.faces.convert.Converter.getAsObject.

Doc from jakarta.faces.convert.Converter.getAsObject.

Convert the specified string value, which is associated with the specified UIComponent, into a model data object that is appropriate for being stored during the Process Validations phase of the request processing lifecycle.

Parameters
context:FacesContext

FacesContext for the request being processed

component:UIComponent

UIComponent with which this model object value is associated

value:String

String value to be converted (may be null)

Returns:UUID

null if the value to convert is null, otherwise the result of the conversion

Annotations
@Override
Exceptions
ConverterException:
if conversion cannot be successfully performed
NullPointerException:
if context or component is null
getAsStringback to summary
public String getAsString(FacesContext context, UIComponent component, UUID value)

Implements jakarta.faces.convert.Converter.getAsString.

Doc from jakarta.faces.convert.Converter.getAsString.

Convert the specified model object value, which is associated with the specified UIComponent, into a String that is suitable for being included in the response generated during the Render Response phase of the request processing lifeycle.

Parameters
context:FacesContext

FacesContext for the request being processed

component:UIComponent

UIComponent with which this model object value is associated

value:UUID

Model object value to be converted (may be null)

Returns:String

a zero-length String if value is null, otherwise the result of the conversion

Annotations
@Override
Exceptions
ConverterException:
if conversion cannot be successfully performed
NullPointerException:
if context or component is null