Class LiferayPortletURLWrapper
- All Implemented Interfaces:
LiferayPortletURL,Serializable,BaseURL,Mutable,MutableRenderState,PortletURL,RenderState,ResourceURL
- Author:
- Neil Griffin
- See Also:
-
Field Summary
Fields inherited from class javax.portlet.filter.RenderStateWrapper
wrappedFields inherited from interface javax.portlet.ResourceURL
FULL, PAGE, PORTLET, SHARED -
Constructor Summary
Constructors -
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) 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.voidsetCacheability(String cacheability) 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) voidsetParameter(String name, String value, boolean append) voidsetPlid(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) voidsetResourceID(String resourceID) 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 class javax.portlet.filter.PortletURLWrapper
getRenderParameters, removePublicRenderParameter, setBeanParameter, setPortletMode, setWindowState, setWrappedMethods inherited from class javax.portlet.filter.BaseURLWrapper
addProperty, append, append, getParameterMap, setParameter, setParameter, setParameters, setProperty, setSecure, setWrapped, toString, write, writeMethods inherited from class javax.portlet.filter.RenderStateWrapper
getPortletMode, getWindowState, setWrappedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, getWindowState
-
Constructor Details
-
LiferayPortletURLWrapper
-
-
Method Details
-
addParameterIncludedInPath
Description copied from interface:LiferayPortletURLAdds a parameter that is included in the friendly URL path and does not need to appear in the query string.- Specified by:
addParameterIncludedInPathin interfaceLiferayPortletURL- Parameters:
name- the name of the parameter
-
getCacheability
- Specified by:
getCacheabilityin interfaceResourceURL
-
getLifecycle
Description copied from interface:LiferayPortletURLReturns the portlet lifecycle of this URL's target portlet.- Specified by:
getLifecyclein interfaceLiferayPortletURL- Returns:
- the portlet lifecycle of this URL's target portlet
- See Also:
-
getParameter
- Specified by:
getParameterin interfaceLiferayPortletURL- Parameters:
name- the name of the URL parameter- Returns:
- the first value of the URL parameter
-
getParametersIncludedInPath
Description copied from interface:LiferayPortletURLReturns the parameters that are included in the friendly URL path and do not need to appear in the query string.- Specified by:
getParametersIncludedInPathin interfaceLiferayPortletURL- 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
public long getPlid()- Specified by:
getPlidin interfaceLiferayPortletURL
-
getPortletId
Description copied from interface:LiferayPortletURLReturns the ID of this URL's target portlet.- Specified by:
getPortletIdin interfaceLiferayPortletURL- Returns:
- the ID of this URL's target portlet
-
getRemovedParameterNames
- Specified by:
getRemovedParameterNamesin interfaceLiferayPortletURL
-
getResourceID
Description copied from interface:LiferayPortletURLReturns the ID of this URL's target resource.- Specified by:
getResourceIDin interfaceLiferayPortletURL- Specified by:
getResourceIDin interfaceResourceURL- Returns:
- the ID of this URL's target resource
-
getResourceParameters
- Specified by:
getResourceParametersin interfaceResourceURL
-
getWrapped
- Overrides:
getWrappedin classPortletURLWrapper
-
isAnchor
public boolean isAnchor()Description copied from interface:LiferayPortletURLReturnstrueif this URL is an anchor pointing to the specified portlet on the page.- Specified by:
isAnchorin interfaceLiferayPortletURL- Returns:
- whether this URL is an anchor pointing to the specified portlet on the page
- See Also:
-
isCopyCurrentRenderParameters
public boolean isCopyCurrentRenderParameters()Description copied from interface:LiferayPortletURLReturnstrueif the render parameters in the current request should be copied to this URL.- Specified by:
isCopyCurrentRenderParametersin interfaceLiferayPortletURL- Returns:
- whether the render parameters in the current request should be copied to this URL
- See Also:
-
isEncrypt
public boolean isEncrypt()Description copied from interface:LiferayPortletURLReturnstrueif this URL should be encrypted.- Specified by:
isEncryptin interfaceLiferayPortletURL- Returns:
trueif this URL should be encrypted;falseotherwise- See Also:
-
isEscapeXml
public boolean isEscapeXml()Description copied from interface:LiferayPortletURLReturnstrueif this URL should be XML escaped.- Specified by:
isEscapeXmlin interfaceLiferayPortletURL- Returns:
trueif this URL should be XML escaped;falseotherwise- See Also:
-
isParameterIncludedInPath
Description copied from interface:LiferayPortletURLReturnstrueif the parameter is included in the friendly URL path.- Specified by:
isParameterIncludedInPathin interfaceLiferayPortletURL- 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
public boolean isSecure()Description copied from interface:LiferayPortletURLReturnstrueif this URL is secure (https).- Specified by:
isSecurein interfaceLiferayPortletURL- Returns:
trueif this URL is secure;falseotherwise
-
setAnchor
public void setAnchor(boolean anchor) Description copied from interface:LiferayPortletURLSets 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.
- Specified by:
setAnchorin interfaceLiferayPortletURL- Parameters:
anchor- whether this URL is an anchor pointing to the specified portlet on the page
-
setCacheability
- Specified by:
setCacheabilityin interfaceResourceURL
-
setCopyCurrentRenderParameters
public void setCopyCurrentRenderParameters(boolean copyCurrentRenderParameters) Description copied from interface:LiferayPortletURLSets 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.
- Specified by:
setCopyCurrentRenderParametersin interfaceLiferayPortletURL- Parameters:
copyCurrentRenderParameters- whether the render parameters in the current request should be copied to this URL
-
setDoAsGroupId
public void setDoAsGroupId(long doAsGroupId) - Specified by:
setDoAsGroupIdin interfaceLiferayPortletURL
-
setDoAsUserId
public void setDoAsUserId(long doAsUserId) Description copied from interface:LiferayPortletURLSets 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.
- Specified by:
setDoAsUserIdin interfaceLiferayPortletURL- Parameters:
doAsUserId- the ID of the user to impersonate in the portlet this URL points to
-
setDoAsUserLanguageId
Description copied from interface:LiferayPortletURLSets the language ID of the user to impersonate. This will only have an effect when a user is being impersonated viaLiferayPortletURL.setDoAsUserId(long).The language set here will override the impersonated user's default language.
- Specified by:
setDoAsUserLanguageIdin interfaceLiferayPortletURL- Parameters:
doAsUserLanguageId- the language ID of the user to impersonate
-
setEncrypt
public void setEncrypt(boolean encrypt) Description copied from interface:LiferayPortletURLSets 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.- Specified by:
setEncryptin interfaceLiferayPortletURL
-
setEscapeXml
public void setEscapeXml(boolean escapeXml) Description copied from interface:LiferayPortletURLSets 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.- Specified by:
setEscapeXmlin interfaceLiferayPortletURL- Parameters:
escapeXml- whether this URL should be XML escaped
-
setLifecycle
Description copied from interface:LiferayPortletURLSets the portlet lifecycle of this URL's target portlet.Valid lifecycles are:
- Specified by:
setLifecyclein interfaceLiferayPortletURL- Parameters:
lifecycle- the portlet lifecycle
-
setParameter
- Specified by:
setParameterin interfaceLiferayPortletURL- 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
- Specified by:
setParameterin interfaceLiferayPortletURL- 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
public void setPlid(long plid) Description copied from interface:LiferayPortletURLSets the portlet layout ID.- Specified by:
setPlidin interfaceLiferayPortletURL- Parameters:
plid- the portlet layout ID
-
setPortletId
Description copied from interface:LiferayPortletURLSets the ID of the target portlet.- Specified by:
setPortletIdin interfaceLiferayPortletURL
-
setRefererGroupId
public void setRefererGroupId(long refererGroupId) - Specified by:
setRefererGroupIdin interfaceLiferayPortletURL
-
setRefererPlid
public void setRefererPlid(long refererPlid) Description copied from interface:LiferayPortletURLSets the referer layout ID.- Specified by:
setRefererPlidin interfaceLiferayPortletURL- Parameters:
refererPlid- the referer layout ID
-
setRemovedParameterNames
- Specified by:
setRemovedParameterNamesin interfaceLiferayPortletURL
-
setResourceID
- Specified by:
setResourceIDin interfaceResourceURL
-
setWindowStateRestoreCurrentView
public void setWindowStateRestoreCurrentView(boolean windowStateRestoreCurrentView) Description copied from interface:LiferayPortletURLSets whether this portlet restores to the current view when toggling between maximized and normal states.- Specified by:
setWindowStateRestoreCurrentViewin interfaceLiferayPortletURL- Parameters:
windowStateRestoreCurrentView- whether this portlet restores to the current view when toggling between maximized and normal states
-
visitReservedParameters
- Specified by:
visitReservedParametersin interfaceLiferayPortletURL
-