Package com.logicaldoc.webservice.soap
Interface SecurityService
- All Known Implementing Classes:
SoapSecurityClient
,SoapSecurityService
public interface SecurityService
Security Web Service definition interface
- Since:
- 6.1
- Author:
- Matteo Caruso - LogicalDOC
-
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 usernameWSGroup[]
listGroups
(String sid) Gets group metadata of all existing groups.WSUser[]
Gets metadata of all existing userslong
storeGroup
(String sid, WSGroup group) Creates/Updates a group.long
Creates/Updates a user.
-
Method Details
-
listUsers
WSUser[] listUsers(String sid, String group) throws AuthenticationException, WebserviceException, PersistenceException Gets metadata of all existing users- Parameters:
sid
- identifier of the session, must be an administratorgroup
- name od the group- Returns:
- A value object containing the users metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
listGroups
Gets group metadata of all existing groups.- Parameters:
sid
- identifier of the session, must be an administrator- Returns:
- A value object containing the groups metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
storeUser
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- 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:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
storeGroup
Creates/Updates a group. You can completely customize the group through a value object containing the group's metadata.- 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:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
deleteUser
void deleteUser(String sid, long userId) throws WebserviceException, PersistenceException, PermissionException Deletes an existing user with the given identifier- Parameters:
sid
- Session identifier. Must be an administratoruserId
- The user id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservicePermissionException
- The user does not have the required permission
-
deleteGroup
void deleteGroup(String sid, long groupId) throws PermissionException, PersistenceException, WebserviceException Deletes an existing group with the given identifier- Parameters:
sid
- Session identifier. Must be an administratorgroupId
- The group id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservicePermissionException
- The user does not have the required permission
-
changePassword
int changePassword(String sid, long userId, String oldPassword, String newPassword) throws WebserviceException, PersistenceException 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- 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:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
getUser
Gets user metadata of an existing user with the given identifier- Parameters:
sid
- Session identifieruserId
- The user id- Returns:
- A value object containing the user's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
getUserByUsername
WSUser getUserByUsername(String sid, String username) throws WebserviceException, PersistenceException Gets user metadata of an existing user with the given username- Parameters:
sid
- Session identifierusername
- The user name- Returns:
- A value object containing the user's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
getGroup
Gets group metadata of an existing group with the given identifier- Parameters:
sid
- Session identifiergroupId
- The group id- Returns:
- A value object containing the group's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-