Skip to content

Commit

Permalink
#30367 Applying code review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgambarios committed Dec 4, 2024
1 parent a185478 commit 6aa22b3
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public JobQueueResource(WebResource webResource, JobQueueHelper helper,
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public Response createJob(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@PathParam("queueName") String queueName,
@BeanParam JobParams form) throws JsonProcessingException, DotDataException {

Expand All @@ -80,7 +80,7 @@ public Response createJob(
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response createJob(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@PathParam("queueName") String queueName,
Map<String, Object> parameters) throws DotDataException {

Expand All @@ -104,7 +104,7 @@ public Response createJob(
@Path("/queues")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<Set<String>> getQueues(
@Context HttpServletRequest request, @Context final HttpServletResponse response) {
@Context final HttpServletRequest request, @Context final HttpServletResponse response) {
new InitBuilder(webResource)
.requiredBackendUser(true)
.requiredFrontendUser(false)
Expand All @@ -118,7 +118,7 @@ public ResponseEntityView<Set<String>> getQueues(
@Path("/{jobId}/status")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<Job> getJobStatus(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@PathParam("jobId") String jobId) throws DotDataException {

new InitBuilder(webResource)
Expand All @@ -137,7 +137,7 @@ public ResponseEntityView<Job> getJobStatus(
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.WILDCARD)
public ResponseEntityView<String> cancelJob(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@PathParam("jobId") String jobId) throws DotDataException {
new InitBuilder(webResource)
.requiredBackendUser(true)
Expand All @@ -153,7 +153,7 @@ public ResponseEntityView<String> cancelJob(
@Path("/{queueName}/active")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> activeJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@PathParam("queueName") String queueName,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
Expand All @@ -170,7 +170,7 @@ public ResponseEntityView<JobPaginatedResult> activeJobs(
@GET
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> listJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -187,7 +187,7 @@ public ResponseEntityView<JobPaginatedResult> listJobs(
@Path("/active")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> activeJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -204,7 +204,7 @@ public ResponseEntityView<JobPaginatedResult> activeJobs(
@Path("/completed")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> completedJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -221,7 +221,7 @@ public ResponseEntityView<JobPaginatedResult> completedJobs(
@Path("/successful")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> successfulJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -238,7 +238,7 @@ public ResponseEntityView<JobPaginatedResult> successfulJobs(
@Path("/canceled")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> canceledJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -255,7 +255,7 @@ public ResponseEntityView<JobPaginatedResult> canceledJobs(
@Path("/failed")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> failedJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -272,7 +272,7 @@ public ResponseEntityView<JobPaginatedResult> failedJobs(
@Path("/abandoned")
@Produces(MediaType.APPLICATION_JSON)
public ResponseEntityView<JobPaginatedResult> abandonedJobs(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@QueryParam("page") @DefaultValue("1") int page,
@QueryParam("pageSize") @DefaultValue("20") int pageSize) {
new InitBuilder(webResource)
Expand All @@ -290,7 +290,7 @@ public ResponseEntityView<JobPaginatedResult> abandonedJobs(
@Produces(SseFeature.SERVER_SENT_EVENTS)
@SuppressWarnings("java:S1854") // jobWatcher assignment is needed for cleanup in catch blocks
public EventOutput monitorJob(
@Context HttpServletRequest request, @Context final HttpServletResponse response,
@Context final HttpServletRequest request, @Context final HttpServletResponse response,
@PathParam("jobId") String jobId) {

new InitBuilder(webResource)
Expand Down

0 comments on commit 6aa22b3

Please sign in to comment.