com.starbase.starteam.viewcomparemerge
Class Options

java.lang.Object
  |
  +--com.starbase.starteam.viewcomparemerge.Options

public class Options
extends java.lang.Object

A set of user preferences that guide a view compare/merge operation. For any invocation of view compare and/or merge, these preferences may be overridden. The intent is that this set of preferences can be stored persistently and retrieved when setting up a view compare/merge operation, and that the set of options reflects what this user will usually want for the operation.


Constructor Summary
Options()
          Constructs a set of Options with default values.
Options(Options other)
          Create an Options instance by copying the contents of another
 
Method Summary
 ActionOverride[] getActionOverrides()
          An array of ActionOverride's, in the order in which they have been set
 boolean getAutoMergeFiles()
          Returns true if file pairs that have no conflicts will be automatically merged.
 boolean getAutoMergeProperties()
          Returns true if property pairs that have no conflicts will be automatically merged.
 boolean getBreakLocksAutomatically()
          Returns true if locks will automatically be broken as needed to check in merged revisions.
 boolean getCheckTargetFoldersForFloatingShares()
          Determines whether or not VCM will check target folders for floating child shares, and fail if any are found.
 boolean getFixFloatingChildShares()
          Indicates whether or not shares that float from the source view to the target view will automatically be detected during the compare phase and fixed during the commit.
 boolean getIgnoreMergePoints()
          Returns true if all merge points should be ignored for comparisons.
 boolean getLockSourceForDifference()
          Returns true if a source item will be locked when a difference is detected.
 boolean getLockTargetForDifference()
          Returns true if a target item will be locked when a difference is detected.
 boolean getMatchFilesByFileName()
          Returns true if files (or folders) with the same name are to be considered matched, even if their object and/or item ids do not match.
 java.lang.String getProperty(java.lang.String key)
          Searches for the property with the specified key in this property list.
 java.lang.String[] getPropertyNames()
          Returns an array of all the keys in this property list,
 boolean getTransactionsEnabled()
          Determines whether or not commit operations are executed within an atomic transaction, if supported by the StarTeam server.
 boolean getTreatFileNamesAsCaseSensitive()
          Returns true if file (or folder) names are compared in a case-sensitive manner.
 boolean getVerboseDifferences(Type type)
          Determines whether or not a difference is generated for every matched pair of source and target items, whether or not the match is considered a difference.
 boolean getVerboseProcessLinks()
          Determines whether or not a commit operation should create process links for all file and folder operations that add or modify target items.
static Options getWorkstationDefault()
          Returns the default Options for this workstation
 void setAutoMergeFiles(boolean bAutoMerge)
          Set whether file pairs that have no conflicts should be automatically merged.
 void setAutoMergeProperties(boolean bAutoMerge)
          Set whether property pairs that have no conflicts should be automatically merged.
 void setBreakLocksAutomatically(boolean bBreakLocks)
          Set whether to automatically break locks as necessary to check in merged revisions.
 void setCheckTargetFoldersForFloatingShares(boolean bEnabled)
          Determines whether or not VCM will check target folders for floating child shares, and fail if any are found.
 void setDefaultAction(DifferenceType type, MergeAction action)
          Changes the default action in a given situation.
 void setDefaultAction(MatchState state, MergeAction action)
          Changes the default action in a given situation.
 void setFixFloatingChildShares(boolean bFix)
          Determines whether or not shares that float from the source view to the target view will automatically be detected during the compare phase and fixed during the commit.
 void setIgnoreMergePoints(boolean bIgnoreMergePoints)
          Set whether all merge points should be ignored for comparisons.
 void setLockSourceForDifference(boolean bLock)
          Set whether to lock the source item when a difference is detected.
 void setLockTargetForDifference(boolean bLock)
          Set whether to lock the target item when a difference is detected.
 void setMatchFilesByFileName(boolean bMatchFilesByFileName)
          Set whether files (or folders) with the same name are to be considered matched, even when their object and/or item ids do not match.
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
          Sets a value for the property identified by the specified key
 void setTransactionsEnabled(boolean bEnabled)
          Determines whether or not commit operations are executed within an atomic transaction, if supported by the StarTeam server.
 void setTreatFileNamesAsCaseSensitive(boolean bCaseSensitive)
          Set whether file (or folder) names should be compared in a case-sensitive manner.
 void setVerboseDifferences(Type type, boolean bVerbose)
          Determines whether or not a difference is generated for every matched pair of source and target items of a given type, whether or not the match is considered a difference.
 void setVerboseProcessLinks(boolean bEnabled)
          Determines whether or not a commit operation should create process links for all file and folder operations that add or modify target items.
 void setWorkstationDefault()
          Saves the current set of options as the defaults for this workstation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()
