Interface UserDataWebService

  • All Known Implementing Classes:
    UserDataWebServiceImpl

    public interface UserDataWebService
    WebService interface that clients will access to gain information about users and related information.
    Version:
    2
    Author:
    Suneet Shah
    • Method Detail

      • getUserWithDependent

        UserResponse getUserWithDependent​(String id,
                                          UserCollection[] dependants)
        Get a user based on his internal ID
        Parameters:
        id - - the internal user ID of the user being requested
        dependants - - UserCollection collection to be returned. UserCollection.ALL for all, null for complete shallow object. Otherwise specify the exact collections you want to be returned.
        Returns:
        - a User object, or null if not found
      • suggestById

        UserResponse suggestById​(String id)
        Get a user from Elasticsearch. This does not hit the database, uses only elasticsearch
        Parameters:
        id - - the internal user ID of the user being requested
        Returns:
        - a UserResponse object, or null if not found
      • getUserByPrincipal

        User getUserByPrincipal​(String principal,
                                String managedSysId,
                                UserCollection[] dependants)
        Find a User based on his principal, security domain, and the managed system
        Parameters:
        principal - - the user's principal Login
        managedSysId - - the ID of the to which the principal belongs to
        dependants - - dependants to return. ALL for all, null for complete shallow object. Otherwise specify the exact collecitons you want returned.
        Returns:
        - a User object, or null if not found
      • removeUser

        Response removeUser​(String id)
        Delete a User from the database
        Parameters:
        id - - the ID of the user
        Returns:
        a Response Object, containing the result of this operation
      • suggest

        UserListResponse suggest​(UserSearchBean userSearchBean,
                                 int from,
                                 int size)
        Call to find users by various criteria. Unlike findBeans, this does not go to the database, and only queries elasticsearch.

        This should be used for autocompletes

        Parameters:
        userSearchBean - - UserSearchBean
        from - - where to start paging
        size - - how many results to return
        Returns:
        a UserListResponse of matched User objects
      • getAttribute

        UserAttribute getAttribute​(String id)
        Get a UserAttribute by the id
        Parameters:
        id - - the id of this UserAttribute
        Returns:
        a UserAttribute object, or null if not found
      • isSecretWordFilled

        Response isSecretWordFilled​(String userId)
        Checks if given user answered security question.
        Parameters:
        userId - - id of user to check
        Returns:
        - FAILURE status if userId is null or given user doesn't exist. - SUCCESS status if secretWord is not null
      • getAddressBeans

        List<Address> getAddressBeans​(AddressSearchBean sb,
                                      int from,
                                      int size)
        Find Address objects based on the incoming criteria
        Parameters:
        sb - - AddressSearchBean the search bean
        from - - from where to page
        size - - how many records to return
        Returns:
        List of Address.
      • addPhone

        Response addPhone​(Phone phone)
        Add a Phone to this User
        Parameters:
        phone - - the Phone record
        Returns:
        a Response Object, containing the result of this operation
      • validatePhone

        Response validatePhone​(Phone phone)
        Validate that a phone is valid.
        Parameters:
        phone -
        Returns:
        a Response Object, containing the result of this operation
      • findPhoneBeans

        List<Phone> findPhoneBeans​(PhoneSearchBean searchBean,
                                   int from,
                                   int size)
        Gets a paged List of Phones identified by the search bean
        Parameters:
        searchBean - - the search criteria
        size - - how many records to return
        from - - where to start
        Returns:
        a paged List of Phone records belonging to this user
      • getEmailAddressList

        List<EmailAddress> getEmailAddressList​(String userId)
        Get all EmailAddress records associated with a User
        Parameters:
        userId - - the user ID of interest
        Returns:
        a List of EmailAddress records belonging to this User
      • findEmailBeans

        List findEmailBeans​(EmailSearchBean searchBean,
                            int from,
                            int size)
        Gets a paged List of EmailAddress records associated with a User
        Parameters:
        searchBean - - search bean to use
        from - - where to start
        size - - how many records to fetch
        Returns:
        a paged List of EmailAddress records associated with the given Search Bean
      • findSupervisor

        Supervisor findSupervisor​(String superiorId,
                                  String subordinateId)
        gets a supervisor Object based on the Superior ID and Subordinate ID
        Parameters:
        superiorId - - the Superior ID
        subordinateId - - the Subordinate ID
        Returns:
        - the Supervisor object
      • getPrimarySupervisor

        Supervisor getPrimarySupervisor​(String employeeId)
        Returns the primary supervisor for this employee. Null if no primary is defined.
        Parameters:
        employeeId -
        Returns:
      • getSuperiors

        SupervisorListResponse getSuperiors​(String userId,
                                            UserCollection[] dependants,
                                            int from,
                                            int size)
        returns a paged List of Supervisors for this User
        Parameters:
        userId - - the User ID
        from - - where to start
        size - - how many objects to return
        Returns:
        a paged List of Supervisors for this User
      • getSubordinates

        UserListResponse getSubordinates​(String userId,
                                         UserCollection[] dependants,
                                         int from,
                                         int size,
                                         List<SortParam> sortList,
                                         UserSearchBean filterSearch)
        Gets a Paged List of User Objects, representing the subordinates of this userId
        Parameters:
        userId - - the User ID
        from - - where to start in the list
        size - - how many to return
        sortList - - for sort
        Returns:
        a Paged List of User Objects, representing the subordinates of this userId
      • getSubordinatesCount

        int getSubordinatesCount​(String userId)
        Gets the number of subordinates for this User
        Parameters:
        userId - - the User ID
        Returns:
        the number of subordinates for this User
      • findPotentialSupSubs

        UserListResponse findPotentialSupSubs​(PotentialSupSubSearchBean userSearchBean,
                                              int from,
                                              int size)
        Retrieves list of potential supervisor/subordinate users that match given search criteria.
        Parameters:
        userSearchBean - PotentialSupSubSearchBean used for search criteria.
        from - Index of first user to retrieve.
        size - Number of users to retrieve.
        Returns:
        List of users that match given criteria.
      • findPotentialSupSubsCount

        int findPotentialSupSubsCount​(PotentialSupSubSearchBean userSearchBean)
        Counts number of potential supervisor/subordinate users that match given count criteria.
        Parameters:
        userSearchBean - PotentialSupSubSearchBean bean used for count criteria.
        Returns:
        Number of users that match given criteria.
      • deleteUser

        Response deleteUser​(String userId)
        Deletes a user from the database by user id
        Parameters:
        userId - - the User ID
        Returns:
        a Response Object, containing the result of this operation
      • setSecondaryStatus

        Response setSecondaryStatus​(String userId,
                                    UserStatusEnum secondaryStatus)
        Sets the Secondary Status of the User
        Parameters:
        userId - - the ID of the User
        secondaryStatus - - the Secondary Status
        Returns:
        a Response Object, containing the result of this operation
      • getNumOfEmailsForUser

        int getNumOfEmailsForUser​(String userId)
        Gets the number of Emails for this user
        Parameters:
        userId - - the User ID
        Returns:
        the number of Emails for this user
      • getNumOfAddressesForUser

        int getNumOfAddressesForUser​(String userId)
        Gets the number of Addresses for this user
        Parameters:
        userId - - the User ID
        Returns:
        the number of Addresses for this user
      • getNumOfPhonesForUser

        int getNumOfPhonesForUser​(String userId)
        Gets the number of Phones for this User
        Parameters:
        userId - - the User ID
        Returns:
        the number of Phones for this User
      • saveUserProfile

        SaveTemplateProfileResponse saveUserProfile​(UserProfileRequestModel request)
        Saves a User Profile
        Parameters:
        request - - the User Profile to save
        Returns:
        a SaveTemplateProfileResponse, containing the results of this operation
      • getProfilePictureById

        ProfilePicture getProfilePictureById​(String picId)
        Returns Profile picture by it's ID
        Parameters:
        picId -
        Returns:
      • getProfilePictureByUserId

        ProfilePicture getProfilePictureByUserId​(String userId)
        Returns Profile picture for User by his ID
        Parameters:
        userId -
        Returns:
      • saveProfilePicture

        Response saveProfilePicture​(ProfilePicture pic)
        Saves Profile picture
        Parameters:
        pic -
        Returns:
      • deleteProfilePictureById

        Response deleteProfilePictureById​(String picId)
        Deletes Profile picture by it's ID
        Parameters:
        picId -
        Returns:
      • deleteProfilePictureByUserId

        Response deleteProfilePictureByUserId​(String userId)
        Deletes Profile picture for User by his ID
        Parameters:
        userId -
        Returns:
      • acceptITPolicy

        @Deprecated(since="4.2.2")
        Response acceptITPolicy​(String userId)
        Deprecated.
        Accept an IT policy
        Parameters:
        userId - - the User ID who has accepted the IT Policy
        Returns:
        a Response Object, containing the result of this operation
      • validateUserSearchRequest

        Response validateUserSearchRequest​(UserSearchBean userSearchBean)
        Validate user search request according to Delegation filter.
        Parameters:
        userSearchBean - - UserSearchBean that is represented user search request
        Returns:
        a Response Object, containing the result of this operation
      • getUserByLastDate

        @Deprecated(since="4.2.1.4")
        List<User> getUserByLastDate​(Date lastDate)
        Deprecated.
        As of 4.2.1.4 has fix in findBeans please use findBeans(UserSearchBean, UserCollection[], int, int) instead.
        Retrieves list of users that have last date before given last date.
        Parameters:
        lastDate - Last date used for search criteria.
        Returns:
        List of users that have last date before then last date.
      • getUserBetweenCreateDate

        @Deprecated
        List<User> getUserBetweenCreateDate​(Date fromDate,
                                            Date toDate)
        Deprecated.
        As of 4.2.1.4 has fix in findBeans please use findBeans(UserSearchBean, UserCollection[], int, int) instead.
        Retrieves list of users that has create date between form date and to date.
        Parameters:
        fromDate - From date.
        toDate - To date.
        Returns:
        List of users that has create date between form date and to date.
      • getAllSuperiors

        List<Supervisor> getAllSuperiors​(int from,
                                         int size)
        returns a paged List of all Supervisors in the system
        Parameters:
        from - - where to start
        size - - how many objects to return
        Returns:
        a paged List of all Supervisors in the system
      • getAllSuperiorsCount

        int getAllSuperiorsCount()
        Get the Number of all supervisors in the system
        Returns:
        the Number of all supervisors in the system
      • getUserBetweenStartDate

        @Deprecated(since="4.2.1.4")
        List<User> getUserBetweenStartDate​(Date fromDate,
                                           Date toDate)
        Deprecated.
        As of 4.2.1.4 has fix in findBeans please use
        Retrieves list of users whose startDate is between from date and to date.
        Parameters:
        fromDate - From date.
        toDate - To date.
        Returns:
        list of users whose startDate is between from date and to date.
      • findSupervisors

        List<Supervisor> findSupervisors​(SupervisorSearchBean supervisorSearchBean)
        Call to find supervisors by various criteria
        Parameters:
        supervisorSearchBean -
        Returns:
        a List Supervisor objects
      • getLastIndexDateTime

        Date getLastIndexDateTime​(String id)
        Checks if user with given id is indexed.
        Parameters:
        id - User id.
        Returns:
        True if user is indexed, otherwise false.
      • reindexUser

        Response reindexUser​(String id)
        Reindexes a user
        Parameters:
        id -
      • saveProvisionUser

        ProvisionUserResponse saveProvisionUser​(ProvisionUser provisionUser,
                                                UserCollection[] dependants)
        Saves ProvisionUser.
        Parameters:
        provisionUser - Provision user which will be saved.
        Returns:
        ProvisionUserResponse.
      • notifyAboutEmailDuplication

        void notifyAboutEmailDuplication​(String requestId,
                                         Set<String> emailAddresses)
      • getPossibleAttributeNames

        List<String> getPossibleAttributeNames()
        Method is used to return unique list of all possible attribute names
        Returns:
        ArrayList of String
      • getAllUserAttributeValues

        List<String> getAllUserAttributeValues​(String attributeName)
        Method is used to return list of all values of attribute selected by name
        Parameters:
        attributeName -
        Returns:
        ArrayList of String
      • isUserHasPicture

        BooleanResponse isUserHasPicture​(String userId)
        Method is used to define, does user has uploaded image or not.
        Parameters:
        userId - - id for current user, nullable
        Returns:
        - return BooleanResponse with value true (picture exists) and false (doesn't exists).
      • deleteOrphans

        Response deleteOrphans​(List<Orphan> orphans,
                               boolean deleteFromTarget)
        Method is used to delete list of orphans
        Parameters:
        deleteFromTarget - if true then delete object from source managed system
        Returns:
        Response
      • linkOrphans

        Response linkOrphans​(List<Orphan> orphans)
        Method is used to link user to selected list of orphans
        Parameters:
        orphans -
        Returns:
        Response
      • moveLoginToOrphan

        Response moveLoginToOrphan​(String loginId)
        Method is used to move selected user login to orphan
        Parameters:
        loginId -
        Returns:
      • getActiveUserSessionCount

        int getActiveUserSessionCount​(ActiveSessionRequest request,
                                      int from,
                                      int size)
        Method is used to get a count of user's active sessions.
        Parameters:
        request -
        from -
        size -
        Returns:
      • addResourceToUsers

        Response addResourceToUsers​(String resourceId,
                                    Set<String> rightIds,
                                    Set<String> userIds)
        This method is written only for testing purposes. Call this only from tests
        Parameters:
        resourceId -
        rightIds -
        userIds -
        Returns:
      • getUserMdTypeId

        String getUserMdTypeId​(String userId)
        Method is used to return user metadata type ID.
        Parameters:
        userId -
        Returns:
      • provisionMembershipOnStartDate

        Response provisionMembershipOnStartDate​(Date fromDate,
                                                Date toDate)
        method to provision based on the specified start date range of entitlements.
        Parameters:
        fromDate - The start date from which users should be provisioned.
        toDate - The start date until which users should be provisioned.
      • deProvisionMembershipOnEndDate

        Response deProvisionMembershipOnEndDate​(Date fromDate,
                                                Date toDate)
        method to deprovision based on the specified start date range of entitlements.
        Parameters:
        fromDate - The end date from which users should be deprovisioned.
        toDate - The end date until which users should be deprovisioned.
      • fetchUsersFromCSVFile

        UserListResponse fetchUsersFromCSVFile​(BulkPasswordResetConfig resetConfig)
        Fetches UserListResponse from a csv file based on the provided BulkPasswordResetConfig. This method retrieves a list of users by processing a csv file according to the configuration specified in the BulkPasswordResetConfig parameter. The configuration contains details about how to read and interpret the csv file. The method then returns a list of User objects representing the users extracted from the csv file.
        Parameters:
        resetConfig - The BulkPasswordResetConfig specifying the configuration for processing the csv file.
        Returns:
        A List of User objects representing the users extracted from the csv file.
      • userTypeConversion

        Response userTypeConversion​(UserTypeConversionModel conversionModel)
        Changes the user metadata type using the provided UserTypeConversionModel.
        Parameters:
        conversionModel - The UserTypeConversionModel containing information for the user type conversion.
        Returns:
        A Response representing the result of the user type change operation.