Package org.jboss.seam.wiki.core.action

Examples of org.jboss.seam.wiki.core.action.DocumentHome


                setParameter("documentId", "6");
            }

            protected void renderResponse() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                assert docHome.getInstance().getId().equals(6l); // Init!

                WikiTextParser parser = new WikiTextParser(docHome.getInstance().getContent(), true, false);
                parser.setRenderer(new NullWikiTextRenderer() {
                    @Override
                    public String renderMacro(WikiTextMacro macro) {

                        if (macro.getName().equals("lastModifiedDocuments")) {
View Full Code Here


            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                assert docHome.getInstance().getId().equals(6l); // Init!

                docHome.getTextEditor().setValue("[<=lastModifiedDocuments[documentTitleLength=66]]");

                assert invokeMethod("#{documentHome.update}").equals("updated");
            }

        }.run();


        new NonFacesRequest("/docDisplay_d.xhtml") {

            protected void beforeRequest() {
                setParameter("documentId", "6");
            }

            protected void renderResponse() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                assert docHome.getInstance().getId().equals(6l); // Init!

                WikiTextParser parser = new WikiTextParser(docHome.getInstance().getContent(), true, false);
                parser.setRenderer(new NullWikiTextRenderer() {
                    @Override
                    public String renderMacro(WikiTextMacro macro) {

                        if (macro.getName().equals("lastModifiedDocuments")) {
View Full Code Here

                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                docHome.getInstance().setName("Test Name");
                docHome.getTextEditor().setValue("Test Content");

                docHome.setPushOnFeeds(true);
                docHome.setPushOnSiteFeed(true);

                assert invokeMethod("#{documentHome.persist}").equals("persisted");

            }
        }.run();
View Full Code Here

                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                docHome.getInstance().setName("Test Name");
                docHome.getTextEditor().setValue("Test Content");

                docHome.setPushOnFeeds(true);
                docHome.setPushOnSiteFeed(true);

                assert invokeMethod("#{documentHome.update}").equals("updated");

            }
        }.run();
View Full Code Here

                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                docHome.getInstance().setName("Test Name");
                docHome.getTextEditor().setValue("Test Content");

                docHome.setPushOnFeeds(true);

                assert invokeMethod("#{documentHome.persist}").equals("persisted");

            }
        }.run();
View Full Code Here

                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                docHome.getInstance().setName("Test Name");
                docHome.getTextEditor().setValue("Test Content");

                docHome.setPushOnFeeds(true);

                assert invokeMethod("#{documentHome.update}").equals("updated");

            }
        }.run();
View Full Code Here

                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                docHome.getInstance().setName("Test Name");
                docHome.getTextEditor().setValue("Test Content");

                docHome.setPushOnFeeds(true);
                docHome.setPushOnSiteFeed(true);

                assert invokeMethod("#{documentHome.persist}").equals("persisted");

            }
        }.run();
View Full Code Here

                setParameter("cid", conversationId);
            }

            protected void invokeApplication() throws Exception {

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                docHome.getInstance().setName("Test Name");
                docHome.getTextEditor().setValue("Test Content");

                docHome.setPushOnFeeds(true);
                docHome.setPushOnSiteFeed(true);

                assert invokeMethod("#{documentHome.update}").equals("updated");

            }
        }.run();
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                assert docHome.getInstance().getId().equals(6l); // Init!

                assert docHome.getInstance().getHeaderMacros().size() == 2;
                assert docHome.getInstance().getFooterMacros().size() == 2;

                boolean macroFound = false;
                for (WikiTextMacro wikiMacro : docHome.getInstance().getContentMacros()) {
                    if (wikiMacro.getName().equals("lastModifiedDocuments")) {
                        assert wikiMacro.getParams().size()==2;
                        assert wikiMacro.getParams().get("documentTitleLength").equals("60");
                        assert wikiMacro.getParams().get("showUsernames").equals("true");
                        macroFound = true;
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                assert Conversation.instance().isLongRunning();

                DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
                assert docHome.getInstance().getId().equals(6l); // Init!

                docHome.getTextEditor().setValue("[<=contentMacro[param=value]]");

                docHome.syncEditorToInstance(docHome.getParentNode().getId(), docHome.getInstance());
                docHome.syncMacros(docHome.getInstance());

                assert docHome.getInstance().getHeaderMacros().size() == 2;
                assert docHome.getInstance().getContentMacros().size() == 1;
                assert docHome.getInstance().getFooterMacros().size() == 2;

                // Check WikiMacro.equals() as well
                WikiTextMacro macro = new WikiTextMacro("contentMacro");
                macro.setPosition(0);

                boolean macroFound = false;
                for (WikiTextMacro wikiMacro : docHome.getInstance().getContentMacros()) {
                    if (wikiMacro.equals(macro)) {
                        assert wikiMacro.getParams().size()==1;
                        assert wikiMacro.getParams().get("param").equals("value");
                        macroFound = true;
                    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.action.DocumentHome

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.