com.starteam
Class CheckinOptions

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

public final class CheckinOptions
extends java.lang.Object

Maintains the checkin options used by CheckinManager.

See Also:
CheckinManager

Nested Class Summary
static class CheckinOptions.WebCacheCheckinOptions
          Maintains the checkin options used by WebCacheCheckinManager.
 
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)
          Returns true if the specified Object identifies the same exact CheckinOptions.
 boolean getAttachNewLabelsOnly()
          Determines under what conditions the specified revision label should be attached to the new file revision on checkin.
 boolean getBreakLock()
          Returns true if another users lock will be broken during checkin
 File.CharacterSet getCharacterSet()
          Gets the Character Set to be used for this file.
 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.
 File.EOLFormat getEOLFormat()
          Gets the End-of-Line format to be used for this file.
 Encoding getFileEncoding()
          Returns the "File Encoding" option value.
 boolean getForceCheckin()
          Returns the "Force Checkin" option value.
 boolean getKeywordExpansionEnabled()
          Determine whether keyword expansion in text files is enabled.
 ViewMember.LockType getLockType()
          Return the type of lock to be used when checking in.
 boolean getMarkProcessItemComplete()
          Returns whether to mark the process item complete.
 boolean getMarkUnlockedFilesReadOnly()
          Returns the "Mark Unlocked Files ReadOnly" option value.
 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 checkin.
 Label getRevisionLabel()
          Returns the revision label to attach.
 boolean getUpdateStatus()
          Determine whether to update status information after a successful checkin.
 int hashCode()
          returns a unique hash for this instance
 boolean isFileSkipped()
          Returns whether to skip checking in files or the file associated with this CheckinOptions object.
 void setAttachNewLabelsOnly(boolean bNewLabelsOnly)
          Determines under what conditions the specified revision label should be attached to the new file revision on checkin.
 void setBreakLock(boolean breakLock)
          set to True to break another users lock during checkin
 void setCharacterSet(File.CharacterSet encoding)
          Sets the Character Set to be used for this file.
 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 setEOLFormat(File.EOLFormat format)
          Sets the End-of-Line format to be used for this file.
 void setFileEncoding(Encoding sEncoding)
          Sets the "File Encoding" option value.
 void setFileSkipped(boolean bFileSkipped)
          Sets whether to skip checking in 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(ViewMember.LockType lockType)
          Set the type of lock to be used when checking in.
 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 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 checkin.
 void setRevisionLabel(Label revisionLabel)
          Sets the revision label to attach.
 void setUpdateStatus(boolean bEnabled)
          Set whether to update status information after a successful checkin.
 java.lang.String toString()
          returns a String representation of this object for debugging
 
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. The following options are assigned values KeywordExpansionEnabled
See Also:
CheckinOptions.getKeywordExpansionEnabled(), MarkProcessItemComplete, CheckinOptions.getMarkProcessItemComplete(), AttachNewLabelsOnly, CheckinOptions.getAttachNewLabelsOnly(), FileEncoding, CheckinOptions.getFileEncoding(), CheckinOptions.setFileEncoding(Encoding), 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. LockType
See Also:
CheckinOptions.getLockType(), FileEncoding, CheckinOptions.getFileEncoding(), CheckinOptions.setFileEncoding(Encoding), 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(ViewMember.LockType lockType)
Set the type of lock to be used when checking in. Default is Item.LockType.UNCHANGED.

Parameters:
lockType - the type of lock to be used when checking in, one of the values supported by Item.LockType.
See Also:
ViewMember.LockType

getLockType

public ViewMember.LockType getLockType()
Return the type of lock to be used when checking in. Default is ViewMember.LockType.UNCHANGED.

Returns:
the type of lock to be used when checking in, one of the values supported by ViewMember.LockType.
See Also:
ViewMember.LockType

getBreakLock

public boolean getBreakLock()
Returns true if another users lock will be broken during checkin

Returns:
true if another users lock will be broken during checkin

setBreakLock

public void setBreakLock(boolean breakLock)
set to True to break another users lock during checkin

Parameters:
breakLock - set to True to break another users lock during checkin

getEOLFormat

public File.EOLFormat getEOLFormat()
Gets the End-of-Line format to be used for this file.

Default value is null, which leaves any previously specified End-of-Line format unchanged. If the End-of-Line format was not previously specified, the value will be inferred automatically from the file content. The End-of-Line format is ignored for binary files.

Returns:
the EOL Format to be used for this file
See Also:
File.getEOLFormat()

setCharacterSet

public void setCharacterSet(File.CharacterSet encoding)
Sets the Character Set to be used for this file.

Parameters:
encoding - The desired Character Set. Specifying null leaves any previously specified Character Set unchanged. If the Character Set was not previously specified, the value will be inferred automatically from the file content.
See Also:
File.setCharacterSet(com.starteam.File.CharacterSet)

getCharacterSet

public File.CharacterSet getCharacterSet()
Gets the Character Set to be used for this file.

Default value is null, which leaves any previously specified Character Set unchanged. If the Character Set was not previously specified, the value will be inferred automatically from the file content.

Returns:
the character set to be used for this file.
See Also:
File.getCharacterSet()

setEOLFormat

public void setEOLFormat(File.EOLFormat format)
Sets the End-of-Line format to be used for this file.

Parameters:
format - The desired End-of-Line format. Specifying null leaves any previously specified End-of-Line format unchanged. If the End-of-Line format was not previously specified, the value will be inferred automatically from the file content. The End-of-Line format is ignored for binary files.
See Also:
File.setEOLFormat(com.starteam.File.EOLFormat)

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.

setUpdateStatus

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

Parameters:
bEnabled - True to update status information after a successful checkin; 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.

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.

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.

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 Encoding 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(Encoding sEncoding)
Sets the "File Encoding" option value.

Parameters:
sEncoding - the "File Encoding" option value.
See Also:
CheckinListener.startFile(com.starteam.events.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 in files or the file associated with this CheckinOptions object.

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

setFileSkipped

public void setFileSkipped(boolean bFileSkipped)
Sets whether to skip checking in 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 in files or the file associated with this CheckinOptions object.
See Also:
CheckinListener.startFile(com.starteam.events.CheckinEvent)

getUpdateStatus

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

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

setKeywordExpansionEnabled

public void setKeywordExpansionEnabled(boolean bEnabled)
Set to enable keyword expansion in text files. Default uses setting from the Project properties. Even if this property is set to true, keyword expansion for a specific file is determined by Project keyword property settings & the file extension.

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

getKeywordExpansionEnabled

public boolean getKeywordExpansionEnabled()
Determine 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:
ChangeRequests to mark fixed; an empty array, if none are specified.

setCRsToMarkFixed

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

Parameters:
changeRequests - the ChangeRequests to mark fixed.

getCheckinReason

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

Returns:
the "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:
true if "Delete Working File" option is set; false, otherwise.

equals

public boolean equals(java.lang.Object another)
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.

hashCode

public int hashCode()
returns a unique hash for this instance

Overrides:
hashCode in class java.lang.Object
Returns:
a unique hash for this instance

toString

public java.lang.String toString()
returns a String representation of this object for debugging

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object for debugging

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 checkin. 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 checkin; otherwise, false.

getRestoreFileOnError

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

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


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