com.stratelia.webactiv.beans.admin
Class UserManager

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.UserManager

public class UserManager
extends Object


Method Summary
 String addUser(DomainDriverManager ddManager, UserDetail userDetail, boolean addOnlyInSilverpeas)
          Add the given user in Silverpeas and specific domain
 String deleteUser(DomainDriverManager ddManager, UserDetail user, boolean onlyInSilverpeas)
          Delete the given user
static UserManager get()
           
 String[] getAllAdminIds(DomainDriverManager ddManager, UserDetail fromUser)
          Get all the admin Ids available in Silverpeas
 List<String> getAllUserIdsOfGroups(List<String> groupIds)
          Get the user ids that are in the group or one of his sub-groups
 List<UserDetail> getAllUsers()
          Get all users (except deleted ones) from all domains
 List<UserDetail> getAllUsersFromNewestToOldest()
          Get all users (except deleted ones) from all domains
 String[] getAllUsersIds(DomainDriverManager ddManager)
          Return all the user Ids available in Silverpeas
 UserDetail[] getAllUsersOfGroups(List<String> groupIds)
          Get the users that are in the group or one of his sub-groups
 List<String> getDomainsOfUser(String login)
          Get domains of a login.
 String[] getManageableSpaceIds(String sUserId, List<String> groupIds)
          Get space ids manageable by given user
 UserDetail getUserDetail(DomainDriverManager ddManager, String sUserId)
          Get the user corresponding to the given user Id (only infos in cache table)
 UserFull getUserFull(DomainDriverManager ddManager, String sUserId)
          Get the user corresponding to the given user Id (only infos in cache table)
 String getUserIdByLoginAndDomain(DomainDriverManager ddManager, String sLogin, String sDomainId)
          Get the Silverpeas user id of user qualified by given login and domain id
 String getUserIdBySpecificIdAndDomainId(DomainDriverManager ddManager, String sSpecificId, String sDomainId)
          Get the Silverpeas user specific id of user qualified by given login and domain id
 String[] getUserIdsOfDomain(DomainDriverManager ddManager, String sDomainId)
          Get the user ids of domain
 String[] getUserIdsOfDomainAndAccessLevel(DomainDriverManager ddManager, String sDomainId, UserAccessLevel accessLevel)
           
 int getUserNumber(DomainDriverManager ddManager)
           
 ListSlice<UserDetail> getUsersMatchingCriteria(UserSearchCriteriaForDAO criteria)
          Gets the users that match the specified criteria.
 int getUsersNumberOfDomain(DomainDriverManager ddManager, String domainId)
           
 UserDetail[] getUsersOfDomain(DomainDriverManager ddManager, String sDomainId)
          Get the users of domain
 List<UserDetail> getUsersOfDomains(List<String> domainIds)
          Get all users (except deleted ones) from specified domains
 List<UserDetail> getUsersOfDomainsFromNewestToOldest(List<String> domainIds)
          Get all users (except deleted ones) from specified domains
 boolean isEmailExisting(DomainDriverManager ddManager, String email)
          Checks if an existing user already have the given email
 void migrateUser(DomainDriverManager ddManager, UserDetail userDetail, String targetDomainId)
           
 UserDetail[] searchUsers(DomainDriverManager ddManager, UserDetail modelUser, boolean isAnd)
           
 String[] searchUsersIds(DomainDriverManager ddManager, List<String> userIds, UserDetail modelUser)
           
 String updateUser(DomainDriverManager ddManager, UserDetail user)
          Update the given user (only in silverpeas)
 String updateUserFull(DomainDriverManager ddManager, UserFull userFull)
          Update the given user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static UserManager get()

getDomainsOfUser

public List<String> getDomainsOfUser(String login)
                              throws AdminException
Get domains of a login.

Parameters:
login - the login whose domains we want.
Returns:
the list of domain ids where the specified login exists.
Throws:
AdminException

getUsersNumberOfDomain

public int getUsersNumberOfDomain(DomainDriverManager ddManager,
                                  String domainId)
                           throws AdminException
Throws:
AdminException

getUserNumber

public int getUserNumber(DomainDriverManager ddManager)
                  throws AdminException
Throws:
AdminException

getAllUsersOfGroups

public UserDetail[] getAllUsersOfGroups(List<String> groupIds)
                                 throws AdminException
Get the users that are in the group or one of his sub-groups

Parameters:
groupIds -
Returns:
Throws:
AdminException

getUsersMatchingCriteria

public ListSlice<UserDetail> getUsersMatchingCriteria(UserSearchCriteriaForDAO criteria)
                                               throws AdminException
Gets the users that match the specified criteria.

Parameters:
criteria - the criteria in searching of user details.
Returns:
a slice of the list of user details matching the criteria or an empty list of no ones are found.
Throws:
AdminException - if an error occurs while getting the user details.

getAllUserIdsOfGroups

public List<String> getAllUserIdsOfGroups(List<String> groupIds)
                                   throws AdminException
Get the user ids that are in the group or one of his sub-groups

Parameters:
groupIds -
Returns:
Throws:
AdminException

getUsersOfDomain

public UserDetail[] getUsersOfDomain(DomainDriverManager ddManager,
                                     String sDomainId)
                              throws AdminException
Get the users of domain

Parameters:
ddManager -
sDomainId -
Returns:
Throws:
AdminException

getUserIdsOfDomain

public String[] getUserIdsOfDomain(DomainDriverManager ddManager,
                                   String sDomainId)
                            throws AdminException
