Project

General

Profile

« Previous | Next » 

Revision 57217

Adding job summary

View differences:

modules/uoa-repository-manager-service/trunk/src/test/resources/application-context.xml
29 29
                <value>classpath*:/application.properties</value>
30 30
                <value>classpath*:/email-texts.properties</value>
31 31

  
32
                <value>classpath*:dnet-site-wizard.properties</value>
33
                <value>classpath*:dnet-site-override.properties</value>
34
                <value>classpath*:dnet-wizard.properties</value>
35
                <value>classpath*:dnet-override-new.properties</value>
36
                <value>classpath*:dnet-validator-wizard.properties</value>
37
                <value>classpath*:dnet-validator-override.properties</value>
38
                <value>classpath*:dnet-site-force-override.properties</value>
39
                <value>classpath*:dnet-force-override.properties</value>
32
<!--                <value>classpath*:dnet-site-wizard.properties</value>-->
33
<!--                <value>classpath*:dnet-site-override.properties</value>-->
34
<!--                <value>classpath*:dnet-wizard.properties</value>-->
35
<!--                <value>classpath*:dnet-override-new.properties</value>-->
36
<!--                <value>classpath*:dnet-validator-wizard.properties</value>-->
37
<!--                <value>classpath*:dnet-validator-override.properties</value>-->
38
<!--                <value>classpath*:dnet-site-force-override.properties</value>-->
39
<!--                <value>classpath*:dnet-force-override.properties</value>-->
40 40
            </list>
41 41
        </property>
42 42
    </bean>
modules/uoa-repository-manager-service/trunk/src/test/resources/applicationContext.xml
55 55
                <value>classpath*:/application.properties</value>
56 56
                <value>classpath*:/email-texts.properties</value>
57 57

  
58
                <value>classpath*:dnet-site-wizard.properties</value>
59
                <value>classpath*:dnet-site-override.properties</value>
60
                <value>classpath*:dnet-wizard.properties</value>
61
                <value>classpath*:dnet-override-new.properties</value>
62
                <value>classpath*:dnet-validator-wizard.properties</value>
63
                <value>classpath*:dnet-validator-override.properties</value>
64
                <value>classpath*:dnet-site-force-override.properties</value>
65
                <value>classpath*:dnet-force-override.properties</value>
58
<!--                <value>classpath*:dnet-site-wizard.properties</value>-->
59
<!--                <value>classpath*:dnet-site-override.properties</value>-->
60
<!--                <value>classpath*:dnet-wizard.properties</value>-->
61
<!--                <value>classpath*:dnet-override-new.properties</value>-->
62
<!--                <value>classpath*:dnet-validator-wizard.properties</value>-->
63
<!--                <value>classpath*:dnet-validator-override.properties</value>-->
64
<!--                <value>classpath*:dnet-site-force-override.properties</value>-->
65
<!--                <value>classpath*:dnet-force-override.properties</value>-->
66 66
            </list>
67 67
        </property>
68 68
    </bean>
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/ValidatorService.java
2 2

  
3 3
import eu.dnetlib.api.functionality.ValidatorServiceException;
4 4
import eu.dnetlib.domain.functionality.validator.JobForValidation;
5
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
5 6
import eu.dnetlib.domain.functionality.validator.RuleSet;
6 7
import eu.dnetlib.domain.functionality.validator.StoredJob;
8
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
7 9
import eu.dnetlib.repo.manager.shared.InterfaceInformation;
8 10
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
9 11
import org.json.JSONException;
......
39 41
    int getStoredJobsTotalNumberNew(String user, String jobType, String validationStatus) throws ValidatorServiceException;
40 42

  
41 43
    InterfaceInformation getInterfaceInformation(String baseUrl) throws ValidationServiceException;
44

  
45
    List<StoredJob> getJobsSummary(String repoId, int limit) throws ValidatorServiceException, ResourceNotFoundException, JSONException;