Constructs a set of Options with default values.


Options

public Options(Options other)
Create an Options instance by copying the contents of another

Method Detail

getWorkstationDefault

public static Options getWorkstationDefault()
Returns the default Options for this workstation

Returns:
the default Options for this workstation

setWorkstationDefault

public void setWorkstationDefault()
                           throws java.io.IOException
Saves the current set of options as the defaults for this workstation.

Throws:
java.io.IOException

setMatchFilesByFileName

public void setMatchFilesByFileName(boolean bMatchFilesByFileName)
Set whether files (or folders) with the same name are to be considered matched, even when their object and/or item ids do not match. The default value is false.

Parameters:
bMatchFilesByFileName - true to match on name.

getMatchFilesByFileName

public boolean getMatchFilesByFileName()
Returns true if files (or folders) with the same name are to be considered matched, even if their object and/or item ids do not match. The default value is false.

Returns:
true if files (or folders) with the same name are to be considered matched, even if their object and/or item ids do not match.

setTreatFileNamesAsCaseSensitive

public void setTreatFileNamesAsCaseSensitive(boolean bCaseSensitive)
Set whether file (or folder) names should be compared in a case-sensitive manner. The default value is false.

Parameters:
bCaseSensitive - true if file (or folder) names are case sensitive.

getTreatFileNamesAsCaseSensitive

public boolean getTreatFileNamesAsCaseSensitive()
Returns true if file (or folder) names are compared in a case-sensitive manner. The default value is false.

Returns:
true if file (or folder) names are compared in a case-sensitive manner.

setIgnoreMergePoints

public void setIgnoreMergePoints(boolean bIgnoreMergePoints)
Set whether all merge points should be ignored for comparisons. The default value is false.

Parameters:
bIgnoreMergePoints - true to ignore merge points.

getIgnoreMergePoints

public boolean getIgnoreMergePoints()
Returns true if all merge points should be ignored for comparisons. The default value is false.

Returns:
true if all merge points should be ignored for comparisons, false if merge points should be used.

setAutoMergeFiles

public void setAutoMergeFiles(boolean bAutoMerge)
Set whether file pairs that have no conflicts should be automatically merged. The default value is false.

Parameters:
bAutoMerge - true if file pairs that have no conflicts should be automatically merged.

getAutoMergeFiles

public boolean getAutoMergeFiles()
Returns true if file pairs that have no conflicts will be automatically merged. The default value is false.

Returns:
true if file pairs that have no conflicts will be automatically merged.

setAutoMergeProperties

public void setAutoMergeProperties(boolean bAutoMerge)
Set whether property pairs that have no conflicts should be automatically merged. The default value is false.

Parameters:
bAutoMerge - true if property pairs that have no conflicts should be automatically merged.

getAutoMergeProperties

public boolean getAutoMergeProperties()
Returns true if property pairs that have no conflicts will be automatically merged. The default value is false.

Returns:
true if property pairs that have no conflicts will be automatically merged.

setBreakLocksAutomatically

public void setBreakLocksAutomatically(boolean bBreakLocks)
Set whether to automatically break locks as necessary to check in merged revisions. The default value is false.

Parameters:
bBreakLocks - true to automatically break locks as needed.

getBreakLocksAutomatically

public boolean getBreakLocksAutomatically()
Returns true if locks will automatically be broken as needed to check in merged revisions. The default value is false.

Returns:
true if locks will automatically be broken as needed to check in merged revisions.

setLockSourceForDifference

public void setLockSourceForDifference(boolean bLock)
Set whether to lock the source item when a difference is detected. The default value is false.

Parameters:
bLock - true to to lock the source item when a difference is detected.

getLockSourceForDifference

public boolean getLockSourceForDifference()
Returns true if a source item will be locked when a difference is detected. The default value is false.

Returns:
true if a source item will be locked when a difference is detected.

setLockTargetForDifference

public void setLockTargetForDifference(boolean bLock)
Set whether to lock the target item when a difference is detected. The default value is false.

Parameters:
bLock - true to to lock the target item when adDifference is detected.

getLockTargetForDifference

public boolean getLockTargetForDifference()
Returns true if a target item will be locked when a difference is detected. The default value is false.

Returns:
true if a target item will be locked when a difference is detected.

setFixFloatingChildShares

public void setFixFloatingChildShares(boolean bFix)
Determines whether or not shares that float from the source view to the target view will automatically be detected during the compare phase and fixed during the commit. By default, floating child shares are neither detected nor fixed.

Parameters:
bFix - true if shares that float from the source view to the target view will automatically be detected during the compare phase and fixed during the commit.

getFixFloatingChildShares

