Add REST endpoint to update the project configuration

By PUT on /projects/*/config it is now possible to update the
configuration of a project.

We already have REST endpoints to get and set the project description
(GET and PUT on /projects/*/description), however on the
ProjectInfoScreen we have a single save button to save both the project
description and the project configuration settings. Triggering two calls
in parallel with a callback group, one to update the project description
and one to update the project configuration, is likely failing because
both requests need to update the project.config file. If it happens in
parallel one request will get a LOCK_FAILURE. Also it would be bad to
create two commits for a single save action. This is why it makes sense
to also allow to get and set the project description via the GetConfig
and PutConfig REST endpoints.

Change-Id: I2109264d75dd50d103e58e8a9e73492e2aa5807c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-07-17 09:10:54 +02:00
committed by Edwin Kempin
parent 3e05f81f8c
commit a23eb10619
7 changed files with 384 additions and 84 deletions

View File

@@ -65,5 +65,6 @@ public class Module extends RestApiModule {
install(new FactoryModuleBuilder().build(CreateProject.Factory.class));
get(PROJECT_KIND, "config").to(GetConfig.class);
put(PROJECT_KIND, "config").to(PutConfig.class);
}
}