|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.LinkCache
Caches links for a given set of items. One LinkCache may be populated with links from multiple view configurations on multiple servers.
| Constructor Summary | |
LinkCache()
Constructs a new link cache. |
|
| Method Summary | |
void |
addLinkUpdateListener(LinkUpdateListener listener)
Registers a LinkUpdateListener, which will then receive LinkUpdateEvents whenever a link is added or removed from the cache, and whenever a previously cached link is modified. |
LinkFactory |
getLinkFactory()
Gets a LinkFactory that may be used to create new links. |
Link[] |
getLinks(Item item)
Gets the links for the given item. |
boolean |
isPopulated(Item item)
Determines whether of not the given item's links have already been cached. |
void |
populate(Folder folder,
Type itemType,
int depth)
Ensures that the links are cached for all items of the given type in the given folder. |
void |
populate(Items list)
Ensures that the links are cached for all of the given items. |
void |
populate(View view,
Type itemType)
Ensures that the links are cached for all items of the given type in the given view. |
void |
refresh(Folder folder,
Type itemType,
int depth)
Ensures that the latest links are available for all items of the given type in the given folder. |
void |
refresh(Item item)
Ensures that the latest links are available for the given item. |
void |
refresh(Items list)
Ensures that the latest links are available for all of the given items. |
void |
refresh(View view,
Type itemType)
Ensures that the latest links are available for all items of the given type in the given view. |
void |
removeLinkUpdateListener(LinkUpdateListener listener)
Removes a previously registered LinkUpdateListener. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LinkCache()
| Method Detail |
public void populate(View view,
Type itemType)
If the links for some of the items have not yet been cached, then they are retrieved from the StarTeam server. Links are fetched in bulk for servers that support it.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache.
view - The view containing the items whose links are to be cached.itemType - The type item whose links are to be cached.SupportedFeatures.hasBulkFetchLinks()
public void populate(Folder folder,
Type itemType,
int depth)
If the links for some of the items have not yet been cached, then they are retrieved from the StarTeam server. Links are fetched in bulk for servers that support it.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache.
folder - The folder containing the items whose links are to be cached.itemType - The type item whose links are to be cached.depth - The number of levels deep in the folder tree that
child folders should also be processed. A value of 0 causes
only this folder to be processed. A positive value n will
cause this folder and all subfolders up to n levels deeper
to be processed. A negative value causes this folder and all subfolders
to be processed.SupportedFeatures.hasBulkFetchLinks()public void populate(Items list)
If the links for some of the items have not yet been cached, then they are retrieved from the StarTeam server. Links are fetched in bulk for servers that support it.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache.
list - The list of items whose links are to be cached.SupportedFeatures.hasBulkFetchLinks()public boolean isPopulated(Item item)
item - The item to be tested.
public void refresh(View view,
Type itemType)
Existing Link objects are modified in place whenever possible.
Note that since links are not currently MPX-aware, this re-fetches the links for all relevant items. Links are fetched in bulk for servers that support it.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache, a linkRemoved() event for each old link removed from the cache, and a linkChanged() event for each cached link modified during the refresh.
view - The view containing the items whose links are to be refreshed.itemType - The type item whose links are to be refreshed.SupportedFeatures.hasBulkFetchLinks()
public void refresh(Folder folder,
Type itemType,
int depth)
Existing Link objects are modified in place whenever possible.
Note that since links are not currently MPX-aware, this re-fetches the links for all relevant items. Links are fetched in bulk for servers that support it.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache, a linkRemoved() event for each old link removed from the cache, and a linkChanged() event for each cached link modified during the refresh.
folder - The folder containing the items whose links are to be refreshed.itemType - The type item whose links are to be refreshed.depth - The number of levels deep in the folder tree that
child folders should also be processed. A value of 0 causes
only this folder to be processed. A positive value n will
cause this folder and all subfolders up to n levels deeper
to be processed. A negative value causes this folder and all subfolders
to be processed.SupportedFeatures.hasBulkFetchLinks()public void refresh(Items list)
Existing Link objects are modified in place whenever possible.
Note that since links are not currently MPX-aware, this re-fetches the links for all of the given items. Links are fetched in bulk for servers that support it.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache, a linkRemoved() event for each old link removed from the cache, and a linkChanged() event for each cached link modified during the refresh.
list - The list of items whose links are to be refreshed.SupportedFeatures.hasBulkFetchLinks()public void refresh(Item item)
Existing Link objects are modified in place whenever possible.
Note that since links are not currently MPX-aware, this re-fetches the links for the given item.
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache, a linkRemoved() event for each old link removed from the cache, and a linkChanged() event for each cached link modified during the refresh.
item - The item whose links are to be refreshed.public Link[] getLinks(Item item)
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache.
item - The item whose links are to be fetched.
public LinkFactory getLinkFactory()
For items whose links are already cached, creating new links through this LinkFactory will ensure that the cached links are updated automatically, without having to explicitly refresh the cache.
public void addLinkUpdateListener(LinkUpdateListener listener)
listener - The LinkUpdateListener to be registered.LinkCache.removeLinkUpdateListener(com.starbase.starteam.LinkUpdateListener)public void removeLinkUpdateListener(LinkUpdateListener listener)
listener - A LinkUpdateListener that was previously registered.LinkCache.addLinkUpdateListener(com.starbase.starteam.LinkUpdateListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||