Interface PersonalMenuEntry

All Known Implementing Classes:
BasePersonalMenuEntry

public interface PersonalMenuEntry
Provides an interface that defines the entries to be used by a liferay-product-navigation:user-personal-menu tag instance to render a new user personal menu entry.

Implementations must be registered in the OSGi Registry. The user personal menu entry order is determined by the product.navigation.personal.menu.entry.order property value. The entry's section placement in the menu is determined by the product.navigation.personal.menu.group property value.

  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    getIcon(jakarta.portlet.PortletRequest portletRequest)
    Returns the icon name to display in the entry.
    default com.liferay.portal.kernel.json.JSONObject
    getJSOnClickConfigJSONObject(jakarta.servlet.http.HttpServletRequest httpServletRequest)
     
    getLabel(Locale locale)
    Returns the label that is displayed in the user personal menu.
    default String
    getOnClickESModule(jakarta.servlet.http.HttpServletRequest httpServletRequest)
     
    getPortletURL(jakarta.servlet.http.HttpServletRequest httpServletRequest)
    Returns the URL used to render a portlet based on the servlet request attributes.
    default boolean
    isActive(jakarta.portlet.PortletRequest portletRequest, String portletId)
    Returns true if the entry is the current active entry.
    default boolean
    isShow(jakarta.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker)
    Returns true if the entry should be displayed in the user personal menu.
  • Method Details

    • getIcon

      default String getIcon(jakarta.portlet.PortletRequest portletRequest)
      Returns the icon name to display in the entry.
      Parameters:
      portletRequest - the portlet request
      Returns:
      the icon name to display in the entry
    • getJSOnClickConfigJSONObject

      default com.liferay.portal.kernel.json.JSONObject getJSOnClickConfigJSONObject(jakarta.servlet.http.HttpServletRequest httpServletRequest)
    • getLabel

      String getLabel(Locale locale)
      Returns the label that is displayed in the user personal menu.
      Parameters:
      locale - the label's retrieved locale
      Returns:
      the label of the user personal menu entry
    • getOnClickESModule

      default String getOnClickESModule(jakarta.servlet.http.HttpServletRequest httpServletRequest)
    • getPortletURL

      String getPortletURL(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.exception.PortalException
      Returns the URL used to render a portlet based on the servlet request attributes.
      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

      default boolean isActive(jakarta.portlet.PortletRequest portletRequest, String portletId) throws com.liferay.portal.kernel.exception.PortalException
      Returns true if the entry is the current active entry.
      Parameters:
      portletRequest - the portlet request
      portletId - the portlet's ID
      Returns:
      true if the entry is the current active entry; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • isShow

      default boolean isShow(jakarta.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker) throws com.liferay.portal.kernel.exception.PortalException
      Returns true if the entry should be displayed in the user personal menu.
      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