com.starteam
Class ViewMemberCollection.WebCacheViewMemberCollection

java.lang.Object
  extended by com.starteam.ViewMemberCollection.WebCacheViewMemberCollection
Enclosing class:
ViewMemberCollection

public static class ViewMemberCollection.WebCacheViewMemberCollection
extends java.lang.Object

A collection to perform transacted operations on web cache view members. Add web cache view members in various states for creation, update, removal, etc in the repository. Call save to actually perform the operations in explicit (or implicit) transactions, as the case may be.


Nested Class Summary
static class ViewMemberCollection.WebCacheViewMemberCollection.WebCacheHistoryContainer
          a query for History on an array of WebCacheViewMembers returns a collection of WebCacheViewMember[]'s.
 
Constructor Summary
ViewMemberCollection.WebCacheViewMemberCollection(ArtifactCacheManager.Context c)
          Constructs this wrapper collection.
 
Method Summary
 ViewMemberCollection.WebCacheViewMemberCollection create(ViewMember.WebCacheViewMember vm)
          Set up a WebCacheViewMember to be created
 ViewMember.WebCacheViewMember find(int vmid)
          return the ViewMember with this id or NULL The Viewmember will have had to have been placed in this collection for it to be found subsequently
static ViewMemberCollection.WebCacheViewMemberCollection.WebCacheHistoryContainer getHistory(ArtifactCacheManager.Context c, ViewMember.WebCacheViewMember[] vms)
          Executes a query to fetch the history of all specified view members in the array.
 ViewMemberCollection.WebCacheViewMemberCollection lock(ViewMember.WebCacheViewMember vm)
          Set up a WebCacheViewMember to be exclusively locked and break anyone else's lock if necessary
 ViewMemberCollection.WebCacheViewMemberCollection move(Item.WebCacheItem itm, Folder.WebCacheFolder destination)
          Set up a WebCacheItem to be moved to the specified destination
 ViewMemberCollection.WebCacheViewMemberCollection move(Item.WebCacheItem itm, View.WebCacheView destination)
          Set up a WebCacheItem to be moved to the specified destination
 ViewMemberCollection.WebCacheViewMemberCollection move(TreeItem.WebCacheTreeItem itm, TreeItem.WebCacheTreeItem destination)
          Set up a WebCacheTreeItem to be moved to a new WebCacheTreeItem parent
 ViewMemberCollection.WebCacheViewMemberCollection remove(ViewMember.WebCacheViewMember vm)
          Set up a WebCacheViewMember to be removed
 ViewMember.WebCacheViewMember[] save()
          Save the entire set of underlying web cache view members in the collection to the repository All operations are performed in a transaction, i.e.
 int size()
          return the size of this collection
 ViewMemberCollection.WebCacheViewMemberCollection unlock(ViewMember.WebCacheViewMember vm)
          Set up a WebCacheViewMember to be unlocked
 ViewMemberCollection.WebCacheViewMemberCollection update(ViewMember.WebCacheViewMember vm)
          Set up a WebCacheViewMember to be updated
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewMemberCollection.WebCacheViewMemberCollection

public ViewMemberCollection.WebCacheViewMemberCollection(ArtifactCacheManager.Context c)
Constructs this wrapper collection.

Parameters:
c - The ArtifactCacheManager.Context pointing at the underlying resources
Method Detail

getHistory

public static ViewMemberCollection.WebCacheViewMemberCollection.WebCacheHistoryContainer getHistory(ArtifactCacheManager.Context c,
                                                                                                    ViewMember.WebCacheViewMember[] vms)
Executes a query to fetch the history of all specified view members in the array. The query is executed in bulk, i.e. using a single server command. Note that all members of this array are required to be from the same view and of the same type. If this constraint is violated, an exception will be thrown.

Parameters:
c - the user context for executing the query
vms - a collection of web cache view members
Returns:
a History Container from which individual view member history may be queried

size

public int size()
return the size of this collection

Returns:
the size of this collection

find

public ViewMember.WebCacheViewMember find(int vmid)
return the ViewMember with this id or NULL The Viewmember will have had to have been placed in this collection for it to be found subsequently

Parameters:
vmid - the id
Returns:
the ViewMember with this id or NULL

remove

public ViewMemberCollection.WebCacheViewMemberCollection remove(ViewMember.WebCacheViewMember vm)
Set up a WebCacheViewMember to be removed

Parameters:
vm - the view member to remove
Returns:
this collection
See Also:
ViewMemberCollection.WebCacheViewMemberCollection.save()

move

public ViewMemberCollection.WebCacheViewMemberCollection move(Item.WebCacheItem itm,
                                                              View.WebCacheView destination)
Set up a WebCacheItem to be moved to the specified destination

Parameters:
itm - the item to move
destination - the destination view
Returns:
this collection
See Also:
ViewMemberCollection.WebCacheViewMemberCollection.save()

move

public ViewMemberCollection.WebCacheViewMemberCollection move(Item.WebCacheItem itm,
                                                              Folder.WebCacheFolder destination)
Set up a WebCacheItem to be moved to the specified destination

Parameters:
itm - the item to move
destination - the destination folder
Returns:
this collection
See Also:
ViewMemberCollection.WebCacheViewMemberCollection.save()

move

public ViewMemberCollection.WebCacheViewMemberCollection move(TreeItem.WebCacheTreeItem itm,
                                                              TreeItem.WebCacheTreeItem destination)
Set up a WebCacheTreeItem to be moved to a new WebCacheTreeItem parent

Parameters:
itm - the tree item to move
destination - the destination tree item parent
Returns:
this collection
See Also:
ViewMemberCollection.WebCacheViewMemberCollection.save()

update

public ViewMemberCollection.WebCacheViewMemberCollection update(ViewMember.WebCacheViewMember vm)
Set up a WebCacheViewMember to be updated

Parameters:
vm - the view member to update
Returns:
this collection
See Also:
ViewMemberCollection.WebCacheViewMemberCollection.save()

create

public ViewMemberCollection.WebCacheViewMemberCollection create(ViewMember.WebCacheViewMember vm)
Set up a WebCacheViewMember to be created

Parameters:
vm - the view member to create
Returns:
this collection

lock

public ViewMemberCollection.WebCacheViewMemberCollection lock(ViewMember.WebCacheViewMember vm)
Set up a WebCacheViewMember to be exclusively locked and break anyone else's lock if necessary

Parameters:
vm - the view member to lock
Returns:
this collection
See Also:
ViewMemberCollection.WebCacheViewMemberCollection.save()

unlock

public ViewMemberCollection.WebCacheViewMemberCollection unlock(ViewMember.WebCacheViewMember vm)
Set up a WebCacheViewMember to be unlocked

Parameters:
vm - the view member to unlock
Returns:
this collection

save

public ViewMember.WebCacheViewMember[] save()
Save the entire set of underlying web cache view members in the collection to the repository All operations are performed in a transaction, i.e. either everything succeeds or everything fails. If the transaction fails, a server exception is thrown back to the caller The sequence of operations is first acquire locks in bulk (implicit transaction), if any then perform all operations in a transaction (explicit transaction) finally release locks in bulk (implicit transaction), if any

Returns:
on success, an array of saved WebCacheViewMembers, representing objects from the ArtifactCache


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.