com.starteam
Class Trace

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.TrackedObject
              extended by com.starteam.VersionedObject
                  extended by com.starteam.ViewMember
                      extended by com.starteam.Trace
All Implemented Interfaces:
ISecurable, Lockable, LockableObject, java.lang.Cloneable
Direct Known Subclasses:
LinkToTraceAdapter

public class Trace
extends ViewMember

A typed relationship between two artifacts.


Nested Class Summary
static class Trace.Status
          The Status of a Trace
static class Trace.TraceType
          Trace Type
static class Trace.Type
          The type of the Trace
static class Trace.WebCacheTrace
          Trace accessor for cached SDK Traces contained objects are obtained from the artifact cache
 
Nested classes/interfaces inherited from class com.starteam.ViewMember
ViewMember.LockType, ViewMember.MyLock, ViewMember.ShareState, ViewMember.WebCacheViewMember
 
Nested classes/interfaces inherited from class com.starteam.VersionedObject
VersionedObject.WebCacheVersionedObject
 
Nested classes/interfaces inherited from class com.starteam.TrackedObject
TrackedObject.WebCacheTrackedObject
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Constructor Summary
Trace(View view)
          Creates a new trace in the specified view.
 
Method Summary
 java.lang.String getDescription()
          Gets the description of this trace.
 Trace.Type.PropertyCollection getProperties()
          Gets all the properties of the Trace Type
 LinkValue getSource()
          Gets the source endpoint of this trace.
 Trace.Status getStatus()
          Gets the Status of this Trace.
 LinkValue getTarget()
          Gets the target endpoint of this trace.
 Trace.TraceType getTraceType()
          Gets the TraceType of this Trace.
 View getView()
          Gets the view that contains this Trace
 boolean isReverseShareRecommended(View target)
          Determines whether share or reverse-share is the more appropriate operation when sharing this trace to the given target view.
 boolean isSuspect()
          Determines whether the trace is suspect
 void pinSource()
          Set the source end-point of this trace to pinned.
 void pinTarget()
          Set the target end-point of this trace to pinned.
 Trace reverseShareTo(View target)
          Transfers ownership of the root share of a trace to a new view, sharing a copy back to the original location.
 void setDescription(java.lang.String description)
          Sets the description of this trace.
 void setSource(LinkValue source)
          Sets the source endpoint of this trace.
 void setSource(ViewMember source)
          Sets the source endpoint of this trace.
 void setStatus(Trace.Status status)
          Set the status of the trace
 void setSuspect(boolean isSuspect)
          Mark the trace as suspect
 void setTarget(LinkValue target)
          Sets the target endpoint of this trace.
 void setTarget(ViewMember target)
          Sets the target endpoint of this trace.
 void setTraceType(Trace.TraceType type)
          Set the trace type of the trace
 Trace shareTo(View target)
          Shares this trace to a new view.
 Trace smartShareTo(View target)
          Shares or reverse-shares this trace to the given target view, as appropriate.
 java.lang.String toString()
          Returns the description of this trace.
 void unpinSource()
          Set the source end-point of this trace to float.
 void unpinTarget()
          Set the target end-point of this trace to float.
 void update()
          Stores the underlying entity in the server.
 
Methods inherited from class com.starteam.ViewMember
copy, equals, findLinks, getAllLabels, getAllShares, getAttachedLabels, getAttachments, getBehavior, getCache, getComment, getDeletedBy, getDeletedTime, getDisplayValue, getDotNotation, getExclusiveLocker, getExternalID, getExternalURL, getFromHistory, getFromHistory, getFromHistory, getFromHistory, getHistory, getID, getIntegerArrayValue, getLocker, getMyLockType, getParentContainer, getParentRevision, getPresentationID, getRights, getRootObjectID, getShare, getShare, getTraces, getValue, getViewMemberRevisions, getViewVersion, getVMID, hashCode, hasPermissions, isBookmarked, isBranchable, isDeleted, isDisembodied, isEqualTo, isReadOnly, isRootShare, isUnread, lockExclusive, lockExclusive, lockNonExclusive, modifyBookmark, modifyReadStatus, putLock, remove, setAttachments, setBehavior, setBranchOnChange, setComment, setExternalID, setExternalURL, setFixedConfiguration, setFloatingConfiguration, setRights, setValue, unlock, updateRevisionComment
 
Methods inherited from class com.starteam.VersionedObject
getBranchRevision, getRevisionNumber, getViewVersion, isFromHistory
 
Methods inherited from class com.starteam.TrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject
getCreatedBy, getCreatedTime, toStarTeamURL
 
Methods inherited from class com.starteam.TypedResource
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, hasCachedProperties, hasValue, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.starteam.ISecurable
getServer, getType
 

Constructor Detail

Trace

public Trace(View view)
Creates a new trace in the specified view.

Parameters:
view - The view to which this new trace will be added.
Method Detail

getProperties

public Trace.Type.PropertyCollection getProperties()
Gets all the properties of the Trace Type

Returns:
Collection of properties

getTraceType

