Class SchedulingInfo

java.lang.Object
org.bedework.calfacade.SchedulingInfo

public class SchedulingInfo extends Object
Handle component participants which represent attendees or organizer/owner.

Currently, we have the complication of having attendee only, participant only, or both. Also, participants are stored as x-properties mixed in with others.

The approach taken is to load all the participants from the x-properties into the bwparticipants set on creation of this class. That set is updated as the result of various operations and the onSave() method updates th ex-properties to reflect the changes.


User: mike Date: 9/10/24 Time: 13:40
  • Constructor Details

    • SchedulingInfo

      public SchedulingInfo(BwEvent parent)
  • Method Details

    • getParent

      public BwEvent getParent()
    • getSchedulingOwner

      public SchedulingOwner getSchedulingOwner()
      Returns:
      the SchedulingOwner - organizer in 5545 terms.
    • newSchedulingOwner

      public SchedulingOwner newSchedulingOwner(String calendarAddress)
      Parameters:
      calendarAddress - of owner
      Returns:
      new owner with calendar address and role set.
    • newSchedulingOwner

      public SchedulingOwner newSchedulingOwner(BwOrganizer organizer, BwParticipant powner)
    • copySchedulingOwner

      public SchedulingOwner copySchedulingOwner(SchedulingOwner from)
    • getParticipants

      public Set<Participant> getParticipants()
      Returns:
      unmodifiable set of all Participant objects
    • getNumParticipants

      public int getNumParticipants()
      Returns:
      number of participant objects
    • getParticipantAddrs

      public Set<String> getParticipantAddrs()
    • clearParticipants

      public void clearParticipants()
    • setOnlyParticipant

      public void setOnlyParticipant(Participant participant)
      Parameters:
      participant - we want left
    • getOnlyParticipant

      public org.bedework.util.misc.response.GetEntityResponse<Participant> getOnlyParticipant()
    • findParticipant

      public Participant findParticipant(String calAddr)
    • makeParticipant

      public Participant makeParticipant()
    • removeRecipientParticipant

      public void removeRecipientParticipant(Participant val)
    • addParticipant

      public Participant addParticipant(Participant val)
    • copyParticipant

      public Participant copyParticipant(Participant val)
      if there is no participant with the same uri then a copy will be added and returned.

      Otherwise the values in the parameter will be copied to the existing participant.

      Parameters:
      val - participant to copy
      Returns:
      copied attende
    • makeParticipant

      public Participant makeParticipant(BwAttendee att, BwParticipant part)
    • makeParticipantLike

      public Participant makeParticipantLike(Participant val)
      Create a Participant 'like' the parameter in that, if the param has a BwAttendee then so does the result. Ditto for participant. No values are copied.
      Parameters:
      val - template Participant
      Returns:
      new Participant
    • newParticipant

      public Participant newParticipant(net.fortuna.ical4j.model.component.Participant part)
      The new object is added to the set. getParticipants must be called to get new updated set.
      Returns:
      a new Participant enclosing the ical object
    • addUpdateParticipant

      public Participant addUpdateParticipant(net.fortuna.ical4j.model.component.Participant part)
      if the participant is not in the set then a new object is added to the set. Otherwise, the exisiting object is updated from the parameter. getParticipants must be called to get new updated set.
      Returns:
      a new Participant enclosing the ical object
    • getParticipantsWithRoles

      public Map<String,Participant> getParticipantsWithRoles(String... roles)
    • getRecipientParticipants

      public Map<String,Participant> getRecipientParticipants()
      Returns:
      unmodifiable set of Participant objects that should receive scheduling messages
    • markChanged

      public void markChanged()
    • onSave

      public void onSave()
    • copyFor

      public SchedulingInfo copyFor(BwEvent ev)