Get the user ids of domain

Parameters:
ddManager -
sDomainId -
Returns:
Throws:
AdminException

getUserIdsOfDomainAndAccessLevel

public String[] getUserIdsOfDomainAndAccessLevel(DomainDriverManager ddManager,
                                                 String sDomainId,
                                                 UserAccessLevel accessLevel)
                                          throws AdminException
Throws:
AdminException

getManageableSpaceIds

public String[] getManageableSpaceIds(String sUserId,
                                      List<String> groupIds)
                               throws AdminException
Get space ids manageable by given user

Parameters:
sUserId -
groupIds -
Returns:
Throws:
AdminException

getAllUsersIds

public String[] getAllUsersIds(DomainDriverManager ddManager)
                        throws AdminException
Return all the user Ids available in Silverpeas

Parameters:
ddManager -
Returns:
Throws:
AdminException

getAllAdminIds

public String[] getAllAdminIds(DomainDriverManager ddManager,
                               UserDetail fromUser)
                        throws AdminException
Get all the admin Ids available in Silverpeas

Parameters:
ddManager -
fromUser -
Returns:
Throws:
AdminException

getUserFull

public UserFull getUserFull(DomainDriverManager ddManager,
                            String sUserId)
                     throws AdminException
Get the user corresponding to the given user Id (only infos in cache table)

Parameters:
ddManager -
sUserId -
Returns:
Throws:
AdminException

getUserDetail

public UserDetail getUserDetail(DomainDriverManager ddManager,
                                String sUserId)
                         throws AdminException
Get the user corresponding to the given user Id (only infos in cache table)

Parameters:
ddManager -
sUserId -
Returns:
Throws:
AdminException

getUserIdBySpecificIdAndDomainId

public String getUserIdBySpecificIdAndDomainId(DomainDriverManager ddManager,
                                               String sSpecificId,
                                               String sDomainId)
                                        throws AdminException
Get the Silverpeas user specific id of user qualified by given login and domain id

Parameters:
ddManager -
sSpecificId -
sDomainId -
Returns:
Throws:
AdminException

getUserIdByLoginAndDomain

public String getUserIdByLoginAndDomain(DomainDriverManager ddManager,
                                        String sLogin,
                                        String sDomainId)
                                 throws AdminException
Get the Silverpeas user id of user qualified by given login and domain id

Parameters:
ddManager -
sLogin -
sDomainId -
Returns:
Throws:
AdminException

searchUsers

public UserDetail[] searchUsers(DomainDriverManager ddManager,
                                UserDetail modelUser,
                                boolean isAnd)
                         throws AdminException
Throws:
AdminException

searchUsersIds

public String[] searchUsersIds(DomainDriverManager ddManager,
                               List<String> userIds,
                               UserDetail modelUser)
                        throws AdminException
Throws:
AdminException

migrateUser

public void migrateUser(DomainDriverManager ddManager,
                        UserDetail userDetail,
                        String targetDomainId)
                 throws AdminException
Throws:
AdminException

addUser

public String addUser(DomainDriverManager ddManager,
                      UserDetail userDetail,
                      boolean addOnlyInSilverpeas)
               throws AdminException
Add the given user in Silverpeas and specific domain

Parameters:
ddManager -
userDetail -
addOnlyInSilverpeas -
Returns:
Throws:
AdminException

deleteUser

public String deleteUser(DomainDriverManager ddManager,
                         UserDetail user,
                         boolean onlyInSilverpeas)
                  throws AdminException
Delete the given user

Parameters:
ddManager -
user -
onlyInSilverpeas -
Returns:
Throws:
AdminException

updateUser

public String updateUser(DomainDriverManager ddManager,
                         UserDetail user)
                  throws AdminException
Update the given user (only in silverpeas)

Parameters:
ddManager -
user -
Returns:
Throws:
AdminException

updateUserFull

public String updateUserFull(DomainDriverManager ddManager,
                             UserFull userFull)
                      throws AdminException
Update the given user

Parameters:
ddManager -
userFull -
Returns:
Throws:
AdminException

isEmailExisting

public boolean isEmailExisting(DomainDriverManager ddManager,
                               String email)
                        throws AdminException
Checks if an existing user already have the given email

Parameters:
email - email to check
Returns:
true if at least one user with given email is found
Throws:
AdminException

getAllUsers

public List<UserDetail> getAllUsers()
                             throws AdminException
Get all users (except deleted ones) from all domains

Returns:
a List of UserDetail sort by alphabetical order
Throws:
AdminException

getAllUsersFromNewestToOldest

public List<UserDetail> getAllUsersFromNewestToOldest()
                                               throws AdminException
Get all users (except deleted ones) from all domains

Returns:
a List of UserDetail sort by reverse creation order
Throws:
AdminException

getUsersOfDomains

public List<UserDetail> getUsersOfDomains(List<String> domainIds)
                                   throws AdminException
Get all users (except deleted ones) from specified domains

Returns:
a List of UserDetail sort by alphabetical order
Throws:
AdminException

getUsersOfDomainsFromNewestToOldest

public List<UserDetail> getUsersOfDomainsFromNewestToOldest(List<String> domainIds)
                                                     throws AdminException
Get all users (except deleted ones) from specified domains

Returns:
a List of UserDetail sort by reverse creation order
Throws:
AdminException


Copyright © 2016 Silverpeas. All Rights Reserved.