com.starteam
Class Change

java.lang.Object
  extended by com.starteam.TypedResource
      extended by com.starteam.LiveObject
          extended by com.starteam.Change
All Implemented Interfaces:
java.lang.Cloneable

public final class Change
extends LiveObject

A Change is essentially a unit of a ChangePackage. Each Change object describes one item modified during the commit.


Nested Class Summary
static class Change.ChangeType
          The value of the Change Type Property
static class Change.CommitAction
          The action that was used to commit a change.
static class Change.Type
          The Type for Change
static class Change.WebCacheChange
          Change accessor for cached SDK Changes contained objects are obtained from the artifact cache
 
Nested classes/interfaces inherited from class com.starteam.LiveObject
LiveObject.WebCacheLiveObject
 
Nested classes/interfaces inherited from class com.starteam.TypedResource
TypedResource.BranchState
 
Method Summary
static ChangeCollection find(Item source, Item target)
          Finds all Change objects for which the given items are the source and/or target.
static ChangeCollection findSource(Item source)
          Finds all Change objects for which the given item is the source.
static ChangeCollection findTarget(Item target)
          Finds all Change objects for which the given item is the target.
 ChangePackage getChangePackage()
          Gets the ChangePackage that contains this Change object.
 Change.ChangeType getChangeType()
          Gets a value representing the type of change.
 Change.CommitAction getCommitAction()
          Gets a value representing the action that was performed to commit this change.
 java.lang.String getDescription()
          Gets a user-friendly description of this Change object.
 Item.Type getItemType()
          Gets the type of the source and/or target item.
 Change.Type.PropertyCollection getProperties()
          Returns the properties of the Change object Type
 Item getSourceItem()
          Gets this Change object's source item, or null if there is no source item.
 LinkValue getSourceLink()
          Gets this Change object's source, as a LinkValue.
 DotNotation getSourceVersion()
          Gets the version number of the source item.
 Item getTargetItem()
          Gets this Change object's target item, or null if there is no target item.
 LinkValue getTargetLink()
          Gets this Change object's target, as a LinkValue.
 DotNotation getTargetVersion()
          Gets the version number of the target item.
 View getView()
          Gets the view that contains this Change object and the associated ChangePackage.
static boolean[] hasChanges(Item[] sources, Item[] targets)
          Check for changes between the specified sources and targets.
 boolean isEnabled()
          Returns true if this change is enabled
 void setEnabled(boolean enabled)
          mark this change as enabled or disabled Disabled Changes will not report their attached links as resolveable members of the ChangePackage or associated Process Item.
 
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, getID, getIntegerArrayValue, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, getValue, hasCachedProperties, hasValue, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getProperties

public Change.Type.PropertyCollection getProperties()
Returns the properties of the Change object Type

Returns:
the properties of the Change Object Type

getView

public View getView()
Gets the view that contains this Change object and the associated ChangePackage.

Returns:
View

isEnabled

public boolean isEnabled()
Returns true if this change is enabled

Returns:
true if this change is enabled

setEnabled

public void setEnabled(boolean enabled)
mark this change as enabled or disabled Disabled Changes will not report their attached links as resolveable members of the ChangePackage or associated Process Item. Administrative access rights are needed to disable changes

Parameters:
enabled - true to enable the change, false otherwise

getChangePackage

public ChangePackage getChangePackage()
Gets the ChangePackage that contains this Change object.

Returns:
ChangePackage

getDescription

public java.lang.String getDescription()
Gets a user-friendly description of this Change object.

Returns:
String

getChangeType

public Change.ChangeType getChangeType()
Gets a value representing the type of change.

Returns:
ChangeType

getItemType

public Item.Type getItemType()
Gets the type of the source and/or target item.

Returns:
Type

getSourceItem

public Item getSourceItem()
Gets this Change object's source item, or null if there is no source item. Note that getSourceLink() may return a non-null Link value, but getSourceItem() may still return null. This is possible if the item has been deleted after the change was committed, since the view used to open the change package is not configured to the commit time of the change package.

Returns:
Item

getSourceLink

public LinkValue getSourceLink()
Gets this Change object's source, as a LinkValue.

Returns:
LinkValue

getTargetItem

public Item getTargetItem()
Gets this Change object's target item, or null if there is no target item. Note that getTargetLink() may return a non-null Link value, but getTargetItem() may still return null. This is possible if the item has been deleted after the change was committed, since the view used to open the change package is not configured to the commit time of the change package.

Returns:
Item

getTargetLink

public LinkValue getTargetLink()
Gets this Change object's target, as a LinkValue.

Returns:
LinkValue

getSourceVersion

public DotNotation getSourceVersion()
Gets the version number of the source item.

Returns:
The version number of the source item, or null.

getTargetVersion

public DotNotation getTargetVersion()
Gets the version number of the target item.

Returns:
The version number of the target item, or null.

getCommitAction

public Change.CommitAction getCommitAction()
Gets a value representing the action that was performed to commit this change.

Returns:
EnumeratedValue

findSource

public static ChangeCollection findSource(Item source)
Finds all Change objects for which the given item is the source.

The resulting Change objects may reside in any view on this server. They are always sorted by CreatedTime, with the most recent first.

Parameters:
source - Item
Returns:
ChangeCollection

findTarget

public static ChangeCollection findTarget(Item target)
Finds all Change objects for which the given item is the target.

The resulting Change objects may reside in any view on this server. They are always sorted by CreatedTime, with the most recent first.

Parameters:
target - Item
Returns:
ChangeCollection

hasChanges

public static boolean[] hasChanges(Item[] sources,
                                   Item[] targets)
Check for changes between the specified sources and targets. Return true if a subsequent call to find(source, target) would return a non-empty ChangeCollection false if the call would return an empty ChangeCollection each source is tested against the matching target all the sources should be from the same view all the targets should be from the same view however, the sources & the targets are expected to be fro different views

Parameters:
sources - the set of sources to compare
targets - the set of targets to compare against
Returns:
boolean array for every pair, true if the pair has changes, false if not. An empty array if returned if the server does not support this query.

find

public static ChangeCollection find(Item source,
                                    Item target)
Finds all Change objects for which the given items are the source and/or target.

The source item may be null, in which case any source item will do; or, the target item may be null, in which case any target item will do. If both source and target are specified, then they must belong to the same server instance.

The resulting Change objects may reside in any view on this server. They are always sorted by CreatedTime, with the most recent first.

Parameters:
source - Item
target - Item
Returns:
ChangeCollection


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