fr.paris.lutece.plugins.jsr168.pluto.core
Class PortalURL

java.lang.Object
  extended by fr.paris.lutece.plugins.jsr168.pluto.core.PortalURL

public class PortalURL
extends java.lang.Object

Define


Field Summary
static java.lang.String PREFIX
          Prefix all parameters
 
Constructor Summary
PortalURL(javax.servlet.http.HttpServletRequest request)
          Construct a PortletURL instance
TODO need to extract render parameters?
 
Method Summary
static java.lang.String buildParams(org.apache.pluto.om.common.ObjectID portletID, boolean bAction, javax.portlet.PortletMode portletMode, javax.portlet.WindowState windowState, java.util.Map parameters)
          Build URL parameters list
static java.lang.String extractPortletId(javax.servlet.http.HttpServletRequest servletRequest)
          Extract the porlet ID from an HTTP request
 void fillWindowPortlet(PortletWindowImpl portletWindow)
          Fill a portlet window with state and mode values
 javax.portlet.PortletMode getPortletMode()
          Return the portlet mode associate to this URL.
 javax.portlet.WindowState getWindowState()
          Return the window state associate to this URL.
 boolean isAction()
          Return true to indicate an action URL.
static boolean isActionURL(javax.servlet.http.HttpServletRequest servletRequest)
          Indicate if an HTTP request is an action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final java.lang.String PREFIX
Prefix all parameters

See Also:
Constant Field Values
Constructor Detail

PortalURL

public PortalURL(javax.servlet.http.HttpServletRequest request)
Construct a PortletURL instance
TODO need to extract render parameters?

Parameters:
request - A HTTP request who define action, mode and state
Method Detail

isAction

public boolean isAction()
Return true to indicate an action URL.

Returns:
true to indicate an action URL

getPortletMode

public javax.portlet.PortletMode getPortletMode()
Return the portlet mode associate to this URL.

Returns:
portlet mode associate to this URL

getWindowState

public javax.portlet.WindowState getWindowState()
Return the window state associate to this URL.

Returns:
window state associate to this URL

fillWindowPortlet

public void fillWindowPortlet(PortletWindowImpl portletWindow)
Fill a portlet window with state and mode values

Parameters:
portletWindow - The portlet window to fill with defined state and mode

buildParams

public static java.lang.String buildParams(org.apache.pluto.om.common.ObjectID portletID,
                                           boolean bAction,
                                           javax.portlet.PortletMode portletMode,
                                           javax.portlet.WindowState windowState,
                                           java.util.Map parameters)
Build URL parameters list

Parameters:
portletID - Portlet ID of the portlet target
bAction - Indicate an action URL (vs a render URL)
portletMode - Current portlet mode
windowState - Current portlet window state
parameters - Map of parameters (the map must be typed <String, String> or <String, String[]>)
Returns:
The URL parameters fragment
for example:
  • Portlet ID: 15
  • Ask for an action URL
  • Parameters: value="295", action="set", field="day"

  • will return the string : "_pid=15&_ac=1&value=295&action=set&field=day"

    extractPortletId

    public static java.lang.String extractPortletId(javax.servlet.http.HttpServletRequest servletRequest)
    Extract the porlet ID from an HTTP request

    Parameters:
    servletRequest - The HTTP request
    Returns:
    the porlet ID defined by an HTTP request

    isActionURL

    public static boolean isActionURL(javax.servlet.http.HttpServletRequest servletRequest)
    Indicate if an HTTP request is an action

    Parameters:
    servletRequest - The HTTP request
    Returns:
    true if the HTTP request is a portlet action request


    Copyright © 2008 Mairie de Paris. All Rights Reserved.