public class UserManagement extends Object
rmi.userservice.enabled=true.UserManagement userManagement = new UserManagement.Config(connector).build();connector is an initialized and logged-on instance of the SaClassicConnector.| Modifier and Type | Class and Description |
|---|---|
static class |
UserManagement.Config
Configuration for the UserManagement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(int id,
String oldPassword,
String newPassword)
Changes the user's password.
|
<Type extends UserManagementItem> |
clone(Class<Type> type,
Type item,
int id) |
<Type extends UserManagementItem> |
create(Class<Type> type,
Type item)
Creates an Item.
|
String |
decrypt(String toDecrypt)
Decrypt a String in the context of the server and user.
|
<Type extends UserManagementItem> |
delete(Class<Type> type,
int id)
Deletes an Item.
|
String |
encrypt(String toEncrypt)
Encrypt a String in the context of the server and user.
|
<Type extends UserManagementItem> |
find(Class<Type> type)
Finds an item.
|
com.saperion.jcs.modules.authentication.api.AccessToken<String> |
generate(long expires,
TimeUnit unit,
Collection<String> additionalOptions)
Generates an AccessToken which can be used with the help of the
UsernameAccessTokenKey to login
into SAPERION. |
<Type extends UserManagementItem> |
getDescriptor(Class<Type> type) |
void |
setPassword(int userId,
String newPassword)
Sets a new password to the user with the given userId.
|
<Type extends UserManagementItem> |
update(Class<Type> type,
Type item)
Updates an Item.
|
public <Type extends UserManagementItem> Descriptor<Type> getDescriptor(Class<Type> type) throws AuthenticationException, BackendException
public <Type extends UserManagementItem> TypedFinder<Type> find(Class<Type> type)
type - type of the item to findpublic <Type extends UserManagementItem> Type create(Class<Type> type, Type item) throws AuthenticationException, BackendException
type - type of the item to createitem - the prototype of the item providing the initial attribute-values.AuthenticationExceptionBackendExceptionpublic <Type extends UserManagementItem> Type clone(Class<Type> type, Type item, int id) throws AuthenticationException, BackendException
public <Type extends UserManagementItem> void delete(Class<Type> type, int id) throws BackendException
type - type of the item to deleteid - the id of the itemBackendExceptionpublic <Type extends UserManagementItem> Type update(Class<Type> type, Type item) throws AuthenticationException, BackendException
type - type of the item to updateitem - the new values of the itemAuthenticationExceptionBackendExceptionpublic void changePassword(int id,
String oldPassword,
String newPassword)
throws AuthenticationException,
BackendException
oldPassword - newPassword - AuthenticationExceptionBackendException@Privileged public void setPassword(int userId, String newPassword) throws AuthenticationException, BackendException
userId - the id of the user to change the password of. Must be greater than zero.newPassword - the new password of the user. May not be null or empty.AuthenticationExceptionBackendExceptionpublic com.saperion.jcs.modules.authentication.api.AccessToken<String> generate(long expires, TimeUnit unit, Collection<String> additionalOptions) throws AuthenticationException, BackendException
UsernameAccessTokenKey to login
into SAPERION.expires - count of seconds if unit == TimeUnit.SECONDSunit - TimeUnitadditionalOptions - Values which will be encoded into the token, which must be passed with the loginRemoteExceptionAuthenticationExceptionBackendExceptionpublic String encrypt(String toEncrypt) throws BackendException
toEncrypt - the string which should be encryptedBackendException - if the string couldn't be encryptedpublic String decrypt(String toDecrypt) throws BackendException
toEncrypt - the encrypted string which should be decryptedBackendException - if the string couldn't be decryptedCopyright © 2016 SAPERION AG. All rights reserved.