com.miginfocom.calendar.category
Interface CategoryResolver


public interface CategoryResolver

If two Categorys 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
 Category resolve(Category currentCategory, Category addingCategory, 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

Category resolve(Category currentCategory,
                 Category addingCategory,
                 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:
currentCategory - The current category in the depository.
addingCategory - The category to be added. Has the same id as currentCategory.
adder - The source responsible for adding addingCategory.
Returns:
The category that actually should be in the depository. Can be a new one or any one of the arguments.

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

The normal course of action is to merge the activities, if needded, and return currentCategory. If any other category is returned remove and add events will be fired.



Copyright © 2009 MiG InfoCom AB. All Rights Reserved.