Class BoxUsersManager
java.lang.Object
org.apache.camel.component.box.api.BoxUsersManager
Provides operations to manage Box users.
-
Constructor Summary
ConstructorsConstructorDescriptionBoxUsersManager(com.box.sdk.BoxAPIConnection boxConnection) Create users manager to manage the users of Box connection's authenticated user. -
Method Summary
Modifier and TypeMethodDescriptioncom.box.sdk.EmailAliasaddUserEmailAlias(String userId, String email) Add a new email alias to user's account.com.box.sdk.BoxUsercreateAppUser(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.BoxUsercreateEnterpriseUser(String login, String name, com.box.sdk.CreateUserParams params) Provision a new user in an enterprise with additional user information.voiddeleteUser(String userId, boolean notifyUser, boolean force) Delete user from an enterprise account.voiddeleteUserEmailAlias(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.BoxUserGet current user.Collection<com.box.sdk.EmailAlias> getUserEmailAlias(String userId) Get a collection of all the email aliases for user.com.box.sdk.BoxUser.InfogetUserInfo(String userId) Get user information.com.box.sdk.BoxFolder.InfomoveFolderToUser(String userId, String sourceUserId) Move root folder for specified user to current user.com.box.sdk.BoxUserupdateUserInfo(String userId, com.box.sdk.BoxUser.Info info) Update user information.
-
Constructor Details
-
BoxUsersManager
public BoxUsersManager(com.box.sdk.BoxAPIConnection boxConnection) Create users manager to manage the users of Box connection's authenticated user.- Parameters:
boxConnection- - Box connection to authenticated user account.
-
-
Method Details
-
getCurrentUser
public com.box.sdk.BoxUser getCurrentUser()Get current user.- Returns:
- The current user.
-
getAllEnterpriseOrExternalUsers
public 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. For managed users it matches any users names or emails that start with the term. For external, it only does full match on email. This method is ideal to use in the case where you have a full email for a user and you don't know if they're managed or external.- Parameters:
filterTerm- - The filter term to lookup users by (login for external, login or name for managed); ifnullall managed users are returned.fields- - the fields to retrieve. Leave this out for the standard fields.- Returns:
- All the enterprise users or enterprise users that matches the filter.
-
createEnterpriseUser
public 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.- Parameters:
login- - the email address the user will use to login.name- - the name of the user.params- - additional user information.- Returns:
- All the enterprise users or enterprise users that matches the filter.
-
createAppUser
Provision a new app user in an enterprise with additional user information using Box Developer Edition.- Parameters:
name- - the name of the user.params- - additional user information.- Returns:
- All the enterprise users or enterprise users that matches the filter.
-
getUserInfo
Get user information.- Parameters:
userId- - the id of user.- Returns:
- The user information.
-
updateUserInfo
Update user information.- Parameters:
userId- - the id of user to update.info- - the updated information- Returns:
- The updated user.
-
deleteUser
Delete user from an enterprise account.- Parameters:
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.
-
addUserEmailAlias
Add a new email alias to user's account.- Parameters:
userId- - the id of user.email- - the email address to add as an alias.- Returns:
- The newly created email alias.
-
getUserEmailAlias
Get a collection of all the email aliases for user.- Parameters:
userId- - the id of user.- Returns:
- A collection of all the email aliases for user.
-
deleteUserEmailAlias
Delete an email alias from user's account.- Parameters:
userId- - the id of user.emailAliasId- - the id of the email alias to delete.
-
moveFolderToUser
Move root folder for specified user to current user.- Parameters:
userId- - the id of user.sourceUserId- - the user id of the user whose files will be the source for this operation.
-