Blue Mind
Release 1.0

net.bluemind.core.user
Class UserHome

java.lang.Object
  extended by net.bluemind.core.user.UserHome

public class UserHome
extends Object

SQL queries for user


Constructor Summary
UserHome()
           
 
Method Summary
 User createUser(AccessToken at, User u)
           
 ResultList<User> find(AccessToken at, UserQuery uq)
          Search users
 String findDomainNameById(int id)
           
 ResultList<User> findFromPattern(AccessToken at, UserQuery uq)
          Search users from patterns (autocomplete)
 ResultList<Group> getAllMyGroups(AccessToken token, int id)
           
 Set<String> getDomainUsersExtId(int domainId)
           
 String getEncryptPassword(AccessToken at, int id)
           
 ResultList<Group> getGroups(AccessToken at, int id)
           
static UserHome getInstance()
           
 ResultList<Group> getMyGroups(AccessToken token, int id)
           
 User getUserCredentialsFromId(AccessToken token, int id)
          Get user credentials from it ID
 String getUserExtIdFromLogin(String userLogin, int domainId)
           
 User getUserFromId(AccessToken token, int id)
          Get user from its ID
 User getUserFromId(Connection con, AccessToken token, int id)
           
 ResultList<User> getUserFromId(Connection con, AccessToken token, Set<Integer> ids)
          Get users from ID list without archived user
 ResultList<User> getUsersFromIds(AccessToken token, Set<Integer> ids)
           
 User removeUser(AccessToken at, User u)
           
 User updateUser(AccessToken at, User previous, User u)
          Update an User
 int updateUserPassword(AccessToken at, int userId, String password)
          Update an User password
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserHome

public UserHome()
Method Detail

getInstance

public static UserHome getInstance()
Returns:
the home instance

getUserFromId

public User getUserFromId(Connection con,
                          AccessToken token,
                          int id)
                   throws ServerFault
Throws:
ServerFault

getUserFromId

public User getUserFromId(AccessToken token,
                          int id)
                   throws ServerFault
Get user from its ID

Parameters:
AccessToken - token
int - id
Returns:
User the User with the given id if it is not archived
Throws:
ServerFault

getUsersFromIds

public ResultList<User> getUsersFromIds(AccessToken token,
                                        Set<Integer> ids)
                                 throws ServerFault
Throws:
ServerFault

getUserFromId

public ResultList<User> getUserFromId(Connection con,
                                      AccessToken token,
                                      Set<Integer> ids)
                               throws ServerFault
Get users from ID list without archived user

Parameters:
AccessToken - token
List - ids
Returns:
the User with the given id if it is not archived
Throws:
ServerFault

getUserCredentialsFromId

public User getUserCredentialsFromId(AccessToken token,
                                     int id)
                              throws ServerFault
Get user credentials from it ID

Parameters:
AccessToken - token
int - id
Returns:
User with credentials set
Throws:
ServerFault

getGroups

public ResultList<Group> getGroups(AccessToken at,
                                   int id)

find

public ResultList<User> find(AccessToken at,
                             UserQuery uq)
                      throws ServerFault
Search users

Parameters:
AccessToken - at
UserQuery - uq
Returns:
Throws:
ServerFault

findFromPattern

public ResultList<User> findFromPattern(AccessToken at,
                                        UserQuery uq)
                                 throws ServerFault
Search users from patterns (autocomplete)

Parameters:
AccessToken - at
UserQuery - uq
Returns:
Throws:
ServerFault

createUser

public User createUser(AccessToken at,
                       User u)
                throws ServerFault
Throws:
ServerFault

updateUser

public User updateUser(AccessToken at,
                       User previous,
                       User u)
                throws ServerFault
Update an User

Parameters:
u -
c -
Throws:
ServerFault

updateUserPassword

public int updateUserPassword(AccessToken at,
                              int userId,
                              String password)
                       throws ServerFault
Update an User password

Parameters:
int - userId
String - password
Throws:
ServerFault

removeUser

public User removeUser(AccessToken at,
                       User u)
                throws ServerFault
Parameters:
u -
Throws:
ServerFault

findDomainNameById

public String findDomainNameById(int id)

getEncryptPassword

public String getEncryptPassword(AccessToken at,
                                 int id)

getMyGroups

public ResultList<Group> getMyGroups(AccessToken token,
                                     int id)

getAllMyGroups

public ResultList<Group> getAllMyGroups(AccessToken token,
                                        int id)

getDomainUsersExtId

public Set<String> getDomainUsersExtId(int domainId)
                                throws ServerFault
Throws:
ServerFault

getUserExtIdFromLogin

public String getUserExtIdFromLogin(String userLogin,
                                    int domainId)
                             throws ServerFault
Throws:
ServerFault

Blue Mind
Release 1.0