001
014
015 package com.liferay.portal.kernel.notifications;
016
017 import java.util.Collection;
018 import java.util.List;
019
020
023 public interface ChannelHubManager {
024
025 public void confirmDelivery(
026 long companyId, long userId,
027 Collection<String> notificationEventUuids)
028 throws ChannelException;
029
030 public void confirmDelivery(
031 long companyId, long userId,
032 Collection<String> notificationEventUuids, boolean archive)
033 throws ChannelException;
034
035 public void confirmDelivery(
036 long companyId, long userId, String notificationEventUuid)
037 throws ChannelException;
038
039 public void confirmDelivery(
040 long companyId, long userId, String notificationEventUuid,
041 boolean archive)
042 throws ChannelException;
043
044 public Channel createChannel(long companyId, long userId)
045 throws ChannelException;
046
047 public ChannelHub createChannelHub(long companyId) throws ChannelException;
048
049 public void deleteUserNotificiationEvent(
050 long companyId, long userId, String notificationEventUuid)
051 throws ChannelException;
052
053 public void deleteUserNotificiationEvents(
054 long companyId, long userId,
055 Collection<String> notificationEventUuids)
056 throws ChannelException;
057
058 public void destroyChannel(long companyId, long userId)
059 throws ChannelException;
060
061 public void destroyChannelHub(long companyId) throws ChannelException;
062
063 public void destroyClusterChannel(long companyId, long userId)
064 throws ChannelException;
065
066 public ChannelHub fetchChannelHub(long companyId) throws ChannelException;
067
068 public ChannelHub fetchChannelHub(long companyId, boolean createIfAbsent)
069 throws ChannelException;
070
071 public List<NotificationEvent> fetchNotificationEvents(
072 long companyId, long userId, boolean flush)
073 throws ChannelException;
074
075 public void flush() throws ChannelException;
076
077 public void flush(long companyId) throws ChannelException;
078
079 public void flush(long companyId, long userId, long timestamp)
080 throws ChannelException;
081
082 public Channel getChannel(long companyId, long userId)
083 throws ChannelException;
084
085 public Channel getChannel(
086 long companyId, long userId, boolean createIfAbsent)
087 throws ChannelException;
088
089 public ChannelHub getChannelHub(long companyId) throws ChannelException;
090
091 public ChannelHub getChannelHub(long companyId, boolean createIfAbsent)
092 throws ChannelException;
093
094 public List<NotificationEvent> getNotificationEvents(
095 long companyId, long userId)
096 throws ChannelException;
097
098 public List<NotificationEvent> getNotificationEvents(
099 long companyId, long userId, boolean flush)
100 throws ChannelException;
101
102 public Collection<Long> getUserIds(long companyId) throws ChannelException;
103
104 public void registerChannelListener(
105 long companyId, long userId, ChannelListener channelListener)
106 throws ChannelException;
107
108 public void removeTransientNotificationEvents(
109 long companyId, long userId,
110 Collection<NotificationEvent> notificationEvents)
111 throws ChannelException;
112
113 public void removeTransientNotificationEventsByUuid(
114 long companyId, long userId,
115 Collection<String> notificationEventUuids)
116 throws ChannelException;
117
118 public void sendClusterNotificationEvent(
119 long companyId, long userId, NotificationEvent notificationEvent)
120 throws ChannelException;
121
122 public void sendNotificationEvent(
123 long companyId, long userId, NotificationEvent notificationEvent)
124 throws ChannelException;
125
126 public void sendNotificationEvents(
127 long companyId, long userId,
128 Collection<NotificationEvent> notificationEvents)
129 throws ChannelException;
130
131 public void storeNotificationEvent(
132 long companyId, long userId, NotificationEvent notificationEvent)
133 throws ChannelException;
134
135 public void unregisterChannelListener(
136 long companyId, long userId, ChannelListener channelListener)
137 throws ChannelException;
138
139 }