public abstract class BaseConverter extends Object implements Converter
Modifier and Type | Field and Description |
---|---|
static String |
BAD_PARAMETER_LONG_ID |
static String |
BAD_PARAMETER_SHORT_ID |
static String |
BAD_STRING_LONG_ID |
static String |
BAD_STRING_SHORT_ID |
static String |
BAD_TYPE_LONG_ID |
static String |
BAD_TYPE_SHORT_ID |
protected boolean |
m_bshowCAFErrorMsg |
protected Locale |
m_clientLocale |
protected String |
m_CustomMessage |
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
Constructor and Description |
---|
BaseConverter() |
Modifier and Type | Method and Description |
---|---|
ConverterException |
getBadCommonInputMsg(String sValParam) |
ConverterException |
getBadInputMsg(String sValParam) |
ConverterException |
getBadInputMsg(String sValParam,
Throwable ex) |
ConverterException |
getBadInputStringTypeMsg(String saValCanCnvrt) |
ConverterException |
getBadInputTypeMsg(String sValParam,
String sValType,
String saValCanCnvrt) |
protected Locale |
getClientLocale(FacesContext context)
getRegion Set the locale for the validated to use.
|
protected TimeZone |
getClientTimeZone(FacesContext context)
Get the user's time zone for the responce header.
|
String |
getCustomErrorMsg()
getCustomMsg get the user defined message for a convervion failure.
|
String |
getRegion()
getRegion Set the locale for the validated to use.
|
boolean |
getshowCAFErrorMsg()
Show the exception cause if availible.
|
protected boolean |
isBlankValue(String value) |
boolean |
isStringObj(Object obj)
isStringObj will check the class and see if the string is
not just full of spaces.
|
boolean |
isValue(String sValue) |
void |
setCustomErrorMsg(String sMsg)
setCustomMsg Set a localized massage used if the convervion fails.
|
void |
setRegion(String region)
setRegion Set the locale for the validated to use.
|
void |
setshowCAFErrorMsg(boolean bShow)
Show the exception cause if availible.
|
void |
validateFromObject(FacesContext context,
UIComponent component,
Object value) |
void |
validateFromString(FacesContext context,
UIComponent component,
String value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsObject, getAsString
public static final String BAD_PARAMETER_SHORT_ID
public static final String BAD_TYPE_SHORT_ID
public static final String BAD_STRING_SHORT_ID
public static final String BAD_PARAMETER_LONG_ID
public static final String BAD_TYPE_LONG_ID
public static final String BAD_STRING_LONG_ID
protected Locale m_clientLocale
protected String m_CustomMessage
protected boolean m_bshowCAFErrorMsg
public void validateFromString(FacesContext context, UIComponent component, String value) throws ConverterException
ConverterException
public void validateFromObject(FacesContext context, UIComponent component, Object value) throws ConverterException
ConverterException
public ConverterException getBadCommonInputMsg(String sValParam)
public ConverterException getBadInputMsg(String sValParam)
public ConverterException getBadInputMsg(String sValParam, Throwable ex)
public ConverterException getBadInputTypeMsg(String sValParam, String sValType, String saValCanCnvrt)
public ConverterException getBadInputStringTypeMsg(String saValCanCnvrt)
public void setRegion(String region)
region
- the local object to use. Null will make the
locale use the session's locale.public String getRegion()
protected Locale getClientLocale(FacesContext context)
protected TimeZone getClientTimeZone(FacesContext context)
public boolean isStringObj(Object obj)
obj
- public boolean isValue(String sValue)
public void setCustomErrorMsg(String sMsg)
sMsg
- message to display for conversion errors.public String getCustomErrorMsg()
public void setshowCAFErrorMsg(boolean bShow)
bShow
- exception cause if availible.public boolean getshowCAFErrorMsg()
protected boolean isBlankValue(String value)