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, String notificationEventUuid)
027 throws ChannelException;
028
029 public Channel createChannel(long companyId, long userId)
030 throws ChannelException;
031
032 public ChannelHub createChannelHub(long companyId) throws ChannelException;
033
034 public void destroyChannel(long companyId, long userId)
035 throws ChannelException;
036
037 public void destroyChannelHub(long companyId) throws ChannelException;
038
039 public void flush() throws ChannelException;
040
041 public void flush(long companyId) throws ChannelException;
042
043 public void flush(long companyId, long userId, long timestamp)
044 throws ChannelException;
045
046 public Channel getChannel(long companyId, long userId)
047 throws ChannelException;
048
049 public Channel getChannel(
050 long companyId, long userId, boolean createIfAbsent)
051 throws ChannelException;
052
053 public ChannelHub getChannelHub(long companyId) throws ChannelException;
054
055 public ChannelHub getChannelHub(long companyId, boolean createIfAbsent)
056 throws ChannelException;
057
058 public List<NotificationEvent> getNotificationEvents(
059 long compnayId, long userId)
060 throws ChannelException;
061
062 public List<NotificationEvent> getNotificationEvents(
063 long compnayId, long userId, boolean flush)
064 throws ChannelException;
065
066 public Collection<Long> getUserIds(long companyId) throws ChannelException;
067
068 public void registerChannelListener(
069 long companyId, long userId, ChannelListener channelListener)
070 throws ChannelException;
071
072 public void removeTransientNotificationEvents(
073 long companyId, long userId,
074 Collection<NotificationEvent> notificationEvents)
075 throws ChannelException;
076
077 public void removeTransientNotificationEventsByUuid(
078 long companyId, long userId,
079 Collection<String> notificationEventUuids)
080 throws ChannelException;
081
082 public void sendNotificationEvent(
083 long companyId, long userId, NotificationEvent notificationEvent)
084 throws ChannelException;
085
086 public void sendNotificationEvents(
087 long companyId, long userId,
088 Collection<NotificationEvent> notificationEvents)
089 throws ChannelException;
090
091 public void unregisterChannelListener(
092 long companyId, long userId, ChannelListener channelListener)
093 throws ChannelException;
094
095 }