public class LiferayPortletURLWrapper extends PortletURLWrapper implements LiferayPortletURL
wrapped
FULL, PAGE, PORTLET, SHARED
Constructor and Description |
---|
LiferayPortletURLWrapper(LiferayPortletURL liferayPortletURL) |
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 |
getCacheability() |
String |
getLifecycle()
Returns the portlet lifecycle of this URL's target portlet.
|
String |
getParameter(String name) |
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.
|
MutableResourceParameters |
getResourceParameters() |
LiferayPortletURL |
getWrapped() |
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 |
setCacheability(String cacheability) |
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) |
void |
setParameter(String name,
String value,
boolean append) |
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 |
setResourceID(String resourceID) |
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) |
getRenderParameters, removePublicRenderParameter, setBeanParameter, setPortletMode, setWindowState, setWrapped
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, setWrapped, toString, write, write
getPortletMode, getWindowState, setWrapped
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
removePublicRenderParameter, setBeanParameter
getRenderParameters, setPortletMode, setWindowState
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, toString, write, write
getPortletMode, getWindowState
public LiferayPortletURLWrapper(LiferayPortletURL liferayPortletURL)
public void addParameterIncludedInPath(String name)
LiferayPortletURL
addParameterIncludedInPath
in interface LiferayPortletURL
name
- the name of the parameterpublic String getCacheability()
getCacheability
in interface ResourceURL
public String getLifecycle()
LiferayPortletURL
getLifecycle
in interface LiferayPortletURL
LiferayPortletURL.setLifecycle(String)
public String getParameter(String name)
getParameter
in interface LiferayPortletURL
name
- the name of the URL parameterpublic Set<String> getParametersIncludedInPath()
LiferayPortletURL
getParametersIncludedInPath
in interface LiferayPortletURL
public long getPlid()
getPlid
in interface LiferayPortletURL
public String getPortletId()
LiferayPortletURL
getPortletId
in interface LiferayPortletURL
public Set<String> getRemovedParameterNames()
getRemovedParameterNames
in interface LiferayPortletURL
public String getResourceID()
LiferayPortletURL
getResourceID
in interface LiferayPortletURL
getResourceID
in interface ResourceURL
public MutableResourceParameters getResourceParameters()
getResourceParameters
in interface ResourceURL
public LiferayPortletURL getWrapped()
getWrapped
in class PortletURLWrapper
public boolean isAnchor()
LiferayPortletURL
true
if this URL is an anchor pointing to the
specified portlet on the page.isAnchor
in interface LiferayPortletURL
LiferayPortletURL.setAnchor(boolean)
public boolean isCopyCurrentRenderParameters()
LiferayPortletURL
true
if the render parameters in the current request
should be copied to this URL.isCopyCurrentRenderParameters
in interface LiferayPortletURL
LiferayPortletURL.setCopyCurrentRenderParameters(boolean)
public boolean isEncrypt()
LiferayPortletURL
true
if this URL should be encrypted.isEncrypt
in interface LiferayPortletURL
true
if this URL should be encrypted;
false
otherwiseLiferayPortletURL.setEncrypt(boolean)
public boolean isEscapeXml()
LiferayPortletURL
true
if this URL should be XML escaped.isEscapeXml
in interface LiferayPortletURL
true
if this URL should be XML escaped;
false
otherwiseLiferayPortletURL.setEscapeXml(boolean)
public boolean isParameterIncludedInPath(String name)
LiferayPortletURL
true
if the parameter is included in the friendly
URL path.isParameterIncludedInPath
in interface LiferayPortletURL
name
- the name of the parameter to check for inclusion in the pathLiferayPortletURL.addParameterIncludedInPath(String)
public boolean isSecure()
LiferayPortletURL
true
if this URL is secure (https).isSecure
in interface LiferayPortletURL
true
if this URL is secure; false
otherwisepublic void setAnchor(boolean anchor)
LiferayPortletURL
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.
setAnchor
in interface LiferayPortletURL
anchor
- whether this URL is an anchor pointing to the specified
portlet on the pagepublic void setCacheability(String cacheability)
setCacheability
in interface ResourceURL
public void setCopyCurrentRenderParameters(boolean copyCurrentRenderParameters)
LiferayPortletURL
New parameters set on this URL will appear before the copied render parameters.
setCopyCurrentRenderParameters
in interface LiferayPortletURL
copyCurrentRenderParameters
- whether the render parameters in the
current request should be copied to this URLpublic void setDoAsGroupId(long doAsGroupId)
setDoAsGroupId
in interface LiferayPortletURL
public void setDoAsUserId(long doAsUserId)
LiferayPortletURL
When a page is accessed while impersonating a user, it will appear exactly as it would to that user.
setDoAsUserId
in interface LiferayPortletURL
doAsUserId
- the ID of the user to impersonate in the portlet this
URL points topublic void setDoAsUserLanguageId(String doAsUserLanguageId)
LiferayPortletURL
LiferayPortletURL.setDoAsUserId(long)
.
The language set here will override the impersonated user's default language.
setDoAsUserLanguageId
in interface LiferayPortletURL
doAsUserLanguageId
- the language ID of the user to impersonatepublic void setEncrypt(boolean encrypt)
LiferayPortletURL
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
.
setEncrypt
in interface LiferayPortletURL
public void setEscapeXml(boolean escapeXml)
LiferayPortletURL
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
.
setEscapeXml
in interface LiferayPortletURL
escapeXml
- whether this URL should be XML escapedpublic void setLifecycle(String lifecycle)
LiferayPortletURL
Valid lifecycles are:
setLifecycle
in interface LiferayPortletURL
lifecycle
- the portlet lifecyclepublic void setParameter(String name, String value, boolean append)
setParameter
in interface LiferayPortletURL
name
- 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.public void setParameter(String name, String[] values, boolean append)
setParameter
in interface LiferayPortletURL
name
- 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.public void setPlid(long plid)
LiferayPortletURL
setPlid
in interface LiferayPortletURL
plid
- the portlet layout IDpublic void setPortletId(String portletId)
LiferayPortletURL
setPortletId
in interface LiferayPortletURL
public void setRefererGroupId(long refererGroupId)
setRefererGroupId
in interface LiferayPortletURL
public void setRefererPlid(long refererPlid)
LiferayPortletURL
setRefererPlid
in interface LiferayPortletURL
refererPlid
- the referer layout IDpublic void setRemovedParameterNames(Set<String> removedParamNames)
setRemovedParameterNames
in interface LiferayPortletURL
public void setResourceID(String resourceID)
setResourceID
in interface ResourceURL
public void setWindowStateRestoreCurrentView(boolean windowStateRestoreCurrentView)
LiferayPortletURL
setWindowStateRestoreCurrentView
in interface LiferayPortletURL
windowStateRestoreCurrentView
- whether this portlet restores to the
current view when toggling between maximized and normal statespublic void visitReservedParameters(BiConsumer<String,String> biConsumer)
visitReservedParameters
in interface LiferayPortletURL