de.espirit.firstspirit.service.permission.groups
Interface Users


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
 User addUser(String login, String password)
          Creates a new user with the given login and password and adds it to the list of users
 void clear()
          Removes all users existing in this users model.
 User getUserByLogin(String login)
          Returns the user specified by the given login or null if no user exists with the given login.
 User[] getUsers()
          Returns an array of all existing users.
 Iterator<User> iterator()
          Returns an iterator of all existing users.
 void removeUser(User user)
          Removes the given user from the list of users
 void save()
          Saves this users model to the belonging xml file
 

Method Detail

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
User getUserByLogin(String login)
Returns the user specified by the given login or null if no user exists with the given 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 password and 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:
Users.addUser(User), Users.getUsers()

clear

void clear()
Removes all users existing in this users model.

Since:
3.1.170
See Also:
Users.getUsers()

save

void save()
          throws IOException
Saves this users model to the belonging xml file

Throws:
IOException
Since:
3.1.170


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480