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.ControlPanelEntryprotected com.liferay.portal.kernel.model.GroupgetGroup(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.intgetNotificationsCount(com.liferay.portal.kernel.model.User user) Returns the number of notifications for the user.javax.portlet.PortletURLgetPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest) Returns the URL used to render a portlet based on the servlet request attributes.booleaninclude(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) Returnstrueif the application successfully renders.booleanisShow(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group) Returnstrueif the panel entry should be displayed in the group's context.voidsetGroupProvider(GroupProvider groupProvider) Sets theGroupProviderassociated with the application.voidsetPortletLocalService(com.liferay.portal.kernel.service.PortletLocalService portletLocalService) protected voidsetUserNotificationEventLocalService(com.liferay.portal.kernel.service.UserNotificationEventLocalService userNotificationEventLocalService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:PanelEntryReturns the panel entry's key.- Specified by:
getKeyin interfacePanelEntry- Returns:
- the panel entry's key
-
getLabel
Description copied from interface:PanelEntryReturns the label that is displayed in the user interface when the panel entry is included.- Specified by:
getLabelin 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:PanelAppReturns the number of notifications for the user.- Specified by:
getNotificationsCountin 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:PanelAppReturns the URL used to render a portlet based on the servlet request attributes.- Specified by:
getPortletURLin 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:PanelAppReturnstrueif the application successfully renders.- Specified by:
includein interfacePanelApp- Parameters:
httpServletRequest- the servlet request used in the rendering processhttpServletResponse- the servlet response used in the rendering process- Returns:
trueif the application successfully renders;falseotherwise- 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:PanelEntryReturnstrueif the panel entry should be displayed in the group's context.- Specified by:
isShowin interfacePanelEntry- Parameters:
permissionChecker- the permission checkergroup- the group for which permissions are checked- Returns:
trueif the Control Menu entry should be displayed in the request's context;falseotherwise- Throws:
com.liferay.portal.kernel.exception.PortalException- if a portal exception occurred
-
setGroupProvider
Description copied from interface:PanelAppSets theGroupProviderassociated with the application.- Specified by:
setGroupProviderin 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)
-