Package com.google.gerrit.server.project
Class SetParent
- java.lang.Object
-
- com.google.gerrit.server.project.SetParent
-
- All Implemented Interfaces:
RestModifyView<ProjectResource,SetParent.Input>
,RestView<ProjectResource>
public class SetParent extends Object implements RestModifyView<ProjectResource,SetParent.Input>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetParent.Input
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
apply(ProjectResource rsrc, SetParent.Input input)
Process the view operation by altering the resource.String
apply(ProjectResource rsrc, SetParent.Input input, boolean checkIfAdmin)
void
validateParentUpdate(Project.NameKey project, IdentifiedUser user, String newParent, boolean checkIfAdmin)
-
-
-
Method Detail
-
apply
public String apply(ProjectResource rsrc, SetParent.Input input) throws AuthException, ResourceConflictException, ResourceNotFoundException, UnprocessableEntityException, IOException, PermissionBackendException
Description copied from interface:RestModifyView
Process the view operation by altering the resource.- Specified by:
apply
in interfaceRestModifyView<ProjectResource,SetParent.Input>
- Parameters:
rsrc
- resource to modify.input
- input after parsing from request.- Returns:
- result to return to the client. Use
BinaryResult
to avoid automatic conversion to JSON. - Throws:
AuthException
- the client is not permitted to access this view.ResourceConflictException
- the resource state does not permit this view to make the changes at this time.ResourceNotFoundException
UnprocessableEntityException
IOException
PermissionBackendException
-
apply
public String apply(ProjectResource rsrc, SetParent.Input input, boolean checkIfAdmin) throws AuthException, ResourceConflictException, ResourceNotFoundException, UnprocessableEntityException, IOException, PermissionBackendException
-
validateParentUpdate
public void validateParentUpdate(Project.NameKey project, IdentifiedUser user, String newParent, boolean checkIfAdmin) throws AuthException, ResourceConflictException, UnprocessableEntityException, PermissionBackendException
-
-