com.miginfocom.calendar.activity
Class ActivityDepository

java.lang.Object
  extended by com.miginfocom.calendar.activity.ActivityDepository
All Implemented Interfaces:
ActivityResolver, java.beans.PropertyChangeListener, java.util.EventListener

public class ActivityDepository
extends java.lang.Object
implements java.beans.PropertyChangeListener, ActivityResolver

A class that is the focal point of all activity exchange events and updates. I/O filters can be registered.

An app-global ActivityList is maintained as a live object that everyone can register listeners on.

Clients (E.g. DefaultDateArea) can register subscriptions to date ranges. Those subscriptions can be reead by ActivityIOPlugin for instance and they can then start to send update events to this synchronizer when information becomes available or are changed in any way.


Field Summary
static java.lang.String PROP_SUBSCR_ADDED
          Property for when a subscription has been added.
static java.lang.String PROP_SUBSCR_REMOVED
          Property for when a subscription has been removed.
 
Constructor Summary
protected ActivityDepository()
          Protected constructor.
 
Method Summary
 void addActivityListListener(TimeSpanListListener l, boolean asWeakRef)
          Deprecated. Use #addDepositoryListener instead. Notification during synchronized block could lead to dead-locks.
 void addBrokedActivities(java.util.Collection c, java.lang.Object source)
          Calls addBrokedActivities(java.util.Collection, Object, int) with TimeSpanListEvent.ADDED.
 void addBrokedActivities(java.util.Collection c, java.lang.Object source, int eventType)
          Adds a number of activities to the list.
 void addBrokedActivity(Activity a, java.lang.Object source)
          Calls addBrokedActivity(com.miginfocom.calendar.activity.Activity, Object, int) with TimeSpanListEvent.ADDED.
 void addBrokedActivity(Activity a, java.lang.Object source, int eventType)
          Adds an activity to the list.
 void addDepositoryListener(TimeSpanListListener l)
          Adds a listener that listens to all adds and removes in the depository.
 void addDepositoryListener(TimeSpanListListener l, boolean asWeakRef)
          Adds a listener that listens to all adds and removes in the depository.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a listener that listens to all handeled activities of type AbstractActivity and subclasses.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l, boolean asWeakRef)
          Adds a listener that listens to all handeled activities of type AbstractActivity and subclasses.
 void addSubscription(ActivitySubscription s)
          Adds the subscription and notifies the listeners.
 void addSubscriptionListener(java.beans.PropertyChangeListener l)
          Adds a listener that listens to all changes in the subscriptions for this depository.
 void addSubscriptionListener(java.beans.PropertyChangeListener l, boolean asWeakRef)
          Adds a listener that listens to all changes in the subscriptions for this depository.
 void fireDepositoryChanged(Activity a, java.lang.Object source, int eventType)
           
 void fireDepositoryChanged(TimeSpan[] acts, java.lang.Object source, int eventType)
           
 void fireManualDepositoryListChanged(TimeSpan[] timeSpans, int type, DateRangeI dateRange)
          Deprecated. Use #fireDepositoryChanged instead. Notification during synchronized block could lead to dead-locks.
 ActivityList getActivities()
          Returns a new list with all the activities in this depository.
 Activity getActivity(java.lang.Object id)
          Returns the activity with the id from a locally mainained HashMap, so it will be very fast.
 ActivityResolver getActivityResolver()
          Returns the current resolver.
 TimeSpanList[] getActivityViewLists(javax.swing.JComponent parent, InteractionListener iListener, DateRangeI withinRange)
          A direct transfer to ActivityList.getActivityViewLists(javax.swing.JComponent, com.miginfocom.ashape.interaction.InteractionListener, com.miginfocom.util.dates.DateRangeI)
 TimeSpanList[] getActivityViewLists(javax.swing.JComponent parent, InteractionListener iListener, DateRangeI withinRange, Filter filter)
          A direct transfer to ActivityList.getActivityViewLists(javax.swing.JComponent, com.miginfocom.ashape.interaction.InteractionListener, com.miginfocom.util.dates.DateRangeI, Filter)
 TimeSpanList getActivityViews(javax.swing.JComponent parent, InteractionListener iListener, DateRangeI withinRange, Filter filter)
          A direct transfer to ActivityList.getActivityViews(javax.swing.JComponent, com.miginfocom.ashape.interaction.InteractionListener, com.miginfocom.util.dates.DateRangeI, Filter)
 java.util.List getBrokedActivities()
          Returns a new list with all Activity objects that are cuurently beeing broked (i.e.
 int getBrokedActivityCount()
          Returns the number of broked activities in the depository.
 ActivityResolver getCurrentActivityResolver()
          Returns the current resolver.
 java.lang.Class getEnforceIDClass()
          Returns the id class type that always should be used as id for the coategories.
static ActivityDepository getInstance()
          Returns an instance of this class using the defulat null context.
static ActivityDepository getInstance(java.lang.String context)
          Returns an instance of this class.
 java.util.logging.Logger getLogger()
          Returns the current logger or null if none is set.
 ActivitySubscription[] getSubscriptions()
          Returns a new list will all current substriptions.
static Activity[] loadActivities(java.io.InputStream in, java.beans.ExceptionListener listener, boolean isZipped)
          Reads an XML input stream and returns a list of
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void removeActivityListListener(TimeSpanListListener l)
          Deprecated. Use #removeDepositoryListener instead. Notification during synchronized block could lead to dead-locks.
 void removeAllBrokedActivities()
          Removes all currently broked activities.
 void removeAllSubscriptions()
          Removes all subscriptions one by one and notifies the listeners.
 void removeBrokedActivities(java.util.Collection c)
          Remove Activitys from the list.
 void removeBrokedActivities(java.util.Collection c, int eventType)
          Remove Activitys from the list.
 boolean removeBrokedActivity(Activity a)
          Remove an activity from the list.
 boolean removeBrokedActivity(Activity act, int eventType)
          Remove an activity from the list.
 Activity removeBrokedActivityById(java.lang.Object id)
          Remove an activity from the list.
 Activity removeBrokedActivityById(java.lang.Object actID, int eventType)
          Remove an activity from the list.
 void removeDepositoryListener(TimeSpanListListener l)
          Removes the listener if it exists locally.
static boolean removeInstance(java.lang.String context)
          Remove the depository from the list of depositories managed.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void removeSubscription(ActivitySubscription s)
          Removes a subscription and notifies the listeners.
 void removeSubscriptionListener(java.beans.PropertyChangeListener l)
           
 void removeSubscriptions(java.lang.Object source)
          Removes all subscriptions associated with source (by identity).
 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-
static void saveActivities(Activity[] activites, java.io.OutputStream os, java.beans.ExceptionListener listener, boolean zipIt)
          Saves the mappings to file using XMLEncoder.
 void setActivityResolver(ActivityResolver activityResolver)
          Sets the resolver.
static void setDepository(java.lang.String context, ActivityDepository depository)
          Sets the synchronizeronizer to synchronizeronizer.
 void setEnforceIDClass(java.lang.Class enforceIDClass)
          Sets the id class type that always should be used as id for the coategories.
 void setLogger(java.util.logging.Logger logger)
          Set the current logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SUBSCR_ADDED

public static final java.lang.String PROP_SUBSCR_ADDED
Property for when a subscription has been added. "New value" will be the added subscription.

See Also:
Constant Field Values

PROP_SUBSCR_REMOVED

public static final java.lang.String PROP_SUBSCR_REMOVED
Property for when a subscription has been removed. "Old value" will be the removed subscription.

See Also:
Constant Field Values
Constructor Detail

ActivityDepository

protected ActivityDepository()
Protected constructor.

Method Detail

getInstance

public static final ActivityDepository getInstance()
Returns an instance of this class using the defulat null context. Creates the instance the first time. After that it can't be changed to another implementation with setDepository(String, ActivityDepository).

Returns the depository for the default null context.

Returns:
An instance of this class.

getInstance

public static final ActivityDepository getInstance(java.lang.String context)
Returns an instance of this class. Creates the instance the first time. After that it can't be changed to another implementation with setDepository(String, ActivityDepository).

Parameters:
context - The context to return the depository for. May be anything and are just used as a key. null is the default one. The context is used so that there can be more than one depository. Every depository contains its own set of activities.
Returns:
An instance of this class.

removeInstance

public static boolean removeInstance(java.lang.String context)
Remove the depository from the list of depositories managed. Note that the depository will be disposed and should be considered unusable.

Parameters:
context -
Returns:
true if the depository was found and removed. false if there was no depository found.

loadActivities

public static Activity[] loadActivities(java.io.InputStream in,
                                        java.beans.ExceptionListener listener,
                                        boolean isZipped)
                                 throws java.io.IOException
Reads an XML input stream and returns a list of

Parameters:
in - The stream to read from. Will be closed.
listener - The listener for exceptions thrown by the XMLDecoder.
isZipped - If in doesn't support mark/reset there is no way to test if the stream is zipped. If so this value will be used. If the stream does support mark/reset the value is gotten from the stream and this argument is not used.
Returns:
The property mappings that was read. Never null.
Throws:
java.io.IOException

saveActivities

public static void saveActivities(Activity[] activites,
                                  java.io.OutputStream os,
                                  java.beans.ExceptionListener listener,
                                  boolean zipIt)
                           throws java.io.IOException
Saves the mappings to file using XMLEncoder.

Since the data that will be persisted to the output stream is including the information that is added to the mappings, and custom class types must be JavaBean-persistable (see XMLEncoder or have a delegate registered with IOUtil.setDelegate(Class, java.beans.PersistenceDelegate).

Parameters:
activites - The activities to save.
os - The output stream to save the XML to. Closes it!!
listener - The listener for exceptions thrown by the XMLEncoder.
zipIt - If set to true the output stream is ziped with level 9. This will reduce the size a lot.
Throws:
java.io.IOException

setDepository

public static void setDepository(java.lang.String context,
                                 ActivityDepository depository)
Sets the synchronizeronizer to synchronizeronizer. This method must be called before any call to getInstance(String) is ever made or a UnsupportedOperationException is thrown since the depository isn't "hot swappable" in the current implementation. This also means that this method can only be called once.

Parameters:
depository - The depository to use. Not null.
context - The context to register this depository under. null is the default one. The context is used so that there can be more than one depository. Every depository contains its own set of activities.

getEnforceIDClass

public java.lang.Class getEnforceIDClass()
Returns the id class type that always should be used as id for the coategories. This can be used as an extra check to protect agains for instance the bug where Long id:s are used when created in code but it is an Integer when it is returned from a database.

Returns:
The class type. null if no check.

setEnforceIDClass

public void setEnforceIDClass(java.lang.Class enforceIDClass)
Sets the id class type that always should be used as id for the coategories. This can be used as an extra check to protect agains for instance the bug where Long id:s are used when created in code but it is an Integer when it is returned from a database.

Parameters:
enforceIDClass - The class type. null will turn of the ID class type check.

getLogger

public java.util.logging.Logger getLogger()
Returns the current logger or null if none is set.

Returns:
The current logger or null if none is set.

setLogger

public void setLogger(java.util.logging.Logger logger)
Set the current logger. Set to null to diable logging (default)

Parameters:
logger - The new logger or null to diable logging (default)

getActivity

public Activity getActivity(java.lang.Object id)
Returns the activity with the id from a locally mainained HashMap, so it will be very fast.

Parameters:
id - The id of the activity.
Returns:
The Activity or null if there was no activity with that id maintained by the depository.

getActivities

public ActivityList getActivities()
Returns a new list with all the activities in this depository.

Returns:
A new list with all the activities in this depository.

getBrokedActivityCount

public int getBrokedActivityCount()
Returns the number of broked activities in the depository.

Returns:
The number of broked activities in the depository.

getActivityResolver

public ActivityResolver getActivityResolver()
Returns the current resolver. If null this object (which is a ActivityResolver) will just choose the newest one (modification date wise).

Returns:
The current resolver. Can be null.

setActivityResolver

public void setActivityResolver(ActivityResolver activityResolver)
Sets the resolver. If null this object (which is a ActivityResolver) will just choose the newest one (modification date wise).

Parameters:
activityResolver - The new resolver. Can be null.

getCurrentActivityResolver

public ActivityResolver getCurrentActivityResolver()
Returns the current resolver. Will never return null as getActivityResolver() might. This methods returns this if not other resolver is returned.

Returns:
The reolver. Not null.

resolve

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

Specified by:
resolve in interface ActivityResolver
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.


addSubscription

public void addSubscription(ActivitySubscription s)
Adds the subscription and notifies the listeners.

A subscription only denotes a date range that is of interested for a source. For instance a IOFiler might use the subscriptions to optimize what activities to load.

Parameters:
s - The subscription to add.
See Also:
addSubscriptionListener(java.beans.PropertyChangeListener, boolean), PROP_SUBSCR_ADDED

removeSubscription

public void removeSubscription(ActivitySubscription s)
Removes a subscription and notifies the listeners.

Parameters:
s - The subscription to remove.
See Also:
addSubscriptionListener(java.beans.PropertyChangeListener, boolean), PROP_SUBSCR_REMOVED

removeAllSubscriptions

public void removeAllSubscriptions()
Removes all subscriptions one by one and notifies the listeners.

See Also:
addSubscriptionListener(java.beans.PropertyChangeListener, boolean), PROP_SUBSCR_REMOVED

removeSubscriptions

public void removeSubscriptions(java.lang.Object source)
Removes all subscriptions associated with source (by identity).

Parameters:
source - The subscription that has this source will be removed.
See Also:
addSubscriptionListener(java.beans.PropertyChangeListener, boolean), PROP_SUBSCR_REMOVED

getSubscriptions

public ActivitySubscription[] getSubscriptions()
Returns a new list will all current substriptions. Subscription changes should normally be tracked through property event listeners.

Returns:
A new list will all current substriptions. Never null.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener, boolean)

getActivityViewLists

public TimeSpanList[] getActivityViewLists(javax.swing.JComponent parent,
                                           InteractionListener iListener,
                                           DateRangeI withinRange)
A direct transfer to ActivityList.getActivityViewLists(javax.swing.JComponent, com.miginfocom.ashape.interaction.InteractionListener, com.miginfocom.util.dates.DateRangeI)


getActivityViewLists

public TimeSpanList[] getActivityViewLists(javax.swing.JComponent parent,
                                           InteractionListener iListener,
                                           DateRangeI withinRange,
                                           Filter filter)
A direct transfer to ActivityList.getActivityViewLists(javax.swing.JComponent, com.miginfocom.ashape.interaction.InteractionListener, com.miginfocom.util.dates.DateRangeI, Filter)


getActivityViews

public TimeSpanList getActivityViews(javax.swing.JComponent parent,
                                     InteractionListener iListener,
                                     DateRangeI withinRange,
                                     Filter filter)
A direct transfer to ActivityList.getActivityViews(javax.swing.JComponent, com.miginfocom.ashape.interaction.InteractionListener, com.miginfocom.util.dates.DateRangeI, Filter)


addBrokedActivities

public void addBrokedActivities(java.util.Collection c,
                                java.lang.Object source)
Calls addBrokedActivities(java.util.Collection, Object, int) with TimeSpanListEvent.ADDED.

Parameters:
source - The source object that is adding the activity.
c - The collection to add

addBrokedActivities

public void addBrokedActivities(java.util.Collection c,
                                java.lang.Object source,
                                int eventType)
Adds a number of activities to the list. Calls addBrokedActivity(Activity, Object) for every activity since they have to be checked so that there are no activity with the same ID. If there is the resolver have to deal with that problem.

Parameters:
source - The source object that is adding the activity.
c - The collection to add
eventType - E.g. TimeSpanListEvent.ADDED. Denotes if the add was due to a creation or if the activitiy(ies) should just be handled by the depository and was created elsewhere. Use -1 to not send any events at all.

addBrokedActivity

public void addBrokedActivity(Activity a,
                              java.lang.Object source)
Calls addBrokedActivity(com.miginfocom.calendar.activity.Activity, Object, int) with TimeSpanListEvent.ADDED.

Parameters:
a - The activity to add
source - The source object that is adding the activity.
See Also:
addBrokedActivity(Activity, Object, int)

addBrokedActivity

public void addBrokedActivity(Activity a,
                              java.lang.Object source,
                              int eventType)
Adds an activity to the list. The activity should already be considered "created" and should only be handled by the broker.

If an activity with the same ID already exist the registered activity resolver will be invoked. The old one can be removed and the new added or nothing will happen depending on the resolver. If a remove/add operation is done the event type TimeSpanListEvent.EXCHANGED will be used instead of the value for eventType. If the resolver chooses to instead change the old activity to be like the new one normal change events will be fired since no add/remove operation is happening.

Parameters:
a - The activity to add
source - The source object that is adding the activity.
eventType - E.g. TimeSpanListEvent.ADDED_CREATED. Denotes if the add was due to a creation or of the activitiy(ies) should just be handled by the depository and was created elsewhere. Use -1 to not send any events at all, not even for exchanges.

removeBrokedActivity

public boolean removeBrokedActivity(Activity a)
Remove an activity from the list. The activity is not deleted, it is only removed from handling by the broker. The activity will be found on identity, not with .equals().

Parameters:
a - The activity to remove.
Returns:
If the activity was removed.

removeBrokedActivity

public boolean removeBrokedActivity(Activity act,
                                    int eventType)
Remove an activity from the list. The activity is not deleted, it is only removed from handling by the depository. The activity will be found using the ID, not with .equals().

Parameters:
act - The activity to remove.
eventType - E.g. TimeSpanListEvent.REMOVED_DELETED. Denotes if the add was due to a deletion or if the activitiy(ies) should just be removed from the depository for other reasons, such as they arenot requered in memory any more. Use -1 to not send any events at all.
Returns:
If the activity was removed.

removeBrokedActivityById

public Activity removeBrokedActivityById(java.lang.Object id)
Remove an activity from the list. The activity is not deleted, it is only removed from handling by the broker.

Parameters:
id - The activity to remove.
Returns:
The removed activity or null if the id was not beeing broked.

removeBrokedActivityById

public Activity removeBrokedActivityById(java.lang.Object actID,
                                         int eventType)
Remove an activity from the list. The activity is not deleted, it is only removed from handling by the broker.

Parameters:
actID - The activity to remove.
eventType - E.g. TimeSpanListEvent.REMOVED_DELETED. Denotes if the add was due to a deletion or if the activitiy(ies) should just be removed from the depository for other reasons, such as they arenot requered in memory any more. Use -1 to not send any events at all.
Returns:
The removed activity or null if the id was not beeing broked.

removeBrokedActivities

public void removeBrokedActivities(java.util.Collection c)
Remove Activitys from the list. The activities are not deleted, it is only removed from handling by the broker.

Parameters:
c - The activities to add.

removeBrokedActivities

public void removeBrokedActivities(java.util.Collection c,
                                   int eventType)
Remove Activitys from the list. The activities are not deleted, it is only removed from handling by the broker.

Parameters:
c - The activities to add.
eventType - E.g. TimeSpanListEvent.REMOVED_DELETED. Denotes if the add was due to a deletion or if the activitiy(ies) should just be removed from the depository for other reasons, such as they arenot requered in memory any more. Use -1 to not send any events at all.

removeAllBrokedActivities

public void removeAllBrokedActivities()
Removes all currently broked activities. It does this with the event type TimeSpanListEvent.REMOVED.


getBrokedActivities

public java.util.List getBrokedActivities()
Returns a new list with all Activity objects that are cuurently beeing broked (i.e. handled) by this depository.

Changes in the depository will not be reflected in the list after its creation.

Returns:
A new list. Never null but can be empty.
See Also:
Arrays.asList(T...)

addSubscriptionListener

public void addSubscriptionListener(java.beans.PropertyChangeListener l)
Adds a listener that listens to all changes in the subscriptions for this depository.

Also fires events when a subscription has been added/removed.

See PROP_xxx in this class.

Parameters:
l - The listener
See Also:
addSubscriptionListener(PropertyChangeListener, boolean)

addSubscriptionListener

public void addSubscriptionListener(java.beans.PropertyChangeListener l,
                                    boolean asWeakRef)
Adds a listener that listens to all changes in the subscriptions for this depository.

See PROP_xxx in this class.

Parameters:
l - The listener
asWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since the garbage collector can collect the listener if it is only referenced from this list.
Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.
See Also:
addSubscriptionListener(PropertyChangeListener, boolean)

removeSubscriptionListener

public void removeSubscriptionListener(java.beans.PropertyChangeListener l)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a listener that listens to all handeled activities of type AbstractActivity and subclasses. Note that classes that only implement Activity have to call AbstractActivity.fireStaticPropertyChangeEvent(java.beans.PropertyChangeEvent) to fire the static notification.

Does not from version 5.5.5 fire subscription change events. See addSubscriptionListener(java.beans.PropertyChangeListener, boolean)

See PROP_xxx in this class.

Parameters:
l - The listener
See Also:
addPropertyChangeListener(PropertyChangeListener, boolean)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l,
                                      boolean asWeakRef)
