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

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


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

            protected void invokeApplication() throws Exception {
                DocumentHistory docHistory = (DocumentHistory)getInstance(DocumentHistory.class);
                docHistory.init();
            }

            protected void renderResponse() throws Exception {
                WikiFile currentFile = (WikiFile)getValue("#{documentHistory.currentFile}");
                assert currentFile.getId().equals(6l);
                assert currentFile.getRevision() == 3;

                DocumentHistory docHistory = (DocumentHistory)getInstance(DocumentHistory.class);
                List<WikiFile> historicalFileList = docHistory.getHistoricalFileList();
                assert historicalFileList.size() == 3;

                // Sorted by revision descending
                assert historicalFileList.get(0).getRevision() == 2;
                assert historicalFileList.get(0).getId().equals(6l);
View Full Code Here


            protected void beforeRequest() {
                setParameter("fileId", "1");
            }

            protected void invokeApplication() throws Exception {
                DocumentHistory docHistory = (DocumentHistory)getInstance(DocumentHistory.class);
                docHistory.init();

                List<WikiFile> historicalFileList = docHistory.getHistoricalFileList();
                WikiFile selected = historicalFileList.get(1);
                assert selected.getHistoricalFileId().equals(2l);

                docHistory.setSelectedHistoricalFile(selected);
                WikiFile selectedHistoricalFile = docHistory.getSelectedHistoricalFile();

                assert selectedHistoricalFile.getHistoricalFileId().equals(selected.getHistoricalFileId());
                assert selectedHistoricalFile.getId().equals(1l);
                assert selectedHistoricalFile.getRevision() == 1;
            }

            protected void renderResponse() throws Exception {
                DocumentHistory docHistory = (DocumentHistory)getInstance(DocumentHistory.class);

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

TOP

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

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.