|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.PortletURLImpl
public class PortletURLImpl
Field Summary |
---|
Fields inherited from interface javax.portlet.ResourceURL |
---|
FULL, PAGE, PORTLET, SHARED |
Constructor Summary | |
---|---|
PortletURLImpl(javax.servlet.http.HttpServletRequest request,
String portletId,
long plid,
String lifecycle)
|
|
PortletURLImpl(PortletRequestImpl portletRequestImpl,
String portletId,
long plid,
String lifecycle)
|
Method Summary | |
---|---|
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. |
protected void |
addPortalAuthToken(StringBundler sb,
Key key)
|
protected void |
addPortletAuthToken(StringBundler sb,
Key key)
|
void |
addProperty(String key,
String value)
|
protected void |
clearCache()
|
protected String |
generateToString()
|
protected String |
generateWSRPToString()
|
String |
getCacheability()
|
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
|
Layout |
getLayout()
|
String |
getLayoutFriendlyURL()
|
String |
getLifecycle()
Gets the lifecycle of the portlet this URL points to. |
String |
getNamespace()
|
String |
getParameter(String name)
Gets the first value of the URL parameter. |
Map<String,String[]> |
getParameterMap()
|
Set<String> |
getParametersIncludedInPath()
|
long |
getPlid()
|
Portlet |
getPortlet()
|
String |
getPortletFriendlyURLPath()
|
String |
getPortletId()
Gets the id of the portlet this URL points to. |
PortletMode |
getPortletMode()
|
PortletRequest |
getPortletRequest()
|
Map<String,String> |
getReservedParameterMap()
Gets the map of reserved parameters for this URL. |
String |
getResourceID()
Gets the id of the resource this URL points to. |
WindowState |
getWindowState()
|
boolean |
isAnchor()
Determines whether this URL is an anchor pointing to the specified portlet on the page. |
protected boolean |
isBlankValue(String[] value)
|
boolean |
isCopyCurrentPublicRenderParameters()
|
boolean |
isCopyCurrentRenderParameters()
Determines whether the render parameters in the current request should be copied to this URL. |
boolean |
isEncrypt()
Determines whether this URL should be encrypted. |
boolean |
isEscapeXml()
Determines whether this URL should be XML escaped. |
boolean |
isParameterIncludedInPath(String name)
Determines whether the parameter is included in the friendly URL path. |
boolean |
isSecure()
Determines whether this URL is secure (https). |
protected String |
processValue(Key key,
int value)
|
protected String |
processValue(Key key,
long value)
|
protected String |
processValue(Key key,
String value)
|
void |
removePublicRenderParameter(String name)
|
void |
setAnchor(boolean anchor)
Sets whether this URL is an anchor pointing to the specified portlet on the page. |
void |
setCacheability(String cacheability)
|
void |
setCopyCurrentPublicRenderParameters(boolean copyCurrentPublicRenderParameters)
|
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)
|
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 lifecycle of the portlet this URL points to. |
void |
setParameter(String name,
String value)
|
void |
setParameter(String name,
String[] values)
|
void |
setParameter(String name,
String[] values,
boolean append)
Sets the URL parameter the values. |
void |
setParameter(String name,
String value,
boolean append)
Sets the URL parameter to the value. |
void |
setParameters(Map<String,String[]> params)
|
void |
setPlid(long plid)
Sets the portlet layout id. |
void |
setPortletId(String portletId)
Sets the id of the target portlet. |
void |
setPortletMode(PortletMode portletMode)
|
void |
setPortletMode(String portletMode)
|
void |
setProperty(String key,
String value)
|
void |
setRefererPlid(long refererPlid)
|
void |
setResourceID(String resourceID)
|
void |
setSecure(boolean secure)
|
void |
setWindowState(String windowState)
|
void |
setWindowState(WindowState windowState)
|
String |
toString()
|
void |
write(Writer writer)
|
void |
write(Writer writer,
boolean escapeXml)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PortletURLImpl(javax.servlet.http.HttpServletRequest request, String portletId, long plid, String lifecycle)
public PortletURLImpl(PortletRequestImpl portletRequestImpl, String portletId, long plid, String lifecycle)
Method Detail |
---|
public void addParameterIncludedInPath(String name)
LiferayPortletURL
addParameterIncludedInPath
in interface LiferayPortletURL
name
- the name of the parameter that is included in the pathpublic void addProperty(String key, String value)
addProperty
in interface BaseURL
public String getCacheability()
getCacheability
in interface ResourceURL
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
public Layout getLayout()
public String getLayoutFriendlyURL()
public String getLifecycle()
LiferayPortletURL
getLifecycle
in interface LiferayPortletURL
LiferayPortletURL.setLifecycle(String)
public String getNamespace()
public String getParameter(String name)
LiferayPortletURL
getParameter
in interface LiferayPortletURL
name
- the name of the URL parameter to get the value of
public Map<String,String[]> getParameterMap()
getParameterMap
in interface BaseURL
public Set<String> getParametersIncludedInPath()
getParametersIncludedInPath
in interface LiferayPortletURL
public long getPlid()
public Portlet getPortlet()
public String getPortletFriendlyURLPath()
public String getPortletId()
LiferayPortletURL
getPortletId
in interface LiferayPortletURL
public PortletMode getPortletMode()
getPortletMode
in interface PortletURL
public PortletRequest getPortletRequest()
public Map<String,String> getReservedParameterMap()
LiferayPortletURL
This method is only used internally. Reserved parameters contain special,
Liferay specific information, such as p_p_id
and
p_p_lifecycle
.
getReservedParameterMap
in interface LiferayPortletURL
public String getResourceID()
LiferayPortletURL
getResourceID
in interface LiferayPortletURL
public WindowState getWindowState()
getWindowState
in interface PortletURL
public boolean isAnchor()
LiferayPortletURL
isAnchor
in interface LiferayPortletURL
LiferayPortletURL.setAnchor(boolean)
public boolean isCopyCurrentPublicRenderParameters()
public boolean isCopyCurrentRenderParameters()
LiferayPortletURL
isCopyCurrentRenderParameters
in interface LiferayPortletURL
LiferayPortletURL.setCopyCurrentRenderParameters(boolean)
public boolean isEncrypt()
LiferayPortletURL
isEncrypt
in interface LiferayPortletURL
LiferayPortletURL.setEncrypt(boolean)
public boolean isEscapeXml()
LiferayPortletURL
isEscapeXml
in interface LiferayPortletURL
LiferayPortletURL.setEscapeXml(boolean)
public boolean isParameterIncludedInPath(String name)
LiferayPortletURL
isParameterIncludedInPath
in interface LiferayPortletURL
name
- the name of the parameter to check for inclusion in the path
LiferayPortletURL.addParameterIncludedInPath(String)
public boolean isSecure()
LiferayPortletURL
isSecure
in interface LiferayPortletURL
public void removePublicRenderParameter(String name)
removePublicRenderParameter
in interface PortletURL
public 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 setCopyCurrentPublicRenderParameters(boolean copyCurrentPublicRenderParameters)
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)
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)
setDoAsUserLanguageId
in interface LiferayPortletURL
public 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 lifecycle of the portlet this URL points topublic void setParameter(String name, String value)
setParameter
in interface BaseURL
public void setParameter(String name, String value, boolean append)
LiferayPortletURL
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)
setParameter
in interface BaseURL
public void setParameter(String name, String[] values, boolean append)
LiferayPortletURL
setParameter
in interface LiferayPortletURL
name
- the name 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 setParameters(Map<String,String[]> params)
setParameters
in interface BaseURL
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 setPortletMode(PortletMode portletMode) throws PortletModeException
setPortletMode
in interface PortletURL
PortletModeException
public void setPortletMode(String portletMode) throws PortletModeException
PortletModeException
public void setProperty(String key, String value)
setProperty
in interface BaseURL
public void setRefererPlid(long refererPlid)
public void setResourceID(String resourceID)
setResourceID
in interface ResourceURL
public void setSecure(boolean secure)
setSecure
in interface BaseURL
public void setWindowState(String windowState) throws WindowStateException
WindowStateException
public void setWindowState(WindowState windowState) throws WindowStateException
setWindowState
in interface PortletURL
WindowStateException
public String toString()
toString
in interface BaseURL
toString
in class Object
public void write(Writer writer) throws IOException
write
in interface BaseURL
IOException
public void write(Writer writer, boolean escapeXml) throws IOException
write
in interface BaseURL
IOException
protected void addPortalAuthToken(StringBundler sb, Key key)
protected void addPortletAuthToken(StringBundler sb, Key key)
protected void clearCache()
protected String generateToString()
protected String generateWSRPToString()
protected boolean isBlankValue(String[] value)
protected String processValue(Key key, int value)
protected String processValue(Key key, long value)
protected String processValue(Key key, String value)
|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |