public abstract class WSRPPortletURL extends Object implements org.gatein.pc.api.ContainerURL
| Modifier and Type | Class and Description |
|---|---|
static class |
WSRPPortletURL.URLContext |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AMPERSAND |
protected static String |
EQUALS |
protected String |
extra
Holds extra data after URL in relaxed mode
|
protected static org.slf4j.Logger |
log |
protected org.gatein.pc.api.StateString |
navigationalState |
protected static boolean |
strict
Are we using strict rewriting parameters validation mode?
|
| Modifier | Constructor and Description |
|---|---|
protected |
WSRPPortletURL() |
protected |
WSRPPortletURL(org.gatein.pc.api.Mode mode,
org.gatein.pc.api.WindowState windowState,
boolean secure,
org.gatein.pc.api.StateString navigationalState,
WSRPPortletURL.URLContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
appendEnd(StringBuffer sb) |
protected void |
appendExtraParams(StringBuffer buffer) |
static WSRPPortletURL |
create(org.gatein.pc.api.ContainerURL containerURL,
boolean secure,
WSRPPortletURL.URLContext context)
Factory method to create the appropriate WSRPPortletURL based on the specified ContainerURL.
|
static WSRPPortletURL |
create(String encodedURL)
Parses a WSRP rewritten URL and extracts each component.
|
static WSRPPortletURL |
create(String encodedURL,
Set<String> customModes,
Set<String> customWindowStates)
Extracts the URL information contained in the specified WSRP-encoded String into a WSRPPortletURL object.
|
static WSRPPortletURL |
create(String encodedURL,
Set<String> customModes,
Set<String> customWindowStates,
boolean noBoundaries) |
protected void |
createURLParameter(StringBuffer sb,
String name,
String value) |
protected void |
dealWithSpecificParams(Map<String,String> params,
String originalURL)
Deal with specific parameters first so that we can remove them before dealing with extra params.
|
org.gatein.pc.api.Mode |
getMode() |
org.gatein.pc.api.StateString |
getNavigationalState() |
Map<String,String> |
getProperties() |
protected String |
getRawParameterValueFor(Map params,
String parameterName) |
protected abstract String |
getURLType() |
org.gatein.pc.api.WindowState |
getWindowState() |
boolean |
isSecure() |
void |
setExtra(String extra) |
protected void |
setParams(Map<String,String> params,
String originalURL) |
static void |
setStrict(boolean strict) |
String |
toString() |
protected static final org.slf4j.Logger log
protected static final String EQUALS
protected static final String AMPERSAND
protected org.gatein.pc.api.StateString navigationalState
protected static boolean strict
protected String extra
protected WSRPPortletURL(org.gatein.pc.api.Mode mode,
org.gatein.pc.api.WindowState windowState,
boolean secure,
org.gatein.pc.api.StateString navigationalState,
WSRPPortletURL.URLContext context)
protected WSRPPortletURL()
public static void setStrict(boolean strict)
public static WSRPPortletURL create(org.gatein.pc.api.ContainerURL containerURL, boolean secure, WSRPPortletURL.URLContext context)
containerURL - a ContainerURL to be converter into WSRP-understandable URLsecure - whether or not this URL needs to be securecontext - contextual information that might be needed by URLs but are not readily available in the ContainerURLpublic static WSRPPortletURL create(String encodedURL, Set<String> customModes, Set<String> customWindowStates)
encodedURL - a WSRP-encoded String representation of a portlet URLcustomModes - potentially empty set of custom modes to check if modes found in the encoded URL are validcustomWindowStates - potentially empty set of custom window states to check if window states found in the encoded URL are validpublic static WSRPPortletURL create(String encodedURL, Set<String> customModes, Set<String> customWindowStates, boolean noBoundaries)
public static WSRPPortletURL create(String encodedURL)
URL are of the form: wsrp_rewrite?wsrp-urlType=value&name1=value1&name2=value2
.../wsrp_rewrite
wsrp_rewrite?wsrp-urlType=resource&wsrp-url=http%3A%2F%2Ftest.com%2Fimages%2Ftest.gif&wsrp-requiresRewrite=true/wsrp_rewritewsrp_rewrite?wsrp-urlType=blockingAction&wsrp-secureURL=true&wsrp-navigationalState=a8h4K5JD9&wsrp-interactionState=fg4h923mdk/wsrp_rewritewsrp_rewrite?wsrp-urlType=render&wsrp-mode=help&wsrp-windowState=maximized/wsrp_rewriteencodedURL - a String representation of the URL to createprotected void dealWithSpecificParams(Map<String,String> params, String originalURL)
params - name-value map of the URL parametersoriginalURL - a String reprensenting the URL we are working withpublic org.gatein.pc.api.Mode getMode()
getMode in interface org.gatein.pc.api.ContainerURLpublic org.gatein.pc.api.WindowState getWindowState()
getWindowState in interface org.gatein.pc.api.ContainerURLpublic boolean isSecure()
protected abstract String getURLType()
protected void appendExtraParams(StringBuffer buffer)
protected abstract void appendEnd(StringBuffer sb)
protected final void createURLParameter(StringBuffer sb, String name, String value)
public void setExtra(String extra)
public org.gatein.pc.api.StateString getNavigationalState()
getNavigationalState in interface org.gatein.pc.api.ContainerURLCopyright © 2006-2014 GateIn. All Rights Reserved.