Package org.apache.nifi.ldap.tenants
Class TenantHolder
java.lang.Object
org.apache.nifi.ldap.tenants.TenantHolder
A holder to provide atomic access to user group data structures.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionTenantHolder(Set<User> allUsers, Set<Group> allGroups) Creates a new holder and populates all convenience data structures. -
Method Summary
Modifier and TypeMethodDescriptioncreateGroupByIdMap(Set<Group> groups) Creates a Map from group identifier to Group.createGroupByNameMap(Set<Group> groups) Creates a Map from group name to Group.createGroupsByUserIdentityMap(Set<Group> groups, Set<User> users) Creates a Map from user identity to the set of Groups for that identity.createUserByIdentityMap(Set<User> users) Creates a Map from user identity to User.createUserByIdMap(Set<User> users) Creates a Map from user identifier to User.
-
Field Details
-
allUsers
-
usersById
-
usersByIdentity
-
allGroups
-
groupsById
-
groupsByName
-
groupsByUserIdentity
-
-
Constructor Details
-
TenantHolder
Creates a new holder and populates all convenience data structures.
-
-
Method Details
-
createUserByIdMap
Creates a Map from user identifier to User.- Parameters:
users- the set of all users- Returns:
- the Map from user identifier to User
-
createUserByIdentityMap
Creates a Map from user identity to User.- Parameters:
users- the set of all users- Returns:
- the Map from user identity to User
-
createGroupByIdMap
Creates a Map from group identifier to Group.- Parameters:
groups- the set of all groups- Returns:
- the Map from group identifier to Group
-
createGroupByNameMap
Creates a Map from group name to Group.- Parameters:
groups- the set of all groups- Returns:
- the Map from group name to Group
-
createGroupsByUserIdentityMap
Creates a Map from user identity to the set of Groups for that identity.- Parameters:
groups- all groupsusers- all users- Returns:
- a Map from User identity to the set of Groups for that identity
-
getAllUsers
-
getUsersById
-
getAllGroups
-
getGroupsById
-
getGroupsByName
-
getUser
-
getGroups
-