Liferay 6.2.0

com.liferay.portal.kernel.portlet
Interface LiferayPortletURL

All Superinterfaces:
BaseURL, PortletURL, ResourceURL, Serializable
All Known Implementing Classes:
LiferayStrutsPortletURLImpl, PortletURLImpl, PortletURLImplWrapper, StrutsActionPortletURL

public interface LiferayPortletURL
extends PortletURL, ResourceURL, Serializable

Represents a URL pointing to a portlet.

See Also:
PortletURLImpl

Field Summary
 
Fields inherited from interface javax.portlet.ResourceURL
FULL, PAGE, PORTLET, SHARED
 
Method Summary
abstract  void addParameterIncludedInPath(String name)
          Adds a parameter that is included in the friendly URL path and does not need to appear in the query string.
abstract  String getLifecycle()
          Returns the portlet lifecycle of this URL's target portlet.
abstract  String getParameter(String name)
          Returns the first value of the URL parameter.
abstract  Set<String> getParametersIncludedInPath()
          Returns the parameters that are included in the friendly URL path and do not need to appear in the query string.
abstract  String getPortletId()
          Returns the ID of this URL's target portlet.
abstract  Set<String> getRemovedParameterNames()
           
abstract  Map<String,String> getReservedParameterMap()
          Returns the map of reserved parameters for this URL.
abstract  String getResourceID()
          Returns the ID of this URL's target resource.
abstract  boolean isAnchor()
          Returns true if this URL is an anchor pointing to the specified portlet on the page.
abstract  boolean isCopyCurrentRenderParameters()
          Returns true if the render parameters in the current request should be copied to this URL.
abstract  boolean isEncrypt()
          Returns true if this URL should be encrypted.
abstract  boolean isEscapeXml()
          Returns true if this URL should be XML escaped.
abstract  boolean isParameterIncludedInPath(String name)
          Returns true if the parameter is included in the friendly URL path.
abstract  boolean isSecure()
          Returns true if this URL is secure (https).
abstract  void setAnchor(boolean anchor)
          Sets whether this URL is an anchor pointing to the specified portlet on the page.
abstract  void setControlPanelCategory(String controlPanelCategory)
           
abstract  void setCopyCurrentRenderParameters(boolean copyCurrentRenderParameters)
          Sets whether the render parameters in the current request should be copied to this URL.
abstract  void setDoAsGroupId(long doAsGroupId)
           
abstract  void setDoAsUserId(long doAsUserId)
          Sets the ID of the user to impersonate.
abstract  void setDoAsUserLanguageId(String doAsUserLanguageId)
          Sets the language ID of the user to impersonate.
abstract  void setEncrypt(boolean encrypt)
          Sets whether this URL should be encrypted.
abstract  void setEscapeXml(boolean escapeXml)
          Sets whether this URL should be XML escaped.
abstract  void setLifecycle(String lifecycle)
          Sets the portlet lifecycle of this URL's target portlet.
abstract  void setParameter(String name, String[] values, boolean append)
          Sets the URL parameter the values.
abstract  void setParameter(String name, String value, boolean append)
          Sets the URL parameter to the value.
abstract  void setPlid(long plid)
          Sets the portlet layout ID.
abstract  void setPortletId(String portletId)
          Sets the ID of the target portlet.
abstract  void setRefererPlid(long refererPlid)
          Sets the referer layout ID.
abstract  void setRemovedParameterNames(Set<String> removedParamNames)
           
 
Methods inherited from interface javax.portlet.PortletURL
getPortletMode, getWindowState, removePublicRenderParameter, setPortletMode, setWindowState
 
Methods inherited from interface javax.portlet.ResourceURL
getCacheability, setCacheability, setResourceID
 
Methods inherited from interface javax.portlet.BaseURL
addProperty, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, toString, write, write
 

Method Detail

addParameterIncludedInPath

void addParameterIncludedInPath(String name)
Adds a parameter that is included in the friendly URL path and does not need to appear in the query string.

Parameters:
name - the name of the parameter

getLifecycle

String getLifecycle()
Returns the portlet lifecycle of this URL's target portlet.

Returns:
the portlet lifecycle of this URL's target portlet
See Also:
setLifecycle(String)

getParameter

String getParameter(String name)
Returns the first value of the URL parameter.

Parameters:
name - the name of the URL parameter
Returns:
the first value of the URL parameter

getParametersIncludedInPath

Set<String> getParametersIncludedInPath()
Returns the parameters that are included in the friendly URL path and do not need to appear in the query string.

Returns:
the names of the parameters that are included in the friendly URL path and do not need to appear in the query string

getPortletId

String getPortletId()
Returns the ID of this URL's target portlet.

Returns:
the ID of this URL's target portlet

getRemovedParameterNames

Set<String> getRemovedParameterNames()

getReservedParameterMap

