Class ChannelDelivery

java.lang.Object
org.exoplatform.agenda.model.ChannelDelivery

public class ChannelDelivery extends Object
What a delivery channel answers when agenda asks it to carry a calendar share (EXO-90357).

Three answers, and the eXo record stands whatever the answer: ChannelDelivery.Status.DELIVERED — the channel granted the share on its side and says under which reference; ChannelDelivery.Status.NOT_APPLICABLE — this share is none of the channel's business (the owner or the colleague has no account there, the calendar lives on no server); ChannelDelivery.Status.FAILED — the channel should have carried it and could not, with a code agenda logs at WARN; the record then stands undelivered and the owner is told nothing.

  • Method Details

    • delivered

      public static ChannelDelivery delivered(String channelId, String deliveryRef)
      The channel granted the share on its side.
      Parameters:
      channelId - the channel, never blank
      deliveryRef - the channel's reference, may be null
      Returns:
      the answer
    • delivered

      public static ChannelDelivery delivered(String channelId, String deliveryRef, CalendarShareLevel deliveredLevel)
      The channel granted the share on its side, at the level it names — which may be narrower than the record's (EXO-90378).
      Parameters:
      channelId - the channel, never blank
      deliveryRef - the channel's reference, may be null
      deliveredLevel - the level the server now holds, null for "the one the record asked"
      Returns:
      the answer
    • notApplicable

      public static ChannelDelivery notApplicable()
      The share is none of the channel's business.
      Returns:
      the answer
    • failed

      public static ChannelDelivery failed(String failureCode)
      The channel should have carried the share and could not.
      Parameters:
      failureCode - a code the drawer can word, never blank
      Returns:
      the answer