Package org.bedework.calfacade.svc
Class EventInfo
- All Implemented Interfaces:
Serializable,Comparable<EventInfo>,Comparator<EventInfo>,org.bedework.util.logging.Logged
public class EventInfo
extends BwUnversionedDbentity<EventInfo>
implements Comparable<EventInfo>, Comparator<EventInfo>, Serializable
This class provides information about an event for a specific user and
session.
- Author:
- Mike Douglass douglm rpi.edu
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class allows add and update event to signal changes back to the caller.Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleaneditable is set at retrieval to indicate an event owned by the current user.protected BwEventprotected booleanstatic final int'added' event - from a referencestatic final intactual event entrystatic final intfrom a subscriptionbooleanUse this to mark an override we saw in the ical. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd a contained itemvoidaddOverride(EventInfo val) voidclear the event's alarmsvoidWill force updateintintbooleanfindOverride(String rid) See if the master event has an override with the given recurrence id.findOverride(String rid, boolean create) See if the master event has an override with the given recurrence id.getChangeset(String userHref) Get change set for the event.Get the contained itemsorg.bedework.access.CurrentAccessGet the current users access rights.getDeletedOverrideProxies(String userHref) booleangetEvent()booleanReturn true if this event is included as a referencegetHref()intgetId()booleanSent instances only?intgetKind()booleanIs the event new?intintintGet the override recurrence ids.Get the overridesbooleanGet the event's previous ctoken - used to allow if none matchGet the event's previous schedule-tag - used to allow if none matchGet the event's recurrence idAn attendee we need to send a reply tobooleanThe full event as retrieved.inthashCode()static EventInfomakeProxy(BwEvent master, BwDateTime start, BwDateTime end, String recurrenceId, boolean isOverride) booleanremoveOverride(String rid) voidsetAlarms(Collection<BwAlarm> val) voidsetContainedItems(Set<EventInfo> val) set the contained itemsvoidsetCurrentAccess(org.bedework.access.CurrentAccess val) Set the current users access rights.voidsetEditable(boolean val) editable is set at retrieval to indicate an event owned by the current user.voidvoidsetId(int val) voidsetInboxEventName(String val) voidsetInstanceOnly(boolean val) This field is set when we are sent one or more instances and no master.voidsetKind(int val) voidsetNewEvent(boolean val) This field is set by those input methods which might need to retrieve an event for update, for example the icalendar translators.voidsetOnlyAttendee(EventInfo outEi, String attUri) Set the attendee in the output event from the corresponding component in this calendar event.voidsetOverrideIds(Set<String> val) voidsetPrevCtoken(String val) Set the event's previous ctoken - used to allow if none matchvoidsetPrevStag(String val) Set the event's previous schedule-tag - used to allow if none matchvoidAn attendee we need to send a reply tovoidsetReplyUpdate(boolean val) This field is set when the organizers copy is being updated as the result of a reply.voidThe full event as retrieved.toString()Methods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
clone, markUnsaved, toStringSegment, unsavedMethods inherited from class org.bedework.calfacade.base.DumpEntity
dump, dump, getLogger, hasDumpValueMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods 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
-
Field Details
-
event
-
editable
protected boolean editableeditable 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 recurrenceSeenUse this to mark an override we saw in the ical. -
kindEntry
public static final int kindEntryactual event entry- See Also:
-
kindAdded
public static final int kindAdded'added' event - from a reference- See Also:
-
kindUndeletable
public static final int kindUndeletablefrom a subscription- See Also:
-
-
Constructor Details
-
EventInfo
- Parameters:
event-
-
EventInfo
- Parameters:
event-overrides-
-
-
Method Details
-
setId
public void setId(int val) - Overrides:
setIdin classBwUnversionedDbentity<EventInfo>
-
getId
public int getId()- Overrides:
getIdin classBwUnversionedDbentity<EventInfo>- Returns:
- int id
-
setHref
- Overrides:
setHrefin classBwUnversionedDbentity<EventInfo>- Parameters:
val- the href - may be ignored
-
getHref
- Overrides:
getHrefin classBwUnversionedDbentity<EventInfo>- Returns:
- non null unique href for the entity
-
getEvent
- Returns:
- BwEvent associated with this object
-
getParent
-
makeProxy
public static EventInfo makeProxy(BwEvent master, BwDateTime start, BwDateTime end, String recurrenceId, boolean isOverride) -
setRetrievedEvent
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
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
-
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
Set the event's previous schedule-tag - used to allow if none match- Parameters:
val- stag
-
getPrevStag
Get the event's previous schedule-tag - used to allow if none match- Returns:
- the event's lastmod
-
setPrevCtoken
Set the event's previous ctoken - used to allow if none match- Parameters:
val- lastmod
-
getPrevCtoken
Get the event's previous ctoken - used to allow if none match- Returns:
- the event's lastmod
-
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
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
- Returns:
- UpdateResult or null
-
getOverridesChanged
public boolean getOverridesChanged()- Returns:
- true if the overrides have been added or deleted
-
setAlarms
- Parameters:
val-
-
getAlarms
- Returns:
- Collection of alarms
-
getNumAlarms
public int getNumAlarms()- Returns:
- int number of alarms.
-
clearAlarms
public void clearAlarms()clear the event's alarms -
addAlarm
- Parameters:
val-
-
setOverrideIds
- Parameters:
val- Set of override ids
-
getOverrideIds
Get the override recurrence ids. Provided by the indexer- Returns:
- Set of override ids
-
getOverrides
Get the overrides- Returns:
- Set overrides list
-
getNumOverrides
public int getNumOverrides()- Returns:
- int number of overrides.
-
addOverride
- Parameters:
val- an override
-
getOverrideProxies
- Returns:
- Collection of override proxy events or null
-
getDeletedOverrideProxies
- Parameters:
userHref-- Returns:
- Collection of deleted override proxy events or null
-
findOverride
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
See if the master event has an override with the given recurrence id. If not optionally create one.- Parameters:
rid- recurrence id to findcreate- - true to create missing override.- Returns:
- EventInfo for override
-
removeOverride
-
setReplyAttendeeURI
An attendee we need to send a reply to- Parameters:
val- uri
-
getReplyAttendeeURI
An attendee we need to send a reply to- Returns:
- uri
-
setInboxEventName
- Parameters:
val- event name
-
getInboxEventName
- Returns:
- inbox event name
-
setOnlyAttendee
Set the attendee in the output event from the corresponding component in this calendar event.- Parameters:
outEi- - destined for somebodies inboxattUri- - the attendee URI
-
setContainedItems
set the contained items- Parameters:
val- Collection of EventInfo
-
getContainedItems
Get the contained items- Returns:
- Collection of EventInfo
-
addContainedItem
Add a contained item- Parameters:
val-
-
getNumContainedItems
public int getNumContainedItems()- Returns:
- int number of contained items.
-
compare
- Specified by:
comparein interfaceComparator<EventInfo>
-
compareTo
- Specified by:
compareToin interfaceComparable<EventInfo>- Overrides:
compareToin classBwUnversionedDbentity<EventInfo>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBwUnversionedDbentity<EventInfo>
-
equals
- Specified by:
equalsin interfaceComparator<EventInfo>- Overrides:
equalsin classBwUnversionedDbentity<EventInfo>
-
toString
-