Class ReadOnlyPersonService

  • All Implemented Interfaces:
    PersonService

    public class ReadOnlyPersonService
    extends Object
    implements PersonService
    For use in the Velocity context.
    Since:
    8.8
    • Constructor Detail

      • ReadOnlyPersonService

        public ReadOnlyPersonService​(PersonService delegate)
    • Method Detail

      • find

        public PersonService.PersonFinder find​(Expansion... expansions)
        Description copied from interface: PersonService
        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()
         
         
        Specified by:
        find in interface PersonService
        Returns:
        a new PersonFinder
      • disable

        public void disable​(String username)
        Description copied from interface: PersonService
        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.
        Specified by:
        disable in interface PersonService
        Parameters:
        username - The username identifying the given user.
      • enable

        public void enable​(String username)
        Description copied from interface: PersonService
        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.
        Specified by:
        enable in interface PersonService
        Parameters:
        username - The username identifying the given user.
      • delete

        public LongTaskSubmission delete​(Person personToDelete)
        Description copied from interface: PersonService
        Delete the given person.

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

        Specified by:
        delete in interface PersonService
        Parameters:
        personToDelete - the person to delete
        Returns:
        a LongTaskSubmission describing the user deletion operation
      • search

        public PersonService.PersonSearcher search()
        Description copied from interface: PersonService
        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(..)
         
         
        Specified by:
        search in interface PersonService
        Returns:
        a new PersonSearcher
      • addMembership

        public void addMembership​(String username,
                                  String groupName)
        Description copied from interface: PersonService
        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.
        Specified by:
        addMembership in interface PersonService
        Parameters:
        username - The username identifying the given user.
        groupName - The group name identifying the given group.
      • removeMembership

        public void removeMembership​(String username,
                                     String groupName)
        Description copied from interface: PersonService
        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.
        Specified by:
        removeMembership in interface PersonService
        Parameters:
        username - The username identifying the given user.
        groupName - The group name identifying the given group.
      • changeUserPassword

        public void changeUserPassword​(String userName,
                                       String newPass)
        Description copied from interface: PersonService
        Change the password of the given user.
        Specified by:
        changeUserPassword in interface PersonService
        Parameters:
        userName - The userName identifying the given user.
        newPass - New Password