Adds a listener that listens to all handeled activities of type AbstractActivity and subclasses. Note that classes that only implement Activity have to call AbstractActivity.fireStaticPropertyChangeEvent(java.beans.PropertyChangeEvent) to fire the static notification.

Does not from version 5.5.5 fire subscription change events. See addSubscriptionListener(java.beans.PropertyChangeListener, boolean)

See PROP_xxx in this class.

Parameters:
l - The listener
asWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since the garbage collector can collect the listener if it is only referenced from this list. Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.
See Also:
addDepositoryListener(com.miginfocom.util.dates.TimeSpanListListener, boolean)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

addDepositoryListener

public void addDepositoryListener(TimeSpanListListener l)
Adds a listener that listens to all adds and removes in the depository.

Parameters:
l - The listener
See Also:
addDepositoryListener(TimeSpanListListener, boolean)

addDepositoryListener

public void addDepositoryListener(TimeSpanListListener l,
                                  boolean asWeakRef)
Adds a listener that listens to all adds and removes in the depository.

Parameters:
l - The listener
asWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since the garbage collector can collect the listener if it is only referenced from this list.

Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.


removeDepositoryListener

public void removeDepositoryListener(TimeSpanListListener l)
Removes the listener if it exists locally.

Parameters:
l - The listener.

fireDepositoryChanged