public Trace.TraceType getTraceType()
Gets the TraceType of this Trace.

Returns:
Trace.TraceType

setTraceType

public void setTraceType(Trace.TraceType type)
Set the trace type of the trace

Parameters:
type - the trace type to set

getStatus

public Trace.Status getStatus()
Gets the Status of this Trace.

Returns:
Status

setStatus

public void setStatus(Trace.Status status)
Set the status of the trace

Parameters:
status - the status to set

getSource

public LinkValue getSource()
Gets the source endpoint of this trace.

Returns:
The source endpoint of this trace.

setSource

public void setSource(LinkValue source)
Sets the source endpoint of this trace.

Parameters:
source - The source endpoint of this trace.

setSource

public void setSource(ViewMember source)
Sets the source endpoint of this trace.

Parameters:
source - The source view member of this trace. May be from this server or any other; the resulting source LinkValue will be an internal link or an external link as appropriate.
Throws:
java.lang.IllegalArgumentException - () if the source ViewMember is itself a Trace

unpinSource

public void unpinSource()
Set the source end-point of this trace to float. i.e. the source will always match the tip ViewMember of the configuration


pinSource

public void pinSource()
Set the source end-point of this trace to pinned. i.e. the source will match the specified revision of the ViewMember


unpinTarget

public void unpinTarget()
Set the target end-point of this trace to float. i.e. the target will always match the tip ViewMember of the configuration


pinTarget

public void pinTarget()
Set the target end-point of this trace to pinned. i.e. the target will match the specified revision of the ViewMember


getTarget

public LinkValue getTarget()
Gets the target endpoint of this trace.

Returns:
The target endpoint of this trace.

setTarget

public void setTarget(LinkValue target)
Sets the target endpoint of this trace.

Parameters:
target - The target endpoint of this trace.

setTarget

public void setTarget(ViewMember target)
Sets the target endpoint of this trace.

Parameters:
target - The target view member of this trace. May be from this server or any other; the resulting source LinkValue will be an internal link or an external link as appropriate.
Throws:
java.lang.IllegalArgumentException - () if the target ViewMember is itself a Trace

getDescription

public java.lang.String getDescription()
Gets the description of this trace.

Returns:
The description of this trace.

isSuspect

public boolean isSuspect()
Determines whether the trace is suspect

Returns:
true if the trace is suspect

setSuspect

public void setSuspect(boolean isSuspect)
Mark the trace as suspect

Parameters:
isSuspect - the suspect flag

setDescription

public void setDescription(java.lang.String description)
Sets the description of this trace.

Parameters:
description - The description of this trace.

getView

public View getView()
Gets the view that contains this Trace

Overrides:
getView in class ViewMember
Returns:
View
See Also:
ViewMember.isDisembodied()

isReverseShareRecommended

public boolean isReverseShareRecommended(View target)
Determines whether share or reverse-share is the more appropriate operation when sharing this trace to the given target view.

Parameters:
target - The target view.
Returns:
true if a reverse-share is appropriate; false otherwise.
See Also:
Trace.smartShareTo(com.starteam.View)

smartShareTo

public Trace smartShareTo(View target)
Shares or reverse-shares this trace to the given target view, as appropriate. The new share uses a time-based configuration, and is set to branch on change.

Parameters:
target - The target view.
Returns:
The shared trace.
See Also:
Trace.isReverseShareRecommended(com.starteam.View)

shareTo

public Trace shareTo(View target)
Shares this trace to a new view. The shared trace will still exist in its original view as well as in the new one.

Parameters:
target - The new view.
Returns:
The newly shared trace.
See Also:
Trace.reverseShareTo(com.starteam.View)

reverseShareTo

public Trace reverseShareTo(View target)
Transfers ownership of the root share of a trace to a new view, sharing a copy back to the original location.

In its basic form, this is simply a move followed by a share. However, reverse share is permitted from a rolled-back view. This is supported by finding the corresponding trace in the tip view configuration, and reverse sharing that one.

When reverse sharing from a rolled back view, it is possible that the desired trace revision in the target is not the tip revision of the trace being shared. The reverse share operation compensates for this by moving the trace to the target, sharing it back to the source, and then rolling back the target by creating a new revision whose user-modifiable properties (and content, if applicable) match the desired revision.

Sharing replaces the original trace in the source view with a new share of the same underlying object. Since this is a new trace with a new VMID, it initially has no attached labels. The reverse share operation will attempt to apply the same labels to the corresponding revisions of the new trace. However, the label operations may be unsuccessful (for example, because of access rights, or because a label may be frozen). Any server exceptions that occur while re-applying labels to the new share are silently ignored, and will not cause the reverse share operation to fail.

Parameters:
target - The new view.
Returns:
The new trace in the target view.
See Also:
Trace.shareTo(com.starteam.View)

update

public void update()
Stores the underlying entity in the server. If the item is new it will be created otherwise an existing item will be modified.

Overrides:
update in class ViewMember

toString

public java.lang.String toString()
Returns the description of this trace.

Overrides:
toString in class TypedResource
Returns:
the description of this trace.


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