Package org.gatein.pc.api

Examples of org.gatein.pc.api.Mode


            WindowState windowState = actionURL.getWindowState();
            if (windowState != null) {
                url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
            }

            Mode mode = actionURL.getMode();
            if (mode != null) {
                url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());
            }
        } else if (containerURL instanceof ResourceURL) {
            ResourceURL resourceURL = (ResourceURL) containerURL;

            url.setQueryParameterValue(Constants.RESOURCE_ID_PARAMETER, resourceURL.getResourceId());

            CacheLevel cachability = resourceURL.getCacheability();
            if (cachability != null) {
                url.setQueryParameterValue(Constants.CACHELEVEL_PARAMETER, cachability.name());
            }

            StateString resourceState = resourceURL.getResourceState();
            if (resourceState != null && !resourceState.getStringValue().equals(StateString.JBPNS_PREFIX)) {
                url.setQueryParameterValue(RESOURCE_STATE_PARAM_NAME, resourceState.getStringValue());
            }

            resourceState = resourceURL.getNavigationalState();
            if (resourceState != null && !resourceState.getStringValue().equals(StateString.JBPNS_PREFIX)) {
                url.setQueryParameterValue(NAVIGATIONAL_STATE_PARAM_NAME, resourceState.getStringValue());
            }

            WindowState windowState = resourceURL.getWindowState();
            if (windowState != null) {
                url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
            }

            Mode mode = resourceURL.getMode();
            if (mode != null) {
                url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());
            }
        } else {
            RenderURL renderURL = (RenderURL) containerURL;

            WindowState windowState = renderURL.getWindowState();
            if (windowState != null)// && !windowState.equals(WindowState.NORMAL))
            {
                url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
            }

            Mode mode = renderURL.getMode();
            if (mode != null) {
                url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());
            }

            Map<String, String[]> publicNSChanges = renderURL.getPublicNavigationalStateChanges();
            if (ParameterValidation.existsAndIsNotEmpty(publicNSChanges)) {
                for (String key : publicNSChanges.keySet()) {
View Full Code Here


        }
        return null;
    }

    private static String getPortletModeOrDefault(UpdateNavigationalStateResponse navResponse) {
        Mode mode = navResponse.getMode();
        if (mode == null) {
            mode = Mode.VIEW;
        }
        return mode.toString();
    }
View Full Code Here

   PortletInvocationResponse invoke(PortletControllerContext context, PortletResourceRequest portletResourceRequest) throws PortletInvokerException
   {

      //
      Mode mode = null;
      org.gatein.pc.api.WindowState windowState = null;
      PortletPageNavigationalState pageNavigationalState = null;
      Map<String, String[]> publicNS = null;
      StateString portletNS = null;
      CacheLevel cacheability;
View Full Code Here

        }
        return null;
    }

    private static String getPortletModeOrDefault(UpdateNavigationalStateResponse navResponse) {
        Mode mode = navResponse.getMode();
        if (mode == null) {
            mode = Mode.VIEW;
        }
        return mode.toString();
    }
View Full Code Here

      return null;
   }

   private static String getPortletModeOrDefault(UpdateNavigationalStateResponse navResponse)
   {
      Mode mode = navResponse.getMode();
      if (mode == null)
      {
         mode = Mode.VIEW;
      }
      return mode.toString();
   }
View Full Code Here

        }
        return null;
    }

    private static String getPortletModeOrDefault(UpdateNavigationalStateResponse navResponse) {
        Mode mode = navResponse.getMode();
        if (mode == null) {
            mode = Mode.VIEW;
        }
        return mode.toString();
    }
View Full Code Here

      return null;
   }

   private static String getPortletModeOrDefault(UpdateNavigationalStateResponse navResponse)
   {
      Mode mode = navResponse.getMode();
      if (mode == null)
      {
         mode = Mode.VIEW;
      }
      return mode.toString();
   }
View Full Code Here

         if (windowState != null)
         {
            appendParameter(baseURL, Constants.WINDOW_STATE_PARAMETER, windowState.toString());
         }

         Mode mode = actionURL.getMode();
         if (mode != null)
         {
            appendParameter(baseURL, Constants.PORTLET_MODE_PARAMETER, mode.toString());
         }
      }
      else if (containerURL instanceof ResourceURL)
      {
         ResourceURL resourceURL = (ResourceURL)containerURL;

         appendParameter(baseURL, Constants.RESOURCE_ID_PARAMETER, resourceURL.getResourceId());

         CacheLevel cachability = resourceURL.getCacheability();
         if (cachability != null)
         {
            appendParameter(baseURL, Constants.CACHELEVEL_PARAMETER, cachability.name());
         }

         StateString resourceState = resourceURL.getResourceState();
         if (resourceState != null && !resourceState.getStringValue().equals(StateString.JBPNS_PREFIX))
         {
            appendParameter(baseURL, RESOURCE_STATE_PARAM_NAME, resourceState.getStringValue());
         }

         resourceState = resourceURL.getNavigationalState();
         if (resourceState != null && !resourceState.getStringValue().equals(StateString.JBPNS_PREFIX))
         {
            appendParameter(baseURL, NAVIGATIONAL_STATE_PARAM_NAME, resourceState.getStringValue());
         }

         WindowState windowState = resourceURL.getWindowState();
         if (windowState != null)
         {
            appendParameter(baseURL, Constants.WINDOW_STATE_PARAMETER, windowState.toString());
         }

         Mode mode = resourceURL.getMode();
         if (mode != null)
         {
            appendParameter(baseURL, Constants.PORTLET_MODE_PARAMETER, mode.toString());
         }
      }
      else
      {
         RenderURL renderURL = (RenderURL)containerURL;

         WindowState windowState = renderURL.getWindowState();
         if (windowState != null)//&& !windowState.equals(WindowState.NORMAL))
         {
            appendParameter(baseURL, Constants.WINDOW_STATE_PARAMETER, windowState.toString());
         }

         Mode mode = renderURL.getMode();
         if (mode != null && !mode.equals(Mode.VIEW))
         {
            appendParameter(baseURL, Constants.PORTLET_MODE_PARAMETER, mode.toString());
         }

         Map<String, String[]> publicNSChanges = renderURL.getPublicNavigationalStateChanges();
         if (ParameterValidation.existsAndIsNotEmpty(publicNSChanges))
         {
View Full Code Here

   }

   public static Mode getJSR168PortletModeFromWSRPName(String wsrpPortletModeName)
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(wsrpPortletModeName, WSRP_MODE_NAME, null);
      Mode mode = WSRP_JSR168_MODES.get(wsrpPortletModeName);
      return (mode == null) ? Mode.create(wsrpPortletModeName) : mode;
   }
View Full Code Here

      if (containerURL == null)
      {
         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)
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.Mode

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.