001
014
015 package com.liferay.portal.kernel.notifications;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.model.UserNotificationEvent;
020 import com.liferay.portal.service.ServiceContext;
021
022 import java.util.List;
023 import java.util.Map;
024
025
028 public interface UserNotificationManager {
029
030 public void addUserNotificationDefinition(
031 String portletIf,
032 UserNotificationDefinition userNotificationDefinition);
033
034 public void addUserNotificationHandler(
035 UserNotificationHandler userNotificationHandler);
036
037 public void deleteUserNotificationDefinitions(String portletId);
038
039 public void deleteUserNotificationHandler(
040 UserNotificationHandler userNotificationHandler);
041
042 public UserNotificationDefinition fetchUserNotificationDefinition(
043 String portletId, long classNameId, int notificationType);
044
045 public Map<String, List<UserNotificationDefinition>>
046 getUserNotificationDefinitions();
047
048 public Map<String, Map<String, UserNotificationHandler>>
049 getUserNotificationHandlers();
050
051 public UserNotificationFeedEntry interpret(
052 String selector, UserNotificationEvent userNotificationEvent,
053 ServiceContext serviceContext)
054 throws PortalException;
055
056 public boolean isDeliver(
057 long userId, String portletId, long classNameId,
058 int notificationType, int deliveryType)
059 throws PortalException, SystemException;
060
061 public boolean isDeliver(
062 long userId, String selector, String portletId, long classNameId,
063 int notificationType, int deliveryType,
064 ServiceContext serviceContext)
065 throws PortalException, SystemException;
066
067 }