com.miginfocom.calendar.activity
Interface ActivityResolver

All Known Implementing Classes:
ActivityDepository

public interface ActivityResolver

If two Activitys that has the same ID are being added to the depository a confict will arise. This interface denotes that resolver that resolves / merges the activities.


Method Summary
 Activity resolve(Activity currentActivity, Activity addingActivity, java.lang.Object adder)
          Should resolve the situation where a new activty is added to the depository when there's onr there with the same ID already-
 

Method Detail

resolve

Activity resolve(Activity currentActivity,
                 Activity addingActivity,
                 java.lang.Object adder)
Should resolve the situation where a new activty is added to the depository when there's onr there with the same ID already-

Parameters:
currentActivity - The current activity in the depository.
addingActivity - The activity to be added. Has the same id as currentActivity.
adder - The source responsible for adding addingActivity. Can for instance be an ActivityIOPlugin
Returns:
The activity that actually should be in the depository. Can be a new one or any one of the arguments.

If null nothing is added and currentActivity should normally still be in the depository.

The normal course of action is to merge the activities, if needed, and return currentActivity.

If the current activity is returned this mean it has been updated and an event is thrown. If null is returned nothing has been changed.



Copyright © 2009 MiG InfoCom AB. All Rights Reserved.