@ProviderType public interface LiferayPortletURL extends PortletURL, ResourceURL, Serializable
FULL, PAGE, PORTLET, SHARED
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getLifecycle()
Returns the portlet lifecycle of this URL's target portlet.
|
String |
getParameter(String name)
Deprecated.
As of Judson (7.1.x), replaced by
PortletParameters.getValue(String) |
Set<String> |
getParametersIncludedInPath()
Returns the parameters that are included in the friendly URL path and do
not need to appear in the query string.
|
long |
getPlid() |
String |
getPortletId()
Returns the ID of this URL's target portlet.
|
Set<String> |
getRemovedParameterNames() |
String |
getResourceID()
Returns the ID of this URL's target resource.
|
boolean |
isAnchor()
Returns
true if this URL is an anchor pointing to the
specified portlet on the page. |
boolean |
isCopyCurrentRenderParameters()
Returns
true if the render parameters in the current request
should be copied to this URL. |
boolean |
isEncrypt()
Returns
true if this URL should be encrypted. |
boolean |
isEscapeXml()
Returns
true if this URL should be XML escaped. |
boolean |
isParameterIncludedInPath(String name)
Returns
true if the parameter is included in the friendly
URL path. |
boolean |
isSecure()
Returns
true if this URL is secure (https). |
void |
setAnchor(boolean anchor)
Sets whether this URL is an anchor pointing to the specified portlet on
the page.
|
void |
setCopyCurrentRenderParameters(boolean copyCurrentRenderParameters)
Sets whether the render parameters in the current request should be
copied to this URL.
|
void |
setDoAsGroupId(long doAsGroupId) |
void |
setDoAsUserId(long doAsUserId)
Sets the ID of the user to impersonate.
|
void |
setDoAsUserLanguageId(String doAsUserLanguageId)
Sets the language ID of the user to impersonate.
|
void |
setEncrypt(boolean encrypt)
Sets whether this URL should be encrypted.
|
void |
setEscapeXml(boolean escapeXml)
Sets whether this URL should be XML escaped.
|
void |
setLifecycle(String lifecycle)
Sets the portlet lifecycle of this URL's target portlet.
|
void |
setParameter(String name,
String[] values,
boolean append)
Deprecated.
As of Judson (7.1.x), replaced by
MutablePortletParameters.setValues(String,
String...) Sets the URL parameter the values |
void |
setParameter(String name,
String value,
boolean append)
Deprecated.
As of Judson (7.1.x), replaced by
MutablePortletParameters.setValue(String,
String) Sets the URL parameter to the value |
void |
setPlid(long plid)
Sets the portlet layout ID.
|
void |
setPortletId(String portletId)
Sets the ID of the target portlet.
|
void |
setRefererGroupId(long refererGroupId) |
void |
setRefererPlid(long refererPlid)
Sets the referer layout ID.
|
void |
setRemovedParameterNames(Set<String> removedParamNames) |
void |
setWindowStateRestoreCurrentView(boolean windowStateRestoreCurrentView)
Sets whether this portlet restores to the current view when toggling
between maximized and normal states.
|
void |
visitReservedParameters(BiConsumer<String,String> biConsumer) |
removePublicRenderParameter, setBeanParameter
getRenderParameters, setPortletMode, setWindowState
getCacheability, getResourceParameters, setCacheability, setResourceID
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, toString, write, write
getPortletMode, getWindowState
void addParameterIncludedInPath(String name)
name
- the name of the parameterString getLifecycle()
setLifecycle(String)
@Deprecated String getParameter(String name)
PortletParameters.getValue(String)
name
- the name of the URL parameterSet<String> getParametersIncludedInPath()
long getPlid()
String getPortletId()
Set<String> getRemovedParameterNames()
String getResourceID()
getResourceID
in interface ResourceURL
boolean isAnchor()
true
if this URL is an anchor pointing to the
specified portlet on the page.setAnchor(boolean)
boolean isCopyCurrentRenderParameters()
true
if the render parameters in the current request
should be copied to this URL.setCopyCurrentRenderParameters(boolean)
boolean isEncrypt()
true
if this URL should be encrypted.true
if this URL should be encrypted;
false
otherwisesetEncrypt(boolean)
boolean isEscapeXml()
true
if this URL should be XML escaped.true
if this URL should be XML escaped;
false
otherwisesetEscapeXml(boolean)
boolean isParameterIncludedInPath(String name)
true
if the parameter is included in the friendly
URL path.name
- the name of the parameter to check for inclusion in the pathaddParameterIncludedInPath(String)
boolean isSecure()
true
if this URL is secure (https).true
if this URL is secure; false
otherwisevoid setAnchor(boolean anchor)
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.
anchor
- whether this URL is an anchor pointing to the specified
portlet on the pagevoid setCopyCurrentRenderParameters(boolean copyCurrentRenderParameters)
New parameters set on this URL will appear before the copied render parameters.
copyCurrentRenderParameters
- whether the render parameters in the
current request should be copied to this URLvoid setDoAsGroupId(long doAsGroupId)
void setDoAsUserId(long doAsUserId)
When a page is accessed while impersonating a user, it will appear exactly as it would to that user.
doAsUserId
- the ID of the user to impersonate in the portlet this
URL points tovoid setDoAsUserLanguageId(String doAsUserLanguageId)
setDoAsUserId(long)
.
The language set here will override the impersonated user's default language.
doAsUserLanguageId
- the language ID of the user to impersonatevoid setEncrypt(boolean encrypt)
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
.
void setEscapeXml(boolean escapeXml)
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
.
escapeXml
- whether this URL should be XML escapedvoid setLifecycle(String lifecycle)
Valid lifecycles are:
lifecycle
- the portlet lifecycle@Deprecated void setParameter(String name, String value, boolean append)
MutablePortletParameters.setValue(String,
String)
Sets the URL parameter to the valuename
- the name of the URL parametervalue
- the value of the URL parameterappend
- 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.@Deprecated void setParameter(String name, String[] values, boolean append)
MutablePortletParameters.setValues(String,
String...)
Sets the URL parameter the valuesname
- the name of the URL parametervalues
- the values of the URL parameterappend
- 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.void setPlid(long plid)
plid
- the portlet layout IDvoid setPortletId(String portletId)
void setRefererGroupId(long refererGroupId)
void setRefererPlid(long refererPlid)
refererPlid
- the referer layout IDvoid setRemovedParameterNames(Set<String> removedParamNames)
void setWindowStateRestoreCurrentView(boolean windowStateRestoreCurrentView)
windowStateRestoreCurrentView
- whether this portlet restores to the
current view when toggling between maximized and normal statesvoid visitReservedParameters(BiConsumer<String,String> biConsumer)