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() 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.
|
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 httpServletRequest)
Returns the URL used to render a portlet based on the servlet request
attributes.
|
protected java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale) |
protected boolean |
hasAccessPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
com.liferay.portal.kernel.model.Portlet portlet) |
boolean |
isActive(javax.portlet.PortletRequest portletRequest,
java.lang.String portletId)
Returns
true if the entry is the current active entry. |
boolean |
isShow(javax.portlet.PortletRequest portletRequest,
com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker)
Returns
true if the entry should be displayed in the user
personal menu. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIcon, getJSOnClickConfigJSONObjectpublic java.lang.String getLabel(java.util.Locale locale)
PersonalMenuEntrygetLabel in interface PersonalMenuEntrylocale - the label's retrieved localepublic abstract java.lang.String getPortletId()
public java.lang.String getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest)
throws com.liferay.portal.kernel.exception.PortalException
PersonalMenuEntrygetPortletURL in interface PersonalMenuEntryhttpServletRequest - 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)
PersonalMenuEntrytrue if the entry is the current active entry.isActive in interface PersonalMenuEntryportletRequest - the portlet requestportletId - the portlet's IDtrue if the entry is the current active entry; false otherwisepublic boolean isShow(javax.portlet.PortletRequest portletRequest,
com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker)
throws com.liferay.portal.kernel.exception.PortalException
PersonalMenuEntrytrue if the entry should be displayed in the user
personal menu.isShow in interface PersonalMenuEntryportletRequest - the portlet requestpermissionChecker - the permission checkertrue if the entry should be displayed in the user
personal menu; false otherwisecom.liferay.portal.kernel.exception.PortalExceptionprotected java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
protected boolean hasAccessPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
com.liferay.portal.kernel.model.Portlet portlet)
throws java.lang.Exception
java.lang.Exception