Class EventInfo

All Implemented Interfaces:
Serializable, Comparable<EventInfo>, Comparator<EventInfo>, org.bedework.util.logging.Logged

This class provides information about an event for a specific user and session.
Author:
Mike Douglass douglm rpi.edu
See Also:
  • Field Details

    • event

      protected BwEvent event
    • editable

      protected boolean editable
      editable is set at retrieval to indicate an event owned by the current user. This only has significance for the personal calendar.
    • fromRef

      protected boolean fromRef
    • recurrenceSeen

      public boolean recurrenceSeen
      Use this to mark an override we saw in the ical.
    • kindEntry

      public static final int kindEntry
      actual event entry
      See Also:
    • kindAdded

      public static final int kindAdded
      'added' event - from a reference
      See Also:
    • kindUndeletable

      public static final int kindUndeletable
      from a subscription
      See Also:
  • Constructor Details

    • EventInfo

      public EventInfo(BwEvent event)
      Parameters:
      event -
    • EventInfo

      public EventInfo(BwEvent event, Set<EventInfo> overrides)
      Parameters:
      event -
      overrides -
  • Method Details

    • setId

      public void setId(int val)
      Overrides:
      setId in class BwUnversionedDbentity<EventInfo>
    • getId

      public int getId()
      Overrides:
      getId in class BwUnversionedDbentity<EventInfo>
      Returns:
      int id
    • setHref

      public void setHref(String val)
      Overrides:
      setHref in class BwUnversionedDbentity<EventInfo>
      Parameters:
      val - the href - may be ignored
    • getHref

      public String getHref()
      Overrides:
      getHref in class BwUnversionedDbentity<EventInfo>
      Returns:
      non null unique href for the entity
    • getEvent

      public BwEvent getEvent()
      Returns:
      BwEvent associated with this object
    • getParent

      public EventInfo getParent()
    • makeProxy

      public static EventInfo makeProxy(BwEvent master, BwDateTime start, BwDateTime end, String recurrenceId, boolean isOverride)
    • setRetrievedEvent

      public void setRetrievedEvent(EventInfo val)
      The full event as retrieved. This allows us to (re)index after changes to a single instance for example
      Parameters:
      val - the full retrieved copy
    • getRetrievedEvent

      public EventInfo getRetrievedEvent()
      The full event as retrieved. This allows us to (re)index after changes to a single instance for example
      Returns:
      as retrieved
    • setEditable

      public void setEditable(boolean val)
      editable is set at retrieval to indicate an event owned by the current user. This only has significance for the personal calendar. XXX - not applicable in a shared world?
      Parameters:
      val - true if object is considered editable
    • getEditable

      public boolean getEditable()
      Returns:
      true if object is considered editable
    • getFromRef

      public boolean getFromRef()
      Return true if this event is included as a reference
      Returns:
      true if object is from a ref
    • setKind

      public void setKind(int val)
      Parameters:
      val - int kind of event
    • getKind

      public int getKind()
      Returns:
      int kind of event
    • setNewEvent

      public void setNewEvent(boolean val)
      This field is set by those input methods which might need to retrieve an event for update, for example the icalendar translators.

      They retrieve the event based on the guid. If the guid is not found then we assume a new event. Otherwise this flag is set false.

      Parameters:
      val - boolean true if a new event
    • getNewEvent

      public boolean getNewEvent()
      Is the event new?
      Returns:
      boolean true if the event is new
    • getSchedulingInfo

      public SchedulingInfo getSchedulingInfo()
    • setReplyUpdate

      public void setReplyUpdate(boolean val)
      This field is set when the organizers copy is being updated as the result of a reply. We flag this in the attendees inbox witha private xprop which allows us to deleet the trivial updates.
      Parameters:
      val - boolean true if a reply update
    • getReplyUpdate

      public boolean getReplyUpdate()
      Returns:
      boolean true if this is a replay update
    • setInstanceOnly

      public void setInstanceOnly(boolean val)
      This field is set when we are sent one or more instances and no master. In this case we don't delete other overrides.
      Parameters:
      val - boolean true if instanceOnly
    • getInstanceOnly

      public boolean getInstanceOnly()
      Sent instances only?
      Returns:
      boolean
    • setPrevStag

      public void setPrevStag(String val)
      Set the event's previous schedule-tag - used to allow if none match
      Parameters:
      val - stag
    • getPrevStag

      public String getPrevStag()
      Get the event's previous schedule-tag - used to allow if none match
      Returns:
      the event's lastmod
    • setPrevCtoken

      public void setPrevCtoken(String val)
      Set the event's previous ctoken - used to allow if none match
      Parameters:
      val - lastmod
    • getPrevCtoken

      public String getPrevCtoken()
      Get the event's previous ctoken - used to allow if none match
      Returns:
      the event's lastmod
    • getRecurrenceId

      public String getRecurrenceId()
      Get the event's recurrence id
      Returns:
      the event's recurrence id
    • setCurrentAccess

      public void setCurrentAccess(org.bedework.access.CurrentAccess val)
      Set the current users access rights.
      Parameters:
      val - CurrentAccess
    • getCurrentAccess

      public org.bedework.access.CurrentAccess getCurrentAccess()
      Get the current users access rights.
      Returns:
      CurrentAccess
    • getChangeset

      public ChangeTable getChangeset(String userHref)
      Get change set for the event. The absence of a changes does not mean no changes - there may be overrides to apply.
      Parameters:
      userHref -
      Returns:
      null for no changes
    • clearChangeset

      public void clearChangeset()
      Will force update
    • getUpdResult

      public EventInfo.UpdateResult getUpdResult()
      Returns:
      UpdateResult or null
    • getOverridesChanged

      public boolean getOverridesChanged()
      Returns:
      true if the overrides have been added or deleted
    • setAlarms

      public void setAlarms(Collection<BwAlarm> val)
      Parameters:
      val -
    • getAlarms

      public Collection<BwAlarm> getAlarms()
      Returns:
      Collection of alarms
    • getNumAlarms

      public int getNumAlarms()
      Returns:
      int number of alarms.
    • clearAlarms

      public void clearAlarms()
      clear the event's alarms
    • addAlarm

      public void addAlarm(BwAlarm val)
      Parameters:
      val -
    • setOverrideIds

      public void setOverrideIds(Set<String> val)
      Parameters:
      val - Set of override ids
    • getOverrideIds

      public Set<String> getOverrideIds()
      Get the override recurrence ids. Provided by the indexer
      Returns:
      Set of override ids
    • getOverrides

      public Set<EventInfo> getOverrides()
      Get the overrides
      Returns:
      Set overrides list
    • getNumOverrides

      public int getNumOverrides()
      Returns:
      int number of overrides.
    • addOverride

      public void addOverride(EventInfo val)
      Parameters:
      val - an override
    • getOverrideProxies

      public Collection<BwEventProxy> getOverrideProxies()
      Returns:
      Collection of override proxy events or null
    • getDeletedOverrideProxies

      public Collection<BwEventProxy> getDeletedOverrideProxies(String userHref)
      Parameters:
      userHref -
      Returns:
      Collection of deleted override proxy events or null
    • findOverride

      public EventInfo findOverride(String rid)
      See if the master event has an override with the given recurrence id. If not create one.
      Parameters:
      rid - recurrence id to find
      Returns:
      EventInfo for override
    • findOverride

      public EventInfo findOverride(String rid, boolean create)
      See if the master event has an override with the given recurrence id. If not optionally create one.
      Parameters:
      rid - recurrence id to find
      create - - true to create missing override.
      Returns:
      EventInfo for override
    • removeOverride

      public boolean removeOverride(String rid)
    • setReplyAttendeeURI

      public void setReplyAttendeeURI(String val)
      An attendee we need to send a reply to
      Parameters:
      val - uri
    • getReplyAttendeeURI

      public String getReplyAttendeeURI()
      An attendee we need to send a reply to
      Returns:
      uri
    • setInboxEventName

      public void setInboxEventName(String val)
      Parameters:
      val - event name
    • getInboxEventName

      public String getInboxEventName()
      Returns:
      inbox event name
    • setOnlyAttendee

      public void setOnlyAttendee(EventInfo outEi, String attUri)
      Set the attendee in the output event from the corresponding component in this calendar event.
      Parameters:
      outEi - - destined for somebodies inbox
      attUri - - the attendee URI
    • setContainedItems

      public void setContainedItems(Set<EventInfo> val)
      set the contained items
      Parameters:
      val - Collection of EventInfo
    • getContainedItems

      public Set<EventInfo> getContainedItems()
      Get the contained items
      Returns:
      Collection of EventInfo
    • addContainedItem

      public void addContainedItem(EventInfo val)
      Add a contained item
      Parameters:
      val -
    • getNumContainedItems

      public int getNumContainedItems()
      Returns:
      int number of contained items.
    • compare

      public int compare(EventInfo e1, EventInfo e2)
      Specified by:
      compare in interface Comparator<EventInfo>
    • compareTo

      public int compareTo(EventInfo that)
      Specified by:
      compareTo in interface Comparable<EventInfo>
      Overrides:
      compareTo in class BwUnversionedDbentity<EventInfo>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BwUnversionedDbentity<EventInfo>
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface Comparator<EventInfo>
      Overrides:
      equals in class BwUnversionedDbentity<EventInfo>
    • toString

      public String toString()
      Overrides:
      toString in class Object