Examples of WebContentHistoryPage


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

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

       
        // 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

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

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

       
        // 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

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

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

       
        // 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

Examples of org.apache.portals.applications.webcontent.portlet.WebContentHistoryPage

        String webContentURL = actionRequest.getParameter(WebContentRewriter.ACTION_PARAMETER_URL);
        String webContentMethod = actionRequest.getParameter(WebContentRewriter.ACTION_PARAMETER_METHOD);
        Map webContentParams = new HashMap(actionRequest.getParameterMap()) ;
        webContentParams.remove(WebContentRewriter.ACTION_PARAMETER_URL);
        webContentParams.remove(WebContentRewriter.ACTION_PARAMETER_METHOD);
        WebContentHistoryPage webContentPage = new WebContentHistoryPage(webContentURL, webContentParams, webContentMethod);
        PortletMessaging.publish(actionRequest, getClass().getName(), webContentPage);       
    }
View Full Code Here

Examples of org.apache.portals.applications.webcontent.portlet.WebContentHistoryPage

        // get source web content URL, parameters, and method to view
        String sourceURL = null;
        Map sourceParams = null;
        boolean sourcePostMethod = false;
        WebContentHistoryPage webContentPage = (WebContentHistoryPage)PortletMessaging.receive(request, getClass().getName());
        if (webContentPage != null)
        {
            // view rewritten action URL page
            sourceURL = webContentPage.getUrl();
            sourceParams = webContentPage.getParams();
            sourcePostMethod = webContentPage.isPost();           
        }
        else
        {
            // load and validate preferences, (base url and portal base path
            // should both end in a "/" path separator to ensure that relative
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.