org.apache.shale.examples.mailreaderjpa
Class ProtocolConverter

java.lang.Object
  extended by org.apache.shale.examples.mailreaderjpa.ProtocolConverter
All Implemented Interfaces:
javax.faces.convert.Converter

public class ProtocolConverter
extends Object
implements javax.faces.convert.Converter

JSF Converter for mapping between a Protocol and its string representation.


Constructor Summary
ProtocolConverter()
           
 
Method Summary
 Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
          Return the Protocol instance corresponding to the specified string representation.
 String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value)
          Return the string representation of the specified Protocol value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolConverter

public ProtocolConverter()
Method Detail

getAsString

public String getAsString(javax.faces.context.FacesContext context,
                          javax.faces.component.UIComponent component,
                          Object value)
                   throws javax.faces.convert.ConverterException

Return the string representation of the specified Protocol value.

Specified by:
getAsString in interface javax.faces.convert.Converter
Parameters:
context - FacesContext for the current request
component - UIComponent whose value is being converted
value - Protocol being converted
Throws:
javax.faces.convert.ConverterException - if a conversion error occurs

getAsObject

public Object getAsObject(javax.faces.context.FacesContext context,
                          javax.faces.component.UIComponent component,
                          String value)
                   throws javax.faces.convert.ConverterException

Return the Protocol instance corresponding to the specified string representation.

Specified by:
getAsObject in interface javax.faces.convert.Converter
Parameters:
context - FacesContext for the current request
component - UIComponent whose value is being converted
value - String representation of the value
Throws:
javax.faces.convert.ConverterException - if a conversion error occurs


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.