public class SecurityClient extends AbstractClient<SecurityService> implements SecurityService
client, endpoint
Constructor and Description |
---|
SecurityClient(String endpoint) |
Modifier and Type | Method and Description |
---|---|
int |
changePassword(String sid,
long userId,
String oldPassword,
String newPassword)
Changes the password of a user
|
void |
deleteGroup(String sid,
long groupId)
Deletes an existing group with the given identifier.
|
void |
deleteUser(String sid,
long userId)
Deletes an existing user with the given identifier.
|
WSGroup |
getGroup(String sid,
long groupId)
Gets group metadata of an existing group with the given identifier.
|
WSUser |
getUser(String sid,
long userId)
Gets user metadata of an existing user with the given identifier.
|
WSUser |
getUserByUsername(String sid,
String username)
Gets user metadata of an existing user with the given username.
|
WSGroup[] |
listGroups(String sid)
Gets group metadata of all existing groups.
|
WSUser[] |
listUsers(String sid)
Gets metadata of all existing users.
|
long |
storeGroup(String sid,
WSGroup group)
Create/Update a group.
|
long |
storeUser(String sid,
WSUser user)
Create/Update a user.
|
configureSSL, configureTimeout, initClient
public SecurityClient(String endpoint) throws IOException
IOException
public WSUser[] listUsers(String sid) throws Exception
SecurityService
listUsers
in interface SecurityService
sid
- Session identifier. Must be an administrator.Exception
public WSGroup[] listGroups(String sid) throws Exception
SecurityService
listGroups
in interface SecurityService
sid
- Session identifier. Must be an administrator.Exception
public long storeUser(String sid, WSUser user) throws Exception
SecurityService
storeUser
in interface SecurityService
sid
- Session identifier. Must be an administrator.user
- Web service value object containing the user's metadataException
public long storeGroup(String sid, WSGroup group) throws Exception
SecurityService
storeGroup
in interface SecurityService
sid
- Session identifier. Must be an administrator.group
- Web service value object containing the group's metadataException
public void deleteUser(String sid, long userId) throws Exception
SecurityService
deleteUser
in interface SecurityService
sid
- Session identifier. Must be an administrator.userId
- The user idException
public void deleteGroup(String sid, long groupId) throws Exception
SecurityService
deleteGroup
in interface SecurityService
sid
- Session identifier. Must be an administrator.groupId
- The group idException
public int changePassword(String sid, long userId, String oldPassword, String newPassword) throws Exception
SecurityService
changePassword
in interface SecurityService
userId
- The user Identifier. Must be an administrator.oldPassword
- can be nullException
public WSUser getUser(String sid, long userId) throws Exception
SecurityService
getUser
in interface SecurityService
sid
- Session identifieruserId
- The user idException
public WSUser getUserByUsername(String sid, String username) throws Exception
SecurityService
getUserByUsername
in interface SecurityService
sid
- Session identifierusername
- The user nameException
public WSGroup getGroup(String sid, long groupId) throws Exception
SecurityService
getGroup
in interface SecurityService
sid
- Session identifiergroupId
- The group idException
Copyright © 2008-2014 Logical Objects. All Rights Reserved.