Examples of BadInputException


Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        throws BadInputException {

        if ( ret.length() > 0 ) {
            if ( !ret.startsWith("http://") &&
                 !ret.startsWith("https://")) {
                throw new BadInputException("The parameter '" + ret + "' must begin with http:// or https:// ! Please try again.");
            }
        }
        return ret;
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

          ret = "";
        }
        ret = ret.trim();

        if ( ret.length() < minLength ) {
            throw new BadInputException("Your password is not allowed to be lesser than " + minLength + " characters! Please try again.");
        }

        /* @todo implement this feature */
        if (option == 1) {//char and number

View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        String inputStr = getParameter(request, param, true);
        java.util.Date ret;
        try {
            ret = dateFormat.parse(inputStr);
        } catch (java.text.ParseException e) {
            throw new BadInputException("Cannot parse the parameter '" + param + "' to an Date value!. Please try again.");
        }
        return new java.sql.Date(ret.getTime());
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        java.util.Date ret;
        try {
            ret = dateFormat.parse(inputStr);
            //log.debug("Date of birth is " + ret);
        } catch (java.text.ParseException e) {
            throw new BadInputException("Cannot parse the parameter '" + inputStr + "' to an Date value!. Please try again.");
        }

//        if ( validate){
        //* @todo : rewrite this code */
//            long nowtime = System.currentTimeMillis();
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        return ret.trim();
    }

    public static void getParameterMemberName(final String memberName) throws BadInputException{
        if (memberName.equalsIgnoreCase(BaseConstants.ADMIN_USERNAME) || memberName.equalsIgnoreCase("guest")) {
            throw new BadInputException("Cannot register member with a reserved name : " + memberName);
        }
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        }
    }

    public static void confirmPassword(final String str1, final String str2) throws BadInputException{
        if (!str1.equals(str2)) {
            throw new BadInputException( "Password and confirmed password are not the same, please try again.");
        }
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        }
    }

    public static void compareEmails(final String str1, final String str2) throws BadInputException{
        if (!str1.equals(str2)) {
            throw new BadInputException( "Your Primary Email and Confirmation Email are not be the same, please try again.");
        }
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

  public static String getParameterIM(final HttpServletRequest request, final String param, final boolean checkEmpty) throws BadInputException {
        String ret = getParameter(request, param, checkEmpty);
        if ( ret.indexOf('<') != -1 ||
             ret.indexOf('>') != -1 ||
             ret.indexOf('@') != -1) {
            throw new BadInputException("The parameter '" + param + "' is not allowed to contain '<' or '>' or '@@' ! Please try again.");
        }
        return ret;
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException

        return ret;
    }

    public static void checkMemberStay(final int memberArrivalYear, final int memberDepartureYearthrows BadInputException {
        if (memberDepartureYear < memberArrivalYear) {
            throw new BadInputException( "Your departure year is less than your arrival year, please try again.");
        }
    }
View Full Code Here

Examples of net.naijatek.myalumni.framework.exceptions.BadInputException


        String inputStr = getParameter(request, param);
        logger.debug("The Gender is " + inputStr);
        if( inputStr.equalsIgnoreCase("--")){
          throw new BadInputException(
              "The Gender field is not allowed to be empty, please try again.");
        }
        return inputStr;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.