com.liferay.faces.bridge.context.url
Interface BridgeURL

All Known Subinterfaces:
BridgeActionURL, BridgePartialActionURL, BridgeRedirectURL, BridgeResourceURL, BridgeResponseURL
All Known Implementing Classes:
BridgeActionURLImpl, BridgeActionURLWrapper, BridgePartialActionURLImpl, BridgePartialActionURLWrapper, BridgeRedirectURLImpl, BridgeRedirectURLWrapper, BridgeResourceURLCompatImpl, BridgeResourceURLImpl, BridgeResourceURLLiferayImpl, BridgeResourceURLWrapper, BridgeResponseURLImpl, BridgeURLBaseImpl, BridgeURLWrapper

public interface BridgeURL

This interface represents a bridge URL, meaning a URL that has convenience methods for representing URLs according to Section 6.1.3.1 of the Bridge Spec.

Author:
Neil Griffin

Method Summary
 String getContextRelativePath()
          Returns the context-relative path in the URL.
 String getParameter(String name)
          Returns the value of the underlying 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 getParameterMap().
 Bridge.PortletPhase getPortletPhase()
          Returns the Bridge.PortletPhase associated with this URL.
 boolean isAbsolute()
          Determines whether or not the URL is absolute.
 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.
 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.
 String removeParameter(String name)
          Removes the value of the underlying getParameterMap() with the specified name.
 void setParameter(String name, String value)
          Sets the value of the underlying getParameterMap() according to the specified name.
 void setParameter(String name, String[] value)
          Sets the value of the underlying getParameterMap() according to the specified name.
 void setSecure(boolean secure)
          Sets the flag indicating whether or not the URL is secure.
 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.
 String toString()
          Returns a string-based representation of the URL.
 

Method Detail

removeParameter

String removeParameter(String name)
Removes the value of the underlying getParameterMap() with the specified name.


toString

String toString()
Returns a string-based representation of the URL. If isEscaped() returns true then the value returned by this method will contain escaped characters.

Overrides:
toString in class Object

getContextRelativePath

String getContextRelativePath()
Returns the context-relative path in the URL. If no path is found, then the current Faces viewId (found in the current UIViewRoot) is returned.


isEscaped

boolean isEscaped()
Determines whether or not the URL is escaped.

Returns:
true if all occurrences of the ampersand character appear as & otherwise, returns false.

isAbsolute

boolean isAbsolute()
Determines whether or not the URL is absolute.

Returns:
true if absolute, otherwise false

isOpaque

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. For more information see URI.isOpaque().

Returns:
true if the URL is opaque, otherwise false.

isPathRelative

boolean isPathRelative()
Determines whether or not the path component of the URL is relative, meaning it does not begin with a forward-slash character.

Returns:
true if the path is relative, otherwise false.

isPortletScheme

boolean isPortletScheme()
Determines whether or not the URL begins with the "portlet:" scheme.

Returns:
true if the URL begins with the "portlet:" scheme, otherwise false.

isSecure

boolean isSecure()
Flag indicating whether or not the URL is secure. For more information, see BaseURL.setSecure(boolean).

Returns:
true if the URL is secure, otherwise false.

isSelfReferencing

boolean isSelfReferencing()
Determines whether or not the URL is self-referencing, meaning, it targets the current Faces view.

Returns:
true if self-referencing, otherwise false.

isExternal

boolean isExternal()
Determines whether or not the URL is external.

Returns:
true if external, otherwise false.

isHierarchical

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.

Returns:
true if the URL is hierarchical, otherwise false.

getParameter

String getParameter(String name)
Returns the value of the underlying getParameterMap() with the specified name.


setParameter

void setParameter(String name,
                  String value)
Sets the value of the underlying getParameterMap() according to the specified name.


setParameter

void setParameter(String name,
                  String[] value)
Sets the value of the underlying getParameterMap() according to the specified name.


getParameterMap

Map<String,String[]> getParameterMap()
Returns a mutable Map representing the URL parameters.


getParameterNames

Set<String> getParameterNames()
Returns a list of key names from the underlying getParameterMap().


getPortletPhase

Bridge.PortletPhase getPortletPhase()
Returns the Bridge.PortletPhase associated with this URL. Note that the value will be null if the URL does not begin with the "portlet:" scheme/prefix.


setSecure

void setSecure(boolean secure)
Sets the flag indicating whether or not the URL is secure.

Parameters:
secure - true if secure, otherwise false.

setSelfReferencing

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.

Parameters:
selfReferencing - true if self-referencing, otherwise false.

isFacesViewTarget

boolean isFacesViewTarget()
Determines whether or not the URL targets a Faces View.

Returns:
true if the URL targets a Faces View, otherwise false


Copyright © 2014 Liferay, Inc.. All Rights Reserved.