Class ValidatorUtility

java.lang.Object
org.serviceconnector.util.ValidatorUtility

public final class ValidatorUtility extends Object
The Class ValidatorUtility. Provides validation functions for checking header fields of requestFs.
Author:
JTraber
  • Method Details

    • validateDateTime

      public static void validateDateTime(String dateTimeString, SCMPError error) throws SCMPValidatorException
      Validate date time.
      Parameters:
      dateTimeString - the date time string
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateDateTime

      public static void validateDateTime(Date dateTime, SCMPError error) throws SCMPValidatorException
      Validate date time.
      Parameters:
      dateTime - the date and time
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateLong

      public static void validateLong(long lowerLimitInc, String longStringValue, SCMPError error) throws SCMPValidatorException
      Validate long.
      Parameters:
      lowerLimitInc - the lower inclusive limit
      longStringValue - the integer string value to validate
      error - the error to be thrown in case of an invalidation
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateLong

      public static void validateLong(long lowerLimitInc, long longValue, SCMPError error) throws SCMPValidatorException
      Validate long.
      Parameters:
      lowerLimitInc - the lower limit inclusive
      longValue - the integer value
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateLong

      public static void validateLong(long lowerLimitInc, String longStringValue, long upperLimitInc, SCMPError error) throws SCMPValidatorException
      Validate long.
      Parameters:
      lowerLimitInc - the lower inclusive limit
      longStringValue - the integer string value to validate
      upperLimitInc - the upper inclusive limit
      error - the error to be thrown in case of an invalidation
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateLong

      public static void validateLong(long lowerLimitInc, long longValue, long upperLimitInc, SCMPError error) throws SCMPValidatorException
      Validate long.
      Parameters:
      lowerLimitInc - the lower limit inclusive
      longValue - the integer value
      upperLimitInc - the upper limit inc
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateIpAddressList

      public static void validateIpAddressList(String ipAddressListString) throws SCMPValidatorException
      Validate ip address list.
      Parameters:
      ipAddressListString - the ip address list string
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateInt

      public static void validateInt(int lowerLimitInc, String intStringValue, SCMPError error) throws SCMPValidatorException
      Validate integer.
      Parameters:
      lowerLimitInc - the lower inclusive limit
      intStringValue - the integer string value
      error - the error to be thrown in case of an invalidation
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateInt

      public static void validateInt(int lowerLimitInc, int intValue, SCMPError error) throws SCMPValidatorException
      Validate integer.
      Parameters:
      lowerLimitInc - the lower limit inclusive
      intValue - the integer value
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateInt

      public static void validateInt(int lowerLimitInc, String intStringValue, int upperLimitInc, SCMPError error) throws SCMPValidatorException
      Validate integer.
      Parameters:
      lowerLimitInc - the lower inclusive limit
      intStringValue - the integer string value to validate
      upperLimitInc - the upper inclusive limit
      error - the error to be thrown in case of an invalidation
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateInt

      public static void validateInt(int lowerLimitInc, int intValue, int upperLimitInc, SCMPError error) throws SCMPValidatorException
      Validate integer.
      Parameters:
      lowerLimitInc - the lower limit inclusive
      intValue - the integer value
      upperLimitInc - the upper limit inclusive
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateStringLengthIgnoreNull

      public static void validateStringLengthIgnoreNull(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error) throws SCMPValidatorException
      Validate string length.
      Parameters:
      minSizeInc - the min size inc
      stringValue - the string value
      maxSizeInc - the max size inc
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateStringLengthTrim

      public static void validateStringLengthTrim(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error) throws SCMPValidatorException
      Validate string. Trims string before length control.
      Parameters:
      minSizeInc - the minimum inclusive size
      stringValue - the string value
      maxSizeInc - the max inclusive size
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateStringLength

      public static void validateStringLength(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error) throws SCMPValidatorException
      Validate string length.
      Parameters:
      minSizeInc - the minimum size inclusive
      stringValue - the string value
      maxSizeInc - the max size inclusive
      error - the error
      Throws:
      SCMPValidatorException - the sCMP validator exception
    • validateMask

      public static void validateMask(String mask, SCMPError error) throws SCMPValidatorException
      Validate subscription mask.
      Parameters:
      mask - the mask value
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception
    • validateCachingMethod

      public static void validateCachingMethod(String cachingMethod, SCMPError error) throws SCMPValidatorException
      Validate caching method.
      Parameters:
      cachingMethod - the caching method
      error - the error
      Throws:
      SCMPValidatorException - the SCMP validator exception