Examples of PortletAppDD


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

    public void tearDown() {
        service = null;
    }

    public void testPortletCount() throws IOException {
       PortletAppDD dd = service.read();
       assertEquals(dd.getPortlets().size(), 2);
    }
View Full Code Here

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

       PortletAppDD dd = service.read();
       assertEquals(dd.getPortlets().size(), 2);
    }

    public void testPortletNames() throws IOException {
        PortletAppDD dd = service.read();
        assertNotNull(dd.getPortlet("TestPortlet1"));
        assertNotNull(dd.getPortlet("TestPortlet2"));
    }
View Full Code Here

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

        assertNotNull(dd.getPortlet("TestPortlet1"));
        assertNotNull(dd.getPortlet("TestPortlet2"));
    }

    public void testPortletClassNames() throws IOException {
        PortletAppDD app = service.read();
        PortletDD dd = app.getPortlet("TestPortlet1");
        assertEquals(dd.getPortletClass(),
                     "org.apache.pluto.portalImpl.portlet.TestPortlet");
    }
View Full Code Here

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

     *
     * @return WebAppDD instance representing the descriptor.
     * @throws java.io.IOException
     */
    public PortletAppDD read() throws IOException {
        PortletAppDD portlet =
            (PortletAppDD) readInternal();
        if(portlet == null && create) {
            portlet = new PortletAppDD();
        }
        return portlet;
    }
View Full Code Here

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

     *
     * @return WebAppDD instance representing the descriptor.
     * @throws java.io.IOException
     */
    public PortletAppDD read(InputStream in) throws IOException {
        PortletAppDD portlet =
            (PortletAppDD) readInternal(in);
        return portlet;
    }
View Full Code Here

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

            LOG.debug("Retrieved cross context: " + crossContext);
        }
       
        // Load PortletAppDD and find out the portlet definition.
        try {
            PortletAppDD appDD = PortletDescriptorRegistry.getRegistry()
                .getPortletAppDD(crossContext);
            for (Iterator it = appDD.getPortlets().iterator(); it.hasNext(); ) {
                PortletDD portletDD = (PortletDD) it.next();
                if (portletDD.getPortletName().equals(
                    portletWindow.getPortletName())) {
                  portletDefinition = portletDD;
                  break;
View Full Code Here

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

     * @throws PortletContainerException
     */
    public InternalPortletContext getPortletContext(ServletContext servletContext)
    throws PortletContainerException {
        if (!portletContexts.containsKey(servletContext)) {
            PortletAppDD portletAppDD = PortletDescriptorRegistry.getRegistry()
                .getPortletAppDD(servletContext);
            PortletContext portletContext = new PortletContextImpl(
                servletContext, portletAppDD);
            portletContexts.put(servletContext, portletContext);
        }
View Full Code Here

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

     * @return The portlet application deployment descriptor.
     * @throws PortletContainerException
     */
    public PortletAppDD getPortletAppDD(ServletContext servletContext)
    throws PortletContainerException {
        PortletAppDD portletAppDD = (PortletAppDD) cache.get(servletContext);
        if (portletAppDD == null) {
          portletAppDD = createDefinition(servletContext);
            cache.put(servletContext, portletAppDD);
        }
        return portletAppDD;
View Full Code Here

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

     * @return the Portlet Application Deployment Descriptor.
     * @throws PortletContainerException
     */
    private PortletAppDD createDefinition(ServletContext servletContext)
    throws PortletContainerException {
        PortletAppDD portletAppDD = null;
        try {
            InputStream in = servletContext.getResourceAsStream(PORTLET_XML);
            portletAppDD = portletDDService.read(in);
        } catch (IOException ex) {
            throw new PortletContainerException(EXCEPTIONS.getString(
View Full Code Here

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

            throw new ServletException(ex);
        }
       
        // Retrieve the portletDD and create portlet config.
        PortletDD portletDD = null;
        PortletAppDD portletAppDD =
            portletContext.getPortletApplicationDefinition();
        for (Iterator it = portletAppDD.getPortlets().iterator();
            it.hasNext(); ) {
          PortletDD currentDD = (PortletDD) it.next();
          if (currentDD.getPortletName().equals(portletName)) {
            portletDD = currentDD;
            break;
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.