Examples of StateString


Examples of org.gatein.pc.api.StateString

         String userAgent = WSRPConsumerImpl.getHttpRequest(invocation).getHeader(USER_AGENT);
         getMarkupParams().setClientData(WSRPTypeFactory.createClientData(userAgent));
         getMarkupParams().getExtensions().addAll(ExtensionAccess.getConsumerExtensionAccessor().getRequestExtensionsFor(MarkupParams.class));

         // navigational state
         StateString navigationalState = invocation.getNavigationalState();
         Map<String, String[]> publicNavigationalState = invocation.getPublicNavigationalState();

         // it is possible to get additional public navigational state from the invocation attributes if the producer used templates:
         String publicNS = (String)invocation.getAttribute(WSRP2RewritingConstants.NAVIGATIONAL_VALUES);
         if (!ParameterValidation.isNullOrEmpty(publicNS))
View Full Code Here

Examples of org.gatein.pc.api.StateString

      if (invocation instanceof RenderInvocation)
      {
         RenderInvocation renderInvocation = (RenderInvocation)invocation;

         //
         StateString navigationalState = renderInvocation.getNavigationalState();
         Map<String, String[]> publicNavigationalState = renderInvocation.getPublicNavigationalState();
         WindowState windowState = renderInvocation.getWindowState();
         Mode mode = renderInvocation.getMode();

         //
         CacheEntry cachedEntry = (CacheEntry)userContext.getAttribute(scopeKey);

         //
         if (cachedEntry != null)
         {
            // Check time validity for fragment
            boolean useEntry = false;
            StateString entryNavigationalState = cachedEntry.navigationalState;
            Map<String, String[]> entryPublicNavigationalState = cachedEntry.publicNavigationalState;

            // Then check nav state equality
            if (navigationalState == null)
            {
View Full Code Here

Examples of org.gatein.pc.api.StateString

         throw new IllegalArgumentException("Cannot construct a WSRPPortletURL from a null PortletURL!");
      }

      Mode mode = containerURL.getMode();
      WindowState windowState = containerURL.getWindowState();
      StateString navigationalState = containerURL.getNavigationalState();

      WSRPPortletURL url;
      if (containerURL instanceof ActionURL)
      {
         StateString interactionState = ((ActionURL)containerURL).getInteractionState();
         url = new WSRPActionURL(mode, windowState, secure, navigationalState, interactionState, context);
      }
      else if (containerURL instanceof RenderURL)
      {
         url = new WSRPRenderURL(mode, windowState, secure, navigationalState, ((RenderURL)containerURL).getPublicNavigationalStateChanges(), context);
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

      WindowState windowState = windowNS.getWindowState();
      if (update.getWindowState() != null)
      {
         windowState = update.getWindowState();
      }
      StateString portletNS = windowNS.getPortletNavigationalState();
      if (update.getNavigationalState() != null)
      {
         portletNS = update.getNavigationalState();
      }
      windowNS = new PortletWindowNavigationalState(portletNS, mode, windowState);
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

         windowState = WindowState.create(queryParameters.get(ControllerRequestParameterNames.WINDOW_STATE));
      }

      //
      String navigationalStateString = queryParameters.get(ControllerRequestParameterNames.NAVIGATIONAL_STATE);
      StateString navigationalState = null;
      if (navigationalStateString != null)
      {
         navigationalState = StateString.create(navigationalStateString);
      }

      //
      PortletWindowNavigationalState windowNavigationalState = new PortletWindowNavigationalState(navigationalState, mode, windowState);

      //
      String phase = queryParameters.get(ControllerRequestParameterNames.LIFECYCLE_PHASE);
      if (ControllerRequestParameterNames.RESOURCE_PHASE.equals(phase))
      {
         StateString resourceState = StateString.create(queryParameters.get(ControllerRequestParameterNames.RESOURCE_STATE));
         String resourceId = queryParameters.get(ControllerRequestParameterNames.RESOURCE_ID);

         //
         CacheLevel resourceCacheLevel = CacheLevel.valueOf(queryParameters.get(ControllerRequestParameterNames.RESOURCE_CACHEABILITY));

         //
         PortletResourceRequest.Scope scope;
         switch (resourceCacheLevel)
         {
            case FULL:
               scope = new PortletResourceRequest.FullScope();
               break;
            case PORTLET:
               scope = new PortletResourceRequest.PortletScope(windowNavigationalState);
               break;
            case PAGE:
               scope = new PortletResourceRequest.PageScope(windowNavigationalState, pageNavigationalState);
               break;
            default:
               throw new AssertionError();
         }

         //
         return new PortletResourceRequest(
            windowId,
            resourceId,
            resourceState,
            formParameterMap,
            scope);
      }
      else
      {
         if (ControllerRequestParameterNames.ACTION_PHASE.equals(phase))
         {
            StateString interactionState = StateString.create(queryParameters.get(ControllerRequestParameterNames.INTERACTION_STATE));

            //
            return new PortletActionRequest(
               windowId,
               interactionState,
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

      //
      Mode mode = null;
      WindowState windowState = null;
      PortletPageNavigationalState pageNavigationalState = null;
      Map<String, String[]> publicNS = null;
      StateString portletNS = null;
      CacheLevel cacheability;

      PortletResourceRequest.Scope scope = portletResourceRequest.getScope();

      //
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

            {
               parameters.put(ControllerRequestParameterNames.NAVIGATIONAL_STATE, actionURL.getNavigationalState().getStringValue());
            }

            //
            StateString interactionState = actionURL.getInteractionState();
            parameters.put(ControllerRequestParameterNames.INTERACTION_STATE, interactionState.getStringValue());
         }
         else
         {
            RenderURL renderURL = (RenderURL)containerURL;

            //
            Map<String, String[]> changes = renderURL.getPublicNavigationalStateChanges();
            byte[] bytes = IOTools.serialize(Serialization.PARAMETER_MAP, SerializationFilter.COMPRESSOR, changes);
            String ns = Base64.encodeBytes(bytes, true);
            parameters.put(ControllerRequestParameterNames.PUBLIC_NAVIGATIONAL_STATE_CHANGES, ns);

            //
            StateString navigationalState = renderURL.getNavigationalState();
            if (navigationalState != null)
            {
               parameters.put(ControllerRequestParameterNames.NAVIGATIONAL_STATE, navigationalState.getStringValue());
            }
         }
      }
      else
      {
         ResourceURL resourceURL = (ResourceURL)containerURL;

         //
         StateString resourceState = resourceURL.getResourceState();
         parameters.put(ControllerRequestParameterNames.RESOURCE_STATE, resourceState.getStringValue());

         //
         String resourceId = resourceURL.getResourceId();
         if (resourceId != null)
         {
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

      }

      //
      Mode mode = Mode.VIEW;
      WindowState windowState = WindowState.NORMAL;
      StateString portletNS = null;

      //
      if (windowNS != null)
      {
         if (windowNS.getMode() != null)
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

      int size = data.readInt();
      while (size-- > 0)
      {
         String windowId = data.readUTF();
         byte header = data.readByte();
         StateString portletNS = null;
         if ((header & 1) != 0)
         {
            portletNS = StateString.create(data);
         }
         WindowState windowState = null;
View Full Code Here

Examples of org.jboss.portal.portlet.StateString

         windowState = WindowState.create(queryParameters.get(ControllerRequestParameterNames.WINDOW_STATE));
      }

      //
      String navigationalStateString = queryParameters.get(ControllerRequestParameterNames.NAVIGATIONAL_STATE);
      StateString navigationalState = null;
      if (navigationalStateString != null)
      {
         navigationalState = ParametersStateString.create(navigationalStateString);
      }

      //
      PortletWindowNavigationalState windowNavigationalState = new PortletWindowNavigationalState(navigationalState, mode, windowState);

      //
      String phase = queryParameters.get(ControllerRequestParameterNames.LIFECYCLE_PHASE);
      if (ControllerRequestParameterNames.RESOURCE_PHASE.equals(phase))
      {
         StateString resourceState = ParametersStateString.create(queryParameters.get(ControllerRequestParameterNames.RESOURCE_STATE));
         String resourceId = queryParameters.get(ControllerRequestParameterNames.RESOURCE_ID);

         //
         CacheLevel resourceCacheLevel = CacheLevel.valueOf(queryParameters.get(ControllerRequestParameterNames.RESOURCE_CACHEABILITY));

         //
         PortletResourceRequest.Scope scope;
         switch (resourceCacheLevel)
         {
            case FULL:
               scope = new PortletResourceRequest.FullScope();
               break;
            case PORTLET:
               scope = new PortletResourceRequest.PortletScope(windowNavigationalState);
               break;
            case PAGE:
               scope = new PortletResourceRequest.PageScope(windowNavigationalState, pageNavigationalState);
               break;
            default:
               throw new AssertionError();
         }

         //
         return new PortletResourceRequest(
            windowId,
            resourceId,
            resourceState,
            formParameterMap,
            scope);
      }
      else
      {
         if (ControllerRequestParameterNames.ACTION_PHASE.equals(phase))
         {
            StateString interactionState = ParametersStateString.create(queryParameters.get(ControllerRequestParameterNames.INTERACTION_STATE));

            //
            return new PortletActionRequest(
               windowId,
               interactionState,
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.