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 TypeMethodDescriptiondefault StringgetIcon(javax.portlet.PortletRequest portletRequest) Returns the icon name to display in the entry.default com.liferay.portal.kernel.json.JSONObjectgetJSOnClickConfigJSONObject(javax.servlet.http.HttpServletRequest httpServletRequest) Returns the label that is displayed in the user personal menu.default StringgetOnClickESModule(javax.servlet.http.HttpServletRequest httpServletRequest) getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest) Returns the URL used to render a portlet based on the servlet request attributes.default booleanReturnstrueif the entry is the current active entry.default booleanisShow(javax.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker) Returnstrueif the entry should be displayed in the user personal menu.
-
Method Details
-
getIcon
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(javax.servlet.http.HttpServletRequest httpServletRequest) -
getLabel
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
-
getPortletURL
String getPortletURL(javax.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(javax.portlet.PortletRequest portletRequest, String portletId) throws com.liferay.portal.kernel.exception.PortalException Returnstrueif the entry is the current active entry.- Parameters:
portletRequest- the portlet requestportletId- the portlet's ID- Returns:
trueif the entry is the current active entry;falseotherwise- Throws:
com.liferay.portal.kernel.exception.PortalException
-
isShow
default boolean isShow(javax.portlet.PortletRequest portletRequest, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker) throws com.liferay.portal.kernel.exception.PortalException Returnstrueif the entry should be displayed in the user personal menu.- 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
-