Class Notification<NI extends Notification.NotificationItem>
- java.lang.Object
-
- org.bedework.synch.shared.Notification<NI>
-
- Type Parameters:
NI-
public class Notification<NI extends Notification.NotificationItem> extends Object
Notification from external system.The system can handle notifications of changes as defined by ActionType below. Connectors set up their remote service to notify the synch engine via the web callback service. These incoming notifications are system specific.
On receipt, a connector instance is located and creates a notification which is a subclass of this class. That object will be used to activate a synchling.
Some systems will send multiple notifications for the same entity. Each object of this class will contain a list of notification items. Presumably these reflect activity since the last notification.
Each notification item defines an action along with a uid and a possible calendar entity. The uid is required as a key as it is the only value which is guaranteed to be available at both ends.
We assume that any change to any part of a recurring event master or overrides will result in synching the whole entity.
- Author:
- douglm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNotification.NotificationItem
-
Constructor Summary
Constructors Constructor Description Notification(String subscriptionId)Create a notification for an unsubscribeNotification(Notification.NotificationItem.ActionType action)Notification(Subscription sub)Create a notification for a subscriptionNotification(Subscription sub, org.bedework.synch.wsmessages.SubscribeResponseType response)Create a new subscription objectNotification(Subscription sub, org.bedework.synch.wsmessages.SubscriptionStatusRequestType request, org.bedework.synch.wsmessages.SubscriptionStatusResponseType response)Create a new subscription status objectNotification(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end)Create object with a single notification.Notification(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end, NI notificationItem)Create object with a single notification.Notification(Subscription sub, org.bedework.synch.wsmessages.UnsubscribeRequestType request, org.bedework.synch.wsmessages.UnsubscribeResponseType response)Create a new unsubscription object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNotificationItem(NI val)org.bedework.synch.wsmessages.SynchEndTypegetEnd()List<NI>getNotifications()SubscriptiongetSub()StringgetSubscriptionId()Our generated subscriptionId.StringtoString()protected voidtoStringSegment(StringBuilder sb)
-
-
-
Constructor Detail
-
Notification
public Notification(Subscription sub)
Create a notification for a subscription- Parameters:
sub- subscription
-
Notification
public Notification(String subscriptionId)
Create a notification for an unsubscribe- Parameters:
subscriptionId- id to unsubscribe
-
Notification
public Notification(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end)
Create object with a single notification.- Parameters:
sub- subscriptionend- which end
-
Notification
public Notification(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end, NI notificationItem)
Create object with a single notification.- Parameters:
sub- subscriptionend- which endnotificationItem- the notification
-
Notification
public Notification(Subscription sub, org.bedework.synch.wsmessages.SubscribeResponseType response)
Create a new subscription object- Parameters:
sub- subscriptionresponse- and the response
-
Notification
public Notification(Subscription sub, org.bedework.synch.wsmessages.UnsubscribeRequestType request, org.bedework.synch.wsmessages.UnsubscribeResponseType response)
Create a new unsubscription object- Parameters:
sub- subscriptionrequest- unsubscriberesponse- and the response
-
Notification
public Notification(Subscription sub, org.bedework.synch.wsmessages.SubscriptionStatusRequestType request, org.bedework.synch.wsmessages.SubscriptionStatusResponseType response)
Create a new subscription status object- Parameters:
sub- subscriptionrequest- for statusresponse- and the response
-
Notification
public Notification(Notification.NotificationItem.ActionType action)
- Parameters:
action- for notification
-
-
Method Detail
-
getSub
public Subscription getSub()
- Returns:
- Subscription
-
getSubscriptionId
public String getSubscriptionId()
Our generated subscriptionId.- Returns:
- String
-
getEnd
public org.bedework.synch.wsmessages.SynchEndType getEnd()
- Returns:
- end designator
-
addNotificationItem
public void addNotificationItem(NI val)
- Parameters:
val- notification
-
toStringSegment
protected void toStringSegment(StringBuilder sb)
-
-