Blue Mind
Release 1.0

net.bluemind.core.api.calendar
Class SyncCalendar

java.lang.Object
  extended by net.bluemind.core.api.calendar.SyncCalendar

public class SyncCalendar
extends java.lang.Object

This class is meant to be used in ICalendar.doSync(net.bluemind.core.api.AccessToken, SyncMode, java.util.Map, EventChanges, java.util.Map, java.util.List) method.

It is used to sent to bm-core data about what will be synchronized, since when, and how the changes on bm-core side will be calculated.

There is two mode to calculate the changes on bm-core :


Constructor Summary
SyncCalendar()
          Default constructor.
SyncCalendar(java.util.Date lastSync, java.lang.Integer calendar)
          This constructor build an usable SyncCalendar object.
SyncCalendar(SyncMode mode, java.util.Date lastSync, java.lang.Integer calendar)
          This constructor build an usable SyncCalendar object.
 
Method Summary
 java.lang.Integer getCalendar()
          Entity.getId() of the calendar to synchronize.
 java.util.Date getLastSync()
          Return the reference Date for the synchronization.
 SyncMode getMode()
          Return the method that will be used to calculate changes on bm-core.
 void setCalendar(java.lang.Integer calendar)
          Entity.getId() of the calendar to synchronize.
 void setLastSync(java.util.Date lastSync)
          Depending on getMode() : if equals to SyncMode.CHANGED_AFTER_DATE : Date since when the last synchronization have been done successfully if equals to SyncMode.OCCURS_AFTER_DATE : Date since after which the events must occurs.
 void setMode(SyncMode mode)
          Determine how the changes on bm-core side will be calculated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncCalendar

public SyncCalendar()
Default constructor.

This set the getMode() to SyncMode.CHANGED_AFTER_DATE.

Since getCalendar() and getLastSync() are mandatory to use SyncCalendar, an objecty initialized with this method can't be used without setting it.


SyncCalendar

public SyncCalendar(java.util.Date lastSync,
                    java.lang.Integer calendar)
This constructor build an usable SyncCalendar object.

This set the getMode() to SyncMode.CHANGED_AFTER_DATE.

Parameters:
lastSync - Date since when the last synchronization have been done successfully.
calendar - Entity.getId() of the calendar to synchronize.

SyncCalendar

public SyncCalendar(SyncMode mode,
                    java.util.Date lastSync,
                    java.lang.Integer calendar)
This constructor build an usable SyncCalendar object.

This constructor let you set the getMode().

Parameters:
mode - Determine how the changes on bm-core side will be calculated.
lastSync - Depending on mode, Date since when the last synchronization have been done successfully, or Date since after which the events must occurs.
calendar - Entity.getId() of the calendar to synchronize.
Method Detail

getMode

public SyncMode getMode()
Return the method that will be used to calculate changes on bm-core.

Returns:
How the changes on bm-core side will be calculated.

setMode

public void setMode(SyncMode mode)
Determine how the changes on bm-core side will be calculated.

Parameters:
mode - How the changes on bm-core side will be calculated.

getLastSync

public java.util.Date getLastSync()
Return the reference Date for the synchronization. Depending on getMode() this date have different meaning :

setLastSync

public void setLastSync(java.util.Date lastSync)
Depending on getMode() :

getCalendar

public java.lang.Integer getCalendar()
Entity.getId() of the calendar to synchronize.

Returns:

setCalendar

public void setCalendar(java.lang.Integer calendar)
Entity.getId() of the calendar to synchronize.

Parameters:
calendar -

Blue Mind
Release 1.0