com.starbase.starteam
Class ImportUtility

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

public class ImportUtility
extends java.lang.Object

This class is used internally for the implementation of various import utilities. It is not intended for general use.


Constructor Summary
ImportUtility(Server server)
          Creates a new ImportUtility object for the specified server.
 
Method Summary
 void enableImportMode()
          Warning: This method is potentially very dangerous and should be used with extreme caution. Calling this method will put the server into a state in which the same server object can be used to perform operations for different users.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int hashCode()
          returns a unique hash for all instances of this type
 void setCommandTime(double time)
          Warning: This method is potentially very dangerous and should be used with extreme caution. Each command issued to a StarTeam Server can have an optional override time.
 void setCommandUserID(int userID)
          Warning: This method is potentially very dangerous and should be used with extreme caution. This can only be called when in import mode and is used to impersonate a user for subsequent commands.
 void switchUserContext(int userID)
          Warning: This method is potentially very dangerous and should be used with extreme caution. This can only be called when in import mode and is used to specify which user will be used for subsequent operations.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportUtility

public ImportUtility(Server server)
Creates a new ImportUtility object for the specified server.

Parameters:
server - the server object for which the import utilities will be used
Method Detail

setCommandTime

public void setCommandTime(double time)
Warning: This method is potentially very dangerous and should be used with extreme caution. Each command issued to a StarTeam Server can have an optional override time. The override time will be interpreted as the time at which the operation occured rather than the true current time. This is useful when implementing an import utility so that, for example, a revision of a file can be checked in to the repository and it will appear to have been checked in at some point in the past rather than at the time the import tool actually performed the checkin.

Once the value is set it will be used on all subsequent commands. To revert to using the current time this method should be called with a value of zero (0.0).

Parameters:
time - the time to use for subsequent commands

setCommandUserID

public void setCommandUserID(int userID)
Warning: This method is potentially very dangerous and should be used with extreme caution. This can only be called when in import mode and is used to impersonate a user for subsequent commands. Note that the command will be executed at the privilege level of the impersonated user

Parameters:
userID - the userID for which new actions will be performed.
See Also:
ImportUtility.enableImportMode()

enableImportMode

public void enableImportMode()
Warning: This method is potentially very dangerous and should be used with extreme caution. Calling this method will put the server into a state in which the same server object can be used to perform operations for different users. Once the server has been put into import mode it cannot be put out of that mode

See Also:
ImportUtility.switchUserContext(int)

switchUserContext

public void switchUserContext(int userID)
Warning: This method is potentially very dangerous and should be used with extreme caution. This can only be called when in import mode and is used to specify which user will be used for subsequent operations. Note that the user (to whose context the session is being switched) should already have been logged on

Parameters:
userID - the userID for which new actions will be performed.
See Also:
ImportUtility.enableImportMode()

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.