Class FakeLdapGroupBackend
- java.lang.Object
-
- com.google.gerrit.server.auth.ldap.FakeLdapGroupBackend
-
- All Implemented Interfaces:
GroupBackend
public class FakeLdapGroupBackend extends Object implements GroupBackend
Fake Implementation of an LDAP group backend used for testing
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupDescription.Basic
get(AccountGroup.UUID uuid)
Looks up a group in the backend.boolean
handles(AccountGroup.UUID uuid)
boolean
isVisibleToAll(AccountGroup.UUID uuid)
GroupMembership
membershipsOf(IdentifiedUser user)
Collection<GroupReference>
suggest(String name, ProjectState project)
-
-
-
Method Detail
-
handles
public boolean handles(AccountGroup.UUID uuid)
- Specified by:
handles
in interfaceGroupBackend
- 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.- Specified by:
get
in interfaceGroupBackend
- Parameters:
uuid
- the group identifier- Returns:
- the group
-
suggest
public Collection<GroupReference> suggest(String name, ProjectState project)
- Specified by:
suggest
in interfaceGroupBackend
- Returns:
- suggestions for the group name sorted by name.
-
membershipsOf
public GroupMembership membershipsOf(IdentifiedUser user)
- Specified by:
membershipsOf
in interfaceGroupBackend
- Returns:
- the group membership checker for the backend.
-
isVisibleToAll
public boolean isVisibleToAll(AccountGroup.UUID uuid)
- Specified by:
isVisibleToAll
in interfaceGroupBackend
- Returns:
true
if the group with the given UUID is visible to all registered users.
-
-