com.starbase.starteam
Class CheckinOptions

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

public class CheckinOptions
extends java.lang.Object

Maintains the checkout options used by CheckinManager.

See Also:
CheckinManager

Constructor Summary
CheckinOptions(CheckinOptions options)
          Construct a CheckinOptions object with the same options as the given one.
CheckinOptions(StarTeamClientOptions options)
          Construct a CheckinOptions object with default options from a StarTeamClientOptions object.
CheckinOptions(View view)
          Construct a CheckinOptions object with default options from the View.
 
Method Summary
 boolean equals(java.lang.Object another)
          ** DEBUGGING ONLY*** Returns true if the specified Object identifies the same exact CheckinOptions.
 boolean getAtomicCheckInDisabled()
          Returns the "Atomic Checkin Disabled" option value.
 boolean getAttachNewLabelsOnly()
          Determines under what conditions the specified revision label should be attached to the new file revision on checkin.
 java.lang.String getCheckinReason()
          Returns the "Checkin Reason" option value.
 ChangeRequest[] getCRsToMarkFixed()
          Returns the ChangeRequests to mark fixed.
 boolean getDeleteWorkingFile()
          Returns the "Delete Working File" option value.
 boolean getEOLConversionEnabled()
          Return whether EOL conversion is enabled when checking out text files.
 java.lang.String getFileEncoding()
          Returns the "File Encoding" option value.
 boolean getForceCheckin()
          Returns the "Force Checkin" option value.
 boolean getKeywordExpansionEnabled()
          Determin whether keyword expansion in text files is enabled.
 int getLockType()
          Return the type of lock to be used when checking out.
 boolean getMarkProcessItemComplete()
          Returns whether to mark the process item complete.
 boolean getMarkUnlockedFilesReadOnly()
          Returns the "Mark Unlocked Files ReadOnly" option value.
 boolean getMoveRevisionLabelIfAssigned()
          Deprecated.  
 Item getProcessItem()
          Returns the process item to link and pin.
 boolean getRestoreFileOnError()
          Determine whether to restore previous working file if an error occurs during a checkout.
 Label getRevisionLabel()
          Returns the revision label to attach.
 boolean getUpdateStatus()
          Determine whether to update status information after a successful checkout.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isFileSkipped()
          Returns whether to skip checking out files or the file associated with this CheckinOptions object.
 void setAtomicCheckInDisabled(boolean bAtomicCheckInDisabled)
          Sets the "Atomic Checkin Disabled" option value.
 void setAttachNewLabelsOnly(boolean bNewLabelsOnly)
          Determines under what conditions the specified revision label should be attached to the new file revision on checkin.
 void setCheckinReason(java.lang.String sCheckinReason)
          Sets the "Checkin Reason" option value.
 void setCRsToMarkFixed(ChangeRequest[] changeRequests)
          Sets the ChangeRequests to mark fixed.
 void setDeleteWorkingFile(boolean bEnabled)
          Sets the "Delete Working File" option value.
 void setEOLConversionEnabled(boolean bEnabled)
          Set to enable EOL conversion when checking out text files.
 void setFileEncoding(java.lang.String sEncoding)
          Sets the "File Encoding" option value.
 void setFileSkipped(boolean bFileSkipped)
          Sets whether to skip checking out files or the file associated with this CheckinOptions object.
 void setForceCheckin(boolean bEnabled)
          Sets the "Force Checkin" option value.
 void setKeywordExpansionEnabled(boolean bEnabled)
          Set to enable keyword expansion in text files.
 void setLockType(int lockType)
          Set the type of lock to be used when checking out.
 void setMarkProcessItemComplete(boolean bEnabled)
          Sets whether to mark the process item complete.
 void setMarkUnlockedFilesReadOnly(boolean bMarkUnlockedFilesReadOnly)
          Sets the "Mark Unlocked Files ReadOnly" option value.
 void setMoveRevisionLabelIfAssigned(boolean bEnabled)
          Deprecated.  
 void setProcessItem(Item processItem)
          Sets the process item to link and pin.
 void setRestoreFileOnError(boolean bEnabled)
          Set to restore previous working file if an error occurs during a checkout.
 void setRevisionLabel(Label revisionLabel)
          Sets the revision label to attach.
 void setUpdateStatus(boolean bEnabled)
          Set to whether to update status information after a successful checkout.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckinOptions

public CheckinOptions(View view)
Construct a CheckinOptions object with default options from the View.

Parameters:
view - a View object where the values of the options are picked up.
See Also:
CheckinManager.getOptions(), View

CheckinOptions

public CheckinOptions(StarTeamClientOptions options)
Construct a CheckinOptions object with default options from a StarTeamClientOptions object.

Parameters:
options - a StarTeamClientOptions where the values of the options are picked up.
See Also:
CheckinManager.getOptions(), StarTeamClientOptions.loadDefault()

