Class ValidateUtils


  • public final class ValidateUtils
    extends Object
    Utility class contains helper methods for validation processing
    Version:
    5.0
    Author:
    Frank Giordano
    • Method Detail

      • checkIllegalParameter

        public static void checkIllegalParameter​(String value,
                                                 String name)
        Check for the state of a parameter by String value
        Parameters:
        value - string value
        name - name of attribute
      • checkIllegalParameter

        public static void checkIllegalParameter​(boolean check,
                                                 String msg)
        Check for state of parameter
        Parameters:
        check - Check for true or false value
        msg - message to display if the check is true
        Throws:
        IllegalArgumentException - with message
      • checkNullParameter

        public static void checkNullParameter​(boolean check,
                                              String msg)
        Check for null parameter
        Parameters:
        check - check for true or false value
        msg - message to display if the check is true
        Throws:
        IllegalArgumentException - with message
      • checkSshConnection

        public static void checkSshConnection​(SshConnection connection)
        Check SSH connection for validity.
        Parameters:
        connection - for connection information, see SshConnection object
        Throws:
        IllegalStateException - with the message "Connection data not setup properly"