public interface UserManagerService extends TreeDBManager<AbstractUserManagerNode>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODULE_NAME |
static java.lang.String |
SECUREE_ID |
Modifier and Type | Method and Description |
---|---|
void |
changePassword(java.lang.String username,
java.lang.String oldPassword,
java.lang.String newPassword) |
void |
changePassword(User user,
java.lang.String oldPassword,
java.lang.String newPassword) |
java.util.Collection<Group> |
getAllGroups()
Returns a
Collection of all existing Group s |
java.util.Collection<OrganisationalUnit> |
getAllOUs() |
java.util.Set<User> |
getAllTransitiveUsers(AbstractUserManagerNode node)
Returns all users underneath the node.
|
java.util.Collection<User> |
getAllUsers()
Returns a
Collection of all existing User s |
java.util.Collection<Group> |
getDirectGroups(User user)
Returns groups in which the user is a direct member.
|
Group |
getGroupByName(java.lang.String name)
Finds a
Group by name |
java.util.Set<Group> |
getGroups(java.util.Collection<java.lang.Long> groupIds)
|
java.util.List<Group> |
getGroupsWithMember(Group group) |
java.util.List<Group> |
getGroupsWithMember(OrganisationalUnit ou) |
java.util.Collection<Group> |
getIndirectGroups(User user)
Returns groups in which the user is an indirect member.
|
AbstractUserManagerNode |
getNodeById(long id)
Searches for a
AbstractUserManagerNode by its id |
long |
getNumberOfActiveUsers()
Returns the number of active users in the system, that is, not inhibited and
not with accounts not expired.
|
long |
getNumberOfExpiredUsers() |
long |
getNumberOfInhibitedUsers() |
java.util.Set<OrganisationalUnit> |
getOUs(java.util.Collection<java.lang.Long> ids) |
java.util.List<OrganisationalUnit> |
getOUsByName(java.lang.String name)
Searches for a
OrganisationalUnit by its name |
java.util.Collection<Group> |
getReferencedGroups(User user)
Returns all groups in which the user is a direct or indirect member.
|
User |
getUserByMail(java.lang.String mail)
Finds a
User by email |
User |
getUserByName(java.lang.String name)
Finds a
User by name |
User |
getUserOrNull(java.lang.String username) |
java.util.Set<User> |
getUsers(java.util.Collection<java.lang.Long> ids)
|
java.util.Set<User> |
getUsers(java.util.Collection<java.lang.Long> ids,
boolean dereferenceGroups)
Returns
User objects for all given IDs (be they user or group) |
java.util.Collection<User> |
getUsersByMail(java.lang.String email) |
AbstractUserManagerNode |
merge(AbstractUserManagerNode node)
Merge's the submitted
AbstractUserManagerNode with the representation
in the database |
void |
persist(AbstractUserManagerNode node)
Persists the submitted
AbstractUserManagerNode |
void |
remove(AbstractUserManagerNode node)
Removes the submitted
AbstractUserManagerNode from the database |
void |
setPassword(User user,
java.lang.String newPassword)
Sets the
User s password |
boolean |
userInFolk(User user,
AbstractUserManagerNode folk)
Tests whether the submitted
User is part of the folk. |
allowsMultipleRoots, copy, forceRemove, getAllNodes, getBaseType, getChildrenWithName, getRoots, getVirtualRoots, isFolder, move, move, updateFlags
static final java.lang.String MODULE_NAME
static final java.lang.String SECUREE_ID
User getUserOrNull(java.lang.String username)
User getUserByMail(java.lang.String mail)
User
by emailUser
java.util.List<OrganisationalUnit> getOUsByName(java.lang.String name)
OrganisationalUnit
by its namename
- The name of the OrganisationalUnit
OrganisationalUnit
AbstractUserManagerNode getNodeById(long id)
AbstractUserManagerNode
by its idgetNodeById
in interface TreeDBManager<AbstractUserManagerNode>
id
- The IDAbstractUserManagerNode
identified by the given IDjava.util.Collection<User> getAllUsers()
Collection
of all existing User
sCollection
of User
sjava.util.Collection<Group> getAllGroups()
Collection
of all existing Group
sCollection
of Group
sjava.util.Collection<OrganisationalUnit> getAllOUs()
void setPassword(User user, java.lang.String newPassword)
User
s passworduser
- The User
newPassword
- The new passwordvoid changePassword(User user, java.lang.String oldPassword, java.lang.String newPassword) throws ExpectedException
ExpectedException
void changePassword(java.lang.String username, java.lang.String oldPassword, java.lang.String newPassword) throws ExpectedException
ExpectedException
void persist(AbstractUserManagerNode node)
AbstractUserManagerNode
persist
in interface TreeDBManager<AbstractUserManagerNode>
node
- The AbstractUserManagerNode
AbstractUserManagerNode merge(AbstractUserManagerNode node)
AbstractUserManagerNode
with the representation
in the databasemerge
in interface TreeDBManager<AbstractUserManagerNode>
node
- The AbstractUserManagerNode
void remove(AbstractUserManagerNode node)
AbstractUserManagerNode
from the databaseremove
in interface TreeDBManager<AbstractUserManagerNode>
node
- AbstractUserManagerNode
boolean userInFolk(User user, AbstractUserManagerNode folk)
User
is part of the folk.user
- The User
to testfolk
- The AbstractUserManagerNode
(the folk)User
is part of folk; false otherwisejava.util.Set<User> getUsers(java.util.Collection<java.lang.Long> ids)
ids
- A Collection
of Long
sSet
of User
sjava.util.Set<OrganisationalUnit> getOUs(java.util.Collection<java.lang.Long> ids)
java.util.Set<User> getUsers(java.util.Collection<java.lang.Long> ids, boolean dereferenceGroups)
User
objects for all given IDs (be they user or group)ids
- A Collection
of Long
s containing the
IDsdereferenceGroups
- Set to true if the result should contain
groupsSet
of User
sjava.util.Set<Group> getGroups(java.util.Collection<java.lang.Long> groupIds)
groupIds
- A Collection
of Long
sSet
of Group
sjava.util.Collection<User> getUsersByMail(java.lang.String email)
java.util.List<Group> getGroupsWithMember(OrganisationalUnit ou)
java.util.Collection<Group> getReferencedGroups(User user)
user
- the user to fetch all groups fromjava.util.Set<User> getAllTransitiveUsers(AbstractUserManagerNode node)
node
- java.util.Collection<Group> getDirectGroups(User user)
user
- the user to fetch direct groups fromjava.util.Collection<Group> getIndirectGroups(User user)
user
- the user to fetch indirect groups fromlong getNumberOfActiveUsers()
long getNumberOfInhibitedUsers()
long getNumberOfExpiredUsers()