CheckinOptions

public CheckinOptions(CheckinOptions options)
Construct a CheckinOptions object with the same options as the given one.

Parameters:
options - a CheckinOptions where the values of the options are picked up.
See Also:
CheckinManager.getOptions()
Method Detail

setLockType

public void setLockType(int lockType)
Set the type of lock to be used when checking out. Default is UNCHANGED. It may be one of these values: UNLOCKED, EXCLUSIVE, NONEXCLUSIVE, UNCHANGED, and BREAK_FLAG.

Parameters:
lockType - the type of lock to be used when checking out.
See Also:
Item.LockType

getLockType

public int getLockType()
Return the type of lock to be used when checking out. Default is UNCHANGED. It may be one of these values: UNLOCKED, EXCLUSIVE, NONEXCLUSIVE, UNCHANGED, and BREAK_FLAG.

Returns:
Return the type of lock to be used when checking out.

getMarkUnlockedFilesReadOnly

public boolean getMarkUnlockedFilesReadOnly()
Returns the "Mark Unlocked Files ReadOnly" option value.

Returns:
option value. Default if not defined: false

setMarkUnlockedFilesReadOnly

public void setMarkUnlockedFilesReadOnly(boolean bMarkUnlockedFilesReadOnly)
Sets the "Mark Unlocked Files ReadOnly" option value.

Parameters:
bMarkUnlockedFilesReadOnly - the "Mark Unlocked Files ReadOnly" option value.
See Also:
CheckoutListener.onStartFile(com.starbase.starteam.CheckoutEvent)

setEOLConversionEnabled

public void setEOLConversionEnabled(boolean bEnabled)
Set to enable EOL conversion when checking out text files. True to enable end-of-line conversion on text files. Default is true.

Parameters:
bEnabled - if true will enable EOL conversion.

getEOLConversionEnabled

public boolean getEOLConversionEnabled()
Return whether EOL conversion is enabled when checking out text files.

Returns:
Return true if EOL conversion is enabled; false, otherwise.

setUpdateStatus

public void setUpdateStatus(boolean bEnabled)
Set to whether to update status information after a successful checkout. Default is true.

Parameters:
bEnabled - True to update status information after a successful checkout; false, otherwise.

getMarkProcessItemComplete

public boolean getMarkProcessItemComplete()
Returns whether to mark the process item complete.

Returns:
true if the associated process item is to be marked complete; false, otherwise.

setMarkProcessItemComplete

public void setMarkProcessItemComplete(boolean bEnabled)
Sets whether to mark the process item complete.

Parameters:
bEnabled - True if the associated process item is to be marked complete; false, otherwise.
See Also:
CheckinListener.onStartFile(com.starbase.starteam.CheckinEvent)

getAttachNewLabelsOnly

public boolean getAttachNewLabelsOnly()
Determines under what conditions the specified revision label should be attached to the new file revision on checkin.

Returns:
true If the specified revision label is only attached to the new file revision if it is not already attached to an earlier revision; false (the default) if the label is moved to the new revision if it is already attached.

setAttachNewLabelsOnly

public void setAttachNewLabelsOnly(boolean bNewLabelsOnly)
Determines under what conditions the specified revision label should be attached to the new file revision on checkin.

Parameters:
bNewLabelsOnly - true If the specified revision label is only attached to the new file revision if it is not already attached to an earlier revision; false (the default) if a previously attached label is moved to the new revision.

getMoveRevisionLabelIfAssigned

public boolean getMoveRevisionLabelIfAssigned()
Deprecated.  

Returns whether to move the revision label if file already has one attached.

Returns:
true the revision label is to move if file already has one attached.; false, otherwise.
See Also:
CheckinOptions.getAttachNewLabelsOnly()

setMoveRevisionLabelIfAssigned

public void setMoveRevisionLabelIfAssigned(boolean bEnabled)
Deprecated.  

Sets whether to move the revision label if file already has one attached.

Parameters:
bEnabled - True if the revision label is to move if file already has one attached; false, otherwise.
See Also:
CheckinListener.onStartFile(com.starbase.starteam.CheckinEvent), CheckinOptions.setAttachNewLabelsOnly(boolean)

getProcessItem

public Item getProcessItem()
Returns the process item to link and pin.

Returns:
the process item to link and pin.

setProcessItem

public void setProcessItem(Item processItem)
Sets the process item to link and pin.

Parameters:
processItem - the process item to link and pin.
See Also:
CheckinListener.onStartFile(com.starbase.starteam.CheckinEvent)

getRevisionLabel

public Label getRevisionLabel()
Returns the revision label to attach.

Returns:
the revision label to attach.

setRevisionLabel

public void setRevisionLabel(Label revisionLabel)
Sets the revision label to attach.

Parameters:
revisionLabel - the revision label to attach.

getFileEncoding

