org.sakaiproject.component.legacy.user
Interface BaseUserDirectoryService.Storage

All Known Implementing Classes:
DbUserService.DbStorage, DbUserService.DbStorageOld
Enclosing interface:
BaseUserDirectoryService

protected static interface BaseUserDirectoryService.Storage

Storage


Method Summary
 void cancel(UserEdit user)
          Cancel the changes and release the lock.
 boolean check(String id)
          Check if a user by this id exists.
 void close()
          Close.
 void commit(UserEdit user)
          Commit the changes and release the lock.
 int count()
          Count all the users.
 int countSearch(String criteria)
          Count all the users with id or email, first or last name matching criteria.
 UserEdit edit(String id)
          Get a lock on the user with this id, or null if a lock cannot be gotten.
 Collection findUsersByEmail(String email)
          Get the users with this email, or return empty if none found.
 UserEdit get(String id)
          Get the user with this id, or null if not found.
 List getAll()
          Get all users.
 List getAll(int first, int last)
          Get all the users in record range.
 void open()
          Open.
 UserEdit put(String id)
          Add a new user with this id.
 void readProperties(UserEdit edit, ResourcePropertiesEdit props)
          Read properties from storage into the edit's properties.
 void remove(UserEdit user)
          Remove this user.
 List search(String criteria, int first, int last)
          Search for users with id or email, first or last name matching criteria, in range.
 

Method Detail

open

public void open()
Open.


close

public void close()
Close.


check

public boolean check(String id)
Check if a user by this id exists.

Parameters:
id - The user id.
Returns:
true if a user by this id exists, false if not.

get

public UserEdit get(String id)
Get the user with this id, or null if not found.

Parameters:
id - The user id.
Returns:
The user with this id, or null if not found.

findUsersByEmail

public Collection findUsersByEmail(String email)
Get the users with this email, or return empty if none found.

Returns:
The Collection (User) of users with this email, or an empty collection if none found.

getAll

public List getAll()
Get all users.

Returns:
The List (UserEdit) of all users.

getAll

public List getAll(int first,
                   int last)
Get all the users in record range.

Parameters:
first - The first record position to return.
last - The last record position to return.
Returns:
The List (BaseUserEdit) of all users.

count

public int count()
Count all the users.

Returns:
The count of all users.

search

public List search(String criteria,
                   int first,
                   int last)
Search for users with id or email, first or last name matching criteria, in range.

Parameters:
criteria - The search criteria.
first - The first record position to return.
last - The last record position to return.
Returns:
The List (BaseUserEdit) of all alias.

countSearch

public int countSearch(String criteria)
Count all the users with id or email, first or last name matching criteria.

Parameters:
criteria - The search criteria.
Returns:
The count of all aliases with id or target matching criteria.

put

public UserEdit put(String id)
Add a new user with this id.

Parameters:
id - The user id.
Returns:
The locked User object with this id, or null if the id is in use.

edit

public UserEdit edit(String id)
Get a lock on the user with this id, or null if a lock cannot be gotten.

Parameters:
id - The user id.
Returns:
The locked User with this id, or null if this records cannot be locked.

commit

public void commit(UserEdit user)
Commit the changes and release the lock.

Parameters:
user - The user to commit.

cancel

public void cancel(UserEdit user)
Cancel the changes and release the lock.

Parameters:
user - The user to commit.

remove

public void remove(UserEdit user)
Remove this user.

Parameters:
user - The user to remove.

readProperties

public void readProperties(UserEdit edit,
                           ResourcePropertiesEdit props)
Read properties from storage into the edit's properties.

Parameters:
edit - The user to read properties for.