Examples of PortletAppDD


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

     * @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

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

    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

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

      WebAppDescriptorService descriptorSvc = new WebAppDescriptorServiceImpl()
      PortletAppDescriptorService portletAppDescriptorSvc = new PortletAppDescriptorServiceImpl();
       
        WebAppDD webAppDDIn = descriptorSvc.read(webXmlIn);
        PortletAppDD portletAppDD = portletAppDescriptorSvc.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

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

       
        // If the supplied window state isn't a JSR 168 window state,
        // we look to see if it is a custom window state.
       
        String appId = PortletWindowConfig.parseContextPath(portletId);
        PortletAppDD portletAppDD = null;
       
        if (portletRegistry == null)
        {                       
            portletRegistry = getPortletRegistryService();
            if ( portletRegistry == null )
            {
                return false;
            }
        }
       
        try
        {
            portletAppDD = portletRegistry.getPortletApplicationDescriptor(appId);
        }
        catch ( PortletContainerException e )
        {
            StringBuffer errMsg = new StringBuffer( "Cannot determine supported window " +
                    "states for portletId [" + portletId + "] and window state [" + state + "].  " );
            String msg = errMsg.append( "Unable to access the Portlet Registry Service." ).toString();
            LOG.error( msg, e );
        }
       
        List customWindowStates = portletAppDD.getCustomWindowStates();
        if ( customWindowStates != null )
        {
            for ( Iterator i = customWindowStates.iterator(); i.hasNext(); )
            {
                CustomWindowStateDD customState = (CustomWindowStateDD)i.next();
View Full Code Here

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

        try {
            if (portletRegistry == null) {
                LOG.error("Optional Portlet Registry Service not found.");
                throw new PortletContainerException("Optional Portlet Registry Service not found.");
            }
            PortletAppDD ctx = portletRegistry.getPortletApplicationDescriptor(applicationId);
            Iterator i = ctx.getPortlets().iterator();
            while(i.hasNext()) {
                PortletDD dd = (PortletDD)i.next();
                if(portletName.equals(dd.getPortletName())) {
                    Iterator i2 = dd.getSupports().iterator();
                    while(i2.hasNext()) {
View Full Code Here

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

        // obtain the context of the portlet
        ServletContext portletCtx = getPortletAppContext(context);

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

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

     * @return The portlet application deployment descriptor.
     * @throws PortletContainerException if the descriptor can not be found or parsed
     */
    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

            if (null == allMap) {
                return null;
            }

            final PortletRegistryService portletRegistryService = optionalContainerServices.getPortletRegistryService();
            final PortletAppDD dd = portletRegistryService.getPortletApplicationDescriptor(portletWindow.getContextPath());

            final List mappedUserAttributes = dd.getUserAttributes();
            for (final Iterator mappedAttrItr = mappedUserAttributes.iterator(); mappedAttrItr.hasNext(); ) {
                final UserAttributeDD userAttrDD = (UserAttributeDD) mappedAttrItr.next();
                final String mappedName = userAttrDD.getName();
                final Object value = allMap.get(mappedName);
                if (value != null) {
View Full Code Here

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

    }

    public void testParseMinimal() throws IOException {
        InputStream in = this.getClass().getResourceAsStream("/portlet-minimal.xml");

        PortletAppDD dd = service.read(in);
        assertEquals("1.0", dd.getVersion());
        assertEquals(0, dd.getCustomPortletModes().size());
        assertEquals(0, dd.getCustomWindowStates().size());
        assertEquals(0, dd.getUserAttributes().size());
        assertEquals(0, dd.getSecurityConstraints().size());
       
        List portlets = dd.getPortlets();
        assertEquals(1, portlets.size());
        PortletDD pd = (PortletDD)portlets.get(0);
       
        assertEquals(0, pd.getDescriptions().size());
        assertEquals(0, pd.getDisplayNames().size());
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.