com.starbase.starteam
Class ViewConfiguration

java.lang.Object
  |
  +--com.starbase.starteam.ViewConfiguration

public class ViewConfiguration
extends java.lang.Object

A class that represents the possible configuration states for a View. A StarTeam View can be in one of four different configurations: Current: all items in the view are the most recent or "tip" versions, Label: all items reference the version with the specified label attached, Time: all items reference the version that was tip as of some time, Promotion: like a label-based view but with respect to some promotion state.

See Also:
View

Method Summary
static ViewConfiguration createFromLabel(int labelID)
          Creates a new ViewConfiguration object that represents a view in the specified label-based configuration.
static ViewConfiguration createFromPromotionState(int stateID)
          Creates a new ViewConfiguration object that represents a view in the specified PromotionState-based configuration.
static ViewConfiguration createFromTime(OLEDate oleTime)
          Creates a new ViewConfiguration object that represents a view as-of a specified point in time.
static ViewConfiguration createTip()
          Creates a new ViewConfiguration object that represents the current or "tip" state of a view.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int getLabelID()
          Return the label ID for this configuration.
 int getPromotionStateID()
          Return the PromotionSate ID for this configuration.
 OLEDate getTime()
          Return the as-of time for this configuration.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isEqualTo(ViewConfiguration theOther)
          returns true if this ViewConfiguration instance can be considered equal to the other
 boolean isLabelBased()
          Return true if this configuration is label-based.
 boolean isPromotionStateBased()
          Return true if this configuration is based on a PromotionState.
 boolean isTimeBased()
          Return true if this configuration is time-based.
 boolean isTip()
          Return true if this configuration is "tip" or "current".
 java.lang.String toString()
          Returns a string representation of this configuration.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

createTip

public static ViewConfiguration createTip()
Creates a new ViewConfiguration object that represents the current or "tip" state of a view.

Returns:
a new configuration for the tip state.

createFromLabel

public static ViewConfiguration createFromLabel(int labelID)
Creates a new ViewConfiguration object that represents a view in the specified label-based configuration.

Parameters:
labelID - The label ID from which to base the configuration.
Returns:
a new configuration based on the specified label ID
See Also:
Label.getID()

createFromTime

public static ViewConfiguration createFromTime(OLEDate oleTime)
Creates a new ViewConfiguration object that represents a view as-of a specified point in time.

Parameters:
oleTime - the view's as-of time
Returns:
a new configuration of the view as-of the specified time

createFromPromotionState

public static ViewConfiguration createFromPromotionState(int stateID)
Creates a new ViewConfiguration object that represents a view in the specified PromotionState-based configuration.

Parameters:
stateID - The PromotionState ID from which to base the configuration.
Returns:
a new configuration based on the specified PromotionState ID
See Also:
PromotionState.getObjectID()

getLabelID

public int getLabelID()
Return the label ID for this configuration. Will throw an exception if the configuration is not label-based.

Returns:
the label ID for this configuration
See Also:
ViewConfiguration.createFromLabel(int), Label.getID()

getPromotionStateID

public int getPromotionStateID()
Return the PromotionSate ID for this configuration. Will throw an exception if the configuration is not promotion state-based.

Returns:
the PromotionState ID for this configuration
See Also:
ViewConfiguration.createFromPromotionState(int), PromotionState.getObjectID()

getTime

public OLEDate getTime()
Return the as-of time for this configuration. Will throw an exception if the configuration is not time-based.

Returns:
the as-of time for this configuration
See Also:
ViewConfiguration.createFromTime(OLEDate)

isTip

public boolean isTip()
Return true if this configuration is "tip" or "current".

Returns:
true if this configuration is tip-based
See Also:
ViewConfiguration.createTip()

isLabelBased

public boolean isLabelBased()
Return true if this configuration is label-based.

Returns:
true if this configuration is label-based
See Also:
ViewConfiguration.createFromLabel(int)

isTimeBased

public boolean isTimeBased()
Return true if this configuration is time-based.

Returns:
true if this configuration is time-based
See Also:
ViewConfiguration.createFromTime(OLEDate)

isPromotionStateBased

public boolean isPromotionStateBased()
Return true if this configuration is based on a PromotionState.

Returns:
true if this configuration is PromotionState-based
See Also:
ViewConfiguration.createFromPromotionState(int)

isEqualTo

public boolean isEqualTo(ViewConfiguration theOther)
returns true if this ViewConfiguration instance can be considered equal to the other

Returns:
boolean true if this ViewConfiguration instance can be considered equal to the other

toString

public java.lang.String toString()
Returns a string representation of this configuration.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this configuration

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.