Class BasePersonalMenuEntry

java.lang.Object
com.liferay.product.navigation.personal.menu.BasePersonalMenuEntry
All Implemented Interfaces:
PersonalMenuEntry

public abstract class BasePersonalMenuEntry extends Object implements 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 Details

    • BasePersonalMenuEntry

      public BasePersonalMenuEntry()
  • Method Details

    • getLabel

      public String getLabel(Locale locale)
      Description copied from interface: PersonalMenuEntry
      Returns the label that is displayed in the user personal menu.
      Specified by:
      getLabel in interface PersonalMenuEntry
      Parameters:
      locale - the label's retrieved locale
      Returns:
      the label of the user personal menu entry
    • getPortletId

      public abstract String 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(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.exception.PortalException
      Description copied from interface: PersonalMenuEntry
      Returns the URL used to render a portlet based on the servlet request attributes.
      Specified by:
      getPortletURL in interface PersonalMenuEntry
      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

      public boolean isActive(jakarta.portlet.PortletRequest portletRequest, String portletId)
      Description copied from interface: PersonalMenuEntry
      Returns true if the entry is the current active entry.
      Specified by:
      isActive in interface PersonalMenuEntry
      Parameters:
      portletRequest - the portlet request
      portletId - the portlet's ID
      Returns:
      true if the entry is the current active entry; false otherwise
    • isShow

      public boolean isShow(jakarta.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker) throws com.liferay.portal.kernel.exception.PortalException
      Description copied from interface: PersonalMenuEntry
      Returns true if the entry should be displayed in the user personal menu.
      Specified by:
      isShow in interface PersonalMenuEntry
      Parameters:
      portletRequest - the portlet request
      permissionChecker - the permission checker
      Returns:
      true if the entry should be displayed in the user personal menu; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getResourceBundle

      protected ResourceBundle getResourceBundle(Locale locale)
    • hasAccessPermission

      protected boolean hasAccessPermission(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Portlet portlet) throws Exception
      Throws:
      Exception