Interface LiferayPortletURL
- All Superinterfaces:
BaseURL,Mutable,MutableRenderState,PortletURL,RenderState,ResourceURL,Serializable
- All Known Implementing Classes:
LiferayPortletURLWrapper
- Author:
- Brian Wing Shun Chan
-
Field Summary
Fields inherited from interface javax.portlet.ResourceURL
FULL, PAGE, PORTLET, SHARED -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a parameter that is included in the friendly URL path and does not need to appear in the query string.Returns the portlet lifecycle of this URL's target portlet.getParameter(String name) Deprecated.Returns the parameters that are included in the friendly URL path and do not need to appear in the query string.longgetPlid()Returns the ID of this URL's target portlet.Returns the ID of this URL's target resource.booleanisAnchor()Returnstrueif this URL is an anchor pointing to the specified portlet on the page.booleanReturnstrueif the render parameters in the current request should be copied to this URL.booleanReturnstrueif this URL should be encrypted.booleanReturnstrueif this URL should be XML escaped.booleanReturnstrueif the parameter is included in the friendly URL path.booleanisSecure()Returnstrueif this URL is secure (https).voidsetAnchor(boolean anchor) Sets whether this URL is an anchor pointing to the specified portlet on the page.voidsetCopyCurrentRenderParameters(boolean copyCurrentRenderParameters) Sets whether the render parameters in the current request should be copied to this URL.voidsetDoAsGroupId(long doAsGroupId) voidsetDoAsUserId(long doAsUserId) Sets the ID of the user to impersonate.voidsetDoAsUserLanguageId(String doAsUserLanguageId) Sets the language ID of the user to impersonate.voidsetEncrypt(boolean encrypt) Sets whether this URL should be encrypted.voidsetEscapeXml(boolean escapeXml) Sets whether this URL should be XML escaped.voidsetLifecycle(String lifecycle) Sets the portlet lifecycle of this URL's target portlet.voidsetParameter(String name, String[] values, boolean append) Deprecated.As of Judson (7.1.x), replaced byMutablePortletParameters.setValues(String, String...)Sets the URL parameter the valuesvoidsetParameter(String name, String value, boolean append) Deprecated.As of Judson (7.1.x), replaced byMutablePortletParameters.setValue(String, String)Sets the URL parameter to the valuevoidsetPlid(long plid) Sets the portlet layout ID.voidsetPortletId(String portletId) Sets the ID of the target portlet.voidsetRefererGroupId(long refererGroupId) voidsetRefererPlid(long refererPlid) Sets the referer layout ID.voidsetRemovedParameterNames(Set<String> removedParamNames) voidsetWindowStateRestoreCurrentView(boolean windowStateRestoreCurrentView) Sets whether this portlet restores to the current view when toggling between maximized and normal states.voidvisitReservedParameters(BiConsumer<String, String> biConsumer) Methods inherited from interface javax.portlet.BaseURL
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, toString, write, writeMethods inherited from interface javax.portlet.MutableRenderState
getRenderParameters, setPortletMode, setWindowStateMethods inherited from interface javax.portlet.PortletURL
removePublicRenderParameter, setBeanParameterMethods inherited from interface javax.portlet.RenderState
getPortletMode, getWindowStateMethods inherited from interface javax.portlet.ResourceURL
getCacheability, getResourceParameters, setCacheability, setResourceID
-
Method Details
-
addParameterIncludedInPath
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:
-
getParameter
Deprecated.As of Judson (7.1.x), replaced byPortletParameters.getValue(String)- Parameters:
name- the name of the URL parameter- Returns:
- the first value of the URL parameter
-
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
-
getPlid
long getPlid() -
getPortletId
String getPortletId()Returns the ID of this URL's target portlet.- Returns:
- the ID of this URL's target portlet
-
getRemovedParameterNames
-
getResourceID
String getResourceID()Returns the ID of this URL's target resource.- Specified by:
getResourceIDin interfaceResourceURL- Returns:
- the ID of this URL's target resource
-
isAnchor
boolean isAnchor()Returnstrueif 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:
-
isCopyCurrentRenderParameters
boolean isCopyCurrentRenderParameters()Returnstrueif 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:
-
isEncrypt
boolean isEncrypt()Returnstrueif this URL should be encrypted.- Returns:
trueif this URL should be encrypted;falseotherwise- See Also:
-
isEscapeXml
boolean isEscapeXml()Returnstrueif this URL should be XML escaped.- Returns:
trueif this URL should be XML escaped;falseotherwise- See Also:
-
isParameterIncludedInPath
Returnstrueif 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:
-
isSecure
boolean isSecure()Returnstrueif this URL is secure (https).- Returns:
trueif this URL is secure;falseotherwise
-
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
-
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
Sets the language ID of the user to impersonate. This will only have an effect when a user is being impersonated viasetDoAsUserId(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
Sets the portlet lifecycle of this URL's target portlet.Valid lifecycles are:
- Parameters:
lifecycle- the portlet lifecycle
-
setParameter
Deprecated.As of Judson (7.1.x), replaced byMutablePortletParameters.setValue(String, String)Sets the URL parameter to the value- Parameters:
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. Ifappendisfalseany existing values will be overwritten with the new value.
-
setParameter
Deprecated.As of Judson (7.1.x), replaced byMutablePortletParameters.setValues(String, String...)Sets the URL parameter the values- Parameters:
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. Ifappendisfalseany 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
Sets the ID of the target portlet. -
setRefererGroupId
void setRefererGroupId(long refererGroupId) -
setRefererPlid
void setRefererPlid(long refererPlid) Sets the referer layout ID.- Parameters:
refererPlid- the referer layout ID
-
setRemovedParameterNames
-
setWindowStateRestoreCurrentView
void setWindowStateRestoreCurrentView(boolean windowStateRestoreCurrentView) Sets whether this portlet restores to the current view when toggling between maximized and normal states.- Parameters:
windowStateRestoreCurrentView- whether this portlet restores to the current view when toggling between maximized and normal states
-
visitReservedParameters
-
PortletParameters.getValue(String)