Interface IPortletURL

All Superinterfaces:
javax.portlet.PortletURL
All Known Subinterfaces:
IPortletURL
All Known Implementing Classes:
ExtendedPortletUrl

public interface IPortletURL extends javax.portlet.PortletURL
Represents portlet url.
  • Field Details

    • GLOBAL_PARAMETER_KEEP_STATE

      static final String GLOBAL_PARAMETER_KEEP_STATE
      Global parameter to keep pageflow state. When set to true the last pageflow state of the managed beans on the page will be preserved. This is used to create so called 'return' Urls. When returning back the last state of portlets on the originated page will be preserved
      See Also:
    • GLOBAL_PARAMETER_RESET_STATE

      static final String GLOBAL_PARAMETER_RESET_STATE
      Global parameter to forcefully reset pageflow state.
      See Also:
  • Method Details

    • setBaseURL

      void setBaseURL(String url) throws Exception
      Sets base url for this portlet url. By default base url is current portal resource, but can be set to any other resource or even any other valid full url like http://myotherportal:8080/portal/alias/ Valid values are: /folder.public /folder.public?p1=p2 http://myotherportal:8080/folder.public?p1=p2&p3=p3
      Parameters:
      url -
      Throws:
      Exception
    • getBaseURL

      String getBaseURL()
      Returns base url for this portlet url. By default it's current portal resource, i.e. http://myotherportal:8080/<current.resource>
      Returns:
      current base url
      See Also:
    • setPortletMethod

      void setPortletMethod(String pcaMethod) throws Exception
      Sets PCA method name to invoke on the portlet
      Parameters:
      pcaMethod - name of the method
      Throws:
      Exception
    • setPortletLayout

      void setPortletLayout(String pcaLayout) throws Exception
      Sets PCA layout to display
      Parameters:
      pcaLayout - the layout to display
      Throws:
      Exception
    • clearParameters

      void clearParameters()
      Removes all portlet parameters from the URL
    • removeParameter

      void removeParameter(String name)
      Removes a portlet paremeter from the URL
      Parameters:
      name - the name of the parameter to remove
    • setTargetAction

      void setTargetAction(String action) throws Exception
      Sets target action to execute on the portlet. This has a format of JSF method binding expression. For example #{myportletPageBean.refresh}. This value is only valid for ACTION type portlet urls
      Parameters:
      action - action target JSF method binding expression
      Throws:
      Exception
    • setTargetView

      void setTargetView(String view) throws Exception
      Sets target view to display
      Parameters:
      view - name of view to display for a given portlet
      Throws:
      Exception
    • setParameter

      void setParameter(String name, String value, boolean encodeValue)
      Sets portlet parameter String value. Allows to specifiy whether to encode the value. Not encoding the value usually is useful when the url gets some post processing
      Parameters:
      name - the portlet parameter name
      value - the parameter value
      encodeValue - false to not encode the value.
    • setParameter

      void setParameter(String name, String[] value, boolean encodeValue)
      Sets portlet parameter String[] value.. Allows to specifiy whether to encode the value.
      Parameters:
      name - the portlet parameter name
      value - the parameter value
      encodeValue - false to not encode the value
      See Also:
    • setParameter

      void setParameter(String portlet, String name, String value, boolean encodeValue)
      Sets given portlet parameter String value. Allows to specifiy whether to encode the value. Not encoding the value usually is useful when the url gets some post processing
      Parameters:
      name - the portlet parameter name
      value - the parameter value
      encodeValue - false to not encode the value.
    • setParameter

      void setParameter(String portlet, String name, String[] value, boolean encodeValue)
      Sets given portlet parameter String[] value.. Allows to specifiy whether to encode the value.
      Parameters:
      name - the portlet parameter name
      value - the parameter value
      encodeValue - false to not encode the value
      See Also:
    • removeParameter

      void removeParameter(String portlet, String name)
      Removes parameter from the specified portlet
      Parameters:
      portlet - the portlet ID to remove parameter from
      name - parameter name
    • setGlobalParameter

      void setGlobalParameter(String name, String value)
      Sets global parameter for this Url, global parameters are affecting all portlets being rendered as a result of processing of this url. See GLOBAL_PARAMETER_KEEP_STATE and GLOBAL_PARAMETER_RESET_STATE
      Parameters:
      name - global parameter name
      value - global parameter value
    • removeGlobalParameter

      void removeGlobalParameter(String name)
      Removes any global parameters from this url. Global parameters are affecting all portlets being rendered as a result of processing of this url. See GLOBAL_PARAMETER_KEEP_STATE and GLOBAL_PARAMETER_RESET_STATE
      Parameters:
      name - global parameter name
    • addPortletURL

      IPortletURL addPortletURL(String anotherPortlet) throws Exception
      Creates portlet URL for another portlet on the the same target page. The returned url is used for customizing parameters and layout for this other
      Parameters:
      anotherPortlet -
      Returns:
      the created portlet URL
      Throws:
      Exception
    • setPortlet

      void setPortlet(String portlet) throws Exception
      Sets target portlet for this url.
      Throws:
      Exception
    • setAXSRFT

      void setAXSRFT(boolean useToken)
      True to include anti-cross-site-request-forgery token on url when invoking portlet action; false to omit token.
    • getPortletNamespace

      String getPortletNamespace(String portlet) throws Exception
      Returns parameter namespace used for the specified portlet
      Parameters:
      portlet -
      Returns:
      the portlet namespace for the specified portlet
      Throws:
      Exception
    • clearState

      void clearState()
      Clears the state of the url keeping just the baseUrl