Class BasePanelApp

java.lang.Object
com.liferay.application.list.BasePanelApp
All Implemented Interfaces:
PanelApp, PanelEntry
Direct Known Subclasses:
BaseJSPPanelApp, PortletPanelAppAdapter

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

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

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected GroupProvider
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.liferay.portal.kernel.portlet.ControlPanelEntry
     
    protected com.liferay.portal.kernel.model.Group
    getGroup(javax.servlet.http.HttpServletRequest httpServletRequest)
     
    Returns the panel entry's key.
    getLabel(Locale locale)
    Returns the label that is displayed in the user interface when the panel entry is included.
    int
    getNotificationsCount(com.liferay.portal.kernel.model.User user)
    Returns the number of notifications for the user.
    javax.portlet.PortletURL
    getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest)
    Returns the URL used to render a portlet based on the servlet request attributes.
    boolean
    include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
    Returns true if the application successfully renders.
    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.
    void
    Sets the GroupProvider associated with the application.
    void
    setPortletLocalService(com.liferay.portal.kernel.service.PortletLocalService portletLocalService)
     
    protected void
    setUserNotificationEventLocalService(com.liferay.portal.kernel.service.UserNotificationEventLocalService userNotificationEventLocalService)
     

    Methods inherited from class java.lang.Object

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

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

    getPortlet, getPortletId
  • Field Details

  • Constructor Details

    • BasePanelApp

      public BasePanelApp()
  • Method Details

    • getKey

      public String getKey()
      Description copied from interface: PanelEntry
      Returns the panel entry's key.
      Specified by:
      getKey in interface PanelEntry
      Returns:
      the panel entry's key
    • getLabel

      public String getLabel(Locale locale)
      Description copied from interface: PanelEntry
      Returns the label that is displayed in the user interface when the panel entry is included.
      Specified by:
      getLabel in interface PanelEntry
      Parameters:
      locale - the label's retrieved locale
      Returns:
      the label of the panel entry
    • getNotificationsCount

      public int getNotificationsCount(com.liferay.portal.kernel.model.User user)
      Description copied from interface: PanelApp
      Returns the number of notifications for the user.
      Specified by:
      getNotificationsCount in interface PanelApp
      Parameters:
      user - the user from which notifications are retrieved
      Returns:
      the number of notifications for the user
    • getPortletURL

      public javax.portlet.PortletURL getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.exception.PortalException
      Description copied from interface: PanelApp
      Returns the URL used to render a portlet based on the servlet request attributes.
      Specified by:
      getPortletURL in interface PanelApp
      Parameters:
      httpServletRequest - the servlet request used to create a portlet's URL
      Returns:
      the portlet's URL used to render a target portlet
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • include

      public boolean include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException
      Description copied from interface: PanelApp
      Returns true if the application successfully renders.
      Specified by:
      include in interface PanelApp
      Parameters:
      httpServletRequest - the servlet request used in the rendering process
      httpServletResponse - the servlet response used in the rendering process
      Returns:
      true if the application successfully renders; false otherwise
      Throws:
      IOException - if an IO exception occurred
    • 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
    • setGroupProvider

      public void setGroupProvider(GroupProvider groupProvider)
      Description copied from interface: PanelApp
      Sets the GroupProvider associated with the application.
      Specified by:
      setGroupProvider in interface PanelApp
      Parameters:
      groupProvider - the group provider associated with the application
    • setPortletLocalService

      public void setPortletLocalService(com.liferay.portal.kernel.service.PortletLocalService portletLocalService)
    • getControlPanelEntry

      protected com.liferay.portal.kernel.portlet.ControlPanelEntry getControlPanelEntry()
    • getGroup

      protected com.liferay.portal.kernel.model.Group getGroup(javax.servlet.http.HttpServletRequest httpServletRequest)
    • setUserNotificationEventLocalService

      protected void setUserNotificationEventLocalService(com.liferay.portal.kernel.service.UserNotificationEventLocalService userNotificationEventLocalService)