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 Channel {
024
025 public void cleanUp() throws ChannelException;
026
027 public void close() throws ChannelException;
028
029 public void confirmDelivery(Collection<String> notificationEventUuids)
030 throws ChannelException;
031
032 public void confirmDelivery(
033 Collection<String> notificationEventUuids, boolean archive)
034 throws ChannelException;
035
036 public void confirmDelivery(String notificationEventUuid)
037 throws ChannelException;
038
039 public void confirmDelivery(String notificationEventUuid, boolean archive)
040 throws ChannelException;
041
042 public void deleteUserNotificiationEvent(String notificationEventUuid)
043 throws ChannelException;
044
045 public void deleteUserNotificiationEvents(
046 Collection<String> notificationEventUuids)
047 throws ChannelException;
048
049 public void flush() throws ChannelException;
050
051 public void flush(long timestamp) throws ChannelException;
052
053 public List<NotificationEvent> getNotificationEvents()
054 throws ChannelException;
055
056 public List<NotificationEvent> getNotificationEvents(boolean flush)
057 throws ChannelException;
058
059 public long getUserId();
060
061 public void init() throws ChannelException;
062
063 public void registerChannelListener(ChannelListener channelListener);
064
065 public void removeTransientNotificationEvents(
066 Collection<NotificationEvent> notificationEvents);
067
068 public void removeTransientNotificationEventsByUuid(
069 Collection<String> notificationEventUuids);
070
071 public void sendNotificationEvent(NotificationEvent notificationEvent)
072 throws ChannelException;
073
074 public void sendNotificationEvents(
075 Collection<NotificationEvent> notificationEvents)
076 throws ChannelException;
077
078 public void storeNotificationEvent(
079 NotificationEvent notificationEvent, long currentTime)
080 throws ChannelException;
081
082 public void unregisterChannelListener(ChannelListener channelListener);
083
084 }