Skip to content

Commit

Permalink
OP-21254: feature implementation audit custom date param (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
emanipravallika authored Oct 25, 2023
1 parent 825d86f commit 5bf4366
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,34 +94,40 @@ class OpsmxAuditClientServiceController {
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "search", required = false) String search,
@RequestParam(value = "sortOrder", required = false) String sortOrder,
@RequestParam(value = "sortBy", required = false) String sortBy) {
return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit, noOfDays, search, sortOrder, sortBy)
@RequestParam(value = "sortBy", required = false) String sortBy,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
return opsmxAuditClientService.getAuditClientResponse3(version, type, source, source1, isTreeView, isLatest, pageNo, pageLimit, noOfDays, search, sortOrder, sortBy, startDate, endDate)
}

@ApiOperation(value = "Endpoint for audit-client rest services")
@RequestMapping(value = "/{version}/{type}/{source}/{source1}/{source2}", method = RequestMethod.GET)
Object getAuditClientResponse4(@PathVariable("version") String version,
@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "updatedTimestamp", required = false) Long updatedTimestamp,
@RequestParam(value = "size", required = false) Integer size) {
@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "updatedTimestamp", required = false) Long updatedTimestamp,
@RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {

return opsmxAuditClientService.getAuditClientResponse4(version, type, source, source1, source2, noOfDays, updatedTimestamp, size)
return opsmxAuditClientService.getAuditClientResponse4(version, type, source, source1, source2, noOfDays, updatedTimestamp, size, startDate, endDate)
}

@ApiOperation(value = "Endpoint for audit-client rest services")
@RequestMapping(value = "/{version}/{type}/{source}/{source1}/{source2}/{source3}", method = RequestMethod.GET)
Object getAuditClientResponse5(@PathVariable("version") String version,
@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@PathVariable("source3") String source3,
@RequestParam(value = "noOfDays", required = false) String noOfDays) {
return opsmxAuditClientService.getAuditClientResponse5(version, type, source, source1, source2, source3,noOfDays)
@PathVariable("type") String type,
@PathVariable("source") String source,
@PathVariable("source1") String source1,
@PathVariable("source2") String source2,
@PathVariable("source3") String source3,
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
return opsmxAuditClientService.getAuditClientResponse5(version, type, source, source1, source2, source3, noOfDays, startDate, endDate)
}

@ApiOperation(value = "Endpoint for audit-client rest services")
Expand Down Expand Up @@ -160,8 +166,10 @@ class OpsmxAuditClientServiceController {
@RequestParam(value = "isLatest", required = false) Boolean isLatest,
@RequestParam(value = "pageNo", required = false) Integer pageNo,
@RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "noOfDays", required = false) String noOfDays) {
Response response = opsmxAuditClientService.downloadCSVFile(version, username, source, isTreeView, isLatest, pageNo, size, noOfDays)
@RequestParam(value = "noOfDays", required = false) String noOfDays,
@RequestParam(value = "startDate", required = false) Long startDate,
@RequestParam(value = "endDate", required = false) Long endDate) {
Response response = opsmxAuditClientService.downloadCSVFile(version, username, source, isTreeView, isLatest, pageNo, size, noOfDays, startDate, endDate)
log.info("response for the insgiths endpoint:" + response.getHeaders())
if (response.getBody()!=null) {
InputStream inputStream = response.getBody().in()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,32 @@ interface OpsmxAuditClientService {
@Query("noOfDays") String noOfDays,
@Query("search") String search,
@Query("sortOrder") String sortOrder,
@Query("sortBy") String sortBy)
@Query("sortBy") String sortBy,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)

@GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}")
Object getAuditClientResponse4(@Path('version') String version,
@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Query("noOfDays") String noOfDays,
@Query("updatedTimestamp") Long updatedTimestamp,
@Query("size") Integer size)
@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Query("noOfDays") String noOfDays,
@Query("updatedTimestamp") Long updatedTimestamp,
@Query("size") Integer size,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)

@GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}/{source3}")
Object getAuditClientResponse5(@Path('version') String version,
@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Path('source3') String source3,
@Query("noOfDays") String noOfDays)
@Path('type') String type,
@Path('source') String source,
@Path('source1') String source1,
@Path('source2') String source2,
@Path('source3') String source3,
@Query("noOfDays") String noOfDays,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)

@GET("/auditclientservice/{version}/{type}/{source}/{source1}/{source2}/{source3}/{source4}")
Object getAuditClientResponse6(@Path('version') String version,
Expand Down Expand Up @@ -116,7 +122,9 @@ interface OpsmxAuditClientService {
@Query("isLatest") Boolean isLatest,
@Query("pageNo") Integer pageNo,
@Query("size") Integer size,
@Query("noOfDays") String noOfDays)
@Query("noOfDays") String noOfDays,
@Query("startDate") Long startDate,
@Query("endDate") Long endDate)

@GET("/auditclientservice/{version}/{type}/{source}/download")
Response downloadDeliveryInsightsCSVFile(@Path('version') String version,
Expand Down

0 comments on commit 5bf4366

Please sign in to comment.