Class BasePersonalMenuEntry
java.lang.Object
com.liferay.product.navigation.personal.menu.BasePersonalMenuEntry
- All Implemented Interfaces:
PersonalMenuEntry
Provides a skeletal implementation of the
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the label that is displayed in the user personal menu.abstract StringReturns the portlet's ID associated with the user personal menu entry.getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest) Returns the URL used to render a portlet based on the servlet request attributes.protected ResourceBundlegetResourceBundle(Locale locale) protected booleanhasAccessPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Portlet portlet) booleanReturnstrueif the entry is the current active entry.booleanisShow(javax.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker) Returnstrueif the entry should be displayed in the user personal menu.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.product.navigation.personal.menu.PersonalMenuEntry
getIcon, getJSOnClickConfigJSONObject, getOnClickESModule
-
Constructor Details
-
BasePersonalMenuEntry
public BasePersonalMenuEntry()
-
-
Method Details
-
getLabel
Description copied from interface:PersonalMenuEntryReturns the label that is displayed in the user personal menu.- Specified by:
getLabelin interfacePersonalMenuEntry- Parameters:
locale- the label's retrieved locale- Returns:
- the label of the user personal menu entry
-
getPortletId
Returns the portlet's ID associated with the user personal menu entry.- Returns:
- the portlet's ID associated with the user personal menu entry
-
getPortletURL
public String getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.exception.PortalException Description copied from interface:PersonalMenuEntryReturns the URL used to render a portlet based on the servlet request attributes.- Specified by:
getPortletURLin interfacePersonalMenuEntry- Parameters:
httpServletRequest- the servlet request used to create a portlet's URL- Returns:
- the portlet's URL used to render a portlet
- Throws:
com.liferay.portal.kernel.exception.PortalException- if a portal exception occurred
-
isActive
Description copied from interface:PersonalMenuEntryReturnstrueif the entry is the current active entry.- Specified by:
isActivein interfacePersonalMenuEntry- Parameters:
portletRequest- the portlet requestportletId- the portlet's ID- Returns:
trueif the entry is the current active entry;falseotherwise
-
isShow
public boolean isShow(javax.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker) throws com.liferay.portal.kernel.exception.PortalException Description copied from interface:PersonalMenuEntryReturnstrueif the entry should be displayed in the user personal menu.- Specified by:
isShowin interfacePersonalMenuEntry- Parameters:
portletRequest- the portlet requestpermissionChecker- the permission checker- Returns:
trueif the entry should be displayed in the user personal menu;falseotherwise- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getResourceBundle
-
hasAccessPermission
protected boolean hasAccessPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Portlet portlet) throws Exception - Throws:
Exception
-