public class SetParent extends Object implements RestModifyView<ProjectResource,ParentInput>, GerritConfigListener
Modifier and Type | Method and Description |
---|---|
String |
apply(ProjectResource rsrc,
ParentInput input)
Process the view operation by altering the resource.
|
String |
apply(ProjectResource rsrc,
ParentInput input,
boolean checkIfAdmin) |
com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> |
configUpdated(ConfigUpdatedEvent event) |
void |
validateParentUpdate(Project.NameKey project,
IdentifiedUser user,
String newParent,
boolean checkIfAdmin) |
public String apply(ProjectResource rsrc, ParentInput input) throws AuthException, ResourceConflictException, ResourceNotFoundException, UnprocessableEntityException, IOException, PermissionBackendException, BadRequestException
RestModifyView
apply
in interface RestModifyView<ProjectResource,ParentInput>
rsrc
- resource to modify.input
- input after parsing from request.BinaryResult
to avoid automatic conversion
to JSON.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.ResourceNotFoundException
UnprocessableEntityException
IOException
PermissionBackendException
public String apply(ProjectResource rsrc, ParentInput input, boolean checkIfAdmin) throws AuthException, ResourceConflictException, ResourceNotFoundException, UnprocessableEntityException, IOException, PermissionBackendException, BadRequestException
public void validateParentUpdate(Project.NameKey project, IdentifiedUser user, String newParent, boolean checkIfAdmin) throws AuthException, ResourceConflictException, UnprocessableEntityException, PermissionBackendException, BadRequestException
public com.google.common.collect.Multimap<ConfigUpdatedEvent.UpdateResult,ConfigUpdatedEvent.ConfigUpdateEntry> configUpdated(ConfigUpdatedEvent event)
configUpdated
in interface GerritConfigListener