站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

WSRPPortletURL - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.wsrp
Class WSRPPortletURL

java.lang.Object
  extended byorg.jboss.portal.wsrp.WSRPPortletURL
All Implemented Interfaces:
PortletURL
Direct Known Subclasses:
WSRPActionURL, WSRPRenderURL, WSRPResourceURL

public abstract class WSRPPortletURL
extends java.lang.Object
implements PortletURL

Since:
2.4 (Apr 28, 2006)
Version:
$Revision: 5440 $
Author:
Chris Laprun

Field Summary
private static java.lang.String AMPERSAND
           
private static java.lang.String EQUALS
           
private static org.jboss.logging.Logger log
           
private  Mode mode
           
private static java.lang.String PARAM_SEPARATOR
           
private  boolean secure
           
private static int URL_TYPE_END
           
private  WindowState windowState
           
 
Constructor Summary
protected WSRPPortletURL()
           
protected WSRPPortletURL(java.util.Map params)
           
protected WSRPPortletURL(Mode mode, WindowState windowState, boolean secure)
           
 
Method Summary
protected abstract  void appendEnd(java.lang.StringBuffer sb)
           
static WSRPPortletURL create(PortletURL portletURL, boolean secure)
           
static WSRPPortletURL create(java.lang.String encodedURL)
          Parses a WSRP rewritten URL and extracts each component.
protected  void createURLParameter(java.lang.StringBuffer sb, java.lang.String name, java.lang.String value)
           
private static java.util.Map extractParams(java.lang.String encodedURL, java.lang.String originalURL)
           
 Mode getMode()
          The mode that may be null.
 java.lang.String getRawParameterValueFor(java.util.Map params, java.lang.String parameterName)
           
protected abstract  java.lang.String getURLType()
           
 WindowState getWindowState()
          The window state that may be null.
 boolean isSecure()
           
protected  void setParams(java.util.Map params)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.jboss.logging.Logger log

EQUALS

private static final java.lang.String EQUALS
See Also:
Constant Field Values

AMPERSAND

private static final java.lang.String AMPERSAND
See Also:
Constant Field Values

PARAM_SEPARATOR

private static final java.lang.String PARAM_SEPARATOR
See Also:
Constant Field Values

URL_TYPE_END

private static final int URL_TYPE_END

secure

private boolean secure

mode

private Mode mode

windowState

private WindowState windowState
Constructor Detail

WSRPPortletURL

protected WSRPPortletURL(Mode mode,
                         WindowState windowState,
                         boolean secure)

WSRPPortletURL

protected WSRPPortletURL(java.util.Map params)

WSRPPortletURL

protected WSRPPortletURL()
Method Detail

create

public static WSRPPortletURL create(PortletURL portletURL,
                                    boolean secure)

create

public static WSRPPortletURL create(java.lang.String encodedURL)
Parses a WSRP rewritten URL and extracts each component.

TODO: some values need to be in pairs or are mutually exclusive, check for this

URL are of the form: wsrp_rewrite?wsrp-urlType=value&name1=value1&name2=value2 .../wsrp_rewrite

    Examples:
  • Load a resource http://test.com/images/test.gif:
    wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Ftest.com%2Fimages%2Ftest.gif&wsrp-requiresRewrite=true/wsrp_rewrite
  • Declare a secure interaction back to the Portlet:
    wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-secureURL=true&wsrp-navigationalState=a8h4K5JD9&wsrp-interactionState=fg4h923mdk/wsrp_rewrite
  • Request the Consumer render the Portlet in a different mode and window state: wsrp_rewrite?wsrp-urlType=render&wsrp-mode=help&wsrp-windowState=maximized/wsrp_rewrite

Parameters:
encodedURL -

setParams

protected void setParams(java.util.Map params)

getRawParameterValueFor

public java.lang.String getRawParameterValueFor(java.util.Map params,
                                                java.lang.String parameterName)

getMode

public Mode getMode()
Description copied from interface: PortletURL
The mode that may be null.

Specified by:
getMode in interface PortletURL
Returns:
the mode

getWindowState

public WindowState getWindowState()
Description copied from interface: PortletURL
The window state that may be null.

Specified by:
getWindowState in interface PortletURL
Returns:
the window state

isSecure

public boolean isSecure()

getURLType

protected abstract java.lang.String getURLType()

toString

public java.lang.String toString()

appendEnd

protected abstract void appendEnd(java.lang.StringBuffer sb)

createURLParameter

protected final void createURLParameter(java.lang.StringBuffer sb,
                                        java.lang.String name,
                                        java.lang.String value)

extractParams

private static java.util.Map extractParams(java.lang.String encodedURL,
                                           java.lang.String originalURL)