public interface Users
Interface representing a users model belonging to the users.xml file specified by the param (DOCUMENT_NAME.users) in service.ini of permission service. This interfaces provides methods to access, add and remove users.
Since:
3.1.170
  • Method Summary

    Modifier and Type
    Method
    Description
    addUser(String login, String password)
    Creates a new user with the given login and passwordand adds it to the list of users
    void
    Removes all users existing in this users model.
    @Nullable User
    Returns the user specified by the given login or null if no user exists with thegiven login.
    Returns an array of all existing users.
    Returns an iterator of all existing users.
    void
    Removes the given user from the list of users
    void
    Saves this users model to the belonging xml file
  • Method Details

    • getUsers

      User[] getUsers()
      Returns an array of all existing users.
      Since:
      3.1.170
    • iterator

      Iterator<User> iterator()
      Returns an iterator of all existing users.
      Since:
      3.1.170
    • getUserByLogin

      @Nullable @Nullable User getUserByLogin(String login)
      Returns the user specified by the given login or null if no user exists with thegiven login.
      Returns:
      the user with the given login or null
      Since:
      3.1.170
    • addUser

      User addUser(String login, String password)
      Creates a new user with the given login and passwordand adds it to the list of users
      Parameters:
      login - the login for the new user
      password - the password for the new user
      Returns:
      the created user
      Since:
      3.1.170
    • removeUser

      void removeUser(User user)
      Removes the given user from the list of users
      Since:
      3.1.170
      See Also:
    • clear

      void clear()
      Removes all users existing in this users model.
      Since:
      3.1.170
      See Also:
    • save

      void save() throws IOException
      Saves this users model to the belonging xml file
      Throws:
      IOException
      Since:
      3.1.170