org.sakaiproject.vm
Class ActionURL

java.lang.Object
  extended byorg.sakaiproject.vm.ActionURL

public class ActionURL
extends Object

PortletActionURL provides a URL with settable and re-settable parameters based on a portlet window's ActionURL base URL.

Version:
$Revision: 1350 $
Author:
University of Michigan, CHEF Software Development Team

Field Summary
protected  String m_base
          The base url to the portlet.
protected  boolean m_isAction
          Is this an Action URL
protected  String m_page
          The site pge, if any.
protected  String m_panel
          The panel, if any.
protected  Map m_parameters
          parameters.
protected  String m_pid
          The portlet window id, if any.
protected  String m_QueryString
          Pre-formatted query string, in lieu of parameters
protected  HttpServletRequest m_request
          HttpServletRequest *
protected  String m_resourcePath
          Is this a Resource URL
protected  String m_site
          The site, if any.
static String PARAM_PAGE
          The parameter for page.
static String PARAM_PANEL
          The parameter for paneld.
static String PARAM_PID
          The parameter for portlet window id (pid).
static String PARAM_SITE
          The parameter for site.
 
Constructor Summary
ActionURL(String base, HttpServletRequest request)
          Construct with a base URL to the portlet, no parameters
 
Method Summary
 boolean equals(Object obj)
          
 ActionURL reset()
          "Reset" the URL by clearing the parameters.
 ActionURL setAction()
          Set this URL to be an 'action' URL, one that usually does a Form POST
 ActionURL setPage(String page)
          Set or reset the page.
 ActionURL setPanel(String panel)
          Set or reset the panel.
 ActionURL setParameter(String name, String value)
          Set or replace (or remove if value is null) a parameter
 ActionURL setPid(String pid)
          Set or reset the pid.
 ActionURL setQueryString(String queryString)
           
 ActionURL setResourcePath(String path)
           
 ActionURL setSite(String site)
          Set or reset the site.
 String toString()
          Reneder the URL with parameters
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAM_PID

public static final String PARAM_PID
The parameter for portlet window id (pid).

See Also:
Constant Field Values

PARAM_SITE

public static final String PARAM_SITE
The parameter for site.

See Also:
Constant Field Values

PARAM_PAGE

public static final String PARAM_PAGE
The parameter for page.

See Also:
Constant Field Values

PARAM_PANEL

public static final String PARAM_PANEL
The parameter for paneld.

See Also:
Constant Field Values

m_base

protected String m_base
The base url to the portlet.


m_parameters

protected Map m_parameters
parameters.


m_pid

protected String m_pid
The portlet window id, if any.


m_panel

protected String m_panel
The panel, if any.


m_site

protected String m_site
The site, if any.


m_page

protected String m_page
The site pge, if any.


m_isAction

protected boolean m_isAction
Is this an Action URL


m_resourcePath

protected String m_resourcePath
Is this a Resource URL


m_QueryString

protected String m_QueryString
Pre-formatted query string, in lieu of parameters


m_request

protected HttpServletRequest m_request
HttpServletRequest *

Constructor Detail

ActionURL

public ActionURL(String base,
                 HttpServletRequest request)
Construct with a base URL to the portlet, no parameters

Parameters:
base - The base URL
Method Detail

reset

public ActionURL reset()
"Reset" the URL by clearing the parameters.

Returns:
this.

setParameter

public ActionURL setParameter(String name,
                              String value)
Set or replace (or remove if value is null) a parameter

Parameters:
name - The parameter name.
value - The parameter value.
Returns:
this.

setAction

public ActionURL setAction()
Set this URL to be an 'action' URL, one that usually does a Form POST

Returns:
this

setPid

public ActionURL setPid(String pid)
Set or reset the pid.

Parameters:
pid - The portlet window id.

setSite

public ActionURL setSite(String site)
Set or reset the site.

Parameters:
site - The site id.

setPage

public ActionURL setPage(String page)
Set or reset the page.

Parameters:
page - The page id.

setPanel

public ActionURL setPanel(String panel)
Set or reset the panel.

Parameters:
panel - The panel id.

toString

public String toString()
Reneder the URL with parameters

Returns:
The URL.

equals

public boolean equals(Object obj)


setResourcePath

public ActionURL setResourcePath(String path)

setQueryString

public ActionURL setQueryString(String queryString)
Parameters:
queryString - The m_QueryString to set.