Package org.apache.jetspeed.container

Examples of org.apache.jetspeed.container.PortletWindow


                                             PageActionAccess pageActionAccess,
                                             Decoration decoration,
                                             boolean isAjaxRequest)
    {
        boolean fragmentSupportsActions = false;
        PortletWindow window = requestContext.getPortletWindow(fragment);
        if (!window.isValid())
        {
            return fragmentSupportsActions; // allow nothing
        }
        PortletDefinition portlet = window.getPortletDefinition();

        List actions = Collections.EMPTY_LIST;
       
        PortletMode currentMode = requestContext.getPortalURL().getNavigationalState().getMode(window);
        WindowState currentState = requestContext.getPortalURL().getNavigationalState().getState(window);
        List<Supports> supports = portlet.getSupports();
       
        if ( fragment.equals(requestContext.getPage().getRootFragment()) )
        {
            fragmentSupportsActions = true;
            actions = getPageModes(requestContext, window, supports, currentMode, currentState, pageActionAccess, decoration, isAjaxRequest);
        }
        else if ( !Fragment.LAYOUT.equals(fragment.getType()) )
        {
            fragmentSupportsActions = true;
            String fragmentId = fragment.getId();
            PortletApplication pa = window.getPortletDefinition().getApplication();

            String portletName = portlet.getUniqueName();

            PortletMode currentMappedMode = pa.getMappedPortletMode(currentMode);
            WindowState currentMappedState = pa.getMappedWindowState(currentState);
View Full Code Here


     */
    public WindowState getWindowState() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return WindowState.NORMAL;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getState(window);
View Full Code Here

     */
    public WindowState getMappedWindowState() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return WindowState.NORMAL;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getMappedState(window);
View Full Code Here

     */
    public PortletMode getPortletMode() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return PortletMode.VIEW;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getMode(window);
View Full Code Here

     */
    public PortletMode getMappedPortletMode() throws Exception
    {
        try
        {
            PortletWindow window = getPortletWindow(getCurrentFragment());
            if (!window.isValid())
            {
                // return a sensible default value to allow a mimimum level of processing to continue
                return PortletMode.VIEW;
            }
            return getRequestContext().getPortalURL().getNavigationalState().getMappedMode(window);
View Full Code Here

            if (windowId == null || portletUniqueName == null)
            {
                throw new IllegalArgumentException("Parameter windowId and portletUniqueName are both required");
            }
            RequestContext context = getRequestContext();
            PortletWindow window = context.getInstantlyCreatedPortletWindow(windowId, portletUniqueName);
            if (window.isValid())
            {
                PortletWindow currentPortletWindow = context.getCurrentPortletWindow();
                try
                {
                    context.setCurrentPortletWindow(window);
                    renderer.renderNow(window.getFragment(), context);
                    return window.getFragment().getRenderedContent();
View Full Code Here

        String remoteUser = request.getRemoteUser();
        if ( remoteUser == null )
        {
            return null;
        }
        PortletWindow portletWindow = (PortletWindow)window;
        return getUserInfoMap(portletWindow.getPortletDefinition().getApplication().getName(), portletWindow.getRequestContext());       
    }
View Full Code Here

    {
        boolean targetResolved = true;
        for (Iterator<Map.Entry<String,PortletWindowRequestNavigationalState>> entryIter = requestStates.getPortletWindowRequestNavigationalStates().entrySet().iterator(); entryIter.hasNext(); )
        {
            Map.Entry<String,PortletWindowRequestNavigationalState> entry = entryIter.next();
            PortletWindow window = requestContext.resolvePortletWindow(entry.getKey());
            if (window == null || !window.isValid())
            {
                entryIter.remove();
                if (requestStates.getTargetWindowId() != null && entry.getKey().equals(requestStates.getTargetWindowId()))
                {
                    requestStates.setTargetWindowId(null);
                    if (PortalURL.URLType.RENDER != requestStates.getURLType())
                    {
                        targetResolved = false;
                    }
                }
            }
            else
            {
                entry.getValue().setPortletDefinition(window.getPortletDefinition());
                if (requestStates.getTargetWindowId() != null && entry.getKey().equals(requestStates.getTargetWindowId()))
                {
                    if (PortalURL.URLType.ACTION == requestStates.getURLType())
                    {
                        requestStates.setActionWindow(window);
View Full Code Here

        {
            try
            {
                if (log.isWarnEnabled())
                {
                    PortletWindow window = job.getWindow();
                    PortletWindowID windowId = (null != window ? window.getId() : null);
                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout() + "ms): " + windowId.getStringId());
                }

                PortletContent content = job.getPortletContent();
               
View Full Code Here

            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }
       
        // handle maximized state
        NavigationalState nav = context.getPortalURL().getNavigationalState();
        PortletWindow window = nav.getMaximizedWindow();
       
        if (null != window)
        {
            renderMaximizedWindow(context, page, root, window);
        }
        else
        {
            aggregateAndRender(root, context, page);
        }
       
        // write all rendered content
        context.getResponse().getWriter().write(root.getRenderedContent());
       
        if (null != window)
        {
            window.removeAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE);
            window.removeAttribute(PortalReservedParameters.MAXIMIZED_LAYOUT_ATTRIBUTE);
        }
       
        releaseBuffers(root, context);       
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.container.PortletWindow

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.