Package org.apache.cocoon.portal.tools

Examples of org.apache.cocoon.portal.tools.PortalToolManager


                   Map objectModel,
                   String source,
                   Parameters parameters)
    throws Exception {
        String url = parameters.getParameter("url");
        PortalToolManager ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
        try {
            UserRightsService userRightsService = ptm.getUserRightsService();
            // FIXME: replace the throw with something else
            if (!userRightsService.userIsAllowed(url, ptm.getPortalObjects().getPortalService().getComponentManager().getProfileManager().getUser())) {
                throw new ProcessingException(
                    "You are not allowed to request this page.");
            }
        } finally {
            this.manager.release(ptm);
View Full Code Here


        }
        DefaultConfiguration root = new DefaultConfiguration("root");
        DefaultConfiguration defconf = new DefaultConfiguration("catalogues");
        defconf.setAttribute("default", "default");
        root.addChild(defconf);
        PortalToolManager ptm = null;
        try {
            ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
            List i18nc = ptm.getI18n();
            for(Iterator it = i18nc.iterator(); it.hasNext();) {
                PortalToolCatalogue ptc = (PortalToolCatalogue) it.next();
                DefaultConfiguration catConf = new DefaultConfiguration("catalogue");
              catConf.setAttribute("id", ptc.getId());
              catConf.setAttribute("name", ptc.getName());
View Full Code Here

                   Map objectModel,
                   String source,
                   Parameters parameters)
    throws Exception {
        String url = parameters.getParameter("url");
        PortalToolManager ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
        try {
            UserRightsService userRightsService = ptm.getUserRightsService();
            // FIXME: replace the throw with something else
            if (!userRightsService.userIsAllowed(url, ptm.getPortalObjects().getPortalService().getComponentManager().getProfileManager().getUser())) {
                throw new ProcessingException(
                    "You are not allowed to request this page.");
            }
        } finally {
            this.manager.release(ptm);
View Full Code Here

        }
        DefaultConfiguration root = new DefaultConfiguration("root");
        DefaultConfiguration defconf = new DefaultConfiguration("catalogues");
        defconf.setAttribute("default", "default");
        root.addChild(defconf);
        PortalToolManager ptm = null;
        try {
            ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
            List i18nc = ptm.getI18n();
            for(Iterator it = i18nc.iterator(); it.hasNext();) {
                PortalToolCatalogue ptc = (PortalToolCatalogue) it.next();
                DefaultConfiguration catConf = new DefaultConfiguration("catalogue");
              catConf.setAttribute("id", ptc.getId());
              catConf.setAttribute("name", ptc.getName());
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.tools.PortalToolManager

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.