Package org.jayasoft.woj.portal.data.dao.security

Examples of org.jayasoft.woj.portal.data.dao.security.UserDao.findUser()


      LicenseDao licenseDao = DaoFactory.getLicenseDao();
      try {
            ClufImpl cluf = getActiveCluf();
           
        userDao.fetch(u);
        UserImpl user = (UserImpl)userDao.findUser(u.getLogin());
        userDao.fetch(user);

            if ((user.getLastAcceptedCluf() == null) || !cluf.getVersion().equals(user.getLastAcceptedCluf().getVersion())) {
                user.setLastAcceptedCluf(cluf);
            }
View Full Code Here


    }

    private void addFreeLicense(User u, License l) throws DaoException, ServiceException {
        UserDao userDao = DaoFactory.getUserDao();
        ClufImpl cluf = getActiveCluf();
        UserImpl user = (UserImpl)userDao.findUser(u.getLogin());
        userDao.fetch(user);
        if ((user.getLastAcceptedCluf() == null) || !cluf.getVersion().equals(user.getLastAcceptedCluf().getVersion())) {
            user.setLastAcceptedCluf(cluf);
        }
        user.getBuyedLicenses().add(l);
View Full Code Here

            ClufImpl cluf = ServiceFactory.getLicenseService().getActiveCluf();
            License l = licenseDao.createTrial();
           
            Group group = (Group) groupDao.find(groupId);
//            l.setHostId(hostId); No Host
            UserImpl user = (UserImpl)userDao.findUser(userLogged.getLogin());
            userDao.fetch(user);
            if ((user.getLastAcceptedCluf() == null) ||
                cluf.getVersion().equals(user.getLastAcceptedCluf().getVersion())) {
                user.setLastAcceptedCluf(cluf);
            }
View Full Code Here

                UserImpl godson = (UserImpl)buyer;
                UserDao uDao = DaoFactory.getUserDao();
                ProductPointDao ppDao = DaoFactory.getProductPointDao();
                UserPointDao upDao = DaoFactory.getUserPointDao();
               
                UserImpl godfather = (UserImpl)uDao.findUser(godson.getGodfather());
                if (godfather != null) {
                    ProductPoint pp = ppDao.get(p, years, ProductPoint.GODSON);
                    if (pp.getPoints()!=0) {
                        UserPoint oldGFUP = getUserPoint(godfather);
                        UserPoint gfUP = UserPointFactory.godson(godfather, oldGFUP, godson, p, subscribedUsers, pp);
View Full Code Here

     * @throws BadLoginPasswordException if the user could not be connected due to a bad login/pass provided
     * @throws LicenseExpiredException if the license of the user has expired
     */
    public User login(String login, String password) throws BadLoginPasswordException, LicenseExpiredException {
        UserDao dao = DaoFactory.getUserDao();
        User u = dao.findUser(login);
        if (u==null) {
          LOGGER.debug("user [" + login + "] cannot log in, login unknown");
            throw new BadLoginPasswordException("invalid login/password");
        }
       
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.