Project

General

Profile

« Previous | Next » 

Revision 49770

1. Logger messages.
2. Change configuration for application properties file

View differences:

modules/uoa-repository-manager-service/src/main/resources/application.properties
1
infrastructure.name=integration
2

  
3
# Container properties
4
container.hostname = localhost
5
container.context=repoManager
6
container.port = 8080
7

  
8
# IS
9
ISLookUpService.url = http://node6.t.openaire.research-infrastructures.eu/is/services/isLookUp
10
ISRegistryService.url = http://node6.t.openaire.research-infrastructures.eu/is/services/isRegistry
11
ISSNService.url = http://node6.t.openaire.research-infrastructures.eu/is/services/isSN
12
#ISLookUpService.url = http://localhost:9190/is/services/isLookUp
13
#ISRegistryService.url = http://localhost:9190/is/services/isRegistry
14
#ISSNService.url = http://localhost:9190/is/services/isSN
15
# LDAP
16
services.users.ldap.address = 194.177.192.119
17
services.users.ldap.port = 389
18
services.users.ldap.username = cn=admin,dc=openaire,dc=eu
19
services.users.ldap.password = serenata
20
services.users.ldap.usersDN = ou=users,dc=openaire,dc=eu
21

  
22
#services.repo-manager.repository.testing.mode = true
23

  
24
ValidatorService.url=http://adonis.athenarc.gr:8080/validator-service/services/validatorWebService
25

  
26
# Broker Service
27
services.broker.url = http://broker1-dev-dnet.d4science.org
28
#services.broker.url = http://localhost
29
services.broker.port = 8080
30
#services.broker.port = 9090
31
services.broker.api = api/
32
services.broker.openaire = openaireBroker
33

  
34
#
35
# Configuration file classpath
36
configurationFileClassPath=classpath:application-context.xml
37

  
38
api.baseAddress=https://dev-openaire.d4science.org/openaire
39

  
40
service.repository-rest-api.baseUrl = http://localhost:8080
41

  
42

  
43
# the address where validator is running and is accessible from the controllers of the web
44
services.repo-manager.baseUrl = http://${container.hostname}:${container.port}/${container.context}
45

  
46
# base address for soap web services
47
transport.soap.baseAddress = http://${container.hostname}:${container.port}/${container.context}
48

  
49
transport.soap.force.local.address = false
50

  
51
# the email of the administrator
52
# he will receive all the automatic bug reports and feedback created
53
services.repo-manager.adminEmail = nikonas@di.uoa.gr
54

  
55
# if set to true, getRepositories will return dummy repositories
56
services.repo-manager.repository.testing.mode = false
57

  
58
services.repo-manager.deploy.environment = development
59

  
60
# the mailhost for the mail service
61
services.validator.mail.host = smtp.gmail.com
62
# the port where the mail service is running
63
services.validator.mail.port = 465
64
# the address that appears in the from field in the mails send by the validator
65
services.validator.mail.fromAddress = no-reply@openaire.eu
66
# the reply-to field value in the mails send by the validator
67
services.validator.mail.replyToAddress = no-reply@openaire.eu
68
# the username of the account used to login in the mail server
69
services.validator.mail.username = test.openaire@gmail.com
70
# the password of the account used to login in the mail server
71
services.validator.mail.password = ^($*@$)*!$
72
# if authentication should take place
73
# if set to false username and password is not needed
74
services.validator.mail.authenticate = true
75
# is set to yes then all mails will not be sent to their targets but to the address specified in services.validator.mail.overrideEmail
76
services.validator.mail.override = false
77
# if set to true then no mails are send, they are only logged as a debug message
78
services.validator.mail.logonly = false
79
# the mode used for the mails send by the validator
80
services.validator.mail.mode = ssl
81
# used by eu.dnetlib.utils.MailLibrary to control debuggin messages
82
services.validator.mail.debug = false
83
# if services.validator.mail.override is true then all mails will be send only to this address
84
services.validator.mail.overrideEmail = nikonas@di.uoa.gr
85
# a comma-seperated list of address that will receive all mails about validations and repo registrations
86
services.validator.mail.specialRecipients = nikonas@di.uoa.gr
87

  
88
# a comma-seperated list of addresses that have the ability to register repos without the need for validation and registration
89
services.validator.repoRegistration.override = nikonas@di.uoa.gr
90

  
91

  
92
repomanager.db.driverClassName = org.postgresql.Driver
93
repomanager.db.url = jdbc:postgresql://194.177.192.119:5432/repomanager
94
repomanager.db.username = dnet
95
repomanager.db.password = dnetPwd
96

  
97
services.repomanager.analyticsURL = http://analytics.openaire.eu/addsite.php?
modules/uoa-repository-manager-service/src/main/java/eu/dnetlib/repo/manager/service/utils/Converter.java
8 8
import org.json.JSONException;
9 9
import org.json.JSONObject;
10 10

  
11
import java.io.BufferedReader;
12
import java.io.File;
13
import java.io.FileReader;
14
import java.io.IOException;
11
import java.io.*;
15 12
import java.text.ParseException;
16 13
import java.text.SimpleDateFormat;
17 14
import java.util.*;
......
195 192
        String line;
