Package org.apache.pluto.descriptors.portlet

Examples of org.apache.pluto.descriptors.portlet.PortletAppDD


    public Map createUserInfoMap() {

        Map userInfoMap = new HashMap();
        try {

            PortletAppDD dd = container.getOptionalContainerServices()
                .getPortletRegistryService()
                .getPortletApplicationDescriptor(internalPortletWindow.getContextPath());

            Map allMap = container.getOptionalContainerServices()
              //PLUTO-388 fix:
              //The PortletWindow is currently ignored in the implementing class
              // See: org.apache.pluto.core.DefaultUserInfoService
              .getUserInfoService().getUserInfo( this, this.internalPortletWindow );

            Iterator i = dd.getUserAttributes().iterator();
            while(i.hasNext()) {
                UserAttributeDD udd = (UserAttributeDD)i.next();
                userInfoMap.put(udd.getName(), allMap.get(udd.getName()));
            }
        } catch (PortletContainerException e) {
View Full Code Here


     * @throws PortletContainerException
     */
    public String register(ServletConfig config) throws PortletContainerException {
        InternalPortletContext portletContext = register(config.getServletContext());

        PortletAppDD portletAppDD =
            portletContext.getPortletApplicationDefinition();
        PortletDD portletDD = null;

        LOG.info("Registering "+portletAppDD.getPortlets().size()+" portlets for context "+portletContext.getApplicationId());

        for (Iterator it = portletAppDD.getPortlets().iterator(); it.hasNext();) {
            portletDD = (PortletDD) it.next();
            portletConfigs.put(
                portletContext.getApplicationId() + "/" + portletDD.getPortletName(),
                new PortletConfigImpl(config, portletContext, portletDD)
            );
View Full Code Here

    public InternalPortletContext register(ServletContext servletContext)
        throws PortletContainerException {
        String applicationId = getContextPath(servletContext);
        if (!portletContexts.containsKey(applicationId)) {

            PortletAppDD portletAppDD = PortletDescriptorRegistry.getRegistry()
                .getPortletAppDD(servletContext);

            PortletContextImpl portletContext = new PortletContextImpl(
                applicationId, servletContext, portletAppDD);
View Full Code Here

            throw new PortletContainerException(msg);
        }

        // obtain the portlet application descriptor for the portlet
        // context.
        PortletAppDD portletAppDD = PortletDescriptorRegistry
                                        .getRegistry()
                                        .getPortletAppDD(portletCtx);

        // we can't return null
        if (portletAppDD == null) {
View Full Code Here

        pos = contentString.lastIndexOf("</portlet-entity-registry>");
        ras.seek(pos);
        ras.writeBytes("    <application id=\"" + service.getContextPath() + "\">\n");
        ras.writeBytes("        <definition-id>" + service.getContextPath() + "</definition-id>\n");

        PortletAppDD app = service.read();
        PortletDD p;
        Iterator i = app.getPortlets().iterator();
        while(i.hasNext()) {
            p = (PortletDD)i.next();
            ras.writeBytes("        <portlet id=\"" + p.getPortletName() + "\">\n");
            ras.writeBytes("            <definition-id>" + service.getContextPath()
                               + "." + p.getPortletName() + "</definition-id>\n");
View Full Code Here

        }
    }

    public void updateDescriptors()
        throws IOException {
        PortletAppDD portletApp = portletAppDescriptorService.read();
        WebAppDD webApp = webAppDescriptorService.read();

        Iterator portlets = portletApp.getPortlets().iterator();
        PortletDD portlet;
        while (portlets.hasNext()) {
            portlet = (PortletDD) portlets.next();
            createServlet(webApp, portlet);
            createServletMapping(webApp, portlet);
View Full Code Here

        long pos = contentString.lastIndexOf("</portlet-entity-registry>");
        ras.seek(pos);
        ras.writeBytes("    <application id=\"" + portletAppDescriptorService.getContextPath() + "\">\r\n");
        ras.writeBytes("        <definition-id>" + portletAppDescriptorService.getContextPath() + "</definition-id>\r\n");

        PortletAppDD app = portletAppDescriptorService.read();
        PortletDD p;
        Iterator i = app.getPortlets().iterator();
        while(i.hasNext()) {
            p = (PortletDD)i.next();
            ras.writeBytes("        <portlet id=\"" + p.getPortletName() + "\">\r\n");
            ras.writeBytes("            <definition-id>" + portletAppDescriptorService.getContextPath()
                               + "." + p.getPortletName() + "</definition-id>\r\n");
View Full Code Here

    public Map createUserInfoMap() {

        Map userInfoMap = new HashMap();
        try {

            PortletAppDD dd = container.getOptionalContainerServices()
                .getPortletRegistryService()
                .getPortletApplicationDescriptor(internalPortletWindow.getContextPath());

            Map allMap = container.getOptionalContainerServices()
              //PLUTO-388 fix:
              //The PortletWindow is currently ignored in the implementing class
              // See: org.apache.pluto.core.DefaultUserInfoService
              .getUserInfoService().getUserInfo( this, this.internalPortletWindow );

            Iterator i = dd.getUserAttributes().iterator();
            while(i.hasNext()) {
                UserAttributeDD udd = (UserAttributeDD)i.next();
                userInfoMap.put(udd.getName(), allMap.get(udd.getName()));
            }
        } catch (PortletContainerException e) {
View Full Code Here

        WebAppDescriptorService descriptorSvc = new WebAppDescriptorServiceImpl();
        WebAppDD webAppDDIn = descriptorSvc.read(webXmlIn);

        PortletAppDescriptorService portletAppDescriptorService =
                new PortletAppDescriptorServiceImpl();
        PortletAppDD portletAppDD = portletAppDescriptorService.read(portletXmlIn);
        portletXmlIn.close();
       
        for (Iterator it = portletAppDD.getPortlets().iterator();
                it.hasNext(); ) {
           
            // Read portlet definition.
            PortletDD portlet = (PortletDD) it.next();
            String name = portlet.getPortletName();
View Full Code Here

    public Map createUserInfoMap() {

        Map userInfoMap = new HashMap();
        try {

            PortletAppDD dd = container.getOptionalContainerServices()
                .getPortletRegistryService()
                .getPortletApplicationDescriptor(internalPortletWindow.getContextPath());

            Map allMap = container.getOptionalContainerServices()
                .getUserInfoService().getUserInfo(this);

            Iterator i = dd.getUserAttributes().iterator();
            while(i.hasNext()) {
                UserAttributeDD udd = (UserAttributeDD)i.next();
                userInfoMap.put(udd.getName(), allMap.get(udd.getName()));
            }
        } catch (PortletContainerException e) {
View Full Code Here

TOP

Related Classes of org.apache.pluto.descriptors.portlet.PortletAppDD

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.