Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.wsrp
Class WSRPPortletURL

    java.lang.Object
      org.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: 11403 $
Author:
  Chris Laprun

Constructor Summary
`protected` | `WSRPPortletURL()`
`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.
`static WSRPPortletURL` | `create(java.lang.String encodedURL, java.util.Set<java.lang.String> customModes, java.util.Set<java.lang.String> customWindowStates)`
`protected void` | `createURLParameter(java.lang.StringBuffer sb, java.lang.String name, java.lang.String value)`
`protected void` | `dealWithSpecificParams(java.util.Map<java.lang.String,java.lang.String> params, java.lang.String originalURL)` Deal with specific parameters first so that we can remove them before dealing with extra params.
`Mode` | `getMode()` The mode that may be null.
`protected 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<java.lang.String,java.lang.String> params, java.lang.String originalURL)`
`static void` | `setStrict(boolean strict)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### WSRPPortletURL

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

### WSRPPortletURL

    protected WSRPPortletURL()

Method Detail

### setStrict

    public static void setStrict(boolean strict)

### create

    public static WSRPPortletURL create(PortletURL portletURL,
                                        boolean secure)

### create

    public static WSRPPortletURL create(java.lang.String encodedURL,
                                        java.util.Set<java.lang.String> customModes,
                                        java.util.Set<java.lang.String> customWindowStates)

### 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&amp;name1=value1&amp;name2=value2 .../wsrp_rewrite`

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

  Parameters:
    `encodedURL` - a String representation of the URL to create
  Returns:
    an appropriate WSRPPortletURL as built from parsing the specified String

### setParams

    protected final void setParams(java.util.Map<java.lang.String,java.lang.String> params,
                                   java.lang.String originalURL)

### dealWithSpecificParams

    protected void dealWithSpecificParams(java.util.Map<java.lang.String,java.lang.String> params,
                                          java.lang.String originalURL)

  Deal with specific parameters first so that we can remove them before dealing with extra params. Sub-classes override to provide support for their specific parameters.

  Parameters:
    `params` - name-value map of the URL parameters
    `originalURL` - a String reprensenting the URL we are working with

### getRawParameterValueFor

    protected 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()

  Overrides:
    `toString` in class `java.lang.Object`

### 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)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD