com.starbase.starteam
Class CheckoutEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.starbase.starteam.CheckoutEvent
All Implemented Interfaces:
java.io.Serializable

public class CheckoutEvent
extends java.util.EventObject

An event triggered whenever a file is checked out through CheckoutManager.

See Also:
CheckoutListener, CheckoutManager.addCheckoutListener(com.starbase.starteam.CheckoutListener), Serialized Form

Method Summary
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 CheckoutManager getCheckoutManager()
          Gets the CheckoutManager that triggered this CheckoutEvent.
 CheckOutResult getCheckoutResults()
          Gets details describing the result of this checkout.
 int getCheckoutThreadIndex()
          Get the index of this thread within the CheckoutManager's running thread list.
 long getCurrentBytesExpected()
          Gets the total number of bytes expected in this file.
 long getCurrentBytesSoFar()
          Get the number of bytes checked out so far for this file.
 File getCurrentFile()
          Gets the StarTeam File being checked out.
 java.io.File getCurrentWorkingFile()
          Gets the working file on disk where this file is being checked out to.
 java.lang.Throwable getError()
          The error that occurred during the checkout of this file.
 CheckoutOptions getOptions()
          Gets the checkout options that apply to the current file.
 CheckoutProgress getProgress()
          Gets a snapshot of the state of the current checkout operation, as of the time that this event was triggered.
 java.lang.Object getSource()
          The object on which the Event initially occurred.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isCanceled()
          Indicates whether or not the overall checkout operation has been canceled.
 boolean isFinished()
          Indicates whether or not the checkout operation for this file is finished.
 boolean isMPXCacheAgentThread()
          Indicates whether this thread is checking out files from the MPX File Cache Agent, or directly from the server.
 boolean isSuccessful()
          Indicates whether or not the checkout operation for this file has finished successfully.
 void setCurrentWorkingFile(java.io.File workingFile)
          Sets the working file on disk where this file is being checked out to.
 java.lang.String toString()
          Gets a short description of this Event.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCheckoutManager

public CheckoutManager getCheckoutManager()
Gets the CheckoutManager that triggered this CheckoutEvent.

Returns:
The CheckoutManager that triggered this CheckoutEvent.
See Also:
CheckoutManager

getProgress

public CheckoutProgress getProgress()
Gets a snapshot of the state of the current checkout operation, as of the time that this event was triggered.

Returns:
A snapshot of the state of the current checkout operation, as of the time that this event was triggered.
See Also:
CheckoutProgress, CheckoutManager.getProgress()

getOptions

public CheckoutOptions getOptions()
Gets the checkout options that apply to the current file.

To override any of the options for the current file, change them in the onStartFile event handler.

Returns:
The checkout options that apply to the current file.
See Also:
CheckoutOptions, CheckoutListener.onStartFile(com.starbase.starteam.CheckoutEvent)

getCheckoutThreadIndex

public int getCheckoutThreadIndex()
Get the index of this thread within the CheckoutManager's running thread list.

Returns:
The index of this thread within the CheckoutManager's running thread list.

isMPXCacheAgentThread

public boolean isMPXCacheAgentThread()
Indicates whether this thread is checking out files from the MPX File Cache Agent, or directly from the server.

Returns:
true if this thread is checking out files from the MPX File Cache Agent, and false if this thread is checking out directly from the StarTeam server.
See Also:
CheckoutManager.setMPXCacheAgentEnabled(boolean), CheckoutProgress.isMPXCacheAgentThread(int)

getCurrentFile

public File getCurrentFile()
Gets the StarTeam File being checked out.

Returns:
The StarTeam File being checked out.
See Also:
File

getCurrentWorkingFile

public java.io.File getCurrentWorkingFile()
Gets the working file on disk where this file is being checked out to.

Returns:
The working file on disk where this file is being checked out to, or null if this file is being checked out to a stream rather than a file.

setCurrentWorkingFile

public void setCurrentWorkingFile(java.io.File workingFile)
Sets the working file on disk where this file is being checked out to.

Parameters:
workingFile - The working file on disk where this file is being checked out to. The working file may be changed in the onStartFile event handler.
See Also:
CheckoutListener.onStartFile(com.starbase.starteam.CheckoutEvent)

getCurrentBytesExpected

public long getCurrentBytesExpected()
Gets the total number of bytes expected in this file.

Returns:
The total number of bytes expected in this file.
See Also:
CheckoutProgress.getCurrentBytesExpected(int), CheckoutEvent.getCurrentBytesSoFar()

getCurrentBytesSoFar

public long getCurrentBytesSoFar()
Get the number of bytes checked out so far for this file.

Returns:
The number of bytes checked out so far for this file.
See Also:
CheckoutProgress.getCurrentBytesSoFar(int), CheckoutEvent.getCurrentBytesExpected()

isFinished

public boolean isFinished()
Indicates whether or not the checkout operation for this file is finished.

Returns:
true if the checkout operation for this file is finished; false if it is still in progress. Note that the checkout may have finished, but unsuccessfully.
See Also:
CheckoutEvent.isSuccessful()

isCanceled

public boolean isCanceled()
Indicates whether or not the overall checkout operation has been canceled.

Returns:
true if the checkout operation has been canceled (for all remaining files), and false otherwise.

isSuccessful

public boolean isSuccessful()
Indicates whether or not the checkout operation for this file has finished successfully.

Returns:
true if the checkout operation for this file has finished successfully; false if the checkout is still in progress, or if it finished with an error.
See Also:
CheckoutEvent.isFinished(), CheckoutEvent.getError(), CheckoutEvent.getCheckoutResults()

getCheckoutResults

public CheckOutResult getCheckoutResults()
Gets details describing the result of this checkout.

Returns:
Details describing the result of this checkout, or null if the checkout of this file is still in progress or finished with an error.
See Also:
CheckOutResult, CheckoutEvent.isFinished(), CheckoutEvent.isSuccessful()

getError

public java.lang.Throwable getError()
The error that occurred during the checkout of this file.

Returns:
The error describing the reason for failure of this checkout, if the checkout finished with an error, or null otherwise.
See Also:
CheckoutEvent.isFinished(), CheckoutEvent.isSuccessful()

getSource

public java.lang.Object getSource()
The object on which the Event initially occurred.

Overrides:
getSource in class java.util.EventObject
Returns:
The object on which the Event initially occurred.

toString

public java.lang.String toString()
Gets a short description of this Event.

Overrides:
toString in class java.util.EventObject
Returns:
A short description of this Event.

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.