com.starteam
Class TraceCollection

java.lang.Object
  extended by com.starteam.StarTeamCollection
      extended by com.starteam.ViewMemberCollection
          extended by com.starteam.TraceCollection
All Implemented Interfaces:
Lockable, java.lang.Iterable, java.util.Collection

public final class TraceCollection
extends ViewMemberCollection

Caches Traces for a given view. Also provides a Trace query mechanism.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.starteam.ViewMemberCollection
ViewMemberCollection.BehaviorContainer, ViewMemberCollection.HistoryContainer, ViewMemberCollection.WebCacheViewMemberCollection
 
Constructor Summary
TraceCollection()
          Constructs an empty collection capable of holding trace objects
TraceCollection(Trace t)
          Constructs a trace collection containing only the specified trace
TraceCollection(Trace[] a)
          Constructs a trace collection containing all the traces of the specified array.
TraceCollection(TraceCollection c)
          Constructs a trace collection containing all the traces of the specified trace collection.
 
Method Summary
 boolean add(java.lang.Object o)
          Add the specified element to the collection.
 boolean addAll(java.util.Collection c)
          Add all the elements of the specified collection to this one.
 boolean addAll(java.lang.Object[] c)
          Add all the elements of the specified array to this one.
 void clear()
          Removes all of the elements from this collection.
 TraceCollection getTraces(LinkValue value, TraceFinder.Direction direction, TraceFinder.PinType pin)
          Gets all traces to or from the given LinkValue that meet the specified criteria.
 TraceCollection getTraces(java.lang.String url, TraceFinder.Direction direction, TraceFinder.PinType pin)
          Gets all traces to or from the given endpoint that meet the specified criteria.
 TraceCollection getTraces(ViewMember item)
          Gets all traces that reference any revision of the given StarTeam item either as the source or the target.
 TraceCollection getTraces(ViewMember item, TraceFinder.Direction direction, TraceFinder.PinType pin)
          Gets all traces to or from the given StarTeam item that meet the specified criteria.
 TraceCollection getTracesFrom(ViewMember source)
          Gets all traces that reference any revision of the given StarTeam item as the source endpoint.
 TraceCollection getTracesTo(ViewMember target)
          Gets all traces that reference any revision of the given StarTeam item as the target endpoint.
 void insert(int index, java.lang.Object o)
          insert the object into the collection at the specified index
 boolean remove(java.lang.Object o)
          Removes a single instance of the specified element from this collection, if it is present
 boolean removeAll(java.util.Collection c)
          Removes all this collection's elements that are also contained in the specified collection
 void set(int index, java.lang.Object o)
          Sets the object at a given index in the collection, and removes the (existing) object at that index in the collection, provided that the object does not already exist in the collection
 void update()
          Updates all the Traces specified in this collection using a single bulk server command Note that only traces support a bulk mechanism for add & edit.
 
Methods inherited from class com.starteam.ViewMemberCollection
contains, find, find, find, getAt, getCache, getFromHistory, getFromHistory, getFromHistory, getHistory, getViewMember, getViewMember, getViewMemberBehavior, lockExclusive, lockExclusive, lockNonExclusive, modifyBookmark, modifyReadStatus, reverse, setViewMemberBehavior, sort, sort, sort, unlock
 
Methods inherited from class com.starteam.StarTeamCollection
addTo, attach, containsAll, detach, get, getSyncRoot, indexOf, isEmpty, isFixedSize, isModified, isReadOnly, isSynchronized, iterator, positionOf, removeAt, resetCapacity, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

TraceCollection

public TraceCollection()
Constructs an empty collection capable of holding trace objects


TraceCollection

public TraceCollection(TraceCollection c)
Constructs a trace collection containing all the traces of the specified trace collection.

Parameters:
c - the TraceCollection whose elements are to be placed into this collection.

TraceCollection

public TraceCollection(Trace[] a)
Constructs a trace collection containing all the traces of the specified array.

Parameters:
a - the trace array whose elements are to be placed into this collection.

TraceCollection

public TraceCollection(Trace t)
Constructs a trace collection containing only the specified trace

Parameters:
t - the trace object to be placed into this collection.
Method Detail

getTraces

public TraceCollection getTraces(ViewMember item)
Gets all traces that reference any revision of the given StarTeam item either as the source or the target.

Parameters:
item - endpoint starTeam item.
Returns:
TraceCollection that reference the given item.

getTracesFrom

public TraceCollection getTracesFrom(ViewMember source)
Gets all traces that reference any revision of the given StarTeam item as the source endpoint.

Parameters:
source - The StarTeam item.
Returns:
The TraceCollection that reference the given source endpoint.

getTracesTo