42 46
}
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/ValidatorServiceImpl.java
1 1
package eu.dnetlib.repo.manager.service;
2 2

  
3 3
import eu.dnetlib.api.functionality.ValidatorServiceException;
4
import eu.dnetlib.domain.data.Repository;
5
import eu.dnetlib.domain.data.RepositoryInterface;
4 6
import eu.dnetlib.domain.functionality.validator.JobForValidation;
7
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
5 8
import eu.dnetlib.domain.functionality.validator.RuleSet;
6 9
import eu.dnetlib.domain.functionality.validator.StoredJob;
10
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
7 11
import eu.dnetlib.repo.manager.shared.Constants;
8 12
import eu.dnetlib.repo.manager.shared.InterfaceInformation;
9 13
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
10 14
import eu.dnetlib.repo.manager.utils.OaiTools;
11 15
import gr.uoa.di.driver.util.ServiceLocator;
12
import io.swagger.annotations.ApiParam;
13 16
import org.apache.log4j.Logger;
14 17
import org.json.JSONException;
15 18
import org.springframework.beans.factory.annotation.Autowired;
......
18 21
import org.springframework.security.access.prepost.PreAuthorize;
19 22
import org.springframework.security.core.context.SecurityContextHolder;
20 23
import org.springframework.stereotype.Service;
21
import org.springframework.web.bind.annotation.PathVariable;
22
import org.springframework.web.bind.annotation.RequestBody;
23
import org.springframework.web.bind.annotation.RequestParam;
24 24

  
25 25
import javax.annotation.PostConstruct;
26 26
import javax.annotation.Resource;
27 27
import java.util.*;
28 28
import java.util.concurrent.ConcurrentHashMap;
29
import java.util.stream.Collectors;
29 30

  
30 31

  
31 32
@Service("validatorService")
......
34 35
    @Autowired
35 36
    private MonitorServiceImpl monitorApi;
36 37

  
38
    @Autowired
39
    private RepositoryService repositoryService;
40

  
37 41
    @Resource(name = "validatorServiceLocator")
38 42
    private ServiceLocator<eu.dnetlib.api.functionality.ValidatorService> validatorServiceLocator;
39 43

  
......
220 224
        }
221 225
    }
222 226

  
227
    @Override
228
    public List<StoredJob> getJobsSummary(String repoId, int limit) throws JSONException, ValidatorServiceException {
229
        return getValidationService().getJobSummary(repositoryService.getRepositoryInterface(repoId).stream().map(RepositoryInterface::getBaseUrl).collect(Collectors.toList()),limit);
230
    }
223 231

  
232

  
224 233
}
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/controllers/ValidatorController.java
2 2

  
3 3
import eu.dnetlib.api.functionality.ValidatorServiceException;
4 4
import eu.dnetlib.domain.data.RepositoryInterface;
5
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
5 6
import eu.dnetlib.domain.functionality.validator.StoredJob;
6 7
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
7 8
import eu.dnetlib.repo.manager.service.EmailUtils;
......
23 24
import org.springframework.security.access.prepost.PreAuthorize;
24 25
import org.springframework.web.bind.annotation.*;
25 26

  
27
import javax.ws.rs.Path;
26 28

  
29

  
27 30
@RestController
28 31
@RequestMapping(value = "/validator")
29 32
@Api(description = "Validator API",  tags = {"validator"})
......
105 108
        return validatorService.getInterfaceInformation(baseUrl);
106 109
    }
