Package org.apache.nifi.authorization
Class UserGroupHolder
java.lang.Object
org.apache.nifi.authorization.UserGroupHolder
A holder to provide atomic access to user group data structures.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserGroupHolder(Tenants tenants) 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.createGroups(Groups groups, Users users) Creates a set of Groups from the JAXB Groups.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.createUsers(Users users) Creates a set of Users from the JAXB Users.
-
Field Details
-
tenants
-
allUsers
-
usersById
-
usersByIdentity
-
allGroups
-
groupsById
-
groupsByName
-
groupsByUserIdentity
-
-
Constructor Details
-
UserGroupHolder
Creates a new holder and populates all convenience data structures.- Parameters:
tenants- the current tenants instance
-
-
Method Details
-
createUsers
Creates a set of Users from the JAXB Users.- Parameters:
users- the JAXB Users- Returns:
- a set of API Users matching the provided JAXB Users
-
createGroups
Creates a set of Groups from the JAXB Groups.- Parameters:
groups- the JAXB Groups- Returns:
- a set of API Groups matching the provided JAXB Groups
-
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 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
-
getTenants
-
getAllUsers
-
getUsersById
-
getUsersByIdentity
-
getAllGroups
-
getGroupsById
-
getGroupsByName
-
getUser
-
getGroups
-