Package org.cast.cwm.data

Examples of org.cast.cwm.data.Role


    }

    @Override
    protected void onBeforeSave(HibernateObjectModel<User> mUser) {
      User user = mUser.getObject();
      Role userRole = (Role) radioGroup.getDefaultModelObject();
      user.setRole(userRole);
      user.setCreateDate(new Date());
      user.setValid(false);
      user.generateSecurityToken();
      user.setPassword(password.getConvertedInput());
      String url = "/register?username=" + user.getUsername() + "&key=" + user.getSecurityToken();
      if (userRole.equals(Role.STUDENT)) {
        // add user to the default period
        user.getPeriods().clear();
        user.getPeriods().add(ISIApplication.get().getMDefaultPeriod().getObject());       
        ISIEmailService.get().sendXmlEmail(mUser, ISIEmailService.EMAIL_CONFIRM, url);
      } else {
View Full Code Here

TOP

Related Classes of org.cast.cwm.data.Role

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.