Examples of IPortletWindow


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

        Validate.notNull(request, "request can not be null");
        Validate.notNull(windowInstanceId, "windowInstanceId can not be null");
        Validate.notNull(portletEntityId, "portletEntityId can not be null");
       
        //Try the get
        IPortletWindow portletWindow = this.getPortletWindow(request, windowInstanceId, portletEntityId);
       
        //If nothing returned by the get create a new one.
        if (portletWindow == null) {
            portletWindow = this.createPortletWindow(request, windowInstanceId, portletEntityId);
        }
View Full Code Here

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

     */
    public IPortletEntity getParentPortletEntity(HttpServletRequest request, IPortletWindowId portletWindowId) {
        Validate.notNull(request, "request can not be null");
        Validate.notNull(portletWindowId, "portletWindowId can not be null");
       
        final IPortletWindow portletWindow = this.getPortletWindow(request, portletWindowId);
        if (portletWindow == null) {
            return null;
        }
       
        final IPortletEntityId parentPortletEntityId = portletWindow.getPortletEntityId();
        final IPortletEntity portletEntity = this.portletEntityRegistry.getPortletEntity(parentPortletEntityId);
        return portletEntity;
    }
View Full Code Here

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

        Validate.notNull(request, "request can not be null");
        Validate.notNull(portletEntityId, "portletEntityId can not be null");

        //Create the window
        final IPortletWindowId portletWindowId = this.getDefaultPortletWindowId(portletEntityId);
        final IPortletWindow portletWindow = this.createPortletWindow(request, portletWindowId, portletEntityId);
       
        //Store it in the request
        this.storePortletWindow(request, portletWindow);
       
        return portletWindow;
View Full Code Here

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

        Validate.notNull(portletEntityId, "portletEntityId can not be null");
       
        final IPortletWindowId portletWindowId = this.getDefaultPortletWindowId(portletEntityId);
       
        //Try the get
        IPortletWindow portletWindow = this.getPortletWindow(request, portletWindowId);
       
        //If nothing returned by the get create a new one.
        if (portletWindow == null) {
            portletWindow = this.createDefaultPortletWindow(request, portletEntityId);
        }
View Full Code Here

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

        Validate.notNull(portletEntityId, "portletEntityId can not be null");
        Validate.notNull(delegationParentId, "delegationParentId can not be null");

        //Create the window
        final IPortletWindowId portletWindowId = this.getDefaultPortletWindowId(portletEntityId);
        final IPortletWindow portletWindow = this.createPortletWindow(request, portletWindowId, portletEntityId, delegationParentId);
       
        //Store it in the request
        this.storePortletWindow(request, portletWindow);
       
        return portletWindow;