public TraceCollection getTracesTo(ViewMember target)
Gets all traces that reference any revision of the given StarTeam item as the target endpoint.

Parameters:
target - The StarTeam item.
Returns:
The TraceCollection that reference the given target endpoint.

getTraces

public TraceCollection getTraces(ViewMember item,
                                 TraceFinder.Direction direction,
                                 TraceFinder.PinType pin)
Gets all traces to or from the given StarTeam item that meet the specified criteria.

Parameters:
item - The source or target endpoint.
direction - Indicates whether the URL must match the source endpoint of the trace, or the target endpoint, or may match either.
pin - Indicates whether the trace must reference a specific revision of the item, or may match any revision. Many Pin values are supported only for LinkValues that reference StarTeam items.
Returns:
The TraceCollection that match the given criteria.

getTraces

public TraceCollection getTraces(LinkValue value,
                                 TraceFinder.Direction direction,
                                 TraceFinder.PinType pin)
Gets all traces to or from the given LinkValue that meet the specified criteria.

Parameters:
value - The source or target endpoint.
direction - Indicates whether the URL must match the source endpoint of the trace, or the target endpoint, or may match either.
pin - Indicates whether the trace must reference a specific revision of the item, or may match any revision. Many Pin values are supported only for LinkValues that reference StarTeam items.
Returns:
The TraceCollection that match the given criteria.

getTraces

public TraceCollection getTraces(java.lang.String url,
                                 TraceFinder.Direction direction,
                                 TraceFinder.PinType pin)
Gets all traces to or from the given endpoint that meet the specified criteria.

Parameters:
url - The URL of the source or target endpoint.
direction - Indicates whether the URL must match the source endpoint of the trace, or the target endpoint, or may match either.
pin - Indicates whether the trace must reference a specific revision of the item, or may match any revision. Many Pin values are supported only for StarTeam URLs.
Returns:
The TraceCollection that match the given criteria.

add

public boolean add(java.lang.Object o)
Description copied from class: StarTeamCollection
Add the specified element to the collection. Returns true if this collection changed as a result of the call. Returns false if this collection already contains the specified element.

Specified by:
add in interface java.util.Collection
Overrides:
add in class StarTeamCollection
Parameters:
o - The Object to add to the collection
Returns:
true if this collection changed as a result of the call.

addAll

public boolean addAll(java.util.Collection c)
Description copied from class: StarTeamCollection
Add all the elements of the specified collection to this one. Returns true if this collection changed as a result of the call. Returns false if this collection already contains the specified element.

Specified by:
addAll in interface java.util.Collection
Overrides:
addAll in class StarTeamCollection
Parameters:
c - the specified collection
Returns:
true if this collection changed as a result of the call.

addAll

public boolean addAll(java.lang.Object[] c)
Description copied from class: StarTeamCollection
Add all the elements of the specified array to this one. Returns true if this collection changed as a result of the call. Returns false if this collection already contains the specified element.

Overrides:
addAll in class StarTeamCollection
Parameters:
c - an array of Objects to add to this collection
Returns:
true if this collection changed as a result of the call.

clear

public void clear()
Description copied from class: ViewMemberCollection
Removes all of the elements from this collection.

Specified by:
clear in interface java.util.Collection
Overrides:
clear in class ViewMemberCollection

remove

public boolean remove(java.lang.Object o)
Description copied from class: StarTeamCollection
Removes a single instance of the specified element from this collection, if it is present

Specified by:
remove in interface java.util.Collection
Overrides:
remove in class StarTeamCollection
Parameters:
o - the object to remove
Returns:
true if the collection changed as a result of the call

removeAll

public boolean removeAll(java.util.Collection c)
Description copied from class: StarTeamCollection
Removes all this collection's elements that are also contained in the specified collection

Specified by:
removeAll in interface java.util.Collection
Overrides:
removeAll in class StarTeamCollection
Returns:
true if the collection changed as a result of the call

set

public void set(int index,
                java.lang.Object o)
Description copied from class: StarTeamCollection
Sets the object at a given index in the collection, and removes the (existing) object at that index in the collection, provided that the object does not already exist in the collection

Overrides:
set in class StarTeamCollection
Parameters:
index - A valid index into the collection.
o - The object to be set.

insert

public void insert(int index,
                   java.lang.Object o)
Description copied from class: StarTeamCollection
insert the object into the collection at the specified index

Overrides:
insert in class StarTeamCollection
Parameters:
index - the position at which the object should be inserted
o - the object to insert

update

public void update()
Updates all the Traces specified in this collection using a single bulk server command Note that only traces support a bulk mechanism for add & edit. The other types do not. Note also that this method expects all Traces being created/updated to belong to the same View. An exception will be thrown if the same server / same view condition is not met.



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