Package org.jboss.seam.wiki.core.model

Examples of org.jboss.seam.wiki.core.model.WikiDirectory


        loginMember();

        new FacesRequest() {
            protected void invokeApplication() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forumDir = nodeDAO.findWikiDirectory(100l);

                ForumDAO dao = (ForumDAO)getInstance(ForumDAO.class);

                Map<Long, ForumInfo> infos = dao.findForums(forumDir);
                assert infos.size() == 2;
View Full Code Here


        loginMember();

        new FacesRequest() {
            protected void invokeApplication() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forums = nodeDAO.findWikiDirectory(100l);

                ForumDAO dao = (ForumDAO)getInstance(ForumDAO.class);

                Calendar lastLogin = new GregorianCalendar(2007, 2, 1);
                Map<Long, Long> unreadTopics = dao.findUnreadTopicAndParentIds(forums, lastLogin.getTime());
View Full Code Here

        loginMember();

        new FacesRequest() {
            protected void invokeApplication() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forum = nodeDAO.findWikiDirectory(102l);

                ForumDAO dao = (ForumDAO)getInstance(ForumDAO.class);

                Calendar lastLogin = new GregorianCalendar(2007, 2, 1);
                Map<Long, Long> unreadTopics = dao.findUnreadTopicAndParentIdsInForum(forum, lastLogin.getTime());
View Full Code Here

        loginMember();

        new FacesRequest() {
            protected void invokeApplication() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forum = nodeDAO.findWikiDirectory(102l);

                ForumDAO dao = (ForumDAO)getInstance(ForumDAO.class);
                assert dao.findTopicCount(forum).equals(2l);

                forum = nodeDAO.findWikiDirectory(109l);
View Full Code Here

        loginMember();

        new FacesRequest() {
            protected void invokeApplication() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forum = nodeDAO.findWikiDirectory(102l);

                ForumDAO dao = (ForumDAO)getInstance(ForumDAO.class);

                Map<Long, TopicInfo> topics = dao.findTopics(forum, 0, 10);
View Full Code Here

        loginMember();

        new FacesRequest() {
            protected void invokeApplication() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forum = nodeDAO.findWikiDirectory(109l);

                ForumDAO dao = (ForumDAO)getInstance(ForumDAO.class);

                Map<Long, TopicInfo> topics = dao.findTopics(forum, 0, 10);
View Full Code Here

        new FacesRequest() {

            protected void invokeApplication() throws Exception {

                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory dir = nodeDAO.findWikiDirectory(2l);

                FeedDAO feedDAO = (FeedDAO)getInstance(FeedDAO.class);

                List<WikiFeed> feeds = feedDAO.findParentFeeds(dir, true);
View Full Code Here

    public void directoryURL() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                EntityManager em = (EntityManager) getInstance("restrictedEntityManager");
                WikiDirectory d = (WikiDirectory)
                        em.createQuery("select d from WikiDirectory d where d.id = :id")
                                .setParameter("id", 3l)
                                .getSingleResult();

                assert d.getPermURL(".lace").equals("3.lace");
                assert d.getWikiURL().equals("CCC");

                d = (WikiDirectory)
                        em.createQuery("select d from WikiDirectory d where d.id = :id")
                                .setParameter("id", 4l)
                                .getSingleResult();

                assert d.getPermURL(".lace").equals("4.lace");
                assert d.getWikiURL().equals("CCC/DDD");

                d = (WikiDirectory)
                        em.createQuery("select d from WikiDirectory d where d.id = :id")
                                .setParameter("id", 1l)
                                .getSingleResult();

                assert d.getPermURL(".lace").equals("1.lace");
                assert d.getWikiURL().equals("");

            }
        }.run();
    }
View Full Code Here

        if (getWikiNodeDAO().findChildrenCount(dir) > 0) {
            getLog().debug("directory is not deletable, has children: " + dir);
            return false;
        }

        WikiDirectory trashArea = (WikiDirectory)Component.getInstance("trashArea");
        WikiDirectory memberArea = (WikiDirectory)Component.getInstance("memberArea");
        WikiDirectory helpArea = (WikiDirectory) Component.getInstance("helpArea");

        return dir.getParent() != null // Wiki ROOT not deleteable
                && !dir.getId().equals(trashArea.getId())
                && !dir.getId().equals(memberArea.getId())
                && !dir.getId().equals(helpArea.getId());

    }
View Full Code Here

        new FacesRequest() {

            protected void updateModelValues() throws Exception {
                WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory forumDir = nodeDAO.findWikiDirectory(100l);
                Contexts.getPageContext().set("currentDirectory", forumDir);
            }

            protected void invokeApplication() throws Exception {
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.model.WikiDirectory

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.