196 193
        ArrayList<String> list = new ArrayList<String>();
197 194
        try {
198
            File file = new File(Converter.class.getResource("/eu/dnetlib/repo/manager/service/utils/"+filename).getFile());
199
            BufferedReader br = new BufferedReader(new FileReader(file));
195
            InputStream in = Converter.class.getResourceAsStream("resources/eu/dnetlib/repo/manager/service/utils/"+filename);
196
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
200 197
            while((line = br.readLine()) != null) {
201 198
                list.add(line.trim());
202 199
            }
203 200
            br.close();
204 201
        } catch (IOException e) {
202
            LOGGER.debug("Error opening file!");
205 203
            e.printStackTrace();
206 204
        }
207 205
        return list;
modules/uoa-repository-manager-service/src/main/java/eu/dnetlib/repo/manager/service/controllers/RepositoryApi.java
111 111
    @ResponseBody
112 112
    String updateOfficialName(String id, String officialName);
113 113

  
114
    @RequestMapping(value = "/getUrlsOfUserRepos/{email}/{page}/{size}/",method = RequestMethod.GET,
114
    @RequestMapping(value = "/getUrlsOfUserRepos/{user_email}/{page}/{size}/",method = RequestMethod.GET,
115 115
            produces = MediaType.APPLICATION_JSON_VALUE)
116 116
    @ResponseBody
117 117
    List<String> getUrlsOfUserRepos(String user_email,
modules/uoa-repository-manager-service/src/main/java/eu/dnetlib/repo/manager/service/controllers/RepositoryApiImpl.java
44 44

  
45 45
    @PostConstruct
46 46
    private void init(){
47
        LOGGER.debug("Initialization method of repository api!");
48

  
47 49
        restTemplate = new RestTemplate();
48 50
        restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
49 51

  
......
161 163
                                                  @PathVariable("page") String page,
162 164
                                                  @PathVariable("size") String size) throws JSONException {
163 165

  
166
        LOGGER.debug("Retreiving repositories of user : " + userEmail + " with params: " + baseAddress + "-" + page + "/" + size);
164 167
        UriComponents uriComponents = UriComponentsBuilder
165 168
                .fromHttpUrl(baseAddress + "/ds/search/email/")
166 169
                .path("/{page}/{size}/")
167 170
                .queryParam("contactemail",userEmail)
168 171
                .build().expand(page,size).encode();
169

  
172
        
173
        LOGGER.debug("URI -> " + uriComponents.toUri());
170 174
        String rs = restTemplate.getForObject(uriComponents.toUri(), String.class);
175
        LOGGER.debug("Repositories are : " + rs);
171 176
        return Converter.jsonToRepositoryList(new JSONArray(rs));
172 177
    }
173 178

  
......
248 253

  
249 254
    @Override
250 255
    public List<String> getDnetCountries() {
256
        LOGGER.debug("Getting dnet-countries!");
251 257
        return Converter.readFile("countries.txt");
252 258
    }
253 259

  
modules/uoa-repository-manager-service/src/main/resources/application-context.xml
6 6
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
7 7
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
8 8

  
9
    <!--<bean id="validationService" class="eu.dnetlib.repo.manager.service.controllers.ValidatorApiImpl">
10
        <property name="validatorServiceLocator" ref="validatorServiceLocator"/>
11
    </bean>
9
    <context:property-placeholder location="classpath*:/eu/**/application.properties" />
12 10

  
13
    <bean id="monitorService" class="eu.dnetlib.repo.manager.service.controllers.MonitorApiImpl">
14
        <property name="validatorServiceLocator" ref="validatorServiceLocator"/>
15
    </bean>-->
16

  
17
    <context:property-placeholder location="classpath*:/application.properties" />
18 11
</beans>
modules/uoa-repository-manager-service/src/main/resources/eu/dnetlib/repo/manager/service/application.properties
1
infrastructure.name=integration
2

  
3
# Container properties
4
container.hostname = localhost
5
container.context=repoManager
6
container.port = 8080
7

  
8
# IS
9
ISLookUpService.url = http://node6.t.openaire.research-infrastructures.eu/is/services/isLookUp
10
ISRegistryService.url = http://node6.t.openaire.research-infrastructures.eu/is/services/isRegistry
11
ISSNService.url = http://node6.t.openaire.research-infrastructures.eu/is/services/isSN
12
#ISLookUpService.url = http://localhost:9190/is/services/isLookUp
13
#ISRegistryService.url = http://localhost:9190/is/services/isRegistry
14
#ISSNService.url = http://localhost:9190/is/services/isSN
15
# LDAP
16
services.users.ldap.address = 194.177.192.119
17
services.users.ldap.port = 389
18
services.users.ldap.username = cn=admin,dc=openaire,dc=eu
19
services.users.ldap.password = serenata
20
services.users.ldap.usersDN = ou=users,dc=openaire,dc=eu
21

  
22
#services.repo-manager.repository.testing.mode = true
23

  
24
ValidatorService.url=http://adonis.athenarc.gr:8080/validator-service/services/validatorWebService
25

  
26
# Broker Service
27
services.broker.url = http://broker1-dev-dnet.d4science.org
28
#services.broker.url = http://localhost
29
services.broker.port = 8080
30
#services.broker.port = 9090
31
services.broker.api = api/
32
services.broker.openaire = openaireBroker
33

  
34
#
35
# Configuration file classpath
36
configurationFileClassPath=classpath:application-context.xml
37

  
38
api.baseAddress=https://dev-openaire.d4science.org/openaire
39

  
40
service.repository-rest-api.baseUrl = http://localhost:8080
41

  
42

  
43
# the address where validator is running and is accessible from the controllers of the web
44
services.repo-manager.baseUrl = http://${container.hostname}:${container.port}/${container.context}
45

  
46
# base address for soap web services
47
transport.soap.baseAddress = http://${container.hostname}:${container.port}/${container.context}
48

  
49
transport.soap.force.local.address = false
50

  
51
# the email of the administrator
52
# he will receive all the automatic bug reports and feedback created
53
services.repo-manager.adminEmail = nikonas@di.uoa.gr
54

  
55
# if set to true, getRepositories will return dummy repositories
56
services.repo-manager.repository.testing.mode = false
57

  
58
services.repo-manager.deploy.environment = development
59

  
60
# the mailhost for the mail service
61
services.validator.mail.host = smtp.gmail.com
62
# the port where the mail service is running
63
services.validator.mail.port = 465
64
# the address that appears in the from field in the mails send by the validator
65
services.validator.mail.fromAddress = no-reply@openaire.eu
66
# the reply-to field value in the mails send by the validator
67
services.validator.mail.replyToAddress = no-reply@openaire.eu
68
# the username of the account used to login in the mail server
69
services.validator.mail.username = test.openaire@gmail.com
70
# the password of the account used to login in the mail server
71
services.validator.mail.password = ^($*@$)*!$
72
# if authentication should take place
73
# if set to false username and password is not needed
74
services.validator.mail.authenticate = true
75
# is set to yes then all mails will not be sent to their targets but to the address specified in services.validator.mail.overrideEmail
76
services.validator.mail.override = false
77
# if set to true then no mails are send, they are only logged as a debug message
78
services.validator.mail.logonly = false
79
# the mode used for the mails send by the validator
80
services.validator.mail.mode = ssl
81
# used by eu.dnetlib.utils.MailLibrary to control debuggin messages
82
services.validator.mail.debug = false
83
# if services.validator.mail.override is true then all mails will be send only to this address
84
services.validator.mail.overrideEmail = nikonas@di.uoa.gr
85
# a comma-seperated list of address that will receive all mails about validations and repo registrations
86
services.validator.mail.specialRecipients = nikonas@di.uoa.gr
87

  
88
# a comma-seperated list of addresses that have the ability to register repos without the need for validation and registration
89
services.validator.repoRegistration.override = nikonas@di.uoa.gr
90

  
91

  
92
repomanager.db.driverClassName = org.postgresql.Driver
93
repomanager.db.url = jdbc:postgresql://194.177.192.119:5432/repomanager
94
repomanager.db.username = dnet
95
repomanager.db.password = dnetPwd
96

  
97
services.repomanager.analyticsURL = http://analytics.openaire.eu/addsite.php?
modules/uoa-repository-manager-service/src/main/webapp/WEB-INF/spring-servlet.xml
9 9
		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
10 10
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
11 11

  
12
    <context:property-placeholder location="classpath*:/application.properties"/>
12
    <context:property-placeholder location="classpath*:/eu/**/application.properties" />
13 13
    <context:annotation-config/>
14 14
    <context:component-scan base-package="eu.dnetlib.repo.manager.service.controllers"/>
15 15
    <mvc:annotation-driven/>
modules/uoa-repository-manager-service/src/main/webapp/WEB-INF/applicationContext.xml
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2
<beans xmlns="http://www.springframework.org/schema/beans"
3 3
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4
       xmlns:context="http://www.springframework.org/schema/context"
5
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
5 6

  
6 7
    <import resource="classpath*:/application-context.xml"/>
7 8

  
......
25 26
    <import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>
26 27

  
27 28

  
29
    <context:property-placeholder location="classpath*:/eu/**/application.properties" />
28 30

  
29 31
    <bean class="eu.dnetlib.repo.manager.service.config.CascadingPropertyLoader" id="propertyLoader">
30 32
        <property name="order" value="2" />

Also available in: Unified diff