Class BasePanelCategory

java.lang.Object
com.liferay.application.list.BasePanelCategory
All Implemented Interfaces:
PanelCategory, PanelEntry
Direct Known Subclasses:
BaseJSPPanelCategory

public abstract class BasePanelCategory extends Object implements PanelCategory
Provides a skeletal implementation of the PanelCategory to minimize the effort required to implement this interface.

To implement an application category, this class should be extended and include(HttpServletRequest, HttpServletResponse) and #includeHeader(HttpServletRequest, HttpServletResponse)} should be overridden. The include override method should return true when the application view successfully renders and false otherwise. The includeHeader override method should return true when the category header successfully renders and false otherwise.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
     
    int
    getNotificationsCount(PanelCategoryHelper panelCategoryHelper, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.User user)
    Returns the number of notifications for the user in this application category.
    int
     
    boolean
    include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
    Returns true if the category body renders successfully.
    boolean
    includeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
    Returns true if the category header renders successfully.
    boolean
    isActive(javax.servlet.http.HttpServletRequest httpServletRequest, PanelCategoryHelper panelCategoryHelper, com.liferay.portal.kernel.model.Group group)
    Returns true if the application category is active.
    boolean
    Returns true if the state of the category is persisted.
    boolean
    isShow(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group)
    Returns true if the panel entry should be displayed in the group's context.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.liferay.application.list.PanelCategory

    isAllowScopeLayouts

    Methods inherited from interface com.liferay.application.list.PanelEntry

    getKey, getLabel
  • Constructor Details

    • BasePanelCategory

      public BasePanelCategory()
  • Method Details

    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • getNotificationsCount

      public int getNotificationsCount(PanelCategoryHelper panelCategoryHelper, com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.User user)
      Description copied from interface: PanelCategory
      Returns the number of notifications for the user in this application category.
      Specified by:
      getNotificationsCount in interface PanelCategory
      Parameters:
      panelCategoryHelper - the PanelCategoryHelper to facilitate the method's implementation
      permissionChecker - the PermissionChecker (in portal-kernel) used to check the user's permissions
      group - the group for which notifications are checked
      user - the user from which notifications are retrieved
      Returns:
      the number of notifications for the user in the application category
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • include

      public boolean include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException
      Description copied from interface: PanelCategory
      Returns true if the category body renders successfully.
      Specified by:
      include in interface PanelCategory
      Parameters:
      httpServletRequest - the servlet request used in the rendering process
      httpServletResponse - the servlet response used in the rendering process
      Returns:
      true if the category body renders successfully; false otherwise
      Throws:
      IOException - if an IO exception occurred
    • includeHeader

      public boolean includeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException
      Description copied from interface: PanelCategory
      Returns true if the category header renders successfully.
      Specified by:
      includeHeader in interface PanelCategory
      Parameters:
      httpServletRequest - the servlet request used in the rendering process
      httpServletResponse - the servlet response used in the rendering process
      Returns:
      true if the category header renders successfully; false otherwise
      Throws:
      IOException - if an IO exception occurred
    • isActive

      public boolean isActive(javax.servlet.http.HttpServletRequest httpServletRequest, PanelCategoryHelper panelCategoryHelper, com.liferay.portal.kernel.model.Group group)
      Description copied from interface: PanelCategory
      Returns true if the application category is active.
      Specified by:
      isActive in interface PanelCategory
      Parameters:
      httpServletRequest - the servlet request
      panelCategoryHelper - the PanelCategoryHelper to facilitate the method's implementation
      group - the group for which the state of the application category is checked
      Returns:
      true if the application category is active; false otherwise
    • isPersistState

      public boolean isPersistState()
      Description copied from interface: PanelCategory
      Returns true if the state of the category is persisted.
      Specified by:
      isPersistState in interface PanelCategory
      Returns:
      true if the state of the category is persisted; false otherwise
    • isShow

      public boolean isShow(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
      Description copied from interface: PanelEntry
      Returns true if the panel entry should be displayed in the group's context.
      Specified by:
      isShow in interface PanelEntry
      Parameters:
      permissionChecker - the permission checker
      group - the group for which permissions are checked
      Returns:
      true if the Control Menu entry should be displayed in the request's context; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred