Class SetParent
- java.lang.Object
-
- com.google.gerrit.server.restapi.project.SetParent
-
- All Implemented Interfaces:
RestModifyView<ProjectResource,ParentInput>,RestView<ProjectResource>,GerritConfigListener,EventListener
public class SetParent extends Object implements RestModifyView<ProjectResource,ParentInput>, GerritConfigListener
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(ProjectResource rsrc, ParentInput input)Process the view operation by altering the resource.Stringapply(ProjectResource rsrc, ParentInput input, boolean checkIfAdmin)com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry>configUpdated(ConfigUpdatedEvent event)voidvalidateParentUpdate(Project.NameKey project, IdentifiedUser user, String newParent, boolean checkIfAdmin)
-
-
-
Method Detail
-
apply
public String apply(ProjectResource rsrc, ParentInput input) throws AuthException, ResourceConflictException, ResourceNotFoundException, UnprocessableEntityException, IOException, PermissionBackendException, BadRequestException
Description copied from interface:RestModifyViewProcess the view operation by altering the resource.- Specified by:
applyin interfaceRestModifyView<ProjectResource,ParentInput>- Parameters:
rsrc- resource to modify.input- input after parsing from request.- Returns:
- result to return to the client. Use
BinaryResultto 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.BadRequestException- the request was incorrectly specified and cannot be handled by this view.ResourceNotFoundExceptionUnprocessableEntityExceptionIOExceptionPermissionBackendException
-
apply
public String apply(ProjectResource rsrc, ParentInput input, boolean checkIfAdmin) throws AuthException, ResourceConflictException, ResourceNotFoundException, UnprocessableEntityException, IOException, PermissionBackendException, BadRequestException
-
validateParentUpdate
public void validateParentUpdate(Project.NameKey project, IdentifiedUser user, String newParent, boolean checkIfAdmin) throws AuthException, ResourceConflictException, UnprocessableEntityException, PermissionBackendException, BadRequestException
-
configUpdated
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> configUpdated(ConfigUpdatedEvent event)
- Specified by:
configUpdatedin interfaceGerritConfigListener
-
-