Package org.jayasoft.woj.common.model.registration

Examples of org.jayasoft.woj.common.model.registration.RegistrationError


                    || StringUtils.isBlank(u.getEmail())
                    || StringUtils.isBlank(u.getFirstName())
                    || StringUtils.isBlank(u.getLastName())
                    || StringUtils.isBlank(u.getCountry())
                ) {
                r = new RegistrationError();
                ((RegistrationError)r).setCause(new RegistrationException("missing required fields or fields contain only spaces"));
            } else if (!EmailHelper.doEmailSeemsValid(u.getEmail())) {
                r = new RegistrationError();
                ((RegistrationError)r).setCause(new RegistrationException("your email seems to be invalid"));
            } else {
                User registeredUser = ServiceFactory.getRegistrationService().registerTrialUser(u, hostId);
                ServiceFactory.getRegistrationService().sendEmailVerification(registeredUser);
                r = new RegistrationSuccessfull();
            }
        } catch (RegistrationException e) {
            r = new RegistrationError();
            ((RegistrationError)r).setCause(e);
        } catch (Exception e) {
            r = new RegistrationError();
        }
        XMLResponseHelper.writeXMLResponse(response, r);
        return null;
    }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.registration.RegistrationError

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.