Interface PersonService

    • Method Detail

      • create

        UserKey create​(UserDetailsForCreation userDetailsForCreation)
        Create a new active user
        Parameters:
        userDetailsForCreation - User Details
        Returns:
        UserKey User Key
        Since:
        8.4.0
      • getCurrentUser

        Person getCurrentUser​(Expansion... expansions)
        Get the currently logged in user
        Since:
        5.9
      • find

        PersonService.PersonFinder find​(Expansion... expansions)
        Create a person finder to locate persons Restrictions can be applied to the finder using the appropriate withFoo() method

        For example:

         personService.find()
              .withKey("DEV")
              .fetchOne()
         
         
        Returns:
        a new PersonFinder
      • disable

        void disable​(String username)
        Disable the given User identified by username. This method is idempotent i.e. if the user is already disabled then no action will be taken.
        Parameters:
        username - The username identifying the given user.
        Since:
        8.2.0
      • enable

        void enable​(String username)
        Enable the given User identified by username. This method is idempotent i.e. if the user is already enabled then no action will be taken.
        Parameters:
        username - The username identifying the given user.
        Since:
        8.2.0
      • delete

        LongTaskSubmission delete​(Person personToDelete)
        Delete the given person.

        The deletion happens asynchronously so a LongTaskSubmission is returned, that can be used to track progress.

        Parameters:
        personToDelete - the person to delete
        Returns:
        a LongTaskSubmission describing the user deletion operation
        Since:
        6.13.0
      • search

        PersonService.PersonSearcher search()
        Create a person searcher to find people matching search criteria For given search category and/or criteria, return all People matching the supplied criteria.

        For example:

         personService.search()
              .forUnsyncedUsers("joe")
              .fetchMany(..)
         
         
        Returns:
        a new PersonSearcher
      • addMembership

        void addMembership​(String username,
                           String groupName)
        Add the given User identified by username to the given Group identified by groupName. This method is idempotent i.e. if the membership already exists then no action will be taken.
        Parameters:
        username - The username identifying the given user.
        groupName - The group name identifying the given group.
        Since:
        8.2.0
      • removeMembership

        void removeMembership​(String username,
                              String groupName)
        Remove the given User identified by username from the given Group identified by groupName. This method is idempotent i.e. if the membership is not present then no action will be taken.
        Parameters:
        username - The username identifying the given user.
        groupName - The group name identifying the given group.
        Since:
        8.2.0
      • changeUserPassword

        void changeUserPassword​(String userName,
                                String newPass)
        Change the password of the given user.
        Parameters:
        userName - The userName identifying the given user.
        newPass - New Password
        Since:
        8.4.0
      • changeMyPassword

        void changeMyPassword​(PasswordChangeDetails passwordChangeDetails)
        Change the password of the current user.
        Parameters:
        passwordChangeDetails - password change details
        Since:
        8.4.0