Interface UserManagerService
- All Superinterfaces:
TreeDBManager<AbstractUserManagerNode>
- All Known Implementing Classes:
UserManagerServiceImpl
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidchangePassword(String username, String oldPassword, String newPassword) voidchangePassword(User user, String oldPassword, String newPassword) Returns aCollectionof all existingGroupsReturns all users underneath the node.Returns aCollectionof all existingUsersgetDirectGroups(User user) Returns groups in which the user is a direct member.getGroupByName(String name) Finds aGroupby namegetGroups(Collection<Long> groupIds) getGroupsWithMember(Group group) getIndirectGroups(User user) Returns groups in which the user is an indirect member.getNodeById(long id) Searches for aAbstractUserManagerNodeby its idlongReturns the number of active users in the system, that is, not inhibited and not with accounts not expired.longlonggetOUs(Collection<Long> ids) getOUsByName(String name) Searches for aOrganisationalUnitby its namegetReferencedGroups(User user) Returns all groups in which the user is a direct or indirect member.getUserByMail(String mail) Finds aUserby emailgetUserByName(String name) Finds aUserby namegetUserOrNull(String username) getUsers(Collection<Long> ids) getUsers(Collection<Long> ids, boolean dereferenceGroups) ReturnsUserobjects for all given IDs (be they user or group)getUsersByMail(String email) merge(AbstractUserManagerNode node) Merge's the submittedAbstractUserManagerNodewith the representation in the databasevoidPersists the submittedAbstractUserManagerNodevoidRemoves the submittedAbstractUserManagerNodefrom the databasevoidsetPassword(User user, String newPassword) Sets theUsers passwordbooleanuserInFolk(User user, AbstractUserManagerNode folk) Tests whether the submittedUseris part of the folk.Methods inherited from interface net.datenwerke.treedb.service.treedb.TreeDBManager
allowsMultipleRoots, copy, forceRemove, getAllNodes, getBaseType, getChildrenWithName, getNodeByKey, getRoots, getVirtualRoots, isFolder, move, move, updateFlags
-
Field Details
-
MODULE_NAME
- See Also:
-
SECUREE_ID
- See Also:
-
-
Method Details
-
getUserByName
Finds aUserby name -
getUserOrNull
-
getUserByMail
Finds aUserby email- Returns:
- The corresponding
User
-
getGroupByName
Finds aGroupby name -
getOUsByName
Searches for aOrganisationalUnitby its name- Parameters:
name- The name of theOrganisationalUnit- Returns:
- The corresponding
OrganisationalUnit
-
getNodeById
Searches for aAbstractUserManagerNodeby its id- Specified by:
getNodeByIdin interfaceTreeDBManager<AbstractUserManagerNode>- Parameters:
id- The ID- Returns:
- The
AbstractUserManagerNodeidentified by the given ID
-
getAllUsers
Collection<User> getAllUsers()Returns aCollectionof all existingUsers- Returns:
- A
CollectionofUsers
-
getAllGroups
Collection<Group> getAllGroups()Returns aCollectionof all existingGroups- Returns:
- A
CollectionofGroups
-
getAllOUs
Collection<OrganisationalUnit> getAllOUs() -
setPassword
Sets theUsers password- Parameters:
user- TheUsernewPassword- The new password
-
changePassword
- Throws:
ExpectedException
-
changePassword
void changePassword(String username, String oldPassword, String newPassword) throws ExpectedException - Throws:
ExpectedException
-
persist
Persists the submittedAbstractUserManagerNode- Specified by:
persistin interfaceTreeDBManager<AbstractUserManagerNode>- Parameters:
node- TheAbstractUserManagerNode
-
merge
Merge's the submittedAbstractUserManagerNodewith the representation in the database- Specified by:
mergein interfaceTreeDBManager<AbstractUserManagerNode>- Parameters:
node- TheAbstractUserManagerNode
-
remove
Removes the submittedAbstractUserManagerNodefrom the database- Specified by:
removein interfaceTreeDBManager<AbstractUserManagerNode>- Parameters:
node-AbstractUserManagerNode
-
userInFolk
Tests whether the submittedUseris part of the folk.- Parameters:
user- TheUserto testfolk- TheAbstractUserManagerNode(the folk)- Returns:
- true if the
Useris part of folk; false otherwise
-
getUsers
- Parameters:
ids- ACollectionofLongs- Returns:
- A
SetofUsers
-
getOUs
-
getUsers
ReturnsUserobjects for all given IDs (be they user or group)- Parameters:
ids- ACollectionofLongs containing the IDsdereferenceGroups- Set to true if the result should contain groups- Returns:
- A
SetofUsers
-
getGroups
- Parameters:
groupIds- ACollectionofLongs- Returns:
- A
SetofGroups
-
getUsersByMail
-
getGroupsWithMember
-
getGroupsWithMember
-
getReferencedGroups
Returns all groups in which the user is a direct or indirect member.- Parameters:
user- the user to fetch all groups from
-
getAllTransitiveUsers
Returns all users underneath the node.- Parameters:
node-
-
getDirectGroups
Returns groups in which the user is a direct member.- Parameters:
user- the user to fetch direct groups from
-
getIndirectGroups
Returns groups in which the user is an indirect member.- Parameters:
user- the user to fetch indirect groups from
-
getNumberOfActiveUsers
long getNumberOfActiveUsers()Returns the number of active users in the system, that is, not inhibited and not with accounts not expired.- Returns:
-
getNumberOfInhibitedUsers
long getNumberOfInhibitedUsers() -
getNumberOfExpiredUsers
long getNumberOfExpiredUsers()
-