com.starteam.events
Class WebCacheCheckoutEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.starteam.events.WebCacheCheckoutEvent
All Implemented Interfaces:
java.io.Serializable

public final class WebCacheCheckoutEvent
extends java.util.EventObject

See Also:
Serialized Form

Method Summary
 CheckoutManager.WebCacheCheckoutManager getCheckoutManager()
          Gets the CheckoutManager that triggered this CheckoutEvent.
 File.CheckOutResult getCheckoutResult()
          Gets details describing the result of this checkout.
 File.WebCacheFile getCheckoutRevision()
          Gets the revision of the StarTeam File being checked out.
 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.
 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.
 java.lang.String getErrorMessage()
          The error message for the error that occurred during the checkout of this file.
 CheckoutOptions.WebCacheCheckoutOptions getOptions()
          Gets the checkout options that apply to the current file.
 File.WebCacheFile getOriginalRevision()
          Gets the StarTeam File that's used to resolve to the revision being checked out.
 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()
          Returns a String representation of this CheckoutEvent (useful for debugging).
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getCheckoutManager

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

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

getOptions

public CheckoutOptions.WebCacheCheckoutOptions 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.WebCacheCheckoutOptions, WebCacheCheckoutListener.startFile(com.starteam.events.WebCacheCheckoutEvent)

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.Progress.isMPXCacheAgentThread(int)

getOriginalRevision

public File.WebCacheFile getOriginalRevision()
Gets the StarTeam File that's used to resolve to the revision being checked out.

Returns:
The StarTeam File that's used to resolve to the revision being checked out.
See Also:
File.WebCacheFile, WebCacheCheckoutEvent.getCheckoutRevision()

getCheckoutRevision

public File.WebCacheFile getCheckoutRevision()
Gets the revision of the StarTeam File being checked out.

Returns:
The revision of the StarTeam File being checked out.
See Also:
File.WebCacheFile, WebCacheCheckoutEvent.getOriginalRevision()

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.startFile(com.starteam.events.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:
WebCacheCheckoutEvent.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:
WebCacheCheckoutEvent.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:
WebCacheCheckoutEvent.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:
WebCacheCheckoutEvent.isFinished(), WebCacheCheckoutEvent.getError(), WebCacheCheckoutEvent.getCheckoutResult()

getCheckoutResult

public File.CheckOutResult getCheckoutResult()
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:
File.CheckOutResult, WebCacheCheckoutEvent.isFinished(), WebCacheCheckoutEvent.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:
WebCacheCheckoutEvent.isFinished(), WebCacheCheckoutEvent.isSuccessful()

getErrorMessage

public java.lang.String getErrorMessage()
The error message for the error that occurred during the checkout of this file.

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

toString

public java.lang.String toString()
Returns a String representation of this CheckoutEvent (useful for debugging).

Overrides:
toString in class java.util.EventObject
Returns:
a String representation of this CheckoutEvent.


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