Class SoapSecurityService

    • Constructor Detail

      • SoapSecurityService

        public SoapSecurityService()
    • Method Detail

      • listUsers

        public WSUser[] listUsers​(String sid,
                                  String group)
                           throws Exception
        Description copied from interface: SecurityService
        Gets metadata of all existing users
        Specified by:
        listUsers in interface SecurityService
        Parameters:
        sid - identifier of the session, must be an administrator
        group - name od the group
        Returns:
        A value object containing the users metadata
        Throws:
        Exception - error in the server application
      • listGroups

        public WSGroup[] listGroups​(String sid)
                             throws Exception
        Description copied from interface: SecurityService
        Gets group metadata of all existing groups.
        Specified by:
        listGroups in interface SecurityService
        Parameters:
        sid - identifier of the session, must be an administrator
        Returns:
        A value object containing the groups metadata
        Throws:
        Exception - error in the server application
      • storeUser

        public long storeUser​(String sid,
                              WSUser user)
                       throws Exception
        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 interface SecurityService
        Parameters:
        sid - identifier of the session, must be an administrator
        user - Web service value object containing the user's metadata
        Returns:
        id of the created/updated user
        Throws:
        Exception - error in the server application
      • storeGroup

        public long storeGroup​(String sid,
                               WSGroup group)
                        throws Exception
        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 interface SecurityService
        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:
        Exception - error in the server application
      • deleteUser

        public void deleteUser​(String sid,
                               long userId)
                        throws Exception
        Description copied from interface: SecurityService
        Deletes an existing user with the given identifier
        Specified by:
        deleteUser in interface SecurityService
        Parameters:
        sid - Session identifier. Must be an administrator
        userId - The user id
        Throws:
        Exception - error in the server application
      • deleteGroup

        public void deleteGroup​(String sid,
                                long groupId)
                         throws Exception
        Description copied from interface: SecurityService
        Deletes an existing group with the given identifier
        Specified by:
        deleteGroup in interface SecurityService
        Parameters:
        sid - Session identifier. Must be an administrator
        groupId - The group id
        Throws:
        Exception - error in the server application
      • changePassword

        public int changePassword​(String sid,
                                  long userId,
                                  String oldPassword,
                                  String newPassword)
                           throws Exception
        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 interface SecurityService
        Parameters:
        sid - identifier of the session
        userId - The user Identifier. Must be an administrator.
        oldPassword - can be null
        newPassword - 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:
        Exception - error in the server application
      • getUser

        public WSUser getUser​(String sid,
                              long userId)
                       throws Exception
        Description copied from interface: SecurityService
        Gets user metadata of an existing user with the given identifier
        Specified by:
        getUser in interface SecurityService
        Parameters:
        sid - Session identifier
        userId - The user id
        Returns:
        A value object containing the user's metadata
        Throws:
        Exception - error in the server application
      • getUserByUsername

        public WSUser getUserByUsername​(String sid,
                                        String username)
                                 throws Exception
        Description copied from interface: SecurityService
        Gets user metadata of an existing user with the given username
        Specified by:
        getUserByUsername in interface SecurityService
        Parameters:
        sid - Session identifier
        username - The user name
        Returns:
        A value object containing the user's metadata
        Throws:
        Exception - error in the server application
      • getGroup

        public WSGroup getGroup​(String sid,
                                long groupId)
                         throws Exception
        Description copied from interface: SecurityService
        Gets group metadata of an existing group with the given identifier
        Specified by:
        getGroup in interface SecurityService
        Parameters:
        sid - Session identifier
        groupId - The group id
        Returns:
        A value object containing the group's metadata
        Throws:
        Exception - error in the server application