Map<String,String> getReservedParameterMap()
Returns the map of reserved parameters for this URL.

This method is only used internally. Reserved parameters contain special, Liferay specific information, such as p_p_id and p_p_lifecycle.

Returns:
the reserved parameter names and values in a read-only map

getResourceID

String getResourceID()
Returns the ID of this URL's target resource.

Returns:
the ID of this URL's target resource

isAnchor

boolean isAnchor()
Returns true if this URL is an anchor pointing to the specified portlet on the page.

Returns:
whether this URL is an anchor pointing to the specified portlet on the page
See Also:
setAnchor(boolean)

isCopyCurrentRenderParameters

boolean isCopyCurrentRenderParameters()
Returns true if the render parameters in the current request should be copied to this URL.

Returns:
whether the render parameters in the current request should be copied to this URL
See Also:
setCopyCurrentRenderParameters(boolean)

isEncrypt

boolean isEncrypt()
Returns true if this URL should be encrypted.

Returns:
true if this URL should be encrypted; false otherwise
See Also:
setEncrypt(boolean)

isEscapeXml

boolean isEscapeXml()
Returns true if this URL should be XML escaped.

Returns:
true if this URL should be XML escaped; false otherwise
See Also:
setEscapeXml(boolean)

isParameterIncludedInPath

boolean isParameterIncludedInPath(String name)
Returns true if the parameter is included in the friendly URL path.

Parameters:
name - the name of the parameter to check for inclusion in the path
Returns:
whether the parameter is included in the friendly URL path
See Also:
addParameterIncludedInPath(String)

isSecure

boolean isSecure()
Returns true if this URL is secure (https).

Returns:
true if this URL is secure; false otherwise

setAnchor

void setAnchor(boolean anchor)
Sets whether this URL is an anchor pointing to the specified portlet on the page.

An anchor URL will cause the user's browser to automatically jump down to the specified portlet after the page loads, avoiding the need to scroll.

Parameters:
anchor - whether this URL is an anchor pointing to the specified portlet on the page

setControlPanelCategory

void setControlPanelCategory(String controlPanelCategory)

setCopyCurrentRenderParameters

void setCopyCurrentRenderParameters(boolean copyCurrentRenderParameters)
Sets whether the render parameters in the current request should be copied to this URL.

New parameters set on this URL will appear before the copied render parameters.

Parameters:
copyCurrentRenderParameters - whether the render parameters in the current request should be copied to this URL

setDoAsGroupId

void setDoAsGroupId(long doAsGroupId)

setDoAsUserId

void setDoAsUserId(long doAsUserId)
Sets the ID of the user to impersonate.

When a page is accessed while impersonating a user, it will appear exactly as it would to that user.

Parameters:
doAsUserId - the ID of the user to impersonate in the portlet this URL points to

setDoAsUserLanguageId

void setDoAsUserLanguageId(String doAsUserLanguageId)
Sets the language ID of the user to impersonate. This will only have an effect when a user is being impersonated via setDoAsUserId(long).

The language set here will override the impersonated user's default language.

Parameters:
doAsUserLanguageId - the language ID of the user to impersonate

setEncrypt

void setEncrypt(boolean encrypt)
Sets whether this URL should be encrypted.

In an encrypted URL, the value of every parameter will be encrypted using the company's key. This allows sensitive information to be placed in the URL without being vulnerable to snooping.

Note that this is not the same as making a URL secure.


setEscapeXml

void setEscapeXml(boolean escapeXml)
Sets whether this URL should be XML escaped.

If a URL is XML escaped, it will automatically have special characters escaped when it is converted to a string or written to a Writer.

Parameters:
escapeXml - whether this URL should be XML escaped

setLifecycle

void setLifecycle(String lifecycle)
Sets the portlet lifecycle of this URL's target portlet.

Valid lifecycles are:

Parameters:
lifecycle - the portlet lifecycle

setParameter

void setParameter(String name,
                  String value,
                  boolean append)
Sets the URL parameter to the value.

Parameters:
name - the name of the URL parameter
value - the value of the URL parameter
append - whether the new value should be appended to any existing values for the parameter. If append is false any existing values will be overwritten with the new value.

setParameter

void setParameter(String name,
                  String[] values,
                  boolean append)
Sets the URL parameter the values.

Parameters:
name - the name of the URL parameter
values - the values of the URL parameter
append - whether the new values should be appended to any existing values for the parameter. If append is false any existing values will be overwritten with the new values.

setPlid

void setPlid(long plid)
Sets the portlet layout ID.

Parameters:
plid - the portlet layout ID

setPortletId

void setPortletId(String portletId)
Sets the ID of the target portlet.


setRefererPlid

void setRefererPlid(long refererPlid)
Sets the referer layout ID.

Parameters:
refererPlid - the referer layout ID

setRemovedParameterNames

void setRemovedParameterNames(Set<String> removedParamNames)

Liferay 6.2.0