com.myJava.util
Class CommonRules

java.lang.Object
  extended by com.myJava.util.CommonRules

public abstract class CommonRules
extends java.lang.Object

Utility class used to check common rules : non-nullity, numeric format, emails, password strength, ...

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Constructor Summary
CommonRules()
           
 
Method Summary
static boolean checkDouble(java.lang.String value)
           
static boolean checkDouble(java.lang.String value, boolean checkPositiveValue)
           
static boolean checkDouble(java.lang.String value, double maxValue)
           
static boolean checkDouble(java.lang.String value, double minValue, double maxValue)
           
static boolean checkEmail(java.lang.String value)
          - not null
- contains a "@"
- ends with ".something"
static boolean checkEmptyString(java.lang.Object value)
           
static boolean checkInteger(java.lang.String value)
           
static boolean checkInteger(java.lang.String value, boolean checkPositiveValue)
           
static boolean checkInteger(java.lang.String value, int maxValue)
           
static boolean checkInteger(java.lang.String value, int minValue, int maxValue)
           
static boolean checkMaxLength(java.lang.Object value, int maxLength)
           
static boolean checkPasswordStrength(java.lang.String value, int minimumNonAlpha, int minimumNonAlphaNumeric, int minLength)
           
static boolean checkPasswordStrength(java.lang.String value, java.lang.String oldValue, int minimumNonAlpha, int minimumNonAlphaNumeric, int minLength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonRules

public CommonRules()
Method Detail

checkEmptyString

public static boolean checkEmptyString(java.lang.Object value)

checkDouble

public static boolean checkDouble(java.lang.String value,
                                  boolean checkPositiveValue)

checkDouble

public static boolean checkDouble(java.lang.String value,
                                  double minValue,
                                  double maxValue)

checkDouble

public static boolean checkDouble(java.lang.String value,
                                  double maxValue)

checkDouble

public static boolean checkDouble(java.lang.String value)

checkInteger

public static boolean checkInteger(java.lang.String value,
                                   boolean checkPositiveValue)

checkInteger

public static boolean checkInteger(java.lang.String value,
                                   int minValue,
                                   int maxValue)

checkInteger

public static boolean checkInteger(java.lang.String value,
                                   int maxValue)

checkInteger

public static boolean checkInteger(java.lang.String value)

checkMaxLength

public static boolean checkMaxLength(java.lang.Object value,
                                     int maxLength)

checkEmail

public static boolean checkEmail(java.lang.String value)
- not null
- contains a "@"
- ends with ".something"


checkPasswordStrength

public static boolean checkPasswordStrength(java.lang.String value,
                                            java.lang.String oldValue,
                                            int minimumNonAlpha,
                                            int minimumNonAlphaNumeric,
                                            int minLength)

checkPasswordStrength

public static boolean checkPasswordStrength(java.lang.String value,
                                            int minimumNonAlpha,
                                            int minimumNonAlphaNumeric,
                                            int minLength)