public java.lang.String getFileEncoding()
Returns the "File Encoding" option value.

Returns:
the "File Encoding" option value. Default if not defined: the value of the system property "file.encoding"

setFileEncoding

public void setFileEncoding(java.lang.String sEncoding)
Sets the "File Encoding" option value.

Parameters:
sEncoding - the "File Encoding" option value.
See Also:
CheckinListener.onStartFile(com.starbase.starteam.CheckinEvent)

getForceCheckin

public boolean getForceCheckin()
Returns the "Force Checkin" option value.

Returns:
Returns true if "Force Checkin" option is set; false, otherwise.

setForceCheckin

public void setForceCheckin(boolean bEnabled)
Sets the "Force Checkin" option value.

Parameters:
bEnabled - if true will enable force checkin.

isFileSkipped

public boolean isFileSkipped()
Returns whether to skip checking out files or the file associated with this CheckinOptions object.

Returns:
whether to skip checking out files or the file associated with this CheckinOptions object.

setFileSkipped

public void setFileSkipped(boolean bFileSkipped)
Sets whether to skip checking out files or the file associated with this CheckinOptions object. Calling setFileSkipped(true) in the CheckinListener.onStartFile() event handler will cause CheckinManager to leave the working file for this file unchanged. Calling setFileSkipped() outside of the onStartFile() handler has no effect.

Parameters:
bFileSkipped - whether to skip checking out files or the file associated with this CheckinOptions object.
See Also:
CheckinListener.onStartFile(com.starbase.starteam.CheckinEvent)

getUpdateStatus

public boolean getUpdateStatus()
Determine whether to update status information after a successful checkout.

Returns:
Return true if status information is to be updated after a successful checkout.

setKeywordExpansionEnabled

public void setKeywordExpansionEnabled(boolean bEnabled)
Set to enable keyword expansion in text files. Default uses setting from the Project properties.

Parameters:
bEnabled - True to use keyword expand in text files; false, otherwise.

getKeywordExpansionEnabled

public boolean getKeywordExpansionEnabled()
Determin whether keyword expansion in text files is enabled.

Returns:
Return true if keyword expansion in text files is enabled; false, otherwise.

getCRsToMarkFixed

public ChangeRequest[] getCRsToMarkFixed()
Returns the ChangeRequests to mark fixed.

Returns:
Returns ChangeRequests to mark fixed; null, if none is specified.

setCRsToMarkFixed

public void setCRsToMarkFixed(ChangeRequest[] changeRequests)
Sets the ChangeRequests to mark fixed.

Parameters:
changeRequests - the ChangeRequests to mark fixed.

getAtomicCheckInDisabled

public boolean getAtomicCheckInDisabled()
Returns the "Atomic Checkin Disabled" option value. The default value is false, meaning the feature will not be disabled if it is available from the server. Note that this is not re-evaluated on a per-file basis.

Returns:
Returns the "Atomic Checkin Disabled" option value.

setAtomicCheckInDisabled

public void setAtomicCheckInDisabled(boolean bAtomicCheckInDisabled)
Sets the "Atomic Checkin Disabled" option value. Note that this is not re-evaluated on a per-file basis.

Parameters:
bAtomicCheckInDisabled - the "Atomic Checkin Disabled" option value.

getCheckinReason

public java.lang.String getCheckinReason()
Returns the "Checkin Reason" option value.

Returns:
Returnsthe "Checkin Reason" option value.

setCheckinReason

public void setCheckinReason(java.lang.String sCheckinReason)
Sets the "Checkin Reason" option value.

Parameters:
sCheckinReason - the "Checkin Reason" option value.

getDeleteWorkingFile

public boolean getDeleteWorkingFile()
Returns the "Delete Working File" option value.

Returns:
Returns true if "Delete Working File" option is set; false, otherwise.

equals

public boolean equals(java.lang.Object another)
** DEBUGGING ONLY*** Returns true if the specified Object identifies the same exact CheckinOptions.

Overrides:
equals in class java.lang.Object
Parameters:
another - the object to be compared to for equality
Returns:
true if the specified object identifies the same item as this.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setDeleteWorkingFile

public void setDeleteWorkingFile(boolean bEnabled)
Sets the "Delete Working File" option value.

Parameters:
bEnabled - if true will enable delete working file.

setRestoreFileOnError

public void setRestoreFileOnError(boolean bEnabled)
Set to restore previous working file if an error occurs during a checkout. If true, then file content is streamed to a temporary file, which requires more disk space. Default is true.

Parameters:
bEnabled - True if the previous working file should be restored if an error occurs during a checkout; otherwise, false.

getRestoreFileOnError

public boolean getRestoreFileOnError()
Determine whether to restore previous working file if an error occurs during a checkout.

Returns:
Return True if the previous working file should be restored if an error occurs during a checkout; otherwise, false.

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.