com.starteam
Class ViewConfiguration

java.lang.Object
  extended by com.starteam.ViewConfiguration

public final 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 createFrom(DateTime oleTime)
          Creates a new ViewConfiguration object that represents a view as-of a specified point in time.
static ViewConfiguration createFrom(Label lbl)
          Creates a new ViewConfiguration object that represents a view in the specified label-based configuration.
static ViewConfiguration createFrom(PromotionState state)
          Creates a new ViewConfiguration object that represents a view in the specified PromotionState-based configuration.
static ViewConfiguration createTip()
          Creates a new ViewConfiguration object that represents the current or "tip" state of a view.
 boolean equals(java.lang.Object o)
          returns true if this ViewConfiguration instance can be considered equal to the other
 Label getLabel()
          Return the label ID for this configuration.
 PromotionState getPromotionState()
          Return the PromotionSate ID for this configuration.
 DateTime getTime()
          Return the as-of time for this configuration.
 int hashCode()
          Gets a hash code for this ViewConfiguration.
 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".
 boolean supportsDeletedItems()
          Return true if this view configuration can support accessing deleted items.
 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.

createFrom

public static ViewConfiguration createFrom(Label lbl)
Creates a new ViewConfiguration object that represents a view in the specified label-based configuration.

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

createFrom

public static ViewConfiguration createFrom(DateTime 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

createFrom

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

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

isEqualTo

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

Parameters:
theOther - viewConfig ViewConfiguration the view configuration to compare
Returns:
boolean true if this ViewConfiguration instance can be considered equal to the other

equals

public boolean equals(java.lang.Object o)
returns true if this ViewConfiguration instance can be considered equal to the other

Overrides:
equals in class java.lang.Object
Parameters:
o - viewConfig ViewConfiguration the view configuration to compare
Returns:
boolean true if this ViewConfiguration instance can be considered equal to the other

getLabel

public Label getLabel()
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.createFrom(Label), Label.getID()

getPromotionState

public PromotionState getPromotionState()
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.createFrom(PromotionState), PromotionState.getObjectID()

getTime

public DateTime 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.createFrom(DateTime)

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.createFrom(Label)

isTimeBased

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

Returns:
true if this configuration is time-based

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.createFrom(PromotionState)

supportsDeletedItems

public boolean supportsDeletedItems()
Return true if this view configuration can support accessing deleted items. Note that this is separate from whether or not the server itself provides support for accessing deleted items. To successfully access deleted items, both the server and the view configuration must support it.

Returns:
true if this view configuration can support accessing deleted items.

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

hashCode

public int hashCode()
Gets a hash code for this ViewConfiguration.

Overrides:
hashCode in class java.lang.Object
Returns:
int


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