Class Notification<NI extends Notification.NotificationItem>

  • 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
    • 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 - subscription
        end - which end
      • Notification

        public Notification​(Subscription sub,
                            org.bedework.synch.wsmessages.SynchEndType end,
                            NI notificationItem)
        Create object with a single notification.
        Parameters:
        sub - subscription
        end - which end
        notificationItem - the notification
      • Notification

        public Notification​(Subscription sub,
                            org.bedework.synch.wsmessages.SubscribeResponseType response)
        Create a new subscription object
        Parameters:
        sub - subscription
        response - 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 - subscription
        request - unsubscribe
        response - 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 - subscription
        request - for status
        response - and the response
    • 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
      • getNotifications

        public List<NI> getNotifications()
        Returns:
        notifications
      • addNotificationItem

        public void addNotificationItem​(NI val)
        Parameters:
        val - notification
      • toStringSegment

        protected void toStringSegment​(StringBuilder sb)