Interface IUserRepository


  • public interface IUserRepository
    User repository to create, delete, find, query users of a security context (application)
    Since:
    8.0.3
    API:
    This is a public API.
    • Method Detail

      • create

        IUser create​(String userName)
        Creates a new user
        Parameters:
        userName - name of the user
        Returns:
        new created user
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • create

        IUser create​(String userName,
                     String password)
        Creates a new user
        Parameters:
        userName - name of the user
        password - the password of the user
        Returns:
        new created user
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • create

        IUser create​(NewUser newUser)
        Creates a new user
        Parameters:
        newUser - information about the new user
        Returns:
        new created user
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS UserCreate PERMISSION OR OWNS UserCreate@SYSTEM PERMISSION
      • delete

        void delete​(String userName)
        Deletes a well-known user
        Parameters:
        userName - The user name
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS UserDelete PERMISSION OR OWNS UserDelete@SYSTEM PERMISSION
      • findWithExternalLookup

        IUser findWithExternalLookup​(String userName)
        Find a user by its name. Does lookup the user in the external security system (e.g Active Directory) if the user is not yet synchronized.
        Parameters:
        userName - the name of the user to find
        Returns:
        user or null if no user with the name exists (also in the external security system if configured)
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.
        Security:
        SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
      • find

        IUser find​(String userName)
        Finds a user by its name. Does not lookup the user in the external security system (e.g Active Directory) if the user is not synchronized yet.
        Parameters:
        userName - the name of the user to find
        Returns:
        user or null if no user with the name exists or the user was not yet synchronized from the external security system
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.
        Security:
        SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
      • find

        IUser find​(long userId)
        Find a user by its identifier
        Parameters:
        userId - the identifier of the user
        Returns:
        the user or null if user is not found
        Throws:
        PersistencyException - if persistency access fails
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
        Security:
        SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
      • paged

        IPagedResult<IUser> paged()

        Gets a paged result with all users of this security context

        This method uses a default, system defined page size (1000) which does not harm memory and provides still good performance.

        Returns:
        paged result with all users
        See Also:
        paged(int), query(), IFluentQueryExecutor.resultsPaged()
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.
        Security:
        SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
      • paged

        IPagedResult<IUser> paged​(int pageSize)
        Gets a paged result with all users of this security context
        Parameters:
        pageSize - the maximum number of users loaded at once into memory On paged UI tables the number of objects you display on a single page.
        Returns:
        paged result with all users
        See Also:
        paged(int), query(), IFluentQueryExecutor.resultsPaged(int)
        API:
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.
        Security:
        SESSION OWNS UserReadAll PERMISSION OR OWNS UserReadAll@SYSTEM PERMISSION
      • query

        UserQuery query()
        Creates a new user query for this security context
        Returns:
        query
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • queryExecutor

        IUserQueryExecutor queryExecutor()

        Executor for user queries on this security context.

        A user query normally works without using this method. It is only required to use it for special use cases

        Returns:
        user query executor
        See Also:
        UserQuery, query()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • count

        long count()
        Count all users
        Returns:
        user count
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.