psdi.webclient.system.runtime

Class Validation

  • java.lang.Object
    • psdi.webclient.system.runtime.Validation


  • public class Validation
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  Validation.DateOrder 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Validation() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.Map createRegexPatterns(UserInfo userInfo)
      Creates regex patterns, based on locale.
      static java.lang.String getAmountRegex(java.util.Locale locale)
      returns amount regex based on locale
      static java.lang.String getDateRegex(java.util.Locale locale, java.lang.String calType, boolean allowReversedDayAndMonth)
      Returns a date regex based on locale, caltype and whether we allow revers day month in long month entries
      static java.lang.String getDateTimeRegex(java.util.Locale locale, java.lang.String date, java.lang.String time) 
      static java.lang.String getDecimalRegex(java.util.Locale locale)
      returns decimal regex based on locale
      static java.lang.String getDurationRegex(java.util.Locale locale)
      returns duration regex based on locale
      static java.lang.String getIntegerRegex(java.util.Locale locale)
      returns integer regex based on locale
      static java.lang.String getLongMonthRegex(java.util.Locale locale) 
      static java.lang.String getTimeRegex(java.util.Locale locale) 
      • Methods inherited from class java.lang.Object

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

      • Validation

        public Validation()
    • Method Detail

      • getLongMonthRegex

        public static java.lang.String getLongMonthRegex(java.util.Locale locale)
      • getDateRegex

        public static java.lang.String getDateRegex(java.util.Locale locale,
                                                    java.lang.String calType,
                                                    boolean allowReversedDayAndMonth)
        Returns a date regex based on locale, caltype and whether we allow revers day month in long month entries
        Parameters:
        allowReversedDayAndMonth - - should we allow reverse on long day/month
      • getIntegerRegex

        public static java.lang.String getIntegerRegex(java.util.Locale locale)
        returns integer regex based on locale
      • getDecimalRegex

        public static java.lang.String getDecimalRegex(java.util.Locale locale)
        returns decimal regex based on locale
      • getDurationRegex

        public static java.lang.String getDurationRegex(java.util.Locale locale)
        returns duration regex based on locale
      • getAmountRegex

        public static java.lang.String getAmountRegex(java.util.Locale locale)
        returns amount regex based on locale
      • getTimeRegex

        public static java.lang.String getTimeRegex(java.util.Locale locale)
      • getDateTimeRegex

        public static java.lang.String getDateTimeRegex(java.util.Locale locale,
                                                        java.lang.String date,
                                                        java.lang.String time)
      • createRegexPatterns

        public static java.util.Map createRegexPatterns(UserInfo userInfo)
        Creates regex patterns, based on locale. Will create the first time they are requested.