|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.LinkCache
public final class 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. |
Link[] |
getLinks(ViewMember vm)
Gets the links for the given ViewMember. |
boolean |
isPopulated(ViewMember vm)
Determines whether of not the given view member's links have already been cached. |
void |
populate(Folder folder,
Item.Type itemType,
int depth)
Ensures that the links are cached for all items of the given type in the given folder. |
void |
populate(View view,
Item.Type type)
Ensures that the links are cached for all items of the given type in the given view. |
void |
populate(ViewMemberCollection list)
Ensures that the links are cached for all of the given view members. |
void |
refresh(Folder folder,
Item.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(View view,
Item.Type itemType)
Ensures that the latest links are available for all items of the given type in the given view. |
void |
refresh(ViewMemberCollection list)
Ensures that the latest links are available for all of the given view members. |
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,
Item.Type type)
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.type - The type whose links are to be cached.
public void populate(Folder folder,
Item.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 sub-folders up
to n levels deeper to be processed. A negative
value causes this folder and all subfolders to be processed.public void populate(ViewMemberCollection list)
If the links for some of the view members 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 view members whose links are to be cached.public boolean isPopulated(ViewMember vm)
vm - The view member to be tested.
public void refresh(View view,
Item.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.
public void refresh(Folder folder,
Item.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 sub-folders up
to n levels deeper to be processed. A negative
value causes this folder and all sub-folders to be processed.public void refresh(ViewMemberCollection 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 view members. 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 view members whose links are to be refreshed.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(ViewMember vm)
If there are any LinkUpdateListeners registered, they will each receive a linkAdded() event for each new link added to the cache.
vm - The ViewMember whose links are to be fetched.
public void addLinkUpdateListener(LinkUpdateListener listener)
listener - The LinkUpdateListener to be registered.LinkCache.removeLinkUpdateListener(com.starteam.events.LinkUpdateListener)public void removeLinkUpdateListener(LinkUpdateListener listener)
listener - A LinkUpdateListener that was previously registered.LinkCache.addLinkUpdateListener(com.starteam.events.LinkUpdateListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||