com.starbase.starteam
Class CheckoutManager

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

public class CheckoutManager
extends java.lang.Object

Provides a way to check out multiple files, applying a consistent set of options across all files.


Constructor Summary
CheckoutManager(View view)
          Deprecated. Use View.createCheckoutManager() instead.
CheckoutManager(View view, CheckoutManager checkoutManager)
          Deprecated.  
CheckoutManager(View view, CheckoutOptions options)
          Deprecated. Use View.createCheckoutManager(CheckoutOptions) instead.
 
Method Summary
 void addCheckoutListener(CheckoutListener listener)
          Adds a listener for checkout-related events.
 void checkout(File file)
          Checks out a single file to the default location.
 void checkout(Folder folder)
          Checks out all the files in the given folder.
 void checkout(Folder folder, int depth)
          Checks out all the files in the given folder, and in all subfolders to the given depth.
 void checkout(Item[] files)
          Checks out the given set of files.
 void checkout(ItemList files)
          Checks out the given set of files.
 void checkout(Items files)
          Checks out the given set of files.
 void checkoutTo(File file, java.io.File workingFile)
          Checks out a single file to an alternate location.
 void checkoutTo(File file, java.io.OutputStream stream)
          Checks out a single file to an output stream.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 java.lang.String getMPXCacheAgentAddress()
          Deprecated.  
 boolean getMPXCacheAgentEnabled()
          Deprecated.  
 int getMPXCacheAgentPort()
          Deprecated.  
 int getMPXCacheAgentThreadCount()
          Deprecated.  
 CheckoutOptions getOptions()
          Gets the checkout options currently in effect.
 CheckoutProgress getProgress()
          Gets a snapshot of the state of the current checkout operation.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isCanceled()
          Indicates whether or not pending checkout operations have been canceled.
 boolean isRunning()
          Determines whether or not there is currently a checkout operation in progress.
 void removeCheckoutListener(CheckoutListener listener)
          Removes a listener for checkout-related events.
 void setCanceled()
          Cancels any pending checkout operations.
 void setMPXCacheAgentAddress(java.lang.String address)
          Deprecated.  
 void setMPXCacheAgentEnabled(boolean bEnabled)
          Deprecated.  
 void setMPXCacheAgentPort(int port)
          Deprecated.  
 void setMPXCacheAgentThreadCount(int nThreads)
          Deprecated.  
 void setOptions(CheckoutOptions checkoutOptions)
          Changes the checkout options currently in effect.
 java.lang.String toString()
          Gets a string representation of this CheckoutManager, useful for debugging.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckoutManager

public CheckoutManager(View view)
Deprecated. Use View.createCheckoutManager() instead.

Constructs a CheckoutManager with default options.

Parameters:
view - The View containing the files to be checked out.

CheckoutManager

public CheckoutManager(View view,
                       CheckoutOptions options)
Deprecated. Use View.createCheckoutManager(CheckoutOptions) instead.

Constructs a CheckoutManager using a specific set of options.

Note that individual options can be overridden on a file-by-file basis by registering a CheckoutListener, and changing options as necessary in the onStartFile event handler.

Parameters:
view - The View containing the files to be checked out.
options - The specific CheckoutOtions to be used.
See Also:
CheckoutOptions, CheckoutManager.addCheckoutListener(com.starbase.starteam.CheckoutListener), CheckoutListener.onStartFile(com.starbase.starteam.CheckoutEvent)

CheckoutManager

public CheckoutManager(View view,
                       CheckoutManager checkoutManager)
Deprecated.  

Constructs a CheckoutManager with the same options as the given one.

Parameters:
view - The View containing the files to be checked out.
checkoutManager - The CheckoutManager whose options are to be copied.
Method Detail

setMPXCacheAgentEnabled

public void setMPXCacheAgentEnabled(boolean bEnabled)
Deprecated.  

Enables or disables checkouts via the MPX cache agent. The cache agent is disabled by default.

Parameters:
bEnabled - True to enable checkouts via the MPX cache agent; false to force all checkouts to use the StarTeam server directly.
See Also:
Server.setMPXCacheAgentEnabled(boolean)

getMPXCacheAgentEnabled

public boolean getMPXCacheAgentEnabled()
Deprecated.  

Indicates whether or not checkouts via the MPX cache agent are enabled. The cache agent is disabled by default.

Returns:
True to enable checkouts via the MPX cache agent; false to force all checkouts to use the StarTeam server directly.
See Also:
CheckoutManager.getMPXCacheAgentAddress(), CheckoutManager.getMPXCacheAgentPort(), CheckoutManager.getMPXCacheAgentThreadCount(), Server.getMPXCacheAgentEnabled()

setMPXCacheAgentAddress

public void setMPXCacheAgentAddress(java.lang.String address)
Deprecated.  

Sets the host address of the MPX cache agent.

Parameters:
address - The host address of the MPX cache agent. Note that if checkouts via the MPX cache agent are enabled, but no host address is explicitly specified, then an attempt is made to automatically locate the nearest cache agent on the network.
See Also:
ServerInfo.setMPXCacheAgentAddress(String)

getMPXCacheAgentAddress

public java.lang.String getMPXCacheAgentAddress()
Deprecated.  

Gets the host address of the MPX cache agent.

Returns:
The host address of the MPX cache agent. Note that if checkouts via the MPX cache agent are enabled, but no host address is explicitly specified, then an attempt is made to automatically locate the nearest cache agent on the network.
See Also:
CheckoutManager.getMPXCacheAgentEnabled(), CheckoutManager.getMPXCacheAgentPort(), ServerInfo.getMPXCacheAgentAddress()

