1. Update pom.xml

2. Add validator api methods.
This commit is contained in:
Panagiotis Kanakakis 2018-01-13 09:56:52 +00:00
parent 156bbb95c0
commit dbd986f38f
3 changed files with 27 additions and 1 deletions

View File

@ -93,12 +93,13 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!--
<dependency> <dependency>
<groupId>eu.dnetlib</groupId> <groupId>eu.dnetlib</groupId>
<artifactId>uoa-utils</artifactId> <artifactId>uoa-utils</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0)</version> <version>[2.0.0-SNAPSHOT, 3.0.0)</version>
</dependency> </dependency>
-->
<dependency> <dependency>
<groupId>eu.dnetlib</groupId> <groupId>eu.dnetlib</groupId>

View File

@ -1,7 +1,10 @@
package eu.dnetlib.repo.manager.service.controllers; package eu.dnetlib.repo.manager.service.controllers;
import eu.dnetlib.api.functionality.ValidatorServiceException;
import eu.dnetlib.domain.functionality.validator.JobForValidation; import eu.dnetlib.domain.functionality.validator.JobForValidation;
import eu.dnetlib.domain.functionality.validator.RuleSet; import eu.dnetlib.domain.functionality.validator.RuleSet;
import eu.dnetlib.domain.functionality.validator.StoredJob;
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.json.JSONException; import org.json.JSONException;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -39,4 +42,14 @@ public interface ValidatorApi {
@ResponseBody @ResponseBody
RuleSet getRuleSet(String acronym); RuleSet getRuleSet(String acronym);
@RequestMapping(value = "/getStoredJobsNew" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
List<StoredJob> getStoredJobsNew(String user, String jobType, Integer offset, Integer limit, String dateFrom,
String dateTo, String validationStatus) throws ValidatorServiceException;
@RequestMapping(value = "/getStoredJobsTotalNumberNew" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
int getStoredJobsTotalNumberNew(String user, String jobType, String validationStatus) throws ValidatorServiceException;
} }

View File

@ -164,4 +164,16 @@ public class ValidatorApiImpl implements ValidatorApi{
} }
} }
@Override
public List<StoredJob> getStoredJobsNew(String user, String jobType, Integer offset, Integer limit, String dateFrom,
String dateTo, String validationStatus) throws ValidatorServiceException {
return getValidationService().getStoredJobsNew(user, jobType, offset, limit, dateFrom, dateTo, validationStatus);
}
@Override
public int getStoredJobsTotalNumberNew(String user, String jobType, String validationStatus) throws ValidatorServiceException {
return getValidationService().getStoredJobsTotalNumberNew(user, jobType, validationStatus);
}
} }