public class AllowedUsers extends Object
Modifier and Type | Field and Description |
---|---|
private Set<GroupIdentity> |
_allowedGroups |
private Set<UserIdentity> |
_allowedUsers |
private boolean |
_anonymousAllowed |
private boolean |
_anyConnectedUserAllowed |
private Set<GroupIdentity> |
_deniedGroups |
private Set<UserIdentity> |
_deniedUsers |
private GroupManager |
_groupManager |
private Set<String> |
_populationContexts |
private UserManager |
_userManager |
Constructor and Description |
---|
AllowedUsers(boolean anonymousAllowed,
boolean anyConnectedUserAllowed,
Set<UserIdentity> allowedUsers,
Set<UserIdentity> deniedUsers,
Set<GroupIdentity> allowedGroups,
Set<GroupIdentity> deniedGroups,
UserManager userManager,
GroupManager groupManager,
Set<String> populationContexts)
Creates an object representing allowed users.
|
Modifier and Type | Method and Description |
---|---|
Set<GroupIdentity> |
getAllowedGroups()
Get the allowed groups
|
Set<UserIdentity> |
getAllowedUsers()
Get the allowed users
|
Set<GroupIdentity> |
getDeniedGroups()
Get the allowed groups
|
Set<UserIdentity> |
getDeniedUsers()
Get the denied users
|
boolean |
isAnonymousAllowed()
Returns true if any anonymous user is allowed
|
boolean |
isAnyConnectedUserAllowed()
Returns true if any connected user is allowed
|
Set<UserIdentity> |
resolveAllowedUsers(boolean returnAll)
Resolve the actual allowed users, taking into account the anyconnected, allowed and denied users and groups.
|
private boolean _anonymousAllowed
private boolean _anyConnectedUserAllowed
private Set<UserIdentity> _allowedUsers
private Set<UserIdentity> _deniedUsers
private Set<GroupIdentity> _allowedGroups
private Set<GroupIdentity> _deniedGroups
private UserManager _userManager
private Set<String> _populationContexts
private GroupManager _groupManager
AllowedUsers(boolean anonymousAllowed, boolean anyConnectedUserAllowed, Set<UserIdentity> allowedUsers, Set<UserIdentity> deniedUsers, Set<GroupIdentity> allowedGroups, Set<GroupIdentity> deniedGroups, UserManager userManager, GroupManager groupManager, Set<String> populationContexts)
anonymousAllowed
- true to indicate any anonymous user is allowedanyConnectedUserAllowed
- if anonymous is false, true to indicate any connected user is allowedallowedUsers
- the allowed users, not taking into account the denied users. Must be null if anonymous or anyConnectedUser is true, must not otherwise.deniedUsers
- the denied users. Must be null if anonymous is true, must not otherwise.allowedGroups
- the allowed groups, not taking into account the denied groups. Must be null if anonymous or anyConnectedUser is true, must not otherwise.deniedGroups
- the denied groups. Must be null if anonymous is true, must not otherwise.userManager
- The user managergroupManager
- The group managerpopulationContexts
- The population contexts for retrieving users from user manager. Can be null if anyConnectedUser is falsepublic boolean isAnonymousAllowed()
public boolean isAnyConnectedUserAllowed()
public Set<UserIdentity> getAllowedUsers()
public Set<UserIdentity> getDeniedUsers()
public Set<GroupIdentity> getAllowedGroups()
public Set<GroupIdentity> getDeniedGroups()
public Set<UserIdentity> resolveAllowedUsers(boolean returnAll)
returnAll
- Set to true
to resolve all users if any connected user is allowed. If false
, returns an empty Set if any connected user is allowed.