setMPXCacheAgentPort

public void setMPXCacheAgentPort(int port)
Deprecated.  

Sets the port number of the MPX cache agent.

Parameters:
port - The port number of the MPX cache agent. Note that if host address is specified but no port number is specified, then the default cache agent port is assumed.
See Also:
ServerInfo.setMPXCacheAgentPort(int)

getMPXCacheAgentPort

public int getMPXCacheAgentPort()
Deprecated.  

Gets the port number of the MPX cache agent.

Returns:
The port number of the MPX cache agent. Note that if host address is specified but no port number is specified, then the default cache agent port is assumed.
See Also:
CheckoutManager.getMPXCacheAgentEnabled(), CheckoutManager.getMPXCacheAgentAddress(), ServerInfo.getMPXCacheAgentPort()

setMPXCacheAgentThreadCount

public void setMPXCacheAgentThreadCount(int nThreads)
Deprecated.  

Sets the number of threads used by the MPX cache agent to fetch file content.

Parameters:
nThreads - The number of threads used by the MPX cache agent to fetch file content. The default value is 3.
See Also:
ServerInfo.setMPXCacheAgentThreadCount(int)

getMPXCacheAgentThreadCount

public int getMPXCacheAgentThreadCount()
Deprecated.  

Gets the number of threads used by the MPX cache agent to fetch file content.

Returns:
The number of threads used by the MPX cache agent to fetch file content. The default value is 3.
See Also:
CheckoutManager.getMPXCacheAgentEnabled(), ServerInfo.getMPXCacheAgentThreadCount()

setCanceled

public void setCanceled()
Cancels any pending checkout operations.

See Also:
CheckoutManager.isCanceled()

isCanceled

public boolean isCanceled()
Indicates whether or not pending checkout operations have been canceled.

Returns:
true if pending checkout operations have been canceled, and false otherwise.
See Also:
CheckoutManager.setCanceled()

checkout

public void checkout(File file)
Checks out a single file to the default location.

Parameters:
file - The file to be checked out.

checkoutTo

public void checkoutTo(File file,
                       java.io.File workingFile)
Checks out a single file to an alternate location.

Parameters:
file - The file to be checked out.
workingFile - The alternate working file.

checkoutTo

public void checkoutTo(File file,
                       java.io.OutputStream stream)
Checks out a single file to an output stream. No status update is performed in this case.

Parameters:
file - The file to be checked out.
stream - The stream to which the checked out content is written.

checkout

public void checkout(Items files)
Checks out the given set of files.

Parameters:
files - The files to be checked out.
See Also:
Items, ItemListManager.getItems(), ItemListManager.getItemsForFolder(com.starbase.starteam.Folder, boolean), ItemListManager.selectByLabel(com.starbase.starteam.Label), ItemListManager.selectByQuery(com.starbase.starteam.QueryInfo)

checkout

public void checkout(ItemList files)
Checks out the given set of files.

Parameters:
files - The files to be checked out.
See Also:
ItemList

checkout

public void checkout(Item[] files)
Checks out the given set of files.

Parameters:
files - The files to be checked out.
See Also:
Folder.getItems(java.lang.String)

checkout

public void checkout(Folder folder)
Checks out all the files in the given folder.

Parameters:
folder - The StarTeam folder whose files are to be checked out.
See Also:
Folder, CheckoutManager.checkout(Folder,int)

checkout

public void checkout(Folder folder,
                     int depth)
Checks out all the files in the given folder, and in all subfolders to the given depth.

Parameters:
folder - The StarTeam folder whose files are to be checked out.
depth - Indicates which subfolders also contain files to be checked out. Zero indicates that no subfolders should be included; 1 indicates that this folder and its immediate child folders should be included; -1 indicates that this folder and all child folders at any depth should be included.

isRunning

public boolean isRunning()
Determines whether or not there is currently a checkout operation in progress.

Returns:
true if there is currently a checkout operation in progress, and false otherwise.

addCheckoutListener

public void addCheckoutListener(CheckoutListener listener)
Adds a listener for checkout-related events.

Parameters:
listener - Application-specific event handler for checkout-related events.
See Also:
CheckoutListener, CheckoutEvent, CheckoutManager.removeCheckoutListener(com.starbase.starteam.CheckoutListener)

removeCheckoutListener

public void removeCheckoutListener(CheckoutListener listener)
Removes a listener for checkout-related events.

Parameters:
listener - A previously-registered event handler for checkout-related events.
See Also:
CheckoutManager.addCheckoutListener(com.starbase.starteam.CheckoutListener)

toString

public java.lang.String toString()
Gets a string representation of this CheckoutManager, useful for debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this CheckoutManager.

getOptions

public CheckoutOptions getOptions()
Gets the checkout options currently in effect.

Note that individual options can be overridden on a file-by-file basis by registering a CheckoutListener, and changing options as necessary in the onStartFile event handler.

Returns:
The checkout options currently in effect.
See Also:
CheckoutOptions, CheckoutManager.addCheckoutListener(com.starbase.starteam.CheckoutListener), CheckoutListener.onStartFile(com.starbase.starteam.CheckoutEvent)

setOptions

public void setOptions(CheckoutOptions checkoutOptions)
Changes the checkout options currently in effect.

Parameters:
checkoutOptions - The new checkout options.

getProgress

public CheckoutProgress getProgress()
Gets a snapshot of the state of the current checkout operation.

Returns:
A snapshot of the state of the current checkout operation.
See Also:
CheckoutProgress, CheckoutManager.isRunning(), CheckoutEvent.getProgress()

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.