Package org.bedework.util.calendar.diff
Class XmlIcalCompare
- java.lang.Object
-
- org.bedework.util.calendar.diff.XmlIcalCompare
-
- All Implemented Interfaces:
org.bedework.util.logging.Logged
public class XmlIcalCompare extends Object implements org.bedework.util.logging.Logged
This class compares 2 components. These components may contain other sub-components, for example alarms. What is produced is a set of updates to generate one from the other.For this to work, and for updates to be applicable, we need well defined rules determining how we match components. For example, an event is matched if the UID and RECURRENCE-ID matches.
This is a little more difficult for some components which don't have a uid, alarms for example.
- Author:
- Mike Douglass
-
-
Field Summary
Fields Modifier and Type Field Description static List<Object>defaultSkipList
-
Constructor Summary
Constructors Constructor Description XmlIcalCompare(List<?> skippedEntities, XcalUtil.TzGetter tzs)The skippedEntities allow the diff process to ignore components, properties and/or parameters that should not take part in the comparison.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.oasis_open.docs.ws_calendar.ns.soap.ComponentSelectionTypediff(ietf.params.xml.ns.icalendar_2.IcalendarType newval, ietf.params.xml.ns.icalendar_2.IcalendarType oldval)Compare the parameters.org.bedework.util.logging.BwLoggergetLogger()-
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, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
-
-
-
Constructor Detail
-
XmlIcalCompare
public XmlIcalCompare(List<?> skippedEntities, XcalUtil.TzGetter tzs)
The skippedEntities allow the diff process to ignore components, properties and/or parameters that should not take part in the comparison.Populate the list with empty icalendar objects.
- Parameters:
skippedEntities- Objects of the class that should be skippedtzs- for fetching timezones
-
-
Method Detail
-
diff
public org.oasis_open.docs.ws_calendar.ns.soap.ComponentSelectionType diff(ietf.params.xml.ns.icalendar_2.IcalendarType newval, ietf.params.xml.ns.icalendar_2.IcalendarType oldval)Compare the parameters. Return null for equal or a select element.- Parameters:
newval- possible new stateoldval- the current state- Returns:
- SelectElementType if newval and oldval differ else null.
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()
- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-
-