public abstract class BasePanelCategory extends java.lang.Object implements PanelCategory
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.
PanelCategory
Constructor and Description |
---|
BasePanelCategory() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.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 |
hashCode() |
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 |
isPersistState()
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. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getKey, getLabel
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
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)
PanelCategory
getNotificationsCount
in interface PanelCategory
panelCategoryHelper
- the PanelCategoryHelper
to facilitate
the method's implementationpermissionChecker
- the PermissionChecker
(in
portal-kernel
) used to check the user's permissionsgroup
- the group for which notifications are checkeduser
- the user from which notifications are retrievedpublic int hashCode()
hashCode
in class java.lang.Object
public boolean include(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws java.io.IOException
PanelCategory
true
if the category body renders successfully.include
in interface PanelCategory
httpServletRequest
- the servlet request used in the rendering
processhttpServletResponse
- the servlet response used in the rendering
processtrue
if the category body renders successfully;
false
otherwisejava.io.IOException
- if an IO exception occurredpublic boolean includeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws java.io.IOException
PanelCategory
true
if the category header renders successfully.includeHeader
in interface PanelCategory
httpServletRequest
- the servlet request used in the rendering
processhttpServletResponse
- the servlet response used in the rendering
processtrue
if the category header renders successfully;
false
otherwisejava.io.IOException
- if an IO exception occurredpublic boolean isActive(javax.servlet.http.HttpServletRequest httpServletRequest, PanelCategoryHelper panelCategoryHelper, com.liferay.portal.kernel.model.Group group)
PanelCategory
true
if the application category is active.isActive
in interface PanelCategory
httpServletRequest
- the servlet requestpanelCategoryHelper
- the PanelCategoryHelper
to facilitate
the method's implementationgroup
- the group for which the state of the application category
is checkedtrue
if the application category is active;
false
otherwisepublic boolean isPersistState()
PanelCategory
true
if the state of the category is persisted.isPersistState
in interface PanelCategory
true
if the state of the category is persisted;
false
otherwisepublic boolean isShow(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
PanelEntry
true
if the panel entry should be displayed in the
group's context.isShow
in interface PanelEntry
permissionChecker
- 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 occurred