Package org.apache.cocoon.portal.wsrp.consumer

Examples of org.apache.cocoon.portal.wsrp.consumer.RequestImpl


            User user = (User) coplet.getTemporaryAttribute(ATTRIBUTE_NAME_USER);
           
            org.apache.cocoon.environment.Request requestObject = ObjectModelHelper.getRequest(service.getObjectModel());
            java.util.Enumeration formParameter = requestObject.getParameterNames();

            Request request = new RequestImpl();
            String portletMode = requestObject.getParameter(Constants.PORTLET_MODE);
            String windowState = requestObject.getParameter(Constants.WINDOW_STATE);
           
            request.setInteractionState(requestObject.getParameter(Constants.INTERACTION_STATE));
            SimplePortletWindowSession windowSession = getSimplePortletWindowSession(wsrpPortlet, portletInstanceKey, user);
            windowSession.setNavigationalState(requestObject.getParameter(Constants.NAVIGATIONAL_STATE));

            if (portletMode != null) {
                windowSession.setMode(portletMode);
            }
            if (windowState != null) {
                if ( !windowState.equals(windowSession.getWindowState()) ) {
                    final Layout layout = (Layout)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_LAYOUT);
                    final Layout fullScreenLayout = service.getEntryLayout(null);
                    if ( fullScreenLayout != null
                         && fullScreenLayout.equals( layout )
                         && !windowState.equals(WindowStates._maximized) ) {
                        FullScreenCopletEvent e = new FullScreenCopletEvent( coplet, null );
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._minimized) ) {
                        ChangeCopletInstanceAspectDataEvent e = new ChangeCopletInstanceAspectDataEvent(coplet, "size", SizingStatus.STATUS_MINIMIZED);
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._normal) ) {
                        ChangeCopletInstanceAspectDataEvent e = new ChangeCopletInstanceAspectDataEvent(coplet, "size", SizingStatus.STATUS_MAXIMIZED);
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._maximized) ) {
                        FullScreenCopletEvent e = new FullScreenCopletEvent( coplet, layout );
                        service.getComponentManager().getEventManager().send(e);
                    }
                    windowSession.setWindowState(windowState);
                }
            }
            if (requestObject.getParameter(Constants.URL_TYPE).equals(Constants.URL_TYPE_BLOCKINGACTION)) {
            // performBlockingInteraction()
                String parameter;
                while (formParameter.hasMoreElements()) {
                    parameter = (String) formParameter.nextElement();
                    request.addFormParameter(parameter, requestObject.getParameter(parameter));
                }
                performBlockingInteraction(wsrpPortlet, windowSession, user, request);
           
            }
               
View Full Code Here


            User user = (User) coplet.getTemporaryAttribute(ATTRIBUTE_NAME_USER);
           
            org.apache.cocoon.environment.Request requestObject = ObjectModelHelper.getRequest(service.getObjectModel());
            java.util.Enumeration formParameter = requestObject.getParameterNames();

            Request request = new RequestImpl();
            String portletMode = requestObject.getParameter(Constants.PORTLET_MODE);
            String windowState = requestObject.getParameter(Constants.WINDOW_STATE);
           
            request.setInteractionState(requestObject.getParameter(Constants.INTERACTION_STATE));
            SimplePortletWindowSession windowSession = getSimplePortletWindowSession(wsrpPortlet, portletInstanceKey, user);
            windowSession.setNavigationalState(requestObject.getParameter(Constants.NAVIGATIONAL_STATE));

            if (portletMode != null) {
                windowSession.setMode(portletMode);
            }
            if (windowState != null) {
                if ( !windowState.equals(windowSession.getWindowState()) ) {
                    final Layout layout = (Layout)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_LAYOUT);
                    final Layout fullScreenLayout = service.getEntryLayout(null);
                    if ( fullScreenLayout != null
                         && fullScreenLayout.equals( layout )
                         && !windowState.equals(WindowStates._maximized) ) {
                        FullScreenCopletEvent e = new FullScreenCopletEvent( coplet, null );
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._minimized) ) {
                        ChangeCopletInstanceAspectDataEvent e = new ChangeCopletInstanceAspectDataEvent(coplet, "size", SizingStatus.STATUS_MINIMIZED);
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._normal) ) {
                        ChangeCopletInstanceAspectDataEvent e = new ChangeCopletInstanceAspectDataEvent(coplet, "size", SizingStatus.STATUS_MAXIMIZED);
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._maximized) ) {
                        FullScreenCopletEvent e = new FullScreenCopletEvent( coplet, layout );
                        service.getComponentManager().getEventManager().send(e);
                    }
                    windowSession.setWindowState(windowState);
                }
            }
            if (requestObject.getParameter(Constants.URL_TYPE).equals(Constants.URL_TYPE_BLOCKINGACTION)) {
            // performBlockingInteraction()
                String parameter;
                while (formParameter.hasMoreElements()) {
                    parameter = (String) formParameter.nextElement();
                    request.addFormParameter(parameter, requestObject.getParameter(parameter));
                }
                performBlockingInteraction(wsrpPortlet, windowSession, user, request);
           
            }
               
