|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.faces.bridge.context.url.BridgeURLBaseImpl
public abstract class BridgeURLBaseImpl
This is a utility class used only by ExternalContextImpl that represents a URL with attributes that the
Bridge Spec is concerned with. The getter methods in this class make heavy use of lazy-initialization for performance
reasons, because it is unlikely that every method will be called.
| Field Summary | |
|---|---|
protected BridgeConfig |
bridgeConfig
|
protected BridgeContext |
bridgeContext
|
protected static String |
PORTLET_ACTION
|
protected static String |
PORTLET_RENDER
|
protected static String |
PORTLET_RESOURCE
|
protected static String |
RELATIVE_PATH_PREFIX
|
protected String |
url
|
| Constructor Summary | |
|---|---|
BridgeURLBaseImpl(String url,
String currentFacesViewId,
BridgeContext bridgeContext)
|
|
| Method Summary | |
|---|---|
protected String |
_toString(boolean modeChanged)
|
protected String |
_toString(boolean modeChanged,
Set<String> excludedParameterNames)
|
String |
getContextRelativePath()
Returns the context-relative path in the URL. |
String |
getParameter(String name)
Returns the value of the underlying BridgeURL.getParameterMap() with the specified name. |
Map<String,String[]> |
getParameterMap()
Returns a mutable Map representing the URL parameters. |
Set<String> |
getParameterNames()
Returns a list of key names from the underlying BridgeURL.getParameterMap(). |
Bridge.PortletPhase |
getPortletPhase()
Returns the Bridge.PortletPhase associated with this URL. |
protected String |
getSchemeSpecificPart()
Returns the scheme-specific part of the URI. |
protected URI |
getURI()
|
protected String |
getViewIdParameterName()
|
boolean |
isAbsolute()
Determines whether or not the URL is absolute, meaning it contains a scheme component. |
boolean |
isEscaped()
Determines whether or not the URL is escaped. |
boolean |
isExternal()
Determines whether or not the URL is external. |
boolean |
isFacesViewTarget()
Determines whether or not the URL targets a Faces View. |
boolean |
isHierarchical()
Determines whether or not the URL is hierarchical, meaning it is either 1) absolute and the scheme-specific part begins with a forward-slash character, or 2) is relative. |
boolean |
isOpaque()
Determines whether or not the URL is opaque, meaning it is absolute and its scheme component does not begin with a forward-slash character. |
boolean |
isPathRelative()
Determines whether or not the path component of the URL is relative, meaning it does not begin with a forward-slash character. |
boolean |
isPortletScheme()
Determines whether or not the URL begins with the "portlet:" scheme. |
protected boolean |
isRelative()
Determines whether or not the URL is relative, meaning it does not have a scheme component. |
boolean |
isSecure()
Flag indicating whether or not the URL is secure. |
boolean |
isSelfReferencing()
Determines whether or not the URL is self-referencing, meaning, it targets the current Faces view. |
protected boolean |
matchPathAndExtension(String file1,
String file2)
Determines whether or not the specified files have the same path (prefix) and extension (suffix). |
String |
removeParameter(String name)
Removes the value of the underlying BridgeURL.getParameterMap() with the specified name. |
void |
setParameter(String name,
String value)
Sets the value of the underlying BridgeURL.getParameterMap() according to the specified
name. |
void |
setParameter(String name,
String[] value)
Sets the value of the underlying BridgeURL.getParameterMap() according to the specified
name. |
protected void |
setPortletModeParameter(String portletMode,
javax.portlet.PortletURL portletURL)
|
protected void |
setRenderParameters(javax.portlet.BaseURL baseURL)
|
void |
setSecure(boolean secure)
Sets the flag indicating whether or not the URL is secure. |
protected void |
setSecureParameter(String secure,
javax.portlet.BaseURL baseURL)
|
void |
setSelfReferencing(boolean selfReferencing)
Sets the flag indicating whether or not the URL is self-referencing, meaning, whether or not it targets the current Faces view. |
protected void |
setWindowStateParameter(String windowState,
javax.portlet.PortletURL portletURL)
|
protected abstract javax.portlet.BaseURL |
toBaseURL()
Returns a BaseURL representation of the bridge URL. |
String |
toString()
Returns a string-based representation of the URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String PORTLET_ACTION
protected static final String PORTLET_RENDER
protected static final String PORTLET_RESOURCE
protected static final String RELATIVE_PATH_PREFIX
protected BridgeConfig bridgeConfig
protected String url
protected BridgeContext bridgeContext
| Constructor Detail |
|---|
public BridgeURLBaseImpl(String url,
String currentFacesViewId,
BridgeContext bridgeContext)
| Method Detail |
|---|
public String removeParameter(String name)
BridgeURLBridgeURL.getParameterMap() with the specified name.
removeParameter in interface BridgeURLpublic String toString()
BridgeURLBridgeURL.isEscaped() returns true then the value
returned by this method will contain escaped characters.
toString in interface BridgeURLtoString in class Object
protected abstract javax.portlet.BaseURL toBaseURL()
throws MalformedURLException
BaseURL representation of the bridge URL.
MalformedURLExceptionprotected String _toString(boolean modeChanged)
protected String _toString(boolean modeChanged,
Set<String> excludedParameterNames)
protected boolean matchPathAndExtension(String file1,
String file2)
filePath1 - The first file to compare.filePath2 - The second file to compare.
true if the specified files have the same path (prefix) and extension (suffix), otherwise
false.public String getContextRelativePath()
BridgeURLUIViewRoot) is returned.
getContextRelativePath in interface BridgeURLpublic boolean isEscaped()
BridgeURL
isEscaped in interface BridgeURLtrue if all occurrences of the ampersand character appear as & otherwise, returns
false.public boolean isAbsolute()
URI an absolute URL is non-relative.
isAbsolute in interface BridgeURLpublic boolean isOpaque()
BridgeURLURI.isOpaque().
isOpaque in interface BridgeURLtrue if the URL is opaque, otherwise false.public boolean isPathRelative()
BridgeURL
isPathRelative in interface BridgeURLtrue if the path is relative, otherwise false.public boolean isPortletScheme()
BridgeURL
isPortletScheme in interface BridgeURLtrue if the URL begins with the "portlet:" scheme, otherwise false.public boolean isSecure()
BridgeURLBaseURL.setSecure(boolean).
isSecure in interface BridgeURLtrue if the URL is secure, otherwise false.protected boolean isRelative()
URI a relative URL is non-absolute.
public boolean isSelfReferencing()
BridgeURL
isSelfReferencing in interface BridgeURLtrue if self-referencing, otherwise false.public boolean isExternal()
BridgeURL
isExternal in interface BridgeURLtrue if external, otherwise false.public boolean isHierarchical()
BridgeURL
isHierarchical in interface BridgeURLtrue if the URL is hierarchical, otherwise false.public String getParameter(String name)
BridgeURLBridgeURL.getParameterMap() with the specified name.
getParameter in interface BridgeURL
public void setParameter(String name,
String[] value)
BridgeURLvalue of the underlying BridgeURL.getParameterMap() according to the specified
name.
setParameter in interface BridgeURL
public void setParameter(String name,
String value)
BridgeURLvalue of the underlying BridgeURL.getParameterMap() according to the specified
name.
setParameter in interface BridgeURLpublic Map<String,String[]> getParameterMap()
BridgeURLMap representing the URL parameters.
getParameterMap in interface BridgeURLpublic Set<String> getParameterNames()
BridgeURLBridgeURL.getParameterMap().
getParameterNames in interface BridgeURL
protected void setPortletModeParameter(String portletMode,
javax.portlet.PortletURL portletURL)
public Bridge.PortletPhase getPortletPhase()
BridgeURLBridge.PortletPhase associated with this URL. Note that the value will be null if the URL
does not begin with the "portlet:" scheme/prefix.
getPortletPhase in interface BridgeURLprotected void setRenderParameters(javax.portlet.BaseURL baseURL)
protected String getSchemeSpecificPart()
public void setSecure(boolean secure)
BridgeURL
setSecure in interface BridgeURLsecure - true if secure, otherwise false.
protected void setSecureParameter(String secure,
javax.portlet.BaseURL baseURL)
public void setSelfReferencing(boolean selfReferencing)
BridgeURL
setSelfReferencing in interface BridgeURLselfReferencing - true if self-referencing, otherwise false.public boolean isFacesViewTarget()
BridgeURL
isFacesViewTarget in interface BridgeURLtrue if the URL targets a Faces View, otherwise falseprotected URI getURI()
protected String getViewIdParameterName()
protected void setWindowStateParameter(String windowState,
javax.portlet.PortletURL portletURL)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||