Package org.bedework.calsvc.scheduling
Class SchedulingBase
java.lang.Object
org.bedework.calsvc.CalSvcDb
org.bedework.calsvc.CalSvcHelperRw
org.bedework.calsvc.scheduling.SchedulingBase
- All Implemented Interfaces:
Serializable,SchedulingIntf,org.bedework.calsvci.SchedulingI,org.bedework.util.logging.Logged
- Direct Known Subclasses:
OutBoxHandler
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 TypeMethodDescriptionprotected voidaddAutoScheduleMessage(boolean inBox, String principalHref, String eventName) Add an entry to the queueorg.bedework.base.response.ResponseaddEvent(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.BwEventcopyEvent(org.bedework.calfacade.BwEvent origEv, org.bedework.calfacade.BwEvent masterEv, org.bedework.calfacade.BwPrincipal<?> owner) protected org.bedework.calfacade.svc.EventInfocopyEventInfo(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.EventInfocopyEventInfo(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.ParticipantfindUserAttendee(org.bedework.calfacade.svc.EventInfo ei) Find the attendee in this event which corresponds to the current userprotected booleaninitScheduleEvent(org.bedework.calfacade.svc.EventInfo ei, boolean response, boolean iSchedule) voidsetupReschedule(org.bedework.calfacade.svc.EventInfo ei) protected booleansignificantChange(org.bedework.calfacade.svc.EventInfo ei) Return true if there is a significant change for the entity or any overridesMethods inherited from class org.bedework.calsvc.CalSvcHelperRw
getEncrypter, getEvents, getEventsByUid, getSpecialCalendar, setupSharableEntityMethods inherited from class org.bedework.calsvc.CalSvcDb
caladdrToPrincipal, checkAccess, close, getCal, getCal, getCols, getCurrentTimestamp, getEncodedUuid, getIndexer, getLogger, getNotes, getPars, getPrefs, getPrefs, getPrincipal, getPrincipal, getPrincipalHref, getPublicUser, getRess, getSvc, getUsers, isGuest, isPublicAdmin, isSuper, open, setSvcMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, warnMethods inherited from interface org.bedework.calsvci.SchedulingI
aggregateFreeBusy, attendeeRespond, declineCounter, getFreeBusy, getFreebusySet, getStoredMeeting, granulateFreeBusy, requestRefresh, schedule, scheduleResponse, sendReplyMethods inherited from interface org.bedework.calsvc.scheduling.SchedulingIntf
implicitSchedule
-
Method Details
-
addAutoScheduleMessage
Add an entry to the queue- Parameters:
inBox- - true if it's an inbox event (inbound)principalHref- identify principaleventName- 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:
copyEventInfoin interfaceSchedulingIntf- Parameters:
ei- EventInfoowner- 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 copysignificantChangesOnly- true to copy only significantowner- 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:SchedulingIntfSave 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:
addEventin interfaceSchedulingIntf- Parameters:
ei- to addnamePrefix- for namecalType- typenoInvites- 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:
findUserAttendeein interfaceorg.bedework.calsvci.SchedulingI- Parameters:
ei- to search- Returns:
- attendee or null.
-
setupReschedule
public void setupReschedule(org.bedework.calfacade.svc.EventInfo ei) - Specified by:
setupReschedulein interfaceorg.bedework.calsvci.SchedulingI
-
initScheduleEvent
protected boolean initScheduleEvent(org.bedework.calfacade.svc.EventInfo ei, boolean response, boolean iSchedule)
-