Resolved Conflicts.
This commit is contained in:
@@ -176,17 +176,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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,7 @@ import io.swagger.v3.oas.annotations.media.ExampleObject;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import net.gepafin.tendermanagement.enums.AssignedApplicationEnum;
|
||||
import net.gepafin.tendermanagement.model.request.AssignedApplicationsRequest;
|
||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
||||
import net.gepafin.tendermanagement.model.response.AssignedApplicationsResponse;
|
||||
import net.gepafin.tendermanagement.model.util.Response;
|
||||
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
||||
@@ -66,7 +64,8 @@ public interface AssignedApplicationsApi {
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||
@GetMapping(value = "", produces = "application/json")
|
||||
ResponseEntity<Response<List<AssignedApplicationsResponse>>> getAllAssignedApplications(@Parameter(description = "The User ID", required = false) @RequestParam(value = "userId",required = false) Long userId);
|
||||
ResponseEntity<Response<List<AssignedApplicationsResponse>>> getAllAssignedApplications(HttpServletRequest request,
|
||||
@Parameter(description = "The User ID", required = false) @RequestParam(value = "userId",required = false) Long userId);
|
||||
|
||||
@Operation(summary = "Api to update assigned application",
|
||||
responses = {
|
||||
@@ -94,7 +93,9 @@ public interface AssignedApplicationsApi {
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||
@GetMapping(value = "/{id}", produces = "application/json")
|
||||
ResponseEntity<Response<AssignedApplicationsResponse>> getAssignedApplicationById(@Parameter(description = "The assigned application id", required = true) @PathVariable(value = "id", required = true) Long id);
|
||||
ResponseEntity<Response<AssignedApplicationsResponse>> getAssignedApplicationById(HttpServletRequest request,
|
||||
@Parameter(description = "The assigned application id", required = true) @PathVariable(value = "id", required = true) Long id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public interface CallApi {
|
||||
public ResponseEntity<Response<CallResponse>> updateCallStep1(HttpServletRequest request,
|
||||
@Parameter(description = "The call id", required = true) @PathVariable("callId") Long callId,
|
||||
@Parameter(description = "Call request object", required = true) @Valid @RequestBody UpdateCallRequestStep1 updateCallRequest);
|
||||
@Operation(summary = "Api to get call by id",
|
||||
@Operation(summary = "Api to get call by id updated today to check the bug",
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "OK"),
|
||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface LoginAttemptApi {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE)}))})
|
||||
@GetMapping(value = "/login-attempt", produces = {"application/json"})
|
||||
@PreAuthorize("hasRole('ROLE_SUPER_ADMIN')")
|
||||
default ResponseEntity<LoginAttemptPageableResponseBean<List<LoginAttemptEntity>>> getLoginAttemptsList(
|
||||
default ResponseEntity<LoginAttemptPageableResponseBean<List<LoginAttemptEntity>>> getLoginAttemptsList(HttpServletRequest request,
|
||||
@ApiParam(value = "page number") @RequestParam(name = "pageNo", required = false) Integer pageNo,
|
||||
@ApiParam(value = "page limit") @RequestParam(name = "pageLimit", required = false) Integer pageLimit) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -59,7 +59,7 @@ public interface UserApi {
|
||||
@RequestMapping(value = "/{userId}",
|
||||
produces = {"application/json"},
|
||||
method = RequestMethod.PUT)
|
||||
default ResponseEntity<Response<UserResponseBean>> updateUser(
|
||||
default ResponseEntity<Response<UserResponseBean>> updateUser(HttpServletRequest request,
|
||||
@Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId,
|
||||
@Parameter(description = "User request object", required = true) @Valid @RequestBody UpdateUserReq userReq) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -77,7 +77,7 @@ public interface UserApi {
|
||||
@RequestMapping(value = "/{userId}",
|
||||
produces = {"application/json"},
|
||||
method = RequestMethod.GET)
|
||||
default ResponseEntity<Response<UserResponseBean>> getUserById(
|
||||
default ResponseEntity<Response<UserResponseBean>> getUserById(HttpServletRequest request,
|
||||
@Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public interface UserApi {
|
||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE)}))})
|
||||
@RequestMapping(value = "/{userId}",
|
||||
method = RequestMethod.DELETE)
|
||||
default ResponseEntity<Response<Void>> deleteUser(
|
||||
default ResponseEntity<Response<Void>> deleteUser(HttpServletRequest request,
|
||||
@Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ public class AssignedApplicationsController implements AssignedApplicationsApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<List<AssignedApplicationsResponse>>> getAllAssignedApplications(Long userId) {
|
||||
public ResponseEntity<Response<List<AssignedApplicationsResponse>>> getAllAssignedApplications(HttpServletRequest request, Long userId) {
|
||||
log.info("Get All Assigned Applications");
|
||||
List<AssignedApplicationsResponse> applications = assignedApplicationsService.getAllAssignedApplications(userId);
|
||||
List<AssignedApplicationsResponse> applications = assignedApplicationsService.getAllAssignedApplications(request, userId);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(applications, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_ASSIGNED_APPLICATION_SUCCESS_MSG)));
|
||||
}
|
||||
@@ -59,9 +59,9 @@ public class AssignedApplicationsController implements AssignedApplicationsApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<AssignedApplicationsResponse>> getAssignedApplicationById(Long id) {
|
||||
public ResponseEntity<Response<AssignedApplicationsResponse>> getAssignedApplicationById(HttpServletRequest request, Long id) {
|
||||
log.info("Get Assigned Applications By Id");
|
||||
AssignedApplicationsResponse application = assignedApplicationsService.getAssignedApplicationById(id);
|
||||
AssignedApplicationsResponse application = assignedApplicationsService.getAssignedApplicationById(request, id);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(application, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_ASSIGNED_APPLICATION_SUCCESS_MSG)));
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CallApiController implements CallApi {
|
||||
}
|
||||
@Override
|
||||
public ResponseEntity<byte[]> downloadCallDocumentsAsZip(HttpServletRequest request, Long callId) {
|
||||
byte[] zipFile = callService.downloadCallDocumentsAsZip(callId);
|
||||
byte[] zipFile = callService.downloadCallDocumentsAsZip(request, callId);
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||
|
||||
@@ -39,8 +39,8 @@ public class LoginAttemptApiController implements LoginAttemptApi {
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public ResponseEntity<LoginAttemptPageableResponseBean<List<LoginAttemptEntity>>> getLoginAttemptsList(Integer pageNo, Integer pageLimit) {
|
||||
LoginAttemptPageableResponseBean<List<LoginAttemptEntity>> response = loginAttemptService.getLoginAttemptsList(pageNo, pageLimit);
|
||||
public ResponseEntity<LoginAttemptPageableResponseBean<List<LoginAttemptEntity>>> getLoginAttemptsList(HttpServletRequest request, Integer pageNo, Integer pageLimit) {
|
||||
LoginAttemptPageableResponseBean<List<LoginAttemptEntity>> response = loginAttemptService.getLoginAttemptsList(request, pageNo, pageLimit);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(response);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,29 +44,29 @@ public class UserApiController implements UserApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<UserResponseBean>> updateUser(
|
||||
public ResponseEntity<Response<UserResponseBean>> updateUser(HttpServletRequest request,
|
||||
@PathVariable("userId") Long userId,
|
||||
@Valid @RequestBody UpdateUserReq userReq) {
|
||||
log.info("Update User - User ID: {}, Request Body: {}", userId, userReq);
|
||||
UserResponseBean updatedUser = userService.updateUser(userId, userReq);
|
||||
UserResponseBean updatedUser = userService.updateUser(request, userId, userReq);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(updatedUser, Status.SUCCESS, Translator.toLocale(GepafinConstant.USER_UPDATED_SUCCESS_MSG)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<UserResponseBean>> getUserById(
|
||||
public ResponseEntity<Response<UserResponseBean>> getUserById(HttpServletRequest request,
|
||||
@PathVariable("userId") Long userId) {
|
||||
log.info("Get User by ID - User ID: {}", userId);
|
||||
UserResponseBean user = userService.getUserById(userId);
|
||||
UserResponseBean user = userService.getUserById(request, userId);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(user, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_USER_SUCCESS_MSG)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Response<Void>> deleteUser(
|
||||
public ResponseEntity<Response<Void>> deleteUser(HttpServletRequest request,
|
||||
@PathVariable("userId") Long userId) {
|
||||
log.info("Delete User - User ID: {}", userId);
|
||||
userService.deleteUser(userId);
|
||||
userService.deleteUser(request, userId);
|
||||
return ResponseEntity.status(HttpStatus.OK)
|
||||
.body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.USER_DELETED_SUCCESS_MSG)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user