public abstract class BasePanelApp extends java.lang.Object implements PanelApp
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.
PanelApp| Modifier and Type | Field and Description |
|---|---|
protected GroupProvider |
groupProvider |
| Constructor and Description |
|---|
BasePanelApp() |
| Modifier and Type | Method and Description |
|---|---|
protected com.liferay.portal.kernel.portlet.ControlPanelEntry |
getControlPanelEntry() |
protected com.liferay.portal.kernel.model.Group |
getGroup(javax.servlet.http.HttpServletRequest httpServletRequest) |
java.lang.String |
getKey()
Returns the panel entry's key.
|
java.lang.String |
getLabel(java.util.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.
|
com.liferay.portal.kernel.model.Portlet |
getPortlet()
Returns the portlet associated with the application.
|
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 |
setGroupProvider(GroupProvider groupProvider)
Sets the
GroupProvider associated with the application. |
void |
setPortlet(com.liferay.portal.kernel.model.Portlet portlet)
Sets the portlet associated with the application.
|
protected void |
setPortletLocalService(com.liferay.portal.kernel.service.PortletLocalService portletLocalService) |
protected void |
setUserNotificationEventLocalService(com.liferay.portal.kernel.service.UserNotificationEventLocalService userNotificationEventLocalService) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPortletIdprotected GroupProvider groupProvider
public java.lang.String getKey()
PanelEntrygetKey in interface PanelEntrypublic java.lang.String getLabel(java.util.Locale locale)
PanelEntrygetLabel in interface PanelEntrylocale - the label's retrieved localepublic int getNotificationsCount(com.liferay.portal.kernel.model.User user)
PanelAppgetNotificationsCount in interface PanelAppuser - the user from which notifications are retrievedpublic com.liferay.portal.kernel.model.Portlet getPortlet()
PanelAppgetPortlet in interface PanelApppublic javax.portlet.PortletURL getPortletURL(javax.servlet.http.HttpServletRequest httpServletRequest)
throws com.liferay.portal.kernel.exception.PortalException
PanelAppgetPortletURL in interface PanelApphttpServletRequest - the servlet request used to create a portlet's
URLcom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredpublic boolean include(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException
PanelApptrue if the application successfully renders.include in interface PanelApphttpServletRequest - the servlet request used in the rendering
processhttpServletResponse - the servlet response used in the rendering
processtrue if the application successfully renders;
false otherwisejava.io.IOException - if an IO exception occurredpublic boolean isShow(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
com.liferay.portal.kernel.model.Group group)
throws com.liferay.portal.kernel.exception.PortalException
PanelEntrytrue if the panel entry should be displayed in the
group's context.isShow in interface PanelEntrypermissionChecker - the permission checkergroup - the group for which permissions are checkedtrue if the Control Menu entry should be displayed
in the request's context; false otherwisecom.liferay.portal.kernel.exception.PortalException - if a portal exception occurredpublic void setGroupProvider(GroupProvider groupProvider)
PanelAppGroupProvider associated with the application.setGroupProvider in interface PanelAppgroupProvider - the group provider associated with the applicationpublic void setPortlet(com.liferay.portal.kernel.model.Portlet portlet)
PanelAppsetPortlet in interface PanelAppportlet - the portlet associated with the applicationprotected com.liferay.portal.kernel.portlet.ControlPanelEntry getControlPanelEntry()
protected com.liferay.portal.kernel.model.Group getGroup(javax.servlet.http.HttpServletRequest httpServletRequest)
protected void setPortletLocalService(com.liferay.portal.kernel.service.PortletLocalService portletLocalService)
protected void setUserNotificationEventLocalService(com.liferay.portal.kernel.service.UserNotificationEventLocalService userNotificationEventLocalService)