Package org.apache.jetspeed.portlet.webcontent

Examples of org.apache.jetspeed.portlet.webcontent.WebContentHistoryPage


        {
            // new page visit - make it the current page in the history
            WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(actionRequest, HISTORY);
            if (history == null)
                history = new WebContentHistoryList();
            history.visitPage(new WebContentHistoryPage(webContentURL,webContentParams,webContentMethod));
            PortletMessaging.publish(actionRequest, HISTORY, history);
        }
    }
View Full Code Here


       
        // view the current page in the history
        WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(request, HISTORY);
        if (history == null)
            history = new WebContentHistoryList();
        WebContentHistoryPage currentPage = history.getCurrentPage();
        if (currentPage == null)
        {
            String sourceURL = request.getPreferences().getValue("SRC", "");
            if (sourceURL == null)
            {
                // BOZO - switch to edit mode automatically here, instead of throwing exception!
                throw new PortletException("WebContent source not specified. Go to edit mode and specify an URL.");
            }
            currentPage = new WebContentHistoryPage(sourceURL);
        }

        // Initialize the controller if it's not already done
        if (rewriteController == null)
        {
            PortletContext portletApplication = getPortletContext();
            String path = portletApplication.getRealPath("/WEB-INF");
            String contextPath = path + "/";
            try
            {
                // Create rewriter adaptor
                rewriteController = getController(contextPath);
            }
            catch (Exception e)
            {
                // Failed to create rewriter controller
                String msg = "WebContentPortlet failed to create rewriter controller.";
                log.error(msg,e);
                throw new PortletException(e.getMessage());
            }
        }

        // get content from current page
        response.setContentType("text/html");
        byte[] content = doWebContent(currentPage.getUrl(), currentPage.getParams(), currentPage.isPost(), request, response);
        // System.out.println("Rewritten content is\n..."+new String(content));
       
        // write the meta-control navigation header
        PrintWriter writer = response.getWriter();
        writer.print("<block>");
View Full Code Here

        {
            // new page visit - make it the current page in the history
            WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(actionRequest, HISTORY);
            if (history == null)
                history = new WebContentHistoryList();
            history.visitPage(new WebContentHistoryPage(webContentURL,webContentParams,webContentMethod));
            PortletMessaging.publish(actionRequest, HISTORY, history);
        }
    }
View Full Code Here

       
        // view the current page in the history
        WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(request, HISTORY);
        if (history == null)
            history = new WebContentHistoryList();
        WebContentHistoryPage currentPage = history.getCurrentPage();
        if (currentPage == null)
        {
            String sourceURL = request.getPreferences().getValue("SRC", "");
            if (sourceURL == null)
            {
                // BOZO - switch to edit mode automatically here, instead of throwing exception!
                throw new PortletException("WebContent source not specified. Go to edit mode and specify an URL.");
            }
            currentPage = new WebContentHistoryPage(sourceURL);
        }

        // Initialize the controller if it's not already done
        if (rewriteController == null)
        {
            PortletContext portletApplication = getPortletContext();
            String path = portletApplication.getRealPath("/WEB-INF");
            String contextPath = path + "/";
            try
            {
                // Create rewriter adaptor
                rewriteController = getController(contextPath);
            }
            catch (Exception e)
            {
                // Failed to create rewriter controller
                String msg = "WebContentPortlet failed to create rewriter controller.";
                log.error(msg,e);
                throw new PortletException(e.getMessage());
            }
        }

        // get content from current page
        response.setContentType("text/html");
        byte[] content = doWebContent(currentPage.getUrl(), currentPage.getParams(), currentPage.isPost(), request, response);
        // System.out.println("Rewritten content is\n..."+new String(content));
       
        // write the meta-control navigation header
        PrintWriter writer = response.getWriter();
        writer.print("<block>");
View Full Code Here

        {
            // new page visit - make it the current page in the history
            WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(actionRequest, HISTORY);
            if (history == null)
                history = new WebContentHistoryList();
            history.visitPage(new WebContentHistoryPage(webContentURL,webContentParams,webContentMethod));
            PortletMessaging.publish(actionRequest, HISTORY, history);
        }
    }
View Full Code Here

       
        // view the current page in the history
        WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(request, HISTORY);
        if (history == null)
            history = new WebContentHistoryList();
        WebContentHistoryPage currentPage = history.getCurrentPage();
        if (currentPage == null)
        {
            String sourceURL = request.getPreferences().getValue("SRC", "");
            if (sourceURL == null)
            {
                // BOZO - switch to edit mode automatically here, instead of throwing exception!
                throw new PortletException("WebContent source not specified. Go to edit mode and specify an URL.");
            }
            currentPage = new WebContentHistoryPage(sourceURL);
        }

        // Initialize the controller if it's not already done
        if (rewriteController == null)
        {
            PortletContext portletApplication = getPortletContext();
            String path = portletApplication.getRealPath("/WEB-INF");
            String contextPath = path + "/";
            try
            {
                // Create rewriter adaptor
                rewriteController = getController(contextPath);
            }
            catch (Exception e)
            {
                // Failed to create rewriter controller
                String msg = "WebContentPortlet failed to create rewriter controller.";
                log.error(msg,e);
                throw new PortletException(e.getMessage());
            }
        }

        // get content from current page
        response.setContentType("text/html");
        byte[] content = doWebContent(currentPage.getUrl(), currentPage.getParams(), currentPage.isPost(), request, response);
        // System.out.println("Rewritten content is\n..."+new String(content));
       
        // write the meta-control navigation header
        PrintWriter writer = response.getWriter();
        writer.print("<block>");
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portlet.webcontent.WebContentHistoryPage

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.