Examples of PageConfig


Examples of org.apache.geronimo.pluto.impl.PageConfig

        super.setUp();

        navigationJsonGenerator = new NavigationJsonGenerator(null);

        pageList = new ArrayList<PageConfig>();
        PageConfig pc = new PageConfig();

        pc.setIcon("/images/ico_deploy_16x16.gif");
        pc.setName("2-2/cat2/item2-2");
        pc.setUri("/server/serverlog");

        pageList.add(pc);

        pc = new PageConfig();
        pc.setIcon("/images/ico_deploy_16x16.gif");
        pc.setName("1-1-1-1/cat1/cat1-1/cat1-1-1/item1-1-1-1");
        pc.setUri("/server/serverlog");
        pageList.add(pc);

        pc = new PageConfig();
        pc.setIcon("/images/ico_deploy_16x16.gif");
        pc.setName("2-2-1/cat2/cat2-1/item2-2-1");
        pc.setUri("/server/serverlog");

        pageList.add(pc);

        pc = new PageConfig();
        pc.setIcon("/images/ico_deploy_16x16.gif");
        pc.setName("1-2/cat1/item1-2");
        pc.setUri("/server/serverlog");
        pageList.add(pc);

    }
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

    * This will add the portlets to the PageConfig in Pluto.
    * @see org.apache.geronimo.pluto.PlutoAccessInterface#addPortlets(java.lang.String, java.lang.String, java.util.ArrayList)
    */
    private void addPortlets() {
        if (pageExists()) {
            PageConfig pageConfig = getPageConfigFromPluto();
            int portletCount = portletList.size();
            for (int i = 0; i < portletCount; i++) {
                pageConfig.addPortlet(portletContext, portletList.get(i));
            }
        } else {
            log.warn("Cannot add portlets to non-existent page " + pageTitle);
        }
    }
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

     * Removes a PageConfig object in Pluto with the pageTitle
     * @see org.apache.geronimo.pluto.PlutoAccessInterface#removePage(java.lang.String)
     */
    private void removePage() {
        //all we really need is a PageConfig with the page name
        PageConfig pageConfig = createPageConfig();

        RenderConfigAdminService renderConfig = portletContainerServices.getAdminConfiguration().getRenderConfigAdminService();

        //This removePage method was added into Pluto as a patch (PLUTO-387). addPage functionality
        //was available, but removePage functionality was unavailable.
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

    * Removes the portletList from the PageConfig in Pluto
    * @see org.apache.geronimo.pluto.PlutoAccessInterface#removePortlets(java.lang.String, java.util.ArrayList)
    */
    private void removePortlets() {
        if (pageExists()) {
            PageConfig pageConfig = getPageConfigFromPluto();
            int portletCount = portletList.size();
            Collection<String> list = pageConfig.getPortletIds();

            //run through the list of portlets to remove
            for (int i = 0; i < portletCount; i++) {
                String portletName = portletList.get(i);

                //run through the list of portlets on this page and see if we can find a match
                for (String pid : list) {
                    String pletContext = PortletWindowConfig.parseContextPath(pid);
                    String pletName = PortletWindowConfig.parsePortletName(pid);
                    if (portletContext.equals(pletContext) && portletName.equals(pletName)) {
                        pageConfig.removePortlet(pid);
                        break;
                    }
                }
            }
        } else {
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

    /*
     * Creates a new PageConfig object with this GBean's pageTitle
     */
    private PageConfig createPageConfig() {
        //Create a new PageConfig
        PageConfig pageConfig = new PageConfig();
        pageConfig.setName(pageTitle);
        pageConfig.setUri("/WEB-INF/themes/default-theme.jsp");
        pageConfig.setIcon(icon);
        pageConfig.setMode(mode);
        return pageConfig;
    }
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

    /*
    * returns true if Pluto contains a PageConfig with that name and it has 0 or if there isn't a page with that name
    */
    private boolean pageIsEmpty() {
        if (pageExists()) {
            PageConfig pageConfig = getPageConfigFromPluto();
            return pageConfig.getPortletIds().size() == 0;
        } else {
            log.debug("no pageConfig found for " + pageTitle);
            return true;
        }
    }
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

        }

        //add the page if it doesn't exist yet
        if (!pageExists()) {
            //create a PageConfig
            PageConfig newPageConfig = createPageConfig();
            addPage(newPageConfig);
        }

        //add portlets to this newly created page
        addPortlets();
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

    /*
     * Creates a new PageConfig object with this GBean's pageTitle
     */
    private PageConfig createPageConfig() {
        //Create a new PageConfig
        PageConfig pageConfig = new PageConfig();
        pageConfig.setName(pageTitle);
        pageConfig.setUri("/WEB-INF/themes/default-theme.jsp");
        pageConfig.setIcon(icon);
        pageConfig.setMode(mode);
        return pageConfig;
    }
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

    /*
    * returns true if Pluto contains a PageConfig with that name and it has 0 or if there isn't a page with that name
    */
    private boolean pageIsEmpty() {
        if (pageExists()) {
            PageConfig pageConfig = getPageConfigFromPluto();
            return pageConfig.getPortletIds().size() == 0;
        } else {
            log.debug("no pageConfig found for " + pageTitle);
            return true;
        }
    }
View Full Code Here

Examples of org.apache.geronimo.pluto.impl.PageConfig

        }

        //add the page if it doesn't exist yet
        if (!pageExists()) {
            //create a PageConfig
            PageConfig newPageConfig = createPageConfig();
            addPage(newPageConfig);
        }

        //add portlets to this newly created page
        addPortlets();
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.