Enum Class CaldavPushService.AnswerOutcome

java.lang.Object
java.lang.Enum<CaldavPushService.AnswerOutcome>
org.exoplatform.caldav.service.CaldavPushService.AnswerOutcome
All Implemented Interfaces:
Serializable, Comparable<CaldavPushService.AnswerOutcome>, Constable
Enclosing class:
CaldavPushService

public static enum CaldavPushService.AnswerOutcome extends Enum<CaldavPushService.AnswerOutcome>
What became of one attempt to write an answer onto one copy.

Four states rather than a boolean, because two of them look like failure and are not, and the caller has to tell them apart to decide whether the copy still owes eXo anything. A copy that already carries the answer is as settled as one this write just corrected; a copy that does not name the answerer at all is not settled by anything a targeted rewrite can do. Collapsing those into "false" is what would make the obligation table either grow for ever or forget the copies that genuinely need a full rewrite.

  • Enum Constant Details

    • WRITTEN

      public static final CaldavPushService.AnswerOutcome WRITTEN
      The answer was written onto the copy, which now carries it.
    • ALREADY_SAID

      public static final CaldavPushService.AnswerOutcome ALREADY_SAID
      The copy already carried the answer, so nothing was written and nothing is owed.
    • NOT_NAMED

      public static final CaldavPushService.AnswerOutcome NOT_NAMED
      The copy carries no ATTENDEE line for the answerer, so a targeted rewrite has nothing to target. Only a full rewrite can put the line there, and the obligation is what brings one.
    • UNWRITABLE

      public static final CaldavPushService.AnswerOutcome UNWRITABLE
      The copy could not be written to at all — no href, no recorded version to condition on, nothing served at it, or no address to name the answerer by. The obligation stands.
  • Method Details

    • values

      public static CaldavPushService.AnswerOutcome[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CaldavPushService.AnswerOutcome valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • settles

      public boolean settles()
      Whether this outcome leaves the copy agreeing with what eXo holds.
      Returns:
      true when nothing more is owed to the copy