Class 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.

    • Field Detail

      • 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 javax.servlet.http.HttpServletRequest m_request
        HttpServletRequest *
    • Constructor Detail

      • ActionURL

        public ActionURL​(String base,
                         javax.servlet.http.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
        Overrides:
        toString in class Object
        Returns:
        The URL.
      • setResourcePath

        public ActionURL setResourcePath​(String path)
        Parameters:
        resource - Whether the URL is a resource
      • setQueryString

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