Package org.jboss.seam.wiki.core.dao

Examples of org.jboss.seam.wiki.core.dao.UserDAO


            protected void renderResponse() throws Exception {
                User user = (User)getInstance(UserPasswordReset.RESET_PASSWORD_OF_USER);
                assert user == null;

                UserDAO dao = (UserDAO)getInstance(UserDAO.class);
                User dbUser = dao.findUser(3l);
                assert dbUser.getActivationCode() == null;
                Hash hashUtil = (Hash)getInstance(Hash.class);
                assert dbUser.getPasswordHash().equals(hashUtil.hash("foo123"));
            }
        }.run();
View Full Code Here


        if (userId == null || imageSize == null) {
            response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Invalid request path, use: /wikiUserPortrait/[0-9]+/(l|s)");
            return;
        }

        UserDAO userDAO = (UserDAO) Component.getInstance(UserDAO.class);
        User user = userDAO.findUser(Long.valueOf(userId));
        if (user == null || user.getProfile().getImageContentType() == null) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND, "User id not found or no portrait for user");
            return;
        }
View Full Code Here

                WikiNode newNode = n.duplicate(true);
                newNode.setName(pastedName);
                newNode.setWikiname(WikiUtil.convertToWikiName(pastedName));
                newNode.setParent(getInstance());
                newNode.setAreaNumber(getInstance().getAreaNumber());
                UserDAO userDAO = (UserDAO)Component.getInstance(UserDAO.class);
                newNode.setCreatedBy(userDAO.findUser(n.getCreatedBy().getId()));
                if (n.getLastModifiedBy() != null) {
                    newNode.setLastModifiedBy(userDAO.findUser(n.getLastModifiedBy().getId()));
                }
                restrictedEntityManager.persist(newNode);
            }
        }
        log.debug("completed executing of paste batch");
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.dao.UserDAO

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.