Package org.orgama.shared.auth.except

Examples of org.orgama.shared.auth.except.InvalidUsernameFormatException


        String result = toSanitize;
       
       
        //check for null input
        if (result == null) {
            throw new InvalidUsernameFormatException();
        }
       
        result = result.trim();
       
        //check that the string length is not too long
        if (result.length() < 6) {
            throw new InvalidUsernameFormatException();
        }
       
        //check that the string is not too long
        if (result.length() > 32) {
            throw new InvalidUsernameFormatException();
        }
       
        //check to see if the string can be used for a username.  If it can't
        //throw an auth exception
        if (!validateUsernameString(result)) {
            throw new InvalidUsernameFormatException();
        }
       
        result = result.toLowerCase();
       
        return result;
View Full Code Here

TOP

Related Classes of org.orgama.shared.auth.except.InvalidUsernameFormatException

Copyright © 2018 www.massapicom. 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.