Package com.google.gerrit.server.group
Class SystemGroupBackend
- java.lang.Object
-
- com.google.gerrit.server.account.AbstractGroupBackend
-
- com.google.gerrit.server.group.SystemGroupBackend
-
- All Implemented Interfaces:
GroupBackend
public class SystemGroupBackend extends AbstractGroupBackend
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SystemGroupBackend.NameCheck
-
Field Summary
Fields Modifier and Type Field Description static AccountGroup.UUID
ANONYMOUS_USERS
Common UUID assigned to the "Anonymous Users" group.static AccountGroup.UUID
CHANGE_OWNER
Common UUID assigned to the "Change Owner" placeholder group.static AccountGroup.UUID
PROJECT_OWNERS
Common UUID assigned to the "Project Owners" placeholder group.static AccountGroup.UUID
REGISTERED_USERS
Common UUID assigned to the "Registered Users" group.static String
SYSTEM_GROUP_SCHEME
-
Constructor Summary
Constructors Constructor Description SystemGroupBackend(org.eclipse.jgit.lib.Config cfg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupDescription.Basic
get(AccountGroup.UUID uuid)
Looks up a group in the backend.GroupReference
getGroup(AccountGroup.UUID uuid)
Set<String>
getNames()
Set<String>
getReservedNames()
boolean
handles(AccountGroup.UUID uuid)
static boolean
isAnonymousOrRegistered(AccountGroup.UUID uuid)
static boolean
isAnonymousOrRegistered(GroupReference ref)
static boolean
isSystemGroup(AccountGroup.UUID uuid)
GroupMembership
membershipsOf(IdentifiedUser user)
Collection<GroupReference>
suggest(String name, ProjectState project)
-
Methods inherited from class com.google.gerrit.server.account.AbstractGroupBackend
isVisibleToAll
-
-
-
-
Field Detail
-
SYSTEM_GROUP_SCHEME
public static final String SYSTEM_GROUP_SCHEME
- See Also:
- Constant Field Values
-
ANONYMOUS_USERS
public static final AccountGroup.UUID ANONYMOUS_USERS
Common UUID assigned to the "Anonymous Users" group.
-
REGISTERED_USERS
public static final AccountGroup.UUID REGISTERED_USERS
Common UUID assigned to the "Registered Users" group.
-
PROJECT_OWNERS
public static final AccountGroup.UUID PROJECT_OWNERS
Common UUID assigned to the "Project Owners" placeholder group.
-
CHANGE_OWNER
public static final AccountGroup.UUID CHANGE_OWNER
Common UUID assigned to the "Change Owner" placeholder group.
-
-
Method Detail
-
isSystemGroup
public static boolean isSystemGroup(AccountGroup.UUID uuid)
-
isAnonymousOrRegistered
public static boolean isAnonymousOrRegistered(GroupReference ref)
-
isAnonymousOrRegistered
public static boolean isAnonymousOrRegistered(AccountGroup.UUID uuid)
-
getGroup
public GroupReference getGroup(AccountGroup.UUID uuid)
-
handles
public boolean handles(AccountGroup.UUID uuid)
- Returns:
true
if the backend can operate on the UUID.
-
get
public GroupDescription.Basic get(AccountGroup.UUID uuid)
Description copied from interface:GroupBackend
Looks up a group in the backend. If the group does not exist, null is returned.- Parameters:
uuid
- the group identifier- Returns:
- the group
-
suggest
public Collection<GroupReference> suggest(String name, ProjectState project)
- Returns:
- suggestions for the group name sorted by name.
-
membershipsOf
public GroupMembership membershipsOf(IdentifiedUser user)
- Returns:
- the group membership checker for the backend.
-
-