|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.ViewConfigurationDiffer
Used to compare two configurations of a given view, triggering FolderUpdateEvents and ItemUpdateEvents describing the changes detected between the two.
Events are triggered only for differences detectable by comparing the two view configurations. For example, if an item was added sometime after the time represented by the first configuration, and then removed sometime before the time represented by the second configuration, then no events would be triggered for that item.
Events are triggered in an order that reflects the times the change actually occurred, when possible. For some older server versions, and for some types of view configurations, it is not currently possible to determine when a move has occurred. It is also not currently possible to determine when a folder or item was removed. Such events are triggered last.
| Constructor Summary | |
ViewConfigurationDiffer(View view)
Constructs a new ViewCOnfigurationDiffer. |
|
| Method Summary | |
void |
addFolderUpdateListener(FolderUpdateListener listener)
Registers a FolderUpdateListener, whose methods will be invoked during a compare() whenever changes to the folder tree are detected. |
void |
addItemUpdateListener(ItemUpdateListener listener,
Type type)
Registers an ItemUpdateListener, whose methods will be invoked durng a compare() whenever changes to the items of the given type are detected. |
void |
addRequiredPropertyName(Type type,
java.lang.String propertyName)
Marks a given property name as required for a given type. |
void |
addRequiredPropertyNames(Type type,
java.lang.String[] propertyNames)
Marks a list of property names as required for a given type. |
void |
compare(ViewConfiguration config1,
ViewConfiguration config2)
Comnpares the two given configurations of this view, triggering FolderUpdateEvents and ItemUpdateEvents for all changes detected between the two. |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
int |
hashCode()
returns a unique hash for all instances of this type |
void |
removeFolderUpdateListener(FolderUpdateListener listener)
Unregisters a previously registered FolderUpdateListener. |
void |
removeItemUpdateListener(ItemUpdateListener listener,
Type type)
Unregisters a previously registered ItemUpdateListener. |
void |
setAllPropertyNamesRequired(Type type)
Marks all property names as required for a given type. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ViewConfigurationDiffer(View view)
view - The view whose configurations are to be compared.| Method Detail |
public void addFolderUpdateListener(FolderUpdateListener listener)
listener - The listener to be registered.FolderUpdateListener,
ViewConfigurationDiffer.compare(com.starbase.starteam.ViewConfiguration, com.starbase.starteam.ViewConfiguration),
ViewConfigurationDiffer.removeFolderUpdateListener(com.starbase.starteam.FolderUpdateListener)public void removeFolderUpdateListener(FolderUpdateListener listener)
listener - The listener to be unregistered.ViewConfigurationDiffer.addFolderUpdateListener(com.starbase.starteam.FolderUpdateListener)
public void addItemUpdateListener(ItemUpdateListener listener,
Type type)
listener - The listener to be registered.type - The item type.ItemUpdateListener,
ViewConfigurationDiffer.compare(com.starbase.starteam.ViewConfiguration, com.starbase.starteam.ViewConfiguration),
ViewConfigurationDiffer.removeItemUpdateListener(com.starbase.starteam.ItemUpdateListener, com.starbase.starteam.Type)
public void removeItemUpdateListener(ItemUpdateListener listener,
Type type)
listener - The listener to be unregistered.type - The item type.ViewConfigurationDiffer.addItemUpdateListener(com.starbase.starteam.ItemUpdateListener, com.starbase.starteam.Type)
public void addRequiredPropertyName(Type type,
java.lang.String propertyName)
If addPropertyName() or any of its variations is never called for a given type, then a default set of properties (including the type's descriptors) is assumed. In fact, if neither addPropertyName() nor addItemUpdateListener() is called, then that item type is not even compared.
type - An item type.propertyName - A property name.ViewConfigurationDiffer.compare(com.starbase.starteam.ViewConfiguration, com.starbase.starteam.ViewConfiguration),
ViewConfigurationDiffer.addRequiredPropertyNames(com.starbase.starteam.Type, java.lang.String[]),
ViewConfigurationDiffer.setAllPropertyNamesRequired(com.starbase.starteam.Type)
public void addRequiredPropertyNames(Type type,
java.lang.String[] propertyNames)
type - An item type.propertyNames - A list of property names.ViewConfigurationDiffer.addRequiredPropertyName(com.starbase.starteam.Type, java.lang.String)public void setAllPropertyNamesRequired(Type type)
type - An item type.ViewConfigurationDiffer.addRequiredPropertyName(com.starbase.starteam.Type, java.lang.String)
public void compare(ViewConfiguration config1,
ViewConfiguration config2)
The folder tree is always compared. In addition, the items are compared for each item type that the application has shown an interest in, either by adding an ItemUpdateListener for that item type, or by calling addRequiredPropertyName() with that item type.
config1 - The first (earlier) view configuration.config2 - The second (later) view configuration.public boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||