public class UserDelegator extends BaseDelegator implements IUserDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION| Constructor and Description |
|---|
UserDelegator(IOptionsServer server)
Instantiate a new UserDelegator, providing the server object that will be used to
execute Perforce Helix attribute commands.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createUser(IUser user,
boolean force)
Create a new Perforce user on the Perforce server.
|
String |
createUser(IUser user,
UpdateUserOptions opts)
Create a new Perforce user on the Perforce server.
|
String |
deleteUser(String userName,
boolean force)
Delete a named Perforce user from the Perforce server.
|
String |
deleteUser(String userName,
UpdateUserOptions opts)
Delete a named Perforce user from the Perforce server
|
IUser |
getUser(String userName)
Get the user details of a specific Perforce user from the Perforce
server.
|
String |
updateUser(IUser user,
boolean force)
Update a Perforce user on the Perforce server.
|
String |
updateUser(IUser user,
UpdateUserOptions opts)
Update a Perforce user on the Perforce server.
|
public UserDelegator(IOptionsServer server)
server - a concrete implementation of a Perforce Helix Serverpublic String createUser(@Nonnull IUser user, boolean force) throws ConnectionException, RequestException, AccessException
IUserDelegatorcreateUser in interface IUserDelegatoruser - non-null IUser defining the new user to be created.force - if true, force the creation of any named user; requires admin
privileges,ConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String createUser(@Nonnull IUser user, UpdateUserOptions opts) throws P4JavaException
IUserDelegatorcreateUser in interface IUserDelegatoruser - non-null IUser defining the new user to be created.opts - UpdateUserOptions object describing optional parameters; if
null, no options are setP4JavaException - if any error occurs in the processing of this method.public String updateUser(@Nonnull IUser user, boolean force) throws ConnectionException, RequestException, AccessException
IUserDelegatorupdateUser in interface IUserDelegatoruser - non-null IUser defining the user to be updatedforce - if true, force update for users other than the caller.
Requires super user / admin privileges (enforced by the
server).ConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String updateUser(@Nonnull IUser user, UpdateUserOptions opts) throws P4JavaException
IUserDelegatorupdateUser in interface IUserDelegatoruser - non-null IUser defining the new user to be updated.opts - UpdateUserOptions object describing optional parameters; if
null, no options are setP4JavaException - if any error occurs in the processing of this method.public String deleteUser(String userName, boolean force) throws ConnectionException, RequestException, AccessException
IUserDelegatordeleteUser in interface IUserDelegatoruserName - non-null name of the user to be deleted.force - if true, force deletion for users other than the caller.
Requires super user / admin privileges (enforced by the
server).ConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerpublic String deleteUser(String userName, UpdateUserOptions opts) throws P4JavaException
IUserDelegatordeleteUser in interface IUserDelegatoruserName - non-null name of the user to be deleted.opts - UpdateUserOptions object describing optional parameters; if
null, no options are setP4JavaException - if any error occurs in the processing of this method.public IUser getUser(String userName) throws ConnectionException, RequestException, AccessException
IUserDelegatorgetUser in interface IUserDelegatoruserName - if null, get the current user details, otherwise use the
passed-in user name.ConnectionException - if the Perforce server is unreachable or is not connected.RequestException - if the Perforce server encounters an error during its
processing of the requestAccessException - if the Perforce server denies access to the callerCopyright © 2017 Perforce Software. All Rights Reserved.