Search in sources :

Example 1 with UseCaseUpdateProjectMetaData

use of com.mercedesbenz.sechub.sharedkernel.usecases.admin.project.UseCaseUpdateProjectMetaData in project sechub by mercedes-benz.

the class ProjectUpdateAdministrationRestController method updateProjectMetaData.

@UseCaseUpdateProjectMetaData(@Step(number = 1, name = "Rest call", description = "MetaData will be updated", needsRestDoc = true))
@RequestMapping(path = AdministrationAPIConstants.API_UPDATE_PROJECT_METADATA, method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
public void updateProjectMetaData(@Validated @RequestBody ProjectJsonInput input, @PathVariable(name = "projectId") String projectId) {
    /* @formatter:on */
    Optional<ProjectMetaData> projectMetaData = input.getMetaData();
    if (!projectMetaData.isPresent()) {
        return;
    }
    ProjectMetaData metaData = projectMetaData.get();
    updateProjectMetaDataService.updateProjectMetaData(projectId, metaData);
}
Also used : ProjectMetaData(com.mercedesbenz.sechub.domain.administration.project.ProjectJsonInput.ProjectMetaData) UseCaseUpdateProjectMetaData(com.mercedesbenz.sechub.sharedkernel.usecases.admin.project.UseCaseUpdateProjectMetaData) UseCaseUpdateProjectMetaData(com.mercedesbenz.sechub.sharedkernel.usecases.admin.project.UseCaseUpdateProjectMetaData) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ProjectMetaData (com.mercedesbenz.sechub.domain.administration.project.ProjectJsonInput.ProjectMetaData)1 UseCaseUpdateProjectMetaData (com.mercedesbenz.sechub.sharedkernel.usecases.admin.project.UseCaseUpdateProjectMetaData)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1