Class SoapSecurityClient
java.lang.Object
com.logicaldoc.webservice.soap.client.SoapClient<SecurityService>
com.logicaldoc.webservice.soap.client.SoapSecurityClient
- All Implemented Interfaces:
SecurityService
Security Web Service client.
- Since:
- 7.5
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
changePassword
(String sid, long userId, String oldPassword, String newPassword) changes the password of a user.
0 if all is ok, 1 if the password is incorrect, 2 if the new password cannot be notified, otherwise a positive number grater than 2void
deleteGroup
(String sid, long groupId) Deletes an existing group with the given identifiervoid
deleteUser
(String sid, long userId) Deletes an existing user with the given identifierGets group metadata of an existing group with the given identifierGets user metadata of an existing user with the given identifiergetUserByUsername
(String sid, String username) Gets user metadata of an existing user with the given usernamelistGroups
(String sid) Gets group metadata of all existing groups.Gets metadata of all existing userslong
storeGroup
(String sid, WSGroup group) Creates/Updates a group.long
Creates/Updates a user.
-
Constructor Details
-
SoapSecurityClient
-
-
Method Details
-
listUsers
public List<WSUser> listUsers(String sid, String group) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:SecurityService
Gets metadata of all existing users- Specified by:
listUsers
in interfaceSecurityService
- Parameters:
sid
- identifier of the session, must be an administratorgroup
- name od the group- Returns:
- the list of users
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
listGroups
Description copied from interface:SecurityService
Gets group metadata of all existing groups.- Specified by:
listGroups
in interfaceSecurityService
- Parameters:
sid
- identifier of the session, must be an administrator- Returns:
- List of groups
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
storeUser
Description copied from interface:SecurityService
Creates/Updates a user. You can completely customize the user through a value object containing the user's metadata. The current user must be an administrator- Specified by:
storeUser
in interfaceSecurityService
- Parameters:
sid
- identifier of the session, must be an administratoruser
- Web service value object containing the user's metadata- Returns:
- the identifier of the created/updated user
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
storeGroup
Description copied from interface:SecurityService
Creates/Updates a group. You can completely customize the group through a value object containing the group's metadata.- Specified by:
storeGroup
in interfaceSecurityService
- Parameters:
sid
- Session identifier. Must be an administrator.group
- Web service value object containing the group's metadata- Returns:
- id of the created/updated group.
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
deleteUser
public void deleteUser(String sid, long userId) throws PermissionException, WebserviceException, PersistenceException Description copied from interface:SecurityService
Deletes an existing user with the given identifier- Specified by:
deleteUser
in interfaceSecurityService
- Parameters:
sid
- Session identifier. Must be an administratoruserId
- The user id- Throws:
PermissionException
- The user does not have the required permissionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
deleteGroup
public void deleteGroup(String sid, long groupId) throws PermissionException, PersistenceException, WebserviceException Description copied from interface:SecurityService
Deletes an existing group with the given identifier- Specified by:
deleteGroup
in interfaceSecurityService
- Parameters:
sid
- Session identifier. Must be an administratorgroupId
- The group id- Throws:
PermissionException
- The user does not have the required permissionPersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
changePassword
public int changePassword(String sid, long userId, String oldPassword, String newPassword) throws WebserviceException, PersistenceException Description copied from interface:SecurityService
changes the password of a user.
0 if all is ok, 1 if the password is incorrect, 2 if the new password cannot be notified, otherwise a positive number grater than 2- Specified by:
changePassword
in interfaceSecurityService
- Parameters:
sid
- identifier of the sessionuserId
- The user Identifier. Must be an administrator.oldPassword
- can be nullnewPassword
- the new password- Returns:
- 0 if all is ok, 1 if the password is incorrect, 2 if the new password cannot be notified, otherwise a positive number grater than 2
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getUser
Description copied from interface:SecurityService
Gets user metadata of an existing user with the given identifier- Specified by:
getUser
in interfaceSecurityService
- Parameters:
sid
- Session identifieruserId
- The user id- Returns:
- A value object containing the user's metadata
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getUserByUsername
public WSUser getUserByUsername(String sid, String username) throws WebserviceException, PersistenceException Description copied from interface:SecurityService
Gets user metadata of an existing user with the given username- Specified by:
getUserByUsername
in interfaceSecurityService
- Parameters:
sid
- Session identifierusername
- The user name- Returns:
- A value object containing the user's metadata
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getGroup
Description copied from interface:SecurityService
Gets group metadata of an existing group with the given identifier- Specified by:
getGroup
in interfaceSecurityService
- Parameters:
sid
- Session identifiergroupId
- The group id- Returns:
- A value object containing the group's metadata
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-