com.liferay.portal.notifications
Class ChannelHubImpl

java.lang.Object
  extended by com.liferay.portal.notifications.ChannelHubImpl
All Implemented Interfaces:
com.liferay.portal.kernel.notifications.ChannelHub

public class ChannelHubImpl
extends java.lang.Object
implements com.liferay.portal.kernel.notifications.ChannelHub

Author:
Edward Han, Brian Wing Shun Chan, Shuyang Zhou

Constructor Summary
ChannelHubImpl()
           
 
Method Summary
 void cleanUp()
           
 void cleanUp(long userId)
           
 com.liferay.portal.kernel.notifications.ChannelHub clone(long companyId)
           
 void confirmDelivery(long userId, java.util.Collection<java.lang.String> notificationEventUuids)
           
 void confirmDelivery(long userId, java.util.Collection<java.lang.String> notificationEventUuids, boolean archive)
           
 void confirmDelivery(long userId, java.lang.String notificationEventUuid)
           
 void confirmDelivery(long userId, java.lang.String notificationEventUuid, boolean archive)
           
 com.liferay.portal.kernel.notifications.Channel createChannel(long userId)
           
 void deleteUserNotificiationEvent(long userId, java.lang.String notificationEventUuid)
           
 void deleteUserNotificiationEvents(long userId, java.util.Collection<java.lang.String> notificationEventUuids)
           
 void destroy()
           
 com.liferay.portal.kernel.notifications.Channel destroyChannel(long userId)
           
 com.liferay.portal.kernel.notifications.Channel fetchChannel(long userId)
           
 com.liferay.portal.kernel.notifications.Channel fetchChannel(long userId, boolean createIfAbsent)
           
 void flush()
           
 void flush(long userId)
           
 void flush(long userId, long timestamp)
           
 com.liferay.portal.kernel.notifications.Channel getChannel(long userId)
           
 com.liferay.portal.kernel.notifications.Channel getChannel(long userId, boolean createIfAbsent)
           
 long getCompanyId()
           
 java.util.List<com.liferay.portal.kernel.notifications.NotificationEvent> getNotificationEvents(long userId)
           
 java.util.List<com.liferay.portal.kernel.notifications.NotificationEvent> getNotificationEvents(long userId, boolean flush)
           
 java.util.Collection<java.lang.Long> getUserIds()
           
 void registerChannelListener(long userId, com.liferay.portal.kernel.notifications.ChannelListener channelListener)
           
 void removeTransientNotificationEvents(long userId, java.util.Collection<com.liferay.portal.kernel.notifications.NotificationEvent> notificationEvents)
           
 void removeTransientNotificationEventsByUuid(long userId, java.util.Collection<java.lang.String> notificationEventUuids)
           
 void sendNotificationEvent(long userId, com.liferay.portal.kernel.notifications.NotificationEvent notificationEvent)
           
 void sendNotificationEvents(long userId, java.util.Collection<com.liferay.portal.kernel.notifications.NotificationEvent> notificationEvents)
           
 void setChannelPrototype(com.liferay.portal.kernel.notifications.Channel channel)
           
 void setCompanyId(long companyId)
           
 void unregisterChannelListener(long userId, com.liferay.portal.kernel.notifications.ChannelListener channelListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelHubImpl

public ChannelHubImpl()
Method Detail

cleanUp

public void cleanUp()
             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
cleanUp in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

cleanUp

public void cleanUp(long userId)
             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
cleanUp in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

clone

public com.liferay.portal.kernel.notifications.ChannelHub clone(long companyId)
Specified by:
clone in interface com.liferay.portal.kernel.notifications.ChannelHub

confirmDelivery

public void confirmDelivery(long userId,
                            java.util.Collection<java.lang.String> notificationEventUuids)
                     throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
confirmDelivery in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

confirmDelivery

public void confirmDelivery(long userId,
                            java.util.Collection<java.lang.String> notificationEventUuids,
                            boolean archive)
                     throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
confirmDelivery in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

confirmDelivery

public void confirmDelivery(long userId,
                            java.lang.String notificationEventUuid)
                     throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
confirmDelivery in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

confirmDelivery

public void confirmDelivery(long userId,
                            java.lang.String notificationEventUuid,
                            boolean archive)
                     throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
confirmDelivery in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

createChannel

public com.liferay.portal.kernel.notifications.Channel createChannel(long userId)
                                                              throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
createChannel in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

deleteUserNotificiationEvent

public void deleteUserNotificiationEvent(long userId,
                                         java.lang.String notificationEventUuid)
                                  throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
deleteUserNotificiationEvent in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

deleteUserNotificiationEvents

public void deleteUserNotificiationEvents(long userId,
                                          java.util.Collection<java.lang.String> notificationEventUuids)
                                   throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
deleteUserNotificiationEvents in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

destroy

public void destroy()
             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
destroy in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

destroyChannel

public com.liferay.portal.kernel.notifications.Channel destroyChannel(long userId)
                                                               throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
destroyChannel in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

fetchChannel

public com.liferay.portal.kernel.notifications.Channel fetchChannel(long userId)
                                                             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
fetchChannel in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

fetchChannel

public com.liferay.portal.kernel.notifications.Channel fetchChannel(long userId,
                                                                    boolean createIfAbsent)
                                                             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
fetchChannel in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

flush

public void flush()
           throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
flush in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

flush

public void flush(long userId)
           throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
flush in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

flush

public void flush(long userId,
                  long timestamp)
           throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
flush in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

getChannel

public com.liferay.portal.kernel.notifications.Channel getChannel(long userId)
                                                           throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
getChannel in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

getChannel

public com.liferay.portal.kernel.notifications.Channel getChannel(long userId,
                                                                  boolean createIfAbsent)
                                                           throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
getChannel in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

getCompanyId

public long getCompanyId()

getNotificationEvents

public java.util.List<com.liferay.portal.kernel.notifications.NotificationEvent> getNotificationEvents(long userId)
                                                                                                throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
getNotificationEvents in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

getNotificationEvents

public java.util.List<com.liferay.portal.kernel.notifications.NotificationEvent> getNotificationEvents(long userId,
                                                                                                       boolean flush)
                                                                                                throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
getNotificationEvents in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

getUserIds

public java.util.Collection<java.lang.Long> getUserIds()
Specified by:
getUserIds in interface com.liferay.portal.kernel.notifications.ChannelHub

registerChannelListener

public void registerChannelListener(long userId,
                                    com.liferay.portal.kernel.notifications.ChannelListener channelListener)
                             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
registerChannelListener in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

removeTransientNotificationEvents

public void removeTransientNotificationEvents(long userId,
                                              java.util.Collection<com.liferay.portal.kernel.notifications.NotificationEvent> notificationEvents)
                                       throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
removeTransientNotificationEvents in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

removeTransientNotificationEventsByUuid

public void removeTransientNotificationEventsByUuid(long userId,
                                                    java.util.Collection<java.lang.String> notificationEventUuids)
                                             throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
removeTransientNotificationEventsByUuid in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

sendNotificationEvent

public void sendNotificationEvent(long userId,
                                  com.liferay.portal.kernel.notifications.NotificationEvent notificationEvent)
                           throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
sendNotificationEvent in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

sendNotificationEvents

public void sendNotificationEvents(long userId,
                                   java.util.Collection<com.liferay.portal.kernel.notifications.NotificationEvent> notificationEvents)
                            throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
sendNotificationEvents in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException

setChannelPrototype

public void setChannelPrototype(com.liferay.portal.kernel.notifications.Channel channel)

setCompanyId

public void setCompanyId(long companyId)

unregisterChannelListener

public void unregisterChannelListener(long userId,
                                      com.liferay.portal.kernel.notifications.ChannelListener channelListener)
                               throws com.liferay.portal.kernel.notifications.ChannelException
Specified by:
unregisterChannelListener in interface com.liferay.portal.kernel.notifications.ChannelHub
Throws:
com.liferay.portal.kernel.notifications.ChannelException