Package org.marketcetera.admin
Interface AdminClient
-
- All Superinterfaces:
AutoCloseable,BaseClient,Closeable
public interface AdminClient extends BaseClient
Provides access to admin services.- Since:
- $Release$
- Version:
- $Id$
- Author:
- Colin DuPlantis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeUserPassword(String inUsername, String inOldPassword, String inNewPassword)Change the password of the given user.PermissioncreatePermission(Permission inPermission)Create a permission with the given attributes.RolecreateRole(Role inRole)Create the given role.UsercreateUser(User inNewUser, String inPassword)Create the given user with the given password.voiddeactivateUser(String inName)Deactivate the user with the given name.voiddeletePermission(String inPermissionName)Delete the permission with the given name.voiddeleteRole(String inName)Delete the role with the given name.voiddeleteUser(String inUsername)Delete the given user.UsergetCurrentUser()Get the current user.Set<Permission>getPermissionsForCurrentUser()Get permissions for the current user.UserAttributegetUserAttribute(String inUsername, UserAttributeType inAttributeType)Get the user attribute for the given user and attribute type.List<Permission>readPermissions()Read permissions.CollectionPageResponse<Permission>readPermissions(PageRequest inPageRequest)Read a page of permissions.List<Role>readRoles()Read roles.CollectionPageResponse<Role>readRoles(PageRequest inPageRequest)Read a page or roles.List<User>readUsers()Get the list of users.CollectionPageResponse<User>readUsers(PageRequest inPageRequest)Get a list of users.voidresetPassword(String inUsername, String inNewPassword)Resets the password of the given user to the given value.voidsetUserAttribute(String inUsername, UserAttributeType inAttributeType, String inAttribute)Set the given user attribute for the given user and attribute type.PermissionupdatePermission(String inPermissionName, Permission inUpdatedPermission)Update the permission with the given name.RoleupdateRole(String inName, Role inRole)Update the given role with the given original name.UserupdateUser(String inUsername, User inUpdatedUser)Update the given user with the given current username.-
Methods inherited from interface org.marketcetera.core.BaseClient
addClientStatusListener, close, isRunning, removeClientStatusListener, start, stop
-
-
-
-
Method Detail
-
getPermissionsForCurrentUser
Set<Permission> getPermissionsForCurrentUser()
Get permissions for the current user.- Returns:
- a
Set<Permission>value
-
getCurrentUser
User getCurrentUser()
Get the current user.- Returns:
- a
Uservalue
-
readUsers
CollectionPageResponse<User> readUsers(PageRequest inPageRequest)
Get a list of users.- Parameters:
inPageRequest- aPageRequestvalue- Returns:
- a
CollectionPageResponse<User>value
-
createUser
User createUser(User inNewUser, String inPassword)
Create the given user with the given password.- Parameters:
inNewUser- aUservalueinPassword- aStringvalue- Returns:
- a
Uservalue
-
updateUser
User updateUser(String inUsername, User inUpdatedUser)
Update the given user with the given current username.- Parameters:
inUsername- aStringvalueinUpdatedUser- aUservalue- Returns:
- a
Uservalue
-
changeUserPassword
void changeUserPassword(String inUsername, String inOldPassword, String inNewPassword)
Change the password of the given user.Requires permissions to change the password of the current user.
- Parameters:
inUsername- aStringvalueinOldPassword- aStringvalueinNewPassword- aStringvalue
-
resetPassword
void resetPassword(String inUsername, String inNewPassword)
Resets the password of the given user to the given value.Requires admin reset password permissions.
- Parameters:
inUsername- aStringvalueinNewPassword- aStringvalue
-
deleteUser
void deleteUser(String inUsername)
Delete the given user.- Parameters:
inUsername- aStringvalue
-
deactivateUser
void deactivateUser(String inName)
Deactivate the user with the given name.- Parameters:
inName- aStringvalue
-
createPermission
Permission createPermission(Permission inPermission)
Create a permission with the given attributes.- Parameters:
inPermission- aPermissionvalue- Returns:
- a
Permissionvalue
-
readPermissions
List<Permission> readPermissions()
Read permissions.- Returns:
- a
List<Permission>value
-
readPermissions
CollectionPageResponse<Permission> readPermissions(PageRequest inPageRequest)
Read a page of permissions.- Parameters:
inPageRequest- aPageRequestvalue- Returns:
- a
CollectionPageResponse<Permission>value
-
updatePermission
Permission updatePermission(String inPermissionName, Permission inUpdatedPermission)
Update the permission with the given name.- Parameters:
inPermissionName- aStringvalueinUpdatedPermission- aPermissionvalue- Returns:
- a
Permissionvalue
-
deletePermission
void deletePermission(String inPermissionName)
Delete the permission with the given name.- Parameters:
inPermissionName- aStringvalue
-
createRole
Role createRole(Role inRole)
Create the given role.- Parameters:
inRole- aRolevalue- Returns:
- a
Rolevalue
-
readRoles
CollectionPageResponse<Role> readRoles(PageRequest inPageRequest)
Read a page or roles.- Parameters:
inPageRequest- aPageRequestvalue- Returns:
- a
CollectionPageResponse<Role>value
-
deleteRole
void deleteRole(String inName)
Delete the role with the given name.- Parameters:
inName- aStringvalue
-
updateRole
Role updateRole(String inName, Role inRole)
Update the given role with the given original name.- Parameters:
inName- aStringvalueinRole- aRolevalue- Returns:
- a
Rolevalue
-
getUserAttribute
UserAttribute getUserAttribute(String inUsername, UserAttributeType inAttributeType)
Get the user attribute for the given user and attribute type.- Parameters:
inUsername- aStringvalueinAttributeType- aUserAttributeTypevalue- Returns:
- a
UserAttributevalue ornull
-
setUserAttribute
void setUserAttribute(String inUsername, UserAttributeType inAttributeType, String inAttribute)
Set the given user attribute for the given user and attribute type.- Parameters:
inUsername- aStringvalueinAttributeType- aUserAttributeTypevalueinAttribute- aStringvalue ornullto remove the attribute
-
-