com.webmethods.caf.portlet
Interface IPortletURL

All Known Subinterfaces:
IPortletURL

public interface IPortletURL

Represents portlet url.


Field Summary
static String GLOBAL_PARAMETER_KEEP_STATE
          Global parameter to keep pageflow state.
static String GLOBAL_PARAMETER_RESET_STATE
          Global parameter to forcefully reset pageflow state.
 
Method Summary
 IPortletURL addPortletURL(String anotherPortlet)
          Creates portlet URL for another portlet on the the same target page.
 void clearParameters()
          Removes all portlet parameters from the URL
 void clearState()
          Clears the state of the url keeping just the baseUrl
 String getBaseURL()
          Returns base url for this portlet url.
 String getPortletNamespace(String portlet)
          Returns parameter namespace used for the specified portlet
 void removeGlobalParameter(String name)
          Removes any global parameters from this url.
 void removeParameter(String name)
          Removes a portlet paremeter from the URL
 void removeParameter(String portlet, String name)
          Removes parameter from the specified portlet
 void setAXSRFT(boolean useToken)
          True to include anti-cross-site-request-forgery token on url when invoking portlet action; false to omit token.
 void setBaseURL(String url)
          Sets base url for this portlet url.
 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.
 void setParameter(String name, String[] value, boolean encodeValue)
          Sets portlet parameter String[] value..
 void setParameter(String name, String value, boolean encodeValue)
          Sets portlet parameter String value.
 void setParameter(String portlet, String name, String[] value, boolean encodeValue)
          Sets given portlet parameter String[] value..
 void setParameter(String portlet, String name, String value, boolean encodeValue)
          Sets given portlet parameter String value.
 void setPortlet(String portlet)
          Sets target portlet for this url.
 void setPortletLayout(String pcaLayout)
          Sets PCA layout to display
 void setPortletMethod(String pcaMethod)
          Sets PCA method name to invoke on the portlet
 void setTargetAction(String action)
          Sets target action to execute on the portlet.
 void setTargetView(String view)
          Sets target view to display
 

Field Detail

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:
Constant Field Values

GLOBAL_PARAMETER_RESET_STATE

static final String GLOBAL_PARAMETER_RESET_STATE
Global parameter to forcefully reset pageflow state.

See Also:
Constant Field Values
Method Detail

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/

Returns:
current base url
See Also:
IPortletURL.setBaseURL(String)

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:
IPortletURL.setParameter(String, String, boolean)

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:
IPortletURL.setParameter(String, String, boolean)

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 IPortletURL.GLOBAL_PARAMETER_KEEP_STATE and IPortletURL.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 IPortletURL.GLOBAL_PARAMETER_KEEP_STATE and IPortletURL.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