View Full Code Here

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

        Validate.notNull(request, "request can not be null");
        Validate.notNull(portletEntityId, "portletEntityId can not be null");
        Validate.notNull(delegationParentId, "delegationParentId can not be null");

        //Try the get
        IPortletWindow portletWindow = this.getPortletWindow(request, portletWindowId);
       
        if (portletWindow != null && (portletWindow.getDelegationParent() == null || !portletWindow.getDelegationParent().equals(delegationParentId))) {
            throw new IllegalArgumentException("Delegation parent '" + delegationParentId + "' is not set as the parent for the existing portle window '" + portletWindow + "'");
        }
       
        //If nothing returned by the get create a new one.
        if (portletWindow == null) {
View Full Code Here

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

   
    /* (non-Javadoc)
     * @see org.jasig.portal.portlet.registry.ITransientPortletWindowRegistry#createTransientPortletWindowId(javax.servlet.http.HttpServletRequest, org.jasig.portal.portlet.om.IPortletWindowId)
     */
    public IPortletWindowId createTransientPortletWindowId(HttpServletRequest request, IPortletWindowId sourcePortletWindowId) {
        final IPortletWindow sourcePortletWindow = this.getPortletWindow(request, sourcePortletWindowId);
        if (sourcePortletWindow == null) {
            throw new IllegalArgumentException("No IPortletWindow exists for id: " + sourcePortletWindowId);
        }
       
        final IPortletEntityId portletEntityId = sourcePortletWindow.getPortletEntityId();
       
        //Build the transient ID from the prefix and the entity ID
        return new PortletWindowIdImpl(TRANSIENT_WINDOW_ID_PREFIX + portletEntityId.getStringId());
    }
View Full Code Here

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

                request.setAttribute(TRANSIENT_PORTLET_WINDOW_MAP_ATTRIBUTE, transientPortletWindowMap);
            }
        }
       
        //Get/create the transient portlet window
        IPortletWindow transientPortletWindow;
        synchronized (transientPortletWindowMap) {
            transientPortletWindow = transientPortletWindowMap.get(portletEntityId);
            if (transientPortletWindow == null) {
                final PortletWindowIdImpl portletWindowId = new PortletWindowIdImpl(windowInstanceId);
                transientPortletWindow = this.createPortletWindow(request, portletWindowId, portletEntityId);
                transientPortletWindow.setWindowState(WindowState.NORMAL);
                transientPortletWindowMap.put(portletEntityId, transientPortletWindow);
               
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("Created new transient portlet window and cached it as a request attribute: " + transientPortletWindow);
                }
View Full Code Here

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

        this.portletDelegationLocator = portletDelegationLocator;
    }

    public IPortletWindowId doInit(IPortletEntity portletEntity, IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
        final IPortletWindow portletWindow;
        if (portletWindowId != null) {
            portletWindow = this.portletWindowRegistry.getPortletWindow(httpServletRequest, portletWindowId);
            if (portletWindow == null) {
                throw new IllegalArgumentException("Portlet window is null but a portlet window ID has been configured for it: " + portletWindowId);
            }
        }
        else {
            portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindow(httpServletRequest, portletEntityId);
        }
       
        //init the portlet window
        final StringWriter initResultsOutput = new StringWriter();
        final PortletHttpServletResponseWrapper portletHttpServletResponseWrapper = new PortletHttpServletResponseWrapper(httpServletResponse, new PrintWriter(initResultsOutput));
       
        httpServletRequest = this.setupPortletRequest(httpServletRequest, portletWindow, null);
       
        try {
            if (this.logger.isDebugEnabled()) {
                this.logger.debug("Loading portlet window '" + portletWindow + "'");
            }
           
            this.portletContainer.doLoad(portletWindow, httpServletRequest, portletHttpServletResponseWrapper);
        }
        catch (PortletException pe) {
            throw new PortletLoadFailureException("The portlet window '" + portletWindow + "' threw an exception while being loaded.", portletWindow, pe);
        }
        catch (PortletContainerException pce) {
            throw new PortletLoadFailureException("The portlet container threw an exception while loading portlet window '" + portletWindow + "'.", portletWindow, pce);
        }
        catch (IOException ioe) {
            throw new PortletLoadFailureException("The portlet window '" + portletWindow + "' threw an exception while being loaded.", portletWindow, ioe);
        }
       
        final StringBuffer initResults = initResultsOutput.getBuffer();
        if (initResults.length() > 0) {
            throw new PortletLoadFailureException("Content was written to response during loading of portlet window '" + portletWindow + "' . Response Content: " + initResults, portletWindow);
        }
       
        return portletWindow.getPortletWindowId();
    }
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.jasig.portal.channels.portlet.IPortletRenderer#doAction(org.jasig.portal.portlet.om.IPortletWindowId, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    @Override
    public void doAction(IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpServletRequest, portletWindowId);
       
        //Load the parameters to provide to the portlet with the request and update the state and mode
        Map<String, List<String>> parameters = null;
        final PortletUrl portletUrl = this.portletRequestParameterManager.getPortletRequestInfo(httpServletRequest, portletWindowId);
        if (portletUrl != null) {
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.