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 ChannelHub fetchChannelHub(long companyId) throws ChannelException;
064
065 public ChannelHub fetchChannelHub(long companyId, boolean createIfAbsent)
066 throws ChannelException;
067
068 public void flush() throws ChannelException;
069
070 public void flush(long companyId) throws ChannelException;
071
072 public void flush(long companyId, long userId, long timestamp)
073 throws ChannelException;
074
075 public Channel getChannel(long companyId, long userId)
076 throws ChannelException;
077
078 public Channel getChannel(
079 long companyId, long userId, boolean createIfAbsent)
080 throws ChannelException;
081
082 public ChannelHub getChannelHub(long companyId) throws ChannelException;
083
084 public ChannelHub getChannelHub(long companyId, boolean createIfAbsent)
085 throws ChannelException;
086
087 public List<NotificationEvent> getNotificationEvents(
088 long compnayId, long userId)
089 throws ChannelException;
090
091 public List<NotificationEvent> getNotificationEvents(
092 long compnayId, long userId, boolean flush)
093 throws ChannelException;
094
095 public Collection<Long> getUserIds(long companyId) throws ChannelException;
096
097 public void registerChannelListener(
098 long companyId, long userId, ChannelListener channelListener)
099 throws ChannelException;
100
101 public void removeTransientNotificationEvents(
102 long companyId, long userId,
103 Collection<NotificationEvent> notificationEvents)
104 throws ChannelException;
105
106 public void removeTransientNotificationEventsByUuid(
107 long companyId, long userId,
108 Collection<String> notificationEventUuids)
109 throws ChannelException;
110
111 public void sendNotificationEvent(
112 long companyId, long userId, NotificationEvent notificationEvent)
113 throws ChannelException;
114
115 public void sendNotificationEvents(
116 long companyId, long userId,
117 Collection<NotificationEvent> notificationEvents)
118 throws ChannelException;
119
120 public void unregisterChannelListener(
121 long companyId, long userId, ChannelListener channelListener)
122 throws ChannelException;
123
124 }