View Full Code Here

            User user = (User) coplet.getTemporaryAttribute(ATTRIBUTE_NAME_USER);
           
            org.apache.cocoon.environment.Request requestObject = ObjectModelHelper.getRequest(service.getObjectModel());
            java.util.Enumeration formParameter = requestObject.getParameterNames();

            Request request = new RequestImpl();
            String portletMode = requestObject.getParameter(Constants.PORTLET_MODE);
            String windowState = requestObject.getParameter(Constants.WINDOW_STATE);
           
            request.setInteractionState(requestObject.getParameter(Constants.INTERACTION_STATE));
            SimplePortletWindowSession windowSession = getSimplePortletWindowSession(wsrpPortlet, portletInstanceKey, user);
            windowSession.setNavigationalState(requestObject.getParameter(Constants.NAVIGATIONAL_STATE));

            if (portletMode != null) {
                windowSession.setMode(portletMode);
            }
            if (windowState != null) {
                if ( !windowState.equals(windowSession.getWindowState()) ) {
                    final Layout layout = (Layout)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_LAYOUT);
                    final Layout fullScreenLayout = service.getEntryLayout(null);
                    if ( fullScreenLayout != null
                         && fullScreenLayout.equals( layout )
                         && !windowState.equals(WindowStates._maximized) ) {
                        FullScreenCopletEvent e = new FullScreenCopletEvent( coplet, null );
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._minimized) ) {
                        ChangeCopletInstanceAspectDataEvent e = new ChangeCopletInstanceAspectDataEvent(coplet, "size", SizingStatus.STATUS_MINIMIZED);
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._normal) ) {
                        ChangeCopletInstanceAspectDataEvent e = new ChangeCopletInstanceAspectDataEvent(coplet, "size", SizingStatus.STATUS_MAXIMIZED);
                        service.getComponentManager().getEventManager().send(e);
                    }
                    if ( windowState.equals(WindowStates._maximized) ) {
                        FullScreenCopletEvent e = new FullScreenCopletEvent( coplet, layout );
                        service.getComponentManager().getEventManager().send(e);
                    }
                    windowSession.setWindowState(windowState);
                }
            }
            if (requestObject.getParameter(Constants.URL_TYPE).equals(Constants.URL_TYPE_BLOCKINGACTION)) {
            // performBlockingInteraction()
                String parameter;
                while (formParameter.hasMoreElements()) {
                    parameter = (String) formParameter.nextElement();
                    request.addFormParameter(parameter, requestObject.getParameter(parameter));
                }
                performBlockingInteraction(wsrpPortlet, windowSession, user, request);
           
            }
               
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.wsrp.consumer.RequestImpl

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.