Example usage for com.liferay.portal.kernel.notifications ChannelHubManagerUtil deleteUserNotificiationEvent

List of usage examples for com.liferay.portal.kernel.notifications ChannelHubManagerUtil deleteUserNotificiationEvent

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.notifications ChannelHubManagerUtil deleteUserNotificiationEvent.

Prototype

public static void deleteUserNotificiationEvent(long companyId, long userId, String notificationEventUuid)
            throws ChannelException 

Source Link

Usage

From source file:com.liferay.so.notifications.portlet.NotificationsPortlet.java

License:Open Source License

public void deleteUserNotificationEvent(ActionRequest actionRequest, ActionResponse actionResponse)
        throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    String userNotificationEventUuid = ParamUtil.getString(actionRequest, "userNotificationEventUuid");

    ChannelHubManagerUtil.deleteUserNotificiationEvent(themeDisplay.getCompanyId(), themeDisplay.getUserId(),
            userNotificationEventUuid);/*from   w w  w . j  a  v  a 2s  .  c o m*/
}

From source file:com.liferay.so.notifications.portlet.NotificationsPortlet.java

License:Open Source License

public void deleteUserNotificationEvents(ActionRequest actionRequest, ActionResponse actionResponse)
        throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    String[] userNotificationEventUuids = StringUtil
            .split(ParamUtil.getString(actionRequest, "userNotificationEventUuids"));

    for (String userNotificationEventUuid : userNotificationEventUuids) {
        ChannelHubManagerUtil.deleteUserNotificiationEvent(themeDisplay.getCompanyId(),
                themeDisplay.getUserId(), userNotificationEventUuid);
    }/*from  w  w w  .  ja  v  a  2 s  .  c  om*/
}