Package org.serviceconnector.util
Class ValidatorUtility
java.lang.Object
org.serviceconnector.util.ValidatorUtility
The Class ValidatorUtility. Provides validation functions for checking header fields of requestFs.
- Author:
- JTraber
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidateCachingMethod(String cachingMethod, SCMPError error) Validate caching method.static voidvalidateDateTime(String dateTimeString, SCMPError error) Validate date time.static voidvalidateDateTime(Date dateTime, SCMPError error) Validate date time.static voidvalidateInt(int lowerLimitInc, int intValue, int upperLimitInc, SCMPError error) Validate integer.static voidvalidateInt(int lowerLimitInc, int intValue, SCMPError error) Validate integer.static voidvalidateInt(int lowerLimitInc, String intStringValue, int upperLimitInc, SCMPError error) Validate integer.static voidvalidateInt(int lowerLimitInc, String intStringValue, SCMPError error) Validate integer.static voidvalidateIpAddressList(String ipAddressListString) Validate ip address list.static voidvalidateLong(long lowerLimitInc, long longValue, long upperLimitInc, SCMPError error) Validate long.static voidvalidateLong(long lowerLimitInc, long longValue, SCMPError error) Validate long.static voidvalidateLong(long lowerLimitInc, String longStringValue, long upperLimitInc, SCMPError error) Validate long.static voidvalidateLong(long lowerLimitInc, String longStringValue, SCMPError error) Validate long.static voidvalidateMask(String mask, SCMPError error) Validate subscription mask.static voidvalidateStringLength(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error) Validate string length.static voidvalidateStringLengthIgnoreNull(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error) Validate string length.static voidvalidateStringLengthTrim(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error) Validate string.
-
Method Details
-
validateDateTime
public static void validateDateTime(String dateTimeString, SCMPError error) throws SCMPValidatorException Validate date time.- Parameters:
dateTimeString- the date time stringerror- the error- Throws:
SCMPValidatorException- the SCMP validator exception
-
validateDateTime
Validate date time.- Parameters:
dateTime- the date and timeerror- 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 limitlongStringValue- the integer string value to validateerror- 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 inclusivelongValue- the integer valueerror- 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 limitlongStringValue- the integer string value to validateupperLimitInc- the upper inclusive limiterror- 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 inclusivelongValue- the integer valueupperLimitInc- the upper limit incerror- the error- Throws:
SCMPValidatorException- the SCMP validator exception
-
validateIpAddressList
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 limitintStringValue- the integer string valueerror- 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 inclusiveintValue- the integer valueerror- 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 limitintStringValue- the integer string value to validateupperLimitInc- the upper inclusive limiterror- 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 inclusiveintValue- the integer valueupperLimitInc- the upper limit inclusiveerror- 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 incstringValue- the string valuemaxSizeInc- the max size incerror- 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 sizestringValue- the string valuemaxSizeInc- the max inclusive sizeerror- 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 inclusivestringValue- the string valuemaxSizeInc- the max size inclusiveerror- the error- Throws:
SCMPValidatorException- the sCMP validator exception
-
validateMask
Validate subscription mask.- Parameters:
mask- the mask valueerror- 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 methoderror- the error- Throws:
SCMPValidatorException- the SCMP validator exception
-