Package org.bedework.calfacade.util
Class ChangeTableEntry
java.lang.Object
org.bedework.calfacade.util.ChangeTableEntry
Entry class used by ChangeTable
- Author:
- Mike Douglass
-
Constructor Summary
ConstructorsConstructorDescriptionChangeTableEntry(ChangeTable chg, org.bedework.util.calendar.PropertyIndex.PropertyInfoIndex index) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a value to the collection of added values and mark as changed.voidAdd a value to the collection of changed values and mark as changed.voidAdd a value to the collection of removed values and mark as changed.voidAdd a value and mark as present.voidaddValues(Collection val) Add a value and mark as present.booleandiff(Collection<?> originalVals) Compare the original and new collections.booleangetAdded()booleanTrue if it's an alarm propertybooleanTrue if it's an available propertybooleanbooleanbooleanbooleanbooleanTrue if it's a freebusy propertyorg.bedework.util.calendar.PropertyIndex.PropertyInfoIndexgetIndex()booleanTrue if it's a journal propertybooleanbooleanTrue if it's a timezone propertybooleanbooleanTrue if it's a vavailability propertybooleanTrue if it's a vcalendar propertybooleanTrue if it's a vpoll propertyvoidMark a property as added and provide new valuevoidsetAddedValues(Collection val) booleansetChanged(Object oldVal, Object newVal) Mark a property as changed if old != new and save old and new valuesvoidvoidsetDeleted(Object oldVal) Mark a property as deleted and provide old valuevoidsetPresent(boolean val) voidtoString()
-
Constructor Details
-
ChangeTableEntry
public ChangeTableEntry(ChangeTable chg, org.bedework.util.calendar.PropertyIndex.PropertyInfoIndex index) - Parameters:
chg-index-
-
-
Method Details
-
addValue
Add a value and mark as present.- Parameters:
val-
-
addValues
Add a value and mark as present.- Parameters:
val-
-
getIndex
public org.bedework.util.calendar.PropertyIndex.PropertyInfoIndex getIndex()- Returns:
- true for a multi-valued property
-
getOldVal
- Returns:
- old value
-
getNewVal
- Returns:
- new value
-
getEventProperty
public boolean getEventProperty()- Returns:
- true if it's an event property
-
getTodoProperty
public boolean getTodoProperty()- Returns:
- true if it's a todo property
-
getFreebusyProperty
public boolean getFreebusyProperty()- Returns:
- true if it's a freebusy property
-
getVcalendarProperty
public boolean getVcalendarProperty()True if it's a vcalendar property- Returns:
- boolean
-
getJournalProperty
public boolean getJournalProperty()True if it's a journal property- Returns:
- boolean
-
getFreeBusyProperty
public boolean getFreeBusyProperty()True if it's a freebusy property- Returns:
- boolean
-
getTimezoneProperty
public boolean getTimezoneProperty()True if it's a timezone property- Returns:
- boolean
-
getAlarmProperty
public boolean getAlarmProperty()True if it's an alarm property- Returns:
- boolean
-
getVavailabilityProperty
public boolean getVavailabilityProperty()True if it's a vavailability property- Returns:
- boolean
-
getAvailableProperty
public boolean getAvailableProperty()True if it's an available property- Returns:
- boolean
-
getVpollProperty
public boolean getVpollProperty()True if it's a vpoll property- Returns:
- boolean
-
setChanged
Mark a property as changed if old != new and save old and new values- Parameters:
oldVal-newVal-- Returns:
- true if it's a changed property
-
getChanged
public boolean getChanged()- Returns:
- true if it's a changed property
-
setAdded
Mark a property as added and provide new value- Parameters:
newVal-
-
setPresent
public void setPresent(boolean val) - Parameters:
val- true if it's a present property
-
getPresent
public boolean getPresent()- Returns:
- true if it's a present property
-
getAdded
public boolean getAdded()- Returns:
- true if it's a added property
-
setDeleted
Mark a property as deleted and provide old value- Parameters:
oldVal-
-
getDeleted
public boolean getDeleted()- Returns:
- true if it's a deleted property
-
getNewValues
- Returns:
- The collection of new values for this property
-
setAddedValues
- Parameters:
val- values added to entity property
-
getAddedValues
- Returns:
- values added to entity property
-
addAddedValue
Add a value to the collection of added values and mark as changed.- Parameters:
o-
-
setRemovedValues
- Parameters:
val- Values removed from entity property
-
getRemovedValues
- Returns:
- Values removed from entity property
-
addRemovedValue
Add a value to the collection of removed values and mark as changed.- Parameters:
o-
-
setChangedValues
- Parameters:
val- Values changed in entity property
-
getChangedValues
- Returns:
- Values changed in entity property
-
addChangedValue
Add a value to the collection of changed values and mark as changed.- Parameters:
o-
-
diff
Compare the original and new collections. Update the removed and added collections to reflect the changes that need to be made.Alarms are the only per user class we have to deal with.
- Parameters:
originalVals- the original contents- Returns:
- true if collection set changed - that is, members were added or removed.
-
toString
-