public class BoxUsersManager extends Object
Provides operations to manage Box users.
Constructor and Description |
---|
BoxUsersManager(com.box.sdk.BoxAPIConnection boxConnection)
Create users manager to manage the users of Box connection's
authenticated user.
|
Modifier and Type | Method and Description |
---|---|
com.box.sdk.EmailAlias |
addUserEmailAlias(String userId,
String email)
Add a new email alias to user's account.
|
com.box.sdk.BoxUser |
createAppUser(String name,
com.box.sdk.CreateUserParams params)
Provision a new app user in an enterprise with additional user
information using Box Developer Edition.
|
com.box.sdk.BoxUser |
createEnterpriseUser(String login,
String name,
com.box.sdk.CreateUserParams params)
Provision a new user in an enterprise with additional user information.
|
void |
deleteUser(String userId,
boolean notifyUser,
boolean force)
Delete user from an enterprise account.
|
void |
deleteUserEmailAlias(String userId,
String emailAliasId)
Delete an email alias from user's account.
|
List<com.box.sdk.BoxUser.Info> |
getAllEnterpriseOrExternalUsers(String filterTerm,
String... fields)
Get any managed users that match the filter term as well as any external
users that match the filter term.
|
com.box.sdk.BoxUser |
getCurrentUser()
Get current user.
|
Collection<com.box.sdk.EmailAlias> |
getUserEmailAlias(String userId)
Get a collection of all the email aliases for user.
|
com.box.sdk.BoxUser.Info |
getUserInfo(String userId)
Get user information.
|
com.box.sdk.BoxFolder.Info |
moveFolderToUser(String userId,
String sourceUserId)
Move root folder for specified user to current user.
|
com.box.sdk.BoxUser |
updateUserInfo(String userId,
com.box.sdk.BoxUser.Info info)
Update user information.
|
public BoxUsersManager(com.box.sdk.BoxAPIConnection boxConnection)
boxConnection
- - Box connection to authenticated user account.public com.box.sdk.BoxUser getCurrentUser()
public List<com.box.sdk.BoxUser.Info> getAllEnterpriseOrExternalUsers(String filterTerm, String... fields)
filterTerm
- - The filter term to lookup users by (login for external,
login or name for managed); if null
all managed
users are returned.fields
- - the fields to retrieve. Leave this out for the standard
fields.public com.box.sdk.BoxUser createEnterpriseUser(String login, String name, com.box.sdk.CreateUserParams params)
login
- - the email address the user will use to login.name
- - the name of the user.params
- - additional user information.public com.box.sdk.BoxUser createAppUser(String name, com.box.sdk.CreateUserParams params)
name
- - the name of the user.params
- - additional user information.public com.box.sdk.BoxUser.Info getUserInfo(String userId)
userId
- - the id of user.public com.box.sdk.BoxUser updateUserInfo(String userId, com.box.sdk.BoxUser.Info info)
userId
- - the id of user to update.info
- - the updated informationpublic void deleteUser(String userId, boolean notifyUser, boolean force)
userId
- - the id of user to delete.notifyUser
- - whether or not to send an email notification to the user
that their account has been deleted.force
- - whether or not this user should be deleted even if they
still own files.public com.box.sdk.EmailAlias addUserEmailAlias(String userId, String email)
userId
- - the id of user.email
- - the email address to add as an alias.public Collection<com.box.sdk.EmailAlias> getUserEmailAlias(String userId)
userId
- - the id of user.public void deleteUserEmailAlias(String userId, String emailAliasId)
userId
- - the id of user.emailAliasId
- - the id of the email alias to delete.Apache Camel