Done ticket GEPAFINBE-38
This commit is contained in:
@@ -175,17 +175,30 @@ public interface ApplicationApi {
|
||||
ResponseEntity<Response<ApplicationSignedDocumentResponse>> getSignedDocument(HttpServletRequest request,
|
||||
@Parameter(description = "The applicationId id", required = true) @PathVariable("applicationId") Long applicationId);
|
||||
|
||||
@Operation(summary = "Api to delete signed document", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||
@DeleteMapping(value = "{applicationId}/signedDocument", produces = "application/json")
|
||||
ResponseEntity<Response<Void>> deleteSignedDocument(HttpServletRequest request,
|
||||
@Parameter(description = "The applicationId id", required = true) @PathVariable("applicationId") Long applicationId);
|
||||
|
||||
|
||||
// @Operation(summary = "Api to delete signed document", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||
// @ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
// @ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||
// @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
// @ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||
// @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
// @ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||
// @DeleteMapping(value = "{applicationId}/signedDocument", produces = "application/json")
|
||||
// ResponseEntity<Response<Void>> deleteSignedDocument(HttpServletRequest request,
|
||||
// @Parameter(description = "The applicationId id", required = true) @PathVariable("applicationId") Long applicationId);
|
||||
|
||||
@Operation(summary = "Api to validate application",
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "OK"),
|
||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||
@PostMapping(value = "/{applicationId}/validate", produces = { "application/json" })
|
||||
ResponseEntity<Response<ApplicationResponse>> validateApplication(HttpServletRequest request,
|
||||
@Parameter(description = "The application id", required = true) @PathVariable("applicationId") Long applicationId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -133,13 +133,20 @@ public class ApplicationApiController implements ApplicationApi {
|
||||
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_SIGNED_DOCUMENT_FILE_SUCCESS)));
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ResponseEntity<Response<Void>> deleteSignedDocument(HttpServletRequest request,
|
||||
// Long applicationId) {
|
||||
// applicationService.deleteSignedDocument(request, applicationId);
|
||||
// log.info("delete signed document applicationId: {}", applicationId);
|
||||
// return ResponseEntity.status(HttpStatus.OK)
|
||||
// .body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.DELETE_SIGNED_DOCUMENT_FILE_SUCCESS)));
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<Void>> deleteSignedDocument(HttpServletRequest request,
|
||||
Long applicationId) {
|
||||
applicationService.deleteSignedDocument(request, applicationId);
|
||||
log.info("delete signed document applicationId: {}", applicationId);
|
||||
public ResponseEntity<Response<ApplicationResponse>> validateApplication(HttpServletRequest request, Long applicationId) {
|
||||
ApplicationResponse applicationResponse = applicationService.validateApplication(request, applicationId);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.DELETE_SIGNED_DOCUMENT_FILE_SUCCESS)));
|
||||
.body(new Response<>(applicationResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_STATUS_UPDATED_SUCCESSFULLY)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user