Package org.apache.pluto.descriptors.portlet

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


        final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
        final List<SecurityRoleRefDD> securityRoleRefs;
        try {
            final IPortletEntity portletEntity = this.portletWindowRegistry.getParentPortletEntity(httpServletRequest, portletWindowId);
            final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntity.getPortletEntityId());
            final PortletDD portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());
            if (portletDescriptor == null) {
                throw new InconsistentPortletModelException("Could not retrieve PortletDD for portlet window '" + portletWindowId + "', this usually means the Portlet application is not deployed correctly.", portletWindowId);
            }
           
            securityRoleRefs = portletDescriptor.getSecurityRoleRefs();
        }
        catch (PortletContainerException pce) {
            throw new InconsistentPortletModelException("Could not retrieve PortletDD for portlet window '" + portletWindowId + "' to provide the required SecurityRoleRefDD List to the PortletHttpRequestWrapper.", portletWindowId, pce);
        }
       
View Full Code Here


        EasyMock.expect(portletDefinition.getPortletDefinitionId()).andReturn(portletDefinitionId);
       
        final IPortletEntityRegistry portletEntityRegistry = EasyMock.createMock(IPortletEntityRegistry.class);
        EasyMock.expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
       
        final PortletDD portletDD = new PortletDD();
        portletDD.setExpirationCache(PortletDD.EXPIRATION_CACHE_UNSET);
       
        final IPortletDefinitionRegistry portletDefinitionRegistry = EasyMock.createMock(IPortletDefinitionRegistry.class);
        EasyMock.expect(portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId)).andReturn(portletDD);
       
        final IPortalRequestUtils portalRequestUtils = EasyMock.createMock(IPortalRequestUtils.class);
View Full Code Here

        EasyMock.expect(portletDefinition.getPortletDefinitionId()).andReturn(portletDefinitionId);
       
        final IPortletEntityRegistry portletEntityRegistry = EasyMock.createMock(IPortletEntityRegistry.class);
        EasyMock.expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
       
        final PortletDD portletDD = new PortletDD();
        portletDD.setExpirationCache(1);
       
        final IPortletDefinitionRegistry portletDefinitionRegistry = EasyMock.createMock(IPortletDefinitionRegistry.class);
        EasyMock.expect(portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId)).andReturn(portletDD);
       
        final IPortalRequestUtils portalRequestUtils = EasyMock.createMock(IPortalRequestUtils.class);
View Full Code Here

        EasyMock.expect(portletDefinition.getPortletDefinitionId()).andReturn(portletDefinitionId);
       
        final IPortletEntityRegistry portletEntityRegistry = EasyMock.createMock(IPortletEntityRegistry.class);
        EasyMock.expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
       
        final PortletDD portletDD = new PortletDD();
        portletDD.setExpirationCache(1);
       
        final IPortletDefinitionRegistry portletDefinitionRegistry = EasyMock.createMock(IPortletDefinitionRegistry.class);
        EasyMock.expect(portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId)).andReturn(portletDD);
       
        final IPortalRequestUtils portalRequestUtils = EasyMock.createMock(IPortalRequestUtils.class);
View Full Code Here

        EasyMock.expect(portletDefinition.getPortletDefinitionId()).andReturn(portletDefinitionId);
       
        final IPortletEntityRegistry portletEntityRegistry = EasyMock.createMock(IPortletEntityRegistry.class);
        EasyMock.expect(portletEntityRegistry.getParentPortletDefinition(portletEntityId)).andReturn(portletDefinition);
       
        final PortletDD portletDD = new PortletDD();
       
        final IPortletDefinitionRegistry portletDefinitionRegistry = EasyMock.createMock(IPortletDefinitionRegistry.class);
        EasyMock.expect(portletDefinitionRegistry.getParentPortletDescriptor(portletDefinitionId)).andReturn(portletDD);
       
        final IPortalRequestUtils portalRequestUtils = EasyMock.createMock(IPortalRequestUtils.class);
View Full Code Here

        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(portletRequest);
       
        Integer expirationCache = portletWindow.getExpirationCache();
       
        if (expirationCache == null) {
            final PortletDD portletDeployment = this.getPortletDeployment(httpServletRequest, portletWindow);
            final int descriptorExpirationCache = portletDeployment.getExpirationCache();
           
            if (PortletDD.EXPIRATION_CACHE_UNSET != descriptorExpirationCache) {
                expirationCache = descriptorExpirationCache;
            }
        }
View Full Code Here

    @Override
    public void setResponseProperty(HttpServletRequest portletRequest, IPortletWindow portletWindow, String property, String value) {
        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(portletRequest);
       
        if (RenderResponse.EXPIRATION_CACHE.equals(property)) {
            final PortletDD portletDeployment = this.getPortletDeployment(httpServletRequest, portletWindow);
            final int descriptorExpirationCache = portletDeployment.getExpirationCache();
           
            //Only set the cache expiration if the descriptor has a cache expiration set (PLT.18.1)
            if (PortletDD.EXPIRATION_CACHE_UNSET != descriptorExpirationCache) {
                Integer cacheExpiration = portletWindow.getExpirationCache();
                try {
View Full Code Here

        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(portletRequest);
       
        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
        final IPortletEntity portletEntity = this.portletWindowRegistry.getParentPortletEntity(httpServletRequest, portletWindow.getPortletWindowId());
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntity.getPortletEntityId());
        final PortletDD portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());

       
        //Linked hash map used to add preferences in order loaded from the descriptor, definition and entity
        final LinkedHashMap<String, InternalPortletPreference> preferencesMap = new LinkedHashMap<String, InternalPortletPreference>();
       
View Full Code Here

        }

        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
        final IPortletEntity portletEntity = this.portletWindowRegistry.getParentPortletEntity(httpServletRequest, portletWindow.getPortletWindowId());
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntity.getPortletEntityId());
        final PortletDD portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());

        //Is this CONFIG mode
        final boolean configMode = IPortletAdaptor.CONFIG.equals(portletWindow.getPortletMode());
       
        //Get Map of descriptor and definition preferences to check new preferences against
View Full Code Here

    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)
            );
        }

        return portletContext.getApplicationId();
View Full Code Here

TOP

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

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.