Class SDKHelper


  • public class SDKHelper
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String GUID_NULL  
    • Constructor Summary

      Constructors 
      Constructor Description
      SDKHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int fixInt​(RequestKeys rk, java.lang.String param, int defaultValue, boolean isZeroLengthValid)
      Transforms the string sent as parameter into an int value.
      static int fixInt​(java.lang.String fixedValue, int defaultValue)
      Transforms the string sent as parameter into an int value.
      static java.lang.String getInboxMessageExpiredDisplayMessage​(ResultSetBean bean)  
      static java.lang.String getInboxMessageExpiredDisplayMessage​(java.lang.String message, java.lang.String objType)  
      static boolean isGuidEmpty​(java.lang.String id)
      Check if it the guid is empty or not.
      static java.lang.String localizeDouble​(java.lang.String doubleValue, java.lang.String localeID)
      Converts a double to the specified locale
      static java.lang.String localizeDoubleToEnglish​(java.lang.String doubleValue)
      Converts a double to English locale
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SDKHelper

        public SDKHelper()
    • Method Detail

      • isGuidEmpty

        public static boolean isGuidEmpty​(java.lang.String id)
        Check if it the guid is empty or not.
        Parameters:
        id - the guid
        Returns:
        true if id is null or GUID_NULL
      • fixInt

        public static int fixInt​(java.lang.String fixedValue,
                                 int defaultValue)
        Transforms the string sent as parameter into an int value.
        Parameters:
        fixedValue - String containing the value to transform into an integer
        defaultValue - int with the default value of the parameter
        Returns:
        the value of the parameter as an int. If an error is generated while the conversion the default value will be used.
      • fixInt

        public static int fixInt​(RequestKeys rk,
                                 java.lang.String param,
                                 int defaultValue,
                                 boolean isZeroLengthValid)
        Transforms the string sent as parameter into an int value.
        Parameters:
        rk - RequestKeys object initialized
        param - String containing the name of the parameter to search for
        defaultValue - String with the default value of the parameter
        isZeroLengthValid - boolean flag indicating if the value of the parameter can be zero-length
        Returns:
        the value of the parameter. If not found, or the length of the value is zero and this is not allowed, the default value will be used. Otherwise, the value found for the parameter will be the output of the method.
      • localizeDouble

        public static java.lang.String localizeDouble​(java.lang.String doubleValue,
                                                      java.lang.String localeID)
        Converts a double to the specified locale
        Parameters:
        doubleValue - value to localize
        localeID - locale to localize to
        Returns:
        localized value
      • localizeDoubleToEnglish

        public static java.lang.String localizeDoubleToEnglish​(java.lang.String doubleValue)
        Converts a double to English locale
        Parameters:
        doubleValue - value to localize
        Returns:
        value localized
      • getInboxMessageExpiredDisplayMessage

        public static java.lang.String getInboxMessageExpiredDisplayMessage​(ResultSetBean bean)
      • getInboxMessageExpiredDisplayMessage

        public static java.lang.String getInboxMessageExpiredDisplayMessage​(java.lang.String message,
                                                                            java.lang.String objType)