Package com.google.gerrit.server.group
Class GroupResolver
- java.lang.Object
-
- com.google.gerrit.server.group.GroupResolver
-
public class GroupResolver extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupDescription.Basic
parse(String id)
Parses a group ID from a request body and returns the group.GroupDescription.Basic
parseId(String id)
Parses a group ID and returns the group without making any permission check whether the current user can see the group.GroupDescription.Internal
parseInternal(String id)
Parses a group ID from a request body and returns the group if it is a Gerrit internal group.
-
-
-
Method Detail
-
parse
public GroupDescription.Basic parse(String id) throws UnprocessableEntityException
Parses a group ID from a request body and returns the group.- Parameters:
id
- ID of the group, can be a group UUID, a group name or a legacy group ID- Returns:
- the group
- Throws:
UnprocessableEntityException
- thrown if the group ID cannot be resolved or if the group is not visible to the calling user
-
parseInternal
public GroupDescription.Internal parseInternal(String id) throws UnprocessableEntityException
Parses a group ID from a request body and returns the group if it is a Gerrit internal group.- Parameters:
id
- ID of the group, can be a group UUID, a group name or a legacy group ID- Returns:
- the group
- Throws:
UnprocessableEntityException
- thrown if the group ID cannot be resolved, if the group is not visible to the calling user or if it's an external group
-
parseId
public GroupDescription.Basic parseId(String id)
Parses a group ID and returns the group without making any permission check whether the current user can see the group.- Parameters:
id
- ID of the group, can be a group UUID, a group name or a legacy group ID- Returns:
- the group, null if no group is found for the given group ID
-
-