Project

General

Profile

« Previous | Next » 

Revision 50631

Changes for new api.

View differences:

MonitorApiImpl.java
10 10
import org.apache.log4j.Logger;
11 11
import org.json.JSONException;
12 12
import org.springframework.stereotype.Component;
13
import org.springframework.web.bind.annotation.PathVariable;
14
import org.springframework.web.bind.annotation.RequestParam;
15

  
13 16
import javax.annotation.Resource;
17
import java.util.Date;
14 18

  
15 19
@Component
16 20
public class MonitorApiImpl implements MonitorApi {
......
35 39
            .getLogger(MonitorApiImpl.class);
36 40

  
37 41
    @Override
38
    public JobsOfUser getJobsOfUser(@ApiParam(value = "User email", required = true) String user,
39
                                    @ApiParam(value = "Equals to filter job type on validation history page", required = true) String jobType,
40
                                    @ApiParam(value = "Page number", required = true) String offset,
41
                                    @ApiParam(value = "Null value", required = true) String limit,
42
                                    @ApiParam(value = "Null value", required = true) String dateFrom,
43
                                    @ApiParam(value = "Null value", required = true) String dateTo,
44
                                    @ApiParam(value = "Equals to filter validation jobs", required = true) String validationStatus,
45
                                    @ApiParam(value = "Always true", required = true) String includeJobsTotal) throws JSONException, ValidatorServiceException {
42
    public JobsOfUser getJobsOfUser(@RequestParam("user") @ApiParam(value = "User email", required = true) String user,
43
                                    @RequestParam("jobType") @ApiParam(value = "Equals to filter job type on validation history page", required = true) String jobType,
44
                                    @RequestParam("offset") @ApiParam(value = "Page number", required = true) String offset,
45
                                    @RequestParam(value = "limit", required = false, defaultValue = "10") @ApiParam(value = "Null value") String limit,
46
                                    @RequestParam(value = "dateFrom", required = false, defaultValue = "2018-02-08") @ApiParam(value = "Null value") String dateFrom,
47
                                    @RequestParam(value = "dateTo", required = false, defaultValue = "2018-02-08") @ApiParam(value = "Null value") String dateTo,
48
                                    @RequestParam("validationStatus") @ApiParam(value = "Equals to filter validation jobs", required = true) String validationStatus,
49
                                    @RequestParam("includeJobsTotal") @ApiParam(value = "Always true", required = true) String includeJobsTotal) throws JSONException, ValidatorServiceException {
46 50

  
47 51
        LOGGER.debug("Getting jobs of user : " + user);
48 52
        LOGGER.debug(user + "/" + jobType + "/" + offset + "/" + dateFrom + "/" + dateTo + "/" + validationStatus + "/" + includeJobsTotal);

Also available in: Unified diff