public void fireDepositoryChanged(Activity a,
                                  java.lang.Object source,
                                  int eventType)

fireDepositoryChanged

public void fireDepositoryChanged(TimeSpan[] acts,
                                  java.lang.Object source,
                                  int eventType)

addActivityListListener

public void addActivityListListener(TimeSpanListListener l,
                                    boolean asWeakRef)
Deprecated. Use #addDepositoryListener instead. Notification during synchronized block could lead to dead-locks.

Transfer to the internal list's TimeSpanList.addTimeSpanListListener(com.miginfocom.util.dates.TimeSpanListListener, boolean)


removeActivityListListener

public void removeActivityListListener(TimeSpanListListener l)
Deprecated. Use #removeDepositoryListener instead. Notification during synchronized block could lead to dead-locks.

Transfer to the internal list's TimeSpanList.removeTimeSpanListListener(com.miginfocom.util.dates.TimeSpanListListener)

Parameters:
l - The listener to remove

fireManualDepositoryListChanged

public void fireManualDepositoryListChanged(TimeSpan[] timeSpans,
                                            int type,
                                            DateRangeI dateRange)
Deprecated. Use #fireDepositoryChanged instead. Notification during synchronized block could lead to dead-locks.

Fires a manual TimeSpanListEvent. If for instance a recurring activity was added its recurrency range is not included in the normal notification date range. A manual event needs to be fired for this.

Parameters:
timeSpans - The affected time spans.
type - If added or removed. E.g. TimeSpanListEvent.REMOVED.
dateRange - The total date span affected.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.