|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.ImpersonateUser
public final class ImpersonateUser
Switch the server to execute in the context of an impersonated user Useful for applications like import utilities or web clients that service multiple users by switching context.
| Constructor Summary | |
|---|---|
ImpersonateUser(Server server)
Creates a new ImpersonateUser object for the specified server. |
|
| Method Summary | |
|---|---|
void |
enableImpersonation()
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. |
void |
setCommandTime(DateTime 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 |
setCommandUser(User user)
Warning: This method is potentially very dangerous and should be used with extreme caution. This can only be called when in impersonation mode and is used to impersonate a user for subsequent commands. |
void |
switchContext(User user)
Warning: This method is potentially very dangerous and should be used with extreme caution. This can only be called when in impersonation mode and is used to specify which user will be used for subsequent operations. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImpersonateUser(Server server)
server - the server object| Method Detail |
|---|
public void setCommandTime(DateTime time)
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 DateTime.CURRENT_SERVER_TIME.
time - the time to use for subsequent commandspublic void setCommandUser(User user)
user - the user on whose behalf new actions will be performed.ImpersonateUser.enableImpersonation()public void enableImpersonation()
ImpersonateUser.switchContext(User)public void switchContext(User user)
user - the user for whom new actions will be performed.ImpersonateUser.enableImpersonation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||