107 110

  
111
    @RequestMapping(value = "/validationSummary/{repoId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
112
    @ResponseBody
113
    public List<StoredJob> getInterfaceInformation(@PathVariable(value = "repoId") String repoId, @RequestParam(name = "size", defaultValue = "20") int size ) throws ValidatorServiceException, ResourceNotFoundException, JSONException {
114
        return validatorService.getJobsSummary(repoId,size);
115
    }
108 116

  
117

  
109 118
    @RequestMapping(value = "/complete" , method = RequestMethod.POST,  produces = MediaType.APPLICATION_JSON_VALUE)
110 119
    @ResponseBody
111 120
    public void validationCompleted(
modules/uoa-repository-manager-service/trunk/src/main/resources/application-context.xml
29 29
                <value>classpath*:/application.properties</value>
30 30
                <value>classpath*:email-texts.properties</value>
31 31

  
32
                <value>classpath*:dnet-site-wizard.properties</value>
33
                <value>classpath*:dnet-site-override.properties</value>
34
                <value>classpath*:dnet-wizard.properties</value>
35
                <value>classpath*:dnet-override.properties</value>
36
                <value>classpath*:dnet-validator-wizard.properties</value>
37
                <value>classpath*:dnet-validator-override.properties</value>
38
                <value>classpath*:dnet-site-force-override.properties</value>
39
                <value>classpath*:dnet-force-override.properties</value>
32
<!--                <value>classpath*:dnet-site-wizard.properties</value>-->
33
<!--                <value>classpath*:dnet-site-override.properties</value>-->
34
<!--                <value>classpath*:dnet-wizard.properties</value>-->
35
<!--                <value>classpath*:dnet-override.properties</value>-->
36
<!--                <value>classpath*:dnet-validator-wizard.properties</value>-->
37
<!--                <value>classpath*:dnet-validator-override.properties</value>-->
38
<!--                <value>classpath*:dnet-site-force-override.properties</value>-->
39
<!--                <value>classpath*:dnet-force-override.properties</value>-->
40 40
            </list>
41 41
        </property>
42 42
    </bean>
modules/uoa-repository-manager-service/trunk/src/main/resources/application.properties
1 1
infrastructure.name=integration
2 2

  
3 3
## Container properties
4
container.hostname=localhost
4
container.hostname=estella.athenarc.gr
5 5
container.context=uoa-repository-manager-service
6
container.port = 8480
6
container.port=8480
7 7

  
8 8
IS.url = https://dev-openaire.d4science.org/is/services
9 9
ISLookUpService.url = ${IS.url}/isLookUp
10 10
ISRegistryService.url = ${IS.url}/isRegistry
11 11
ISSNService.url = ${IS.url}/services/isSN
12 12

  
13
#ValidatorService.url=http://88.197.53.69:8080/validator-service/services/validatorWebService
14
#ValidatorService.url=http://beta.services.openaire.eu/validator-service/services/validatorWebService
13 15
ValidatorService.url=http://localhost:8080/validator-service/services/validatorWebService
14
#ValidatorService.url=http://beta.services.openaire.eu/validator-service/services/validatorWebService
15
#ValidatorService.url=http://88.197.53.69:8080/validator-service/
16 16

  
17 17
services.provide.adminEmail=provide-admin@openaire.eu
18 18

  
......
31 31
transport.soap.baseAddress = http://${container.hostname}:${container.port}/${container.context}
32 32
transport.soap.force.local.address = false
33 33

  
34

  
35
validator.results.url=https://${container.hostname}:${container.port}/compatibility/browseHistory/
34 36
services.repo-manager.adminEmail = antleb@di.uoa.gr
35 37
services.repo-manager.repository.testing.mode = false
36 38
services.repo-manager.deploy.environment = development
......
68 70

  
69 71
##REDIS-AAI
70 72

  
71
redis.host=vereniki.athenarc.gr
73
redis.host=estella.athenarc.gr
72 74
redis.port=6379
73
redis.password=redis01041992s
75
redis.password=redis123
74 76
aai.mode=develop
75 77

  
76
#redis.host = aleka.athenarc.gr
77
#redis.port = 6379
78
#redis.password =
79
#aai.mode = develop
80 78

  
81
#redis.host=localhost
82
#redis.port=6379
83
#redis.password=
84
#aai.mode=develop
85

  
86 79
services.repomanager.usageStatisticsDiagramsBaseURL = https://beta.openaire.eu/stats3/
87 80
services.repomanager.usageStatisticsNumbersBaseURL = https://beta.services.openaire.eu/usagestats/datasources/
88 81
services.repomanager.usagestats.adminEmail = antleb@di.uoa.gr

Also available in: Unified diff