public abstract class BasePersonalMenuEntry extends java.lang.Object implements PersonalMenuEntry
PersonalMenuEntry
to
minimize the effort required to implement this interface.
To implement a user personal menu entry, this class should be extended and
getPortletId()
and should be overridden.Constructor and Description |
---|
BasePersonalMenuEntry() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLabel(java.util.Locale locale)
Returns the label that is displayed in the user personal menu.
|
protected abstract java.lang.String |
getPortletId()
Returns the portlet's ID associated with the user personal menu entry.
|
java.lang.String |
getPortletURL(javax.servlet.http.HttpServletRequest request)
Returns the URL used to render a portlet based on the servlet request
attributes.
|
protected java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale) |
boolean |
isActive(javax.portlet.PortletRequest portletRequest,
java.lang.String portletId)
Returns
true if the entry is the current active entry. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIcon, isShow
public java.lang.String getLabel(java.util.Locale locale)
PersonalMenuEntry
getLabel
in interface PersonalMenuEntry
locale
- the label's retrieved localepublic java.lang.String getPortletURL(javax.servlet.http.HttpServletRequest request) throws com.liferay.portal.kernel.exception.PortalException
PersonalMenuEntry
getPortletURL
in interface PersonalMenuEntry
request
- the servlet request used to create a portlet's URLcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic boolean isActive(javax.portlet.PortletRequest portletRequest, java.lang.String portletId)
PersonalMenuEntry
true
if the entry is the current active entry.isActive
in interface PersonalMenuEntry
portletRequest
- the portlet requestportletId
- the portlet IDtrue
if the entry is the current active entry;
false
otherwiseprotected abstract java.lang.String getPortletId()
protected java.util.ResourceBundle getResourceBundle(java.util.Locale locale)