站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

UserModule - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.modules
Interface UserModule

All Known Implementing Classes:
UserModuleImpl

public interface UserModule


Method Summary
 User createUser(java.lang.String name, java.lang.String password, java.lang.String realEmail)
          Creates a new user with the specified name.
 User findUserById(java.lang.Object id)
          Retrieve a user by its id.
 User findUserById(java.lang.String id)
          Retrieve a user by its id.
 User findUserByUserName(java.lang.String userName)
          Retrieve a user by its name.
 java.util.Set findUsers(int offset, int limit)
          Get a range of users.
 java.util.Set findUsersFilteredByUserName(java.lang.String filter, int offset, int limit)
          Get a range of users.
 PreferencesGroup getPreferencesGroup(User user)
          Deprecated. this will be detached from the UserModule interfaces in next versions
 int getUserCount()
          Returns the number of users.
 void removeUser(java.lang.Object id)
          Remove a user.
 

Method Detail

findUserByUserName

public User findUserByUserName(java.lang.String userName)
                        throws java.lang.IllegalArgumentException,
                               ModuleException,
                               NoSuchUserException
Retrieve a user by its name.

Parameters:
userName - the user name
Returns:
the user
Throws:
java.lang.IllegalArgumentException
ModuleException
NoSuchUserException

findUserById

public User findUserById(java.lang.Object id)
                  throws java.lang.IllegalArgumentException,
                         ModuleException,
                         NoSuchUserException
Retrieve a user by its id.

Parameters:
id - the user id
Returns:
the user
Throws:
java.lang.IllegalArgumentException - if the id is null
ModuleException
NoSuchUserException

findUserById

public User findUserById(java.lang.String id)
                  throws java.lang.IllegalArgumentException,
                         ModuleException,
                         NoSuchUserException
Retrieve a user by its id.

Parameters:
id - the user id
Returns:
the user
Throws:
java.lang.IllegalArgumentException - if the id is null or not in the good format
ModuleException
NoSuchUserException

createUser

public User createUser(java.lang.String name,
                       java.lang.String password,
                       java.lang.String realEmail)
                throws java.lang.IllegalArgumentException,
                       ModuleException
Creates a new user with the specified name.

Parameters:
name - the user name
Returns:
the user
Throws:
java.lang.IllegalArgumentException
ModuleException

removeUser

public void removeUser(java.lang.Object id)
                throws java.lang.IllegalArgumentException,
                       ModuleException
Remove a user.

Parameters:
id - the user id
Throws:
java.lang.IllegalArgumentException
ModuleException

findUsers

public java.util.Set findUsers(int offset,
                               int limit)
                        throws java.lang.IllegalArgumentException,
                               ModuleException
Get a range of users.

Parameters:
offset - the offset of the first result to retrieve
limit - the maximum number of users to retrieve
Returns:
the user set
Throws:
java.lang.IllegalArgumentException
ModuleException

findUsersFilteredByUserName

public java.util.Set findUsersFilteredByUserName(java.lang.String filter,
                                                 int offset,
                                                 int limit)
                                          throws ModuleException
Get a range of users.

Parameters:
filter - a string filter applied to the user name.
offset - the offset of the frist result to retrieve
limit - the maximum number of users to retrieve
Returns:
the user set
Throws:
ModuleException

getUserCount

public int getUserCount()
                 throws java.lang.IllegalArgumentException,
                        ModuleException
Returns the number of users.

Returns:
the number of users
Throws:
java.lang.IllegalArgumentException
ModuleException

getPreferencesGroup

public PreferencesGroup getPreferencesGroup(User user)
Deprecated. this will be detached from the UserModule interfaces in next versions

Return the preferences group for the specified user.