Examples of IPortletWindow


Examples of org.jasig.portal.portlet.om.IPortletWindow

        }
    }

    @Override
    public PortletRenderResult doRender(IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Writer printWriter) {
        final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpServletRequest, portletWindowId);
       
        //Load the parameters to provide with the request
        final PortletUrl portletUrl = this.portletRequestParameterManager.getPortletRequestInfo(httpServletRequest, portletWindowId);
       
        Map<String, List<String>> parameters;
        //Current portlet isn't targeted, use parameters from previous request
        if (portletUrl == null) {
            parameters = portletWindow.getRequestParameters();
        }
        //Current portlet is targeted, set parameters and update state/mode
        else {
            parameters = portletUrl.getParameters();
            if (parameters != null) {
                portletWindow.setRequestParameters(parameters);
            }
           
            this.setupPortletWindow(httpServletRequest, portletWindow, portletUrl);
        }
       
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

        return new PortletRenderResult(title);
    }
   
    @Override
    public void doReset(IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpServletRequest, portletWindowId);
       
        portletWindow.setPortletMode(PortletMode.VIEW);
        portletWindow.setRequestParameters(null);
        portletWindow.setExpirationCache(null);
       
        final StringWriter responseOutput = new StringWriter();
       
        httpServletRequest = this.setupPortletRequest(httpServletRequest, portletWindow, null);
        httpServletResponse = new PortletHttpServletResponseWrapper(httpServletResponse, new PrintWriter(responseOutput));
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

     * @see org.apache.pluto.spi.optional.PortletPreferencesService#getStoredPreferences(org.apache.pluto.PortletWindow, javax.portlet.PortletRequest)
     */
    public InternalPortletPreference[] getStoredPreferences(PortletWindow plutoPortletWindow, PortletRequest portletRequest) throws PortletContainerException {
        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>();
       
        //Add descriptor preferences
        final List<IPortletPreference> descriptorPreferencesList = this.getDescriptorPreferences(portletDescriptor);
        this.addPreferencesToMap(descriptorPreferencesList, preferencesMap);
       
        //Add definition preferences
        final IPortletPreferences definitionPreferences = portletDefinition.getPortletPreferences();
        final List<IPortletPreference> definitionPreferencesList = definitionPreferences.getPortletPreferences();
        this.addPreferencesToMap(definitionPreferencesList, preferencesMap);
       
        //Determine if the user is a guest
        final boolean isGuest = isGuestUser(httpServletRequest);
       
        if (!IPortletAdaptor.CONFIG.equals(portletWindow.getPortletMode())) {
            //If not guest or storing shared guest prefs get the prefs from the portlet entity
            if (this.isLoadFromEntity(portletRequest)) {
                //Add entity preferences
                final IPortletPreferences entityPreferences = portletEntity.getPortletPreferences();
                final List<IPortletPreference> entityPreferencesList = entityPreferences.getPortletPreferences();
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

        //If this is a guest and no prefs are being stored just return as the rest of the method is not needed for this case
        if (isGuest && !(this.isStoreInEntity(portletRequest) || this.isStoreInMemory(portletRequest))) {
            return;
        }

        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
        final Map<String, InternalPortletPreference> basePreferences = new HashMap<String, InternalPortletPreference>();
       
        //Add deploy preferences
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

                                               HttpServletRequest servletRequest,
                                               PortletContext portletContext,
                                               HttpSession httpSession,
                                               InternalPortletWindow internalPortletWindow) {
       
        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(servletRequest, internalPortletWindow);
        final IPortletEntityId portletEntityId = portletWindow.getPortletEntityId();
        return new ScopingPortletSessionImpl(portletEntityId, portletContext, internalPortletWindow, httpSession);
    }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

        if (remoteUser == null) {
            return null;
        }
       
        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(request);
        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
       
        return this.getUserInfo(remoteUser, httpServletRequest, portletWindow);
    }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

    }

    public void testAddProperties() {
        final MockHttpServletRequest request = new MockHttpServletRequest();
       
        final IPortletWindow portletWindow = EasyMock.createMock(IPortletWindow.class);
        EasyMock.replay(portletWindow);
       
        final IRequestPropertiesManager delegateManager1 = new MockRequestPropertiesManager();
        final IRequestPropertiesManager delegateManager2 = new MockRequestPropertiesManager();
       
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

    }

    public void testSetProperties() {
        final MockHttpServletRequest request = new MockHttpServletRequest();
       
        final IPortletWindow portletWindow = EasyMock.createMock(IPortletWindow.class);
        EasyMock.replay(portletWindow);
       
        final IRequestPropertiesManager delegateManager1 = new MockRequestPropertiesManager();
        final IRequestPropertiesManager delegateManager2 = new MockRequestPropertiesManager();
       
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

    }

    public void testGetProperties() {
        final MockHttpServletRequest request = new MockHttpServletRequest();
       
        final IPortletWindow portletWindow = EasyMock.createMock(IPortletWindow.class);
        EasyMock.replay(portletWindow);
       
        final IRequestPropertiesManager delegateManager1 = new MockRequestPropertiesManager();
        final IRequestPropertiesManager delegateManager2 = new MockRequestPropertiesManager();
       
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletWindow

    @SuppressWarnings("unchecked")
  public boolean isCasProxyTicketRequested(PortletRequest request, PortletWindow plutoPortletWindow) throws PortletContainerException {

      // get the list of requested user attributes
        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(request);
        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 PortletAppDD portletApplicationDescriptor = this.portletDefinitionRegistry.getParentPortletApplicationDescriptor(portletDefinition.getPortletDefinitionId());
       
        // check to see if the proxy ticket key is one of the requested user attributes
        List<UserAttributeDD> requestedUserAttributes = portletApplicationDescriptor.getUserAttributes();
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.