com.atlassian.jira.user
Class UserFilter

java.lang.Object
  extended by com.atlassian.jira.user.UserFilter

@PublicApi
public class UserFilter
extends Object

Represents user filtering setting. If isEnabled() is false, then it always refers to all active users. If isEnabled() is true, it's subject to the restrictions from getGroups() and getRoleIds(). Current implementation supports filters by groups and/or project roles. The filters are OR-ed, i.e., if 2 group filters and 3 project role filters are specified, the final set of users allowed is the union of the 5 sets of users from the 5 filters. If no filters are specified and isEnabled() is true, no users are allowed.

Since:
v6.2

Field Summary
static UserFilter DISABLED
           
static UserFilter ENABLED_NO_USERS
           
 
Constructor Summary
UserFilter(boolean enabled, Collection<Long> roleIds, Collection<String> groups)
           
 
Method Summary
 Set<String> getGroups()
          This value is only considered if isEnabled() returns true.
 Set<Long> getRoleIds()
          This value is only considered if isEnabled() returns true.
 boolean isEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLED

public static final UserFilter DISABLED

ENABLED_NO_USERS

public static final UserFilter ENABLED_NO_USERS
Constructor Detail

UserFilter

public UserFilter(boolean enabled,
                  Collection<Long> roleIds,
                  Collection<String> groups)
Method Detail

isEnabled

public boolean isEnabled()

getGroups

public Set<String> getGroups()

This value is only considered if isEnabled() returns true.

If null or empty, it means NO users are allowed from group restriction point of view. Note that some users might still be allowed due to project role based restriction. getRoleIds()

If not empty, it means only users from the groups are allowed. Note that some other users might still be allowed due to project role based restriction.

Returns:

getRoleIds

public Set<Long> getRoleIds()

This value is only considered if isEnabled() returns true.

If null or empty, it means NO users are allowed from project role restriction point of view. Note that some users might still be allowed due to group based restriction. getGroups()

If not empty, it means only users from the project roles are allowed. Note that some other users might still be allowed due to group based restriction.

Returns:


Copyright © 2002-2014 Atlassian. All Rights Reserved.