Class BaseConverter

java.lang.Object
com.webmethods.caf.faces.convert.BaseConverter
All Implemented Interfaces:
Converter
Direct Known Subclasses:
CollectionConverter, CurrencyNumberConverter, FormattedBooleanConverter, FormattedDateTimeConverter, FormattedNumberConverter, MapConverter, PortalURIConverter, PrincipalAttributeValueSourceConverter, StringArrayConverter, URLConverter

public abstract class BaseConverter extends Object implements Converter
Created by IntelliJ IDEA. Date: Jan 3, 2006 Time: 6:01:33 PM To change this template use File | Settings | File Templates.
  • Field Details

  • Constructor Details

    • BaseConverter

      public BaseConverter()
  • Method Details

    • validateFromString

      public void validateFromString(FacesContext context, UIComponent component, String value) throws ConverterException
      Throws:
      ConverterException
    • validateFromObject

      public void validateFromObject(FacesContext context, UIComponent component, Object value) throws ConverterException
      Throws:
      ConverterException
    • getBadCommonInputMsg

      public ConverterException getBadCommonInputMsg(String sValParam)
    • getBadInputMsg

      public ConverterException getBadInputMsg(String sValParam)
    • getBadInputMsg

      public ConverterException getBadInputMsg(String sValParam, Throwable ex)
    • getBadInputTypeMsg

      public ConverterException getBadInputTypeMsg(String sValParam, String sValType, String saValCanCnvrt)
    • getBadInputStringTypeMsg

      public ConverterException getBadInputStringTypeMsg(String saValCanCnvrt)
    • setRegion

      public void setRegion(String region)
      setRegion Set the locale for the validated to use.
      Parameters:
      region - the local object to use. Null will make the locale use the session's locale.
    • getRegion

      public String getRegion()
      getRegion Set the locale for the validated to use. returns the Locale.toString(). the Construct a locale from a language code. Null or spaces will make the locale use the session's locale. also see java.util.Locale
    • getClientLocale

      protected Locale getClientLocale(FacesContext context)
      getRegion Set the locale for the validated to use. returns the Locale.toString(). the Construct a locale from a language code. Null or spaces will make the locale use the session's locale. also see java.util.Locale
    • getClientTimeZone

      protected TimeZone getClientTimeZone(FacesContext context)
      Get the user's time zone for the responce header. If this fails use the time zone for the default jvm.
    • isStringObj

      public boolean isStringObj(Object obj)
      isStringObj will check the class and see if the string is not just full of spaces.
      Parameters:
      obj -
      Returns:
      true of the input object is a non-empty string
    • isValue

      public boolean isValue(String sValue)
    • setCustomErrorMsg

      public void setCustomErrorMsg(String sMsg)
      setCustomMsg Set a localized massage used if the convervion fails.
      Parameters:
      sMsg - message to display for conversion errors.
    • getCustomErrorMsg

      public String getCustomErrorMsg()
      getCustomMsg get the user defined message for a convervion failure.
      Returns:
      String user defined error message.
    • setshowCAFErrorMsg

      public void setshowCAFErrorMsg(boolean bShow)
      Show the exception cause if availible.
      Parameters:
      bShow - exception cause if availible.
    • getshowCAFErrorMsg

      public boolean getshowCAFErrorMsg()
      Show the exception cause if availible.
      Returns:
      boolean show exception if availible.
    • isBlankValue

      protected boolean isBlankValue(String value)