Package com.liferay.application.list
Class BasePanelApp
java.lang.Object
com.liferay.application.list.BasePanelApp
- All Implemented Interfaces:
PanelApp
,PanelEntry
- Direct Known Subclasses:
BaseJSPPanelApp
,PortletPanelAppAdapter
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.liferay.portal.kernel.portlet.ControlPanelEntry
protected com.liferay.portal.kernel.model.Group
getGroup
(javax.servlet.http.HttpServletRequest httpServletRequest) getKey()
Returns the panel entry's key.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) Returnstrue
if the application successfully renders.boolean
isShow
(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group) Returnstrue
if the panel entry should be displayed in the group's context.void
setGroupProvider
(GroupProvider groupProvider) Sets theGroupProvider
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
-
groupProvider
-
-
Constructor Details
-
BasePanelApp
public BasePanelApp()
-
-
Method Details
-
getKey
Description copied from interface:PanelEntry
Returns the panel entry's key.- Specified by:
getKey
in interfacePanelEntry
- Returns:
- the panel entry's key
-
getLabel
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 interfacePanelEntry
- 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 interfacePanelApp
- 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 interfacePanelApp
- 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
Returnstrue
if the application successfully renders.- Specified by:
include
in interfacePanelApp
- Parameters:
httpServletRequest
- the servlet request used in the rendering processhttpServletResponse
- 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
Returnstrue
if the panel entry should be displayed in the group's context.- Specified by:
isShow
in interfacePanelEntry
- Parameters:
permissionChecker
- the permission checkergroup
- 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
Description copied from interface:PanelApp
Sets theGroupProvider
associated with the application.- Specified by:
setGroupProvider
in interfacePanelApp
- 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)
-