public boolean getFixFloatingChildShares()
Indicates whether or not shares that float from the source view to the target view will automatically be detected during the compare phase and fixed during the commit.

Returns:
true if shares that float from the source view to the target view will automatically be detected during the compare phase and fixed during the commit; false otherwise.

setVerboseDifferences

public void setVerboseDifferences(Type type,
                                  boolean bVerbose)
Determines whether or not a difference is generated for every matched pair of source and target items of a given type, whether or not the match is considered a difference. The default value is false.

Verbose differences are off by default. If you change the scope of a session, then verbose differences are enabled for all types that are in scope, but not fully in scope.

Parameters:
type - An item type.
bVerbose - True to generate an ItemDifference for every matched pair of source and target items of the given type; false to generate an ItemDifference only when a true difference is detected.

getVerboseDifferences

public boolean getVerboseDifferences(Type type)
Determines whether or not a difference is generated for every matched pair of source and target items, whether or not the match is considered a difference. The default value is false.

Verbose differences are off by default, but are enabled for sessions whose scope is not the entire source view.

Returns:
True to generate an ItemDifference for every matched pair of source and target items; false to generate an ItemDifference only when a true difference is detected.
See Also:
Session#addScope

getTransactionsEnabled

public boolean getTransactionsEnabled()
Determines whether or not commit operations are executed within an atomic transaction, if supported by the StarTeam server.

Returns:
true if commit operations are executed within an atomic transaction; false otherwise. Transactions are disabled by default.
See Also:
SupportedFeatures.hasMultiCommandTransactions()

setTransactionsEnabled

public void setTransactionsEnabled(boolean bEnabled)
Determines whether or not commit operations are executed within an atomic transaction, if supported by the StarTeam server.

Parameters:
bEnabled - true if commit operations are executed within an atomic transaction; false otherwise. Transactions are disabled by default.
See Also:
SupportedFeatures.hasMultiCommandTransactions()

getVerboseProcessLinks

public boolean getVerboseProcessLinks()
Determines whether or not a commit operation should create process links for all file and folder operations that add or modify target items.

Returns:
true if commit operations should create process links for all file and folder operations that add or modify target items; false if process links are created only for file checkins (which is consistent with the rest of StarTeam). Verbose process links are enabled by default.

setVerboseProcessLinks

public void setVerboseProcessLinks(boolean bEnabled)
Determines whether or not a commit operation should create process links for all file and folder operations that add or modify target items.

Parameters:
bEnabled - true if commit operations should create process links for all file and folder operations that add or modify target items; false if process links are created only for file checkins (which is consistent with the rest of StarTeam). Verbose process links are enabled by default.

getCheckTargetFoldersForFloatingShares

public boolean getCheckTargetFoldersForFloatingShares()
Determines whether or not VCM will check target folders for floating child shares, and fail if any are found.

Returns:
true if VCM will check target folders for floating child shares, and fail if any are found. Enabled by default.

setCheckTargetFoldersForFloatingShares

public void setCheckTargetFoldersForFloatingShares(boolean bEnabled)
Determines whether or not VCM will check target folders for floating child shares, and fail if any are found.

Parameters:
bEnabled - true if VCM will check target folders for floating child shares, and fail if any are found. Enabled by default.

getActionOverrides

public ActionOverride[] getActionOverrides()
An array of ActionOverride's, in the order in which they have been set

Returns:
ActionOverride[] An array of ActionOverride's, returned in the order in which they were entered

setDefaultAction

public void setDefaultAction(DifferenceType type,
                             MergeAction action)
Changes the default action in a given situation.

Note that there may be one and only one default action for a given DifferenceType

Parameters:
action - The new default action for the given DifferenceType, or null to restore the default action to the engine's default value.
See Also:
MergeAction

setDefaultAction

public void setDefaultAction(MatchState state,
                             MergeAction action)
Changes the default action in a given situation.

Note that if multiple calls to setDefaultAction() are made, the order is significant. If two overrides are both relevant to a given ItemDifference, the most recently specified one takes precedence.

Parameters:
state - The MatchState for which the default action is to be changed.
action - The new default action for the given MatchState, or null to restore the default action to the engine's default value.
See Also:
MergeAction

getProperty

public java.lang.String getProperty(java.lang.String key)
Searches for the property with the specified key in this property list.

Parameters:
key - String the key to search for
Returns:
String the stored property value for the specified key

setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)
Sets a value for the property identified by the specified key

Parameters:
key - String the key for which a value needs to be set
value - String the value to set
Returns:
Object he previous value of the specified key in this property list, or null if it did not have one.

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns an array of all the keys in this property list,

Returns:
String[] the array of all the keys in this property list


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