Class SchedulingBase

All Implemented Interfaces:
Serializable, SchedulingIntf, org.bedework.calsvci.SchedulingI, org.bedework.util.logging.Logged
Direct Known Subclasses:
OutBoxHandler

public abstract class SchedulingBase extends CalSvcHelperRw implements SchedulingIntf
Rather than have a single class steering calls to a number of smaller classes we will build up a full implementation by progressively implementing abstract classes.

That allows us to split up some rather complex code into appropriate pieces.

This piece introduces the interface and provides some commonly used methods.

Author:
douglm
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.bedework.calsvci.SchedulingI

    org.bedework.calsvci.SchedulingI.FbGranulatedResponse, org.bedework.calsvci.SchedulingI.FbResponses
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addAutoScheduleMessage(boolean inBox, String principalHref, String eventName)
    Add an entry to the queue
    org.bedework.base.response.Response
    addEvent(org.bedework.calfacade.svc.EventInfo ei, String namePrefix, int calType, boolean noInvites)
    Save the event which is all set up except for the name.
    protected org.bedework.calfacade.BwEvent
    copyEvent(org.bedework.calfacade.BwEvent origEv, org.bedework.calfacade.BwEvent masterEv, org.bedework.calfacade.BwPrincipal<?> owner)
     
    protected org.bedework.calfacade.svc.EventInfo
    copyEventInfo(org.bedework.calfacade.svc.EventInfo ei, boolean significantChangesOnly, org.bedework.calfacade.BwPrincipal<?> owner)
    Same as copyEventInfo(EventInfo, BwPrincipal) except it only copies significant changes.
    org.bedework.calfacade.svc.EventInfo
    copyEventInfo(org.bedework.calfacade.svc.EventInfo ei, org.bedework.calfacade.BwPrincipal<?> owner)
    Copy an event to send as a request or a response.
    org.bedework.calfacade.Participant
    findUserAttendee(org.bedework.calfacade.svc.EventInfo ei)
    Find the attendee in this event which corresponds to the current user
    protected boolean
    initScheduleEvent(org.bedework.calfacade.svc.EventInfo ei, boolean response, boolean iSchedule)
     
    void
    setupReschedule(org.bedework.calfacade.svc.EventInfo ei)
     
    protected boolean
    significantChange(org.bedework.calfacade.svc.EventInfo ei)
    Return true if there is a significant change for the entity or any overrides

    Methods inherited from class org.bedework.calsvc.CalSvcHelperRw

    getEncrypter, getEvents, getEventsByUid, getSpecialCalendar, setupSharableEntity

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bedework.util.logging.Logged

    audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn

    Methods inherited from interface org.bedework.calsvci.SchedulingI

    aggregateFreeBusy, attendeeRespond, declineCounter, getFreeBusy, getFreebusySet, getStoredMeeting, granulateFreeBusy, requestRefresh, schedule, scheduleResponse, sendReply

    Methods inherited from interface org.bedework.calsvc.scheduling.SchedulingIntf

    implicitSchedule
  • Method Details

    • addAutoScheduleMessage

      protected void addAutoScheduleMessage(boolean inBox, String principalHref, String eventName)
      Add an entry to the queue
      Parameters:
      inBox - - true if it's an inbox event (inbound)
      principalHref - identify principal
      eventName - name of event
    • significantChange

      protected boolean significantChange(org.bedework.calfacade.svc.EventInfo ei)
      Return true if there is a significant change for the entity or any overrides
      Parameters:
      ei - EventInfo
      Returns:
      true if something important changed
    • copyEventInfo

      public org.bedework.calfacade.svc.EventInfo copyEventInfo(org.bedework.calfacade.svc.EventInfo ei, org.bedework.calfacade.BwPrincipal<?> owner)
      Copy an event to send as a request or a response. Non-recurring is easy, we just copy it.

      Recurring events introduce a number of complications. We are only supposed to send as much as the recipient needs to know, that is, if an attendee has been disinvited from one instance we should not send that instance but instead add an EXDATE. For that case we will have an override that does not include the attendee.

      For the case that an attendee has been added we should remove any rules and add RDATES for all instances in which the attendee is present.

      Specified by:
      copyEventInfo in interface SchedulingIntf
      Parameters:
      ei - EventInfo
      owner - BwPrincipal
      Returns:
      a copy of the event.
    • copyEventInfo

      protected org.bedework.calfacade.svc.EventInfo copyEventInfo(org.bedework.calfacade.svc.EventInfo ei, boolean significantChangesOnly, org.bedework.calfacade.BwPrincipal<?> owner)
      Same as copyEventInfo(EventInfo, BwPrincipal) except it only copies significant changes.
      Parameters:
      ei - event to copy
      significantChangesOnly - true to copy only significant
      owner - for new event
      Returns:
      a copy of the event.
    • copyEvent

      protected org.bedework.calfacade.BwEvent copyEvent(org.bedework.calfacade.BwEvent origEv, org.bedework.calfacade.BwEvent masterEv, org.bedework.calfacade.BwPrincipal<?> owner)
    • addEvent

      public org.bedework.base.response.Response addEvent(org.bedework.calfacade.svc.EventInfo ei, String namePrefix, int calType, boolean noInvites)
      Description copied from interface: SchedulingIntf
      Save the event which is all set up except for the name. If we get a conflict we add a suffix and try again
      Specified by:
      addEvent in interface SchedulingIntf
      Parameters:
      ei - to add
      namePrefix - for name
      calType - type
      noInvites - true for send no invites
      Returns:
      null if added, error code otherwise
    • findUserAttendee

      public org.bedework.calfacade.Participant findUserAttendee(org.bedework.calfacade.svc.EventInfo ei)
      Find the attendee in this event which corresponds to the current user
      Specified by:
      findUserAttendee in interface org.bedework.calsvci.SchedulingI
      Parameters:
      ei - to search
      Returns:
      attendee or null.
    • setupReschedule

      public void setupReschedule(org.bedework.calfacade.svc.EventInfo ei)
      Specified by:
      setupReschedule in interface org.bedework.calsvci.SchedulingI
    • initScheduleEvent

      protected boolean initScheduleEvent(org.bedework.calfacade.svc.EventInfo ei, boolean response, boolean iSchedule)