Project

General

Profile

« Previous | Next » 

Revision 57216

Splitting some listeners and adding getJobSummary methods

View differences:

modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManager.java
1 1
package eu.dnetlib.validator.service.impl;
2 2

  
3 3
import eu.dnetlib.domain.functionality.validator.JobForValidation;
4
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
4 5
import eu.dnetlib.domain.functionality.validator.RuleSet;
5 6
import eu.dnetlib.domain.functionality.validator.StoredJob;
6 7
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob;
7 8
import eu.dnetlib.enabling.tools.blackboard.BlackboardNotificationHandler;
8 9
import eu.dnetlib.enabling.tools.blackboard.BlackboardServerHandler;
10
import eu.dnetlib.validator.commons.dao.DaoException;
9 11
import eu.dnetlib.validator.engine.ValidatorException;
10 12

  
11 13
import java.util.List;
......
30 32

  
31 33
    int getStoredJobsTotalNumber(String userMail, String jobType, String jobStatus) throws ValidatorException;
32 34

  
35
    List<StoredJob> getJobSummary(List<String> baseUrl, int limit) throws DaoException;
36

  
37

  
33 38
}
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManagerImpl.java
1 1
package eu.dnetlib.validator.service.impl;
2 2

  
3
import eu.dnetlib.domain.functionality.validator.CustomProperties;
4
import eu.dnetlib.domain.functionality.validator.JobForValidation;
5
import eu.dnetlib.domain.functionality.validator.RuleSet;
6
import eu.dnetlib.domain.functionality.validator.StoredJob;
3
import eu.dnetlib.domain.functionality.validator.*;
7 4
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob;
8 5
import eu.dnetlib.enabling.tools.blackboard.BlackboardNotificationHandler;
9 6
import eu.dnetlib.enabling.tools.blackboard.BlackboardServerHandler;
......
65 62
			throw new ValidatorException(e);
66 63
		}
67 64
	}
65

  
66
	public List<StoredJob> getJobSummary(List<String> baseUrl, int limit) throws DaoException {
67
		return jobsDao.getJobSummary(baseUrl,limit);
68
	}
68 69
	
69 70
	public List<StoredJob> getStoredJobs(String userMail, String jobType,
70 71
			Integer offset, Integer limit, String dateFrom, String dateTo)
......
233 234
					logger.debug("Setting METADATA_PREFIX to: oai_openaire");
234 235
					job.setMetadataPrefix("oai_openaire");
235 236
				} else if (
236
//					job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0") ||
237 237
						job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d$") ||
238
//					job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire3.0") ||
239
//					job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire4.0") ||
240 238
								job.getDesiredCompatibilityLevel().equalsIgnoreCase("driver")) {
241 239
					logger.debug("Chosen set: OpenAIRE For Literature Repositories");
242 240
					logger.debug("Setting METADATA_PREFIX to: oai_dc");
243 241
					job.setMetadataPrefix("oai_dc");
244 242
				} else if (job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d_data$")) {
245
					// job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0_data")) {
246 243
					logger.debug("Chosen set: OpenAIRE For Data Archives");
247 244
					logger.debug("Setting METADATA_PREFIX to: oai_datacite");
248 245
					job.setMetadataPrefix("oai_datacite");
249 246
				} else if (job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d(.\\d)?_cris$")) {
250
					// job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire3.0_cris")) {
251 247
					logger.debug("Chosen set: OpenAIRE For Cris");
252 248
					logger.debug("Setting METADATA_PREFIX to: oai_CERIF_openaire");
253 249
					job.setMetadataPrefix("oai_CERIF_openaire");
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorServiceImpl.java
6 6
import eu.dnetlib.domain.ResourceType;
7 7
import eu.dnetlib.domain.enabling.Notification;
8 8
import eu.dnetlib.domain.functionality.validator.JobForValidation;
9
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
9 10
import eu.dnetlib.domain.functionality.validator.RuleSet;
10 11
import eu.dnetlib.domain.functionality.validator.StoredJob;
11 12
import eu.dnetlib.enabling.tools.blackboard.BlackboardNotificationHandler;
12 13
import eu.dnetlib.enabling.tools.blackboard.BlackboardServerHandler;
14
import eu.dnetlib.validator.commons.dao.DaoException;
13 15
import eu.dnetlib.validator.engine.ValidatorException;
14 16
import gr.uoa.di.driver.app.DriverServiceImpl;
15 17
import gr.uoa.di.driver.enabling.issn.NotificationListener;
......
67 69
	}
68 70

  
69 71
	@Override
72
	public List<StoredJob> getJobSummary(List<String> baseUrl, int size) throws ValidatorServiceException {
73
		try {
74
			return valManager.getJobSummary(baseUrl,size);
75
		} catch (DaoException e) {
76
			throw new ValidatorServiceException(e);
77
		}
78
	}
79

  
80

  
81
	@Override
70 82
	public List<StoredJob> getStoredJobs(String userMail, String jobType,
71 83
										 Integer offset, Integer limit, String dateFrom, String dateTo)
72 84
			throws ValidatorServiceException {
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impls/listeners/AbstractValidatorListener.java
1
package eu.dnetlib.validator.service.impls.listeners;
2

  
3
import eu.dnetlib.validator.commons.dao.jobs.JobsDAO;
4
import eu.dnetlib.validator.engine.execution.CompletedTask;
5
import eu.dnetlib.validator.engine.execution.JobListener;
6
import org.apache.log4j.Logger;
7
import org.springframework.transaction.annotation.Propagation;
8
import org.springframework.transaction.annotation.Transactional;
9

  
10
import java.util.List;
11
import java.util.Map;
12

  
13
public abstract class AbstractValidatorListener implements JobListener {
14

  
15
    private static Logger logger = Logger.getLogger(AbstractValidatorListener.class);
16
    private JobsDAO jobsDao;
17
    protected int jobId;
18
    protected boolean updateExisting;
19
    private int totalJobs;
20
    private int jobsFinished = 0;
21

  
22
    protected int score_content = 0, score_usage = 0;
23

  
24

  
25
    public AbstractValidatorListener() {
26
        logger.error("Creating new validator listener");
27
    }
28

  
29
    protected abstract void jobSuccess(int jobId,  Map<String, Object> jobContext);
30

  
31
    protected abstract void jobFailure(int jobId,  Map<String, Object> jobContext, Throwable t);
32

  
33

  
34
    @Override
35
    @Transactional(propagation = Propagation.REQUIRED)
36
    public synchronized void finished(int jobId, Map<String, Object> jobContext) {
37

  
38
        try{
39
            jobsFinished++;
40
            if (jobContext.containsKey("score_content")) {
41
                score_content = (Integer) jobContext.get("score_content");
42
            } else if (jobContext.containsKey("score_usage")) {
43
                score_usage = (Integer) jobContext.get("score_usage");
44
            }
45
            if (jobsFinished == totalJobs) {
46
                logger.debug("all jobs for registration finished");
47
                jobsDao.setTotalJobFinished(jobId, null, false);
48
                logger.debug("id:"+jobId+ "c: " + score_content + " u:" + score_usage);
49
                jobSuccess((Integer) jobContext.get("jobSubmittedId"), jobContext);
50
            } else {
51
                logger.debug("not all jobs finished yet. Waiting "+ (totalJobs-jobsFinished) + " job(s) to finish" );
52
            }
53
        } catch (Exception e) {
54
            logger.error("Error while finalizing successfull registration job");
55
        }
56
    }
57

  
58
    @Override
59
    @Transactional(propagation = Propagation.REQUIRED)
60
    public synchronized void failed(int jobId, Map<String, Object> jobContext, Throwable t) {
61

  
62
        try{
63
            jobsDao.setTotalJobFinished(jobId, t.getMessage(), true);
64
            this.jobFailure((Integer) jobContext.get("jobSubmittedId"), jobContext,t);
65
        } catch (Exception e) {
66
            logger.error("Error while finalizing failed registration job");
67
        }
68
    }
69

  
70
    @Override
71
    public synchronized void currentResults(List<CompletedTask> tasks, int jobId,
72
                                            Object object, Map<String, Object> recordContext, Throwable t) {
73
        // We don't care about partial results.
74
    }
75

  
76
    @Override
77
    public synchronized void currentResults(List<CompletedTask> tasks, int jobId,
78
                                            Object object, Map<String, Object> recordContext) {
79
        // We don't care about partial results.
80
    }
81

  
82
    public JobsDAO getJobsDao() {
83
        return jobsDao;
84
    }
85

  
86
    public void setJobsDao(JobsDAO jobsDao) {
87
        this.jobsDao = jobsDao;
88
    }
89

  
90
    public int getJobId() {
91
        return jobId;
92
    }
93

  
94
    public void setJobId(int jobId) {
95
        this.jobId = jobId;
96
    }
97

  
98
    public boolean isUpdateExisting() {
99
        return updateExisting;
100
    }
101

  
102
    public void setUpdateExisting(boolean updateExisting) {
103
        this.updateExisting = updateExisting;
104
    }
105

  
106
    public int getTotalJobs() {
107
        return totalJobs;
108
    }
109

  
110
    public void setTotalJobs(int totalJobs) {
111
        this.totalJobs = totalJobs;
112
    }
113

  
114
    public int getJobsFinished() {
115
        return jobsFinished;
116
    }
117

  
118
    public void setJobsFinished(int jobsFinished) {
119
        this.jobsFinished = jobsFinished;
120
    }
121

  
122
    public int getScore_content() {
123
        return score_content;
124
    }
125

  
126
    public void setScore_content(int score_content) {
127
        this.score_content = score_content;
128
    }
129

  
130
    public int getScore_usage() {
131
        return score_usage;
132
    }
133

  
134
    public void setScore_usage(int score_usage) {
135
        this.score_usage = score_usage;
136
    }
137
}
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impls/listeners/CompatibilityTestListener.java
13 13
import eu.dnetlib.validator.engine.execution.CompletedTask;
14 14
import eu.dnetlib.validator.engine.execution.JobListener;
15 15

  
16
public class CompatibilityTestListener implements JobListener{
16
public class CompatibilityTestListener extends AbstractValidatorListener{
17 17
	private static Logger logger = Logger.getLogger(CompatibilityTestListener.class);
18 18
	
19 19
	private Emailer emailer = null;
20 20
	private String valBaseUrl = null;
21 21
	private String validationSet = null; 
22 22
	private String guidelines = null;
23
	private JobsDAO jobsDao;
24
	
25
	private int totalJobs;
26
	private int jobsFinished = 0;
27 23

  
28 24
	@Override
29
	@Transactional(propagation = Propagation.REQUIRED)
30
	public synchronized void finished(int jobId, Map<String, Object> jobContext) {
31
		try {
32
			jobsFinished++;
33
			if (jobsFinished == totalJobs) {
34
				logger.debug("all jobs finished");
35
				jobsDao.setTotalJobFinished(jobId, null, false);
36
				this.sendMail((Integer) jobContext.get("jobSubmittedId"), (String) jobContext.get("jobSubmittedUser"));
37
			} else {
38
				logger.debug("not all jobs finished yet. Waiting "+ (totalJobs-jobsFinished) + " job(s) to finish" );
39
			}
40
		} catch (Exception e) {
41
			logger.error("Error while finalizing successfull compatibility test job", e);
42
		}
25
	protected void jobSuccess(int jobId, Map<String, Object> jobContext) {
26
		sendMail(jobId, (String) jobContext.get("jobSubmittedUser"));
43 27
	}
44 28

  
45 29
	@Override
46
	@Transactional(propagation = Propagation.REQUIRED)
47
	public synchronized void failed(int jobId, Map<String, Object> jobContext, Throwable t) {
48
		try {
49
			jobsFinished++;
50
			if (jobsFinished == totalJobs) {
51
				jobsDao.setTotalJobFinished(jobId, t.getMessage(), true);
52
				this.sendMail((Integer) jobContext.get("jobSubmittedId"), (String) jobContext.get("jobSubmittedUser"));
53
			} else {
54
				logger.debug("not all jobs finished yet. Waiting "+ (totalJobs-jobsFinished) + " job(s) to finish" );
55
			}
56
		} catch (Exception e) {
57
			logger.error("Error while finalizing failed compatibility test job", e);
58
		}
30
	protected void jobFailure(int jobId, Map<String, Object> jobContext, Throwable t) {
31
		sendMail( jobId, (String) jobContext.get("jobSubmittedUser"));
59 32
	}
60 33

  
61

  
62
	
63 34
	private void sendMail(int jobSubmittedId, String jobSubmittedUser) {
64 35
		logger.debug("JOBID:"+jobSubmittedId+"# Sending email for finished job");
65 36
		String mailTo = jobSubmittedUser;
......
78 49
			logger.error("JOBID:"+jobSubmittedId+"# Error sending email for finished job", e);
79 50
		}
80 51
	}
81
	
82
	@Override
83
	public void currentResults(List<CompletedTask> tasks, int jobId,
84
			Object object, Map<String, Object> recordContext, Throwable t) {
85
		// TODO Auto-generated method stub
86
		
87
	}
88 52

  
89
	@Override
90
	public void currentResults(List<CompletedTask> tasks, int jobId,
91
			Object object, Map<String, Object> recordContext) {
92
		// TODO Auto-generated method stub
93
		
94
	}
95

  
96 53
	public String getValBaseUrl() {
97 54
		return valBaseUrl;
98 55
	}
......
125 82
		this.guidelines = guidelines;
126 83
	}
127 84

  
128
	public int getTotalJobs() {
129
		return totalJobs;
130
	}
131

  
132
	public void setTotalJobs(int totalJobs) {
133
		this.totalJobs = totalJobs;
134
	}
135

  
136
	public JobsDAO getJobsDao() {
137
		return jobsDao;
138
	}
139

  
140
	public void setJobsDao(JobsDAO jobsDao) {
141
		this.jobsDao = jobsDao;
142
	}
143

  
144
	
145 85
}
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impls/listeners/RegistrationListener.java
1 1
package eu.dnetlib.validator.service.impls.listeners;
2 2

  
3
import java.util.List;
4
import java.util.Map;
5 3

  
6 4
import org.apache.log4j.Logger;
7 5
import org.springframework.http.*;
8
import org.springframework.transaction.annotation.Propagation;
9
import org.springframework.transaction.annotation.Transactional;
10

  
11
import eu.dnetlib.api.data.DatasourceManagerService;
12
import eu.dnetlib.validator.commons.dao.jobs.JobsDAO;
13
import eu.dnetlib.validator.commons.email.Emailer;
14
import eu.dnetlib.validator.engine.execution.CompletedTask;
15
import eu.dnetlib.validator.engine.execution.JobListener;
16
import gr.uoa.di.driver.util.ServiceLocator;
17 6
import org.springframework.util.LinkedMultiValueMap;
18 7
import org.springframework.util.MultiValueMap;
19 8
import org.springframework.web.client.RestTemplate;
20 9

  
21
public class RegistrationListener implements JobListener{
22
	
23
//	private String valBaseUrl = null;
24
	private String providerUrl = null;
25
	private JobsDAO jobsDao;
10
import java.util.Map;
26 11

  
27
	private int jobId;
28
//	private String activationId;
29
	private String userMail;
30
//	private String officialName;
31
//	private String baseUrl;
12
public class RegistrationListener extends AbstractValidatorListener {
13

  
32 14
	private String datasourceId;
33 15
	private String interfaceId;
34
//	private String interfaceIdOld;
35
//	private String validationSet;
36
//	private String desiredCompLevel;
37
//	private String repoType;
16
	private String providerUrl = null;
17
	private String userMail;
38 18

  
39
	private boolean updateExisting;
40
	
41
	private int totalJobs;
42
	private int jobsFinished = 0;
43
	
44
	private int score_content = 0, score_usage = 0;
45

  
46 19
	private static Logger logger = Logger.getLogger(RegistrationListener.class);
47 20

  
48 21
	public RegistrationListener() {
49 22
		logger.error("Creating new registration listener");
50 23
	}
51 24

  
52
	@Override
53
	@Transactional(propagation = Propagation.REQUIRED)
54
	public synchronized void finished(int jobId, Map<String, Object> jobContext) {
55 25

  
56
		try{
57
			jobsFinished++;
58
			if (jobContext.containsKey("score_content")) {
59
				score_content = (Integer) jobContext.get("score_content");
60
			} else if (jobContext.containsKey("score_usage")) {
61
				score_usage = (Integer) jobContext.get("score_usage");
62
			}
63
			if (jobsFinished == totalJobs) {
64
				logger.debug("all jobs for registration finished");
65
				jobsDao.setTotalJobFinished(jobId, null, false);
66
				logger.debug("id:"+jobId+ "c: " + score_content + " u:" + score_usage);
67
				this.jobSuccess((Integer) jobContext.get("jobSubmittedId"), score_content, score_usage);
68
			} else {
69
				logger.debug("not all jobs finished yet. Waiting "+ (totalJobs-jobsFinished) + " job(s) to finish" );
70
			}
71
		} catch (Exception e) {
72
			logger.error("Error while finalizing successfull registration job");
73
		}
74
	}
75 26

  
76
	@Override
77
	@Transactional(propagation = Propagation.REQUIRED)
78
	public synchronized void failed(int jobId, Map<String, Object> jobContext, Throwable t) {
79

  
80
		try{
81
			jobsDao.setTotalJobFinished(jobId, t.getMessage(), true);
82
			this.jobFailure((Integer) jobContext.get("jobSubmittedId"),t.getMessage());
83
		} catch (Exception e) {
84
			logger.error("Error while finalizing failed registration job");
85
		}
86
	}
87

  
88
	@Override
89
	public synchronized void currentResults(List<CompletedTask> tasks, int jobId,
90
											Object object, Map<String, Object> recordContext, Throwable t) {
91
		// We don't care about partial results.
92
	}
93

  
94
	@Override
95
	public synchronized void currentResults(List<CompletedTask> tasks, int jobId,
96
											Object object, Map<String, Object> recordContext) {
97
		// We don't care about partial results.
98
	}
99

  
100
	public synchronized void jobSuccess(int jobId, int score_content, int score_usage) {
27
	public synchronized void jobSuccess(int jobId,  Map<String, Object> jobContext) {
101 28
		logger.info("Preregistration job "+jobId+" finished");
102

  
103
		this.score_content = score_content;
104
		this.score_usage = score_usage;
105
		this.jobId=jobId;
106

  
107
		this.success();
108
	}
109

  
110
	public synchronized void jobFailure(int jobId, String error) {
111
		logger.info("Pregistration job "+jobId+" failed with exception: "+error);
112

  
113
		this.jobId=jobId;
114

  
115
		this.error();
116
	}
117
	
118
	private void success() {
119 29
		try {
120
		    logger.debug("Sending results to provide @ " + providerUrl +"/validator/complete");
30
			logger.debug("Sending results to provide @ " + providerUrl +"/validator/complete");
121 31
			HttpHeaders headers = new HttpHeaders();
122 32
			headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
123 33

  
124 34
			MultiValueMap<String, String> map= new LinkedMultiValueMap<String, String>();
125
			map.add("interfaceId", this.interfaceId);
126
			map.add("repoId",this.datasourceId);
127
			map.add("jobId",Integer.toString(this.jobId));
128
			map.add("issuerEmail",this.userMail);
129
			map.add("isUpdate",Boolean.toString(this.updateExisting));
35
			map.add("interfaceId", interfaceId);
36
			map.add("repoId",datasourceId);
37
			map.add("jobId",Integer.toString(jobId));
38
			map.add("issuerEmail",userMail);
39
			map.add("isUpdate",Boolean.toString(updateExisting));
130 40

  
131 41
			// isUsccess: the job finished succesfully, regardless of validation scores.
132 42

  
......
139 49

  
140 50
			ResponseEntity<String> response = restTemplate.postForEntity( providerUrl + "/validator/complete", request , String.class );
141 51

  
142
//			this.updateRepositoryInterfaceCompliance(officialName, datasourceId, interfaceId, desiredCompLevel, validationSet, baseUrl, interfaceIdOld);
143

  
144 52
		} catch (Exception e) {
145 53
			logger.error("", e);
146 54
		}
55

  
147 56
	}
148 57

  
149
	private void error() {
58
	public synchronized void jobFailure(int jobId,  Map<String, Object> jobContext, Throwable t) {
59
		logger.info("Pregistration job "+jobId+" failed with exception: "+t.getMessage());
150 60
		try {
151 61
			logger.debug("Sending results to provide @ " + providerUrl + "/validator/complete");
152 62
			HttpHeaders headers = new HttpHeaders();
......
169 79

  
170 80
			ResponseEntity<String> response = restTemplate.postForEntity(providerUrl + "/validator/complete", request, String.class);
171 81

  
172
//			this.updateRepositoryInterfaceCompliance(officialName, datasourceId, interfaceId, "notCompatible", validationSet, baseUrl, interfaceIdOld);
173 82
		} catch (Exception e) {
174 83
			logger.error("", e);
175 84
		}
176 85
	}
177 86

  
178

  
179
	
180
//	public boolean updateRepositoryInterfaceCompliance(String officialName,
181
//			String datasourceId, String interfaceId, String desiredCompliance, String set, String baseUrl, String oldId)
182
//					throws Exception {
183
//		boolean ret = true;
184
//		try {
185
//			if (desiredCompliance.equalsIgnoreCase("openaire2.0_data"))
186
//				desiredCompliance = "openaire2.0";
187
//			logger.debug("updating repository " + officialName + " compliance to : " + desiredCompliance);
188
//			if (oldId == null) {
189
//				dmService.getService().updateLevelOfCompliance(datasourceId, interfaceId, desiredCompliance);
190
//			}
191
//			else {
192
//				logger.debug("Checking if old interface should be updated");
193
//				if (!desiredCompliance.equalsIgnoreCase("UNKNOWN") && (!desiredCompliance.equalsIgnoreCase("notCompatible"))) {
194
//					logger.debug("updating old interface with new set/url");
195
//					dmService.getService().updateBaseUrl(datasourceId, oldId, baseUrl);
196
//					if(set.equalsIgnoreCase("none"))
197
//						dmService.getService().deleteAccessParamOrExtraField(datasourceId, oldId, "set");
198
//					else
199
//						dmService.getService().updateAccessParam(datasourceId, oldId, "set", set, false);
200
//					logger.debug("deleting new interface");
201
//					dmService.getService().deleteInterface(datasourceId, interfaceId);
202
//
203
//				}
204
//				logger.debug("updating repository " + officialName + " compliance to : " + desiredCompliance);
205
//			}
206
//			java.util.Date utilDate = new java.util.Date();
207
//			java.sql.Timestamp date = new java.sql.Timestamp(utilDate.getTime());
208
//
209
//			String updateQuery = "UPDATE datasources SET activationid = " + null + "," +
210
//					" dateofvalidation = '" + date + "'" +
211
//					" WHERE id = '" + datasourceId + "'";
212
//
213
//			if (dmService.getService().updateSQL(datasourceId, updateQuery, false))
214
//				logger.debug("updated successfully");
215
//			else
216
//				logger.error("error while updating: " + updateQuery);
217
//
218
//		} catch (Exception e) {
219
//			logger.error("error connecting to dms to set a repo interface as openaire compliant " + officialName, e);
220
//			ret = false;
221
//			throw e;
222
//		}
223
//		return ret;
224
//	}
225
//
226

  
227 87
	public String getProviderUrl() {
228 88
		return providerUrl;
229 89
	}
......
232 92
		this.providerUrl = providerUrl;
233 93
	}
234 94

  
235
	public JobsDAO getJobsDao() {
236
		return jobsDao;
237
	}
238 95

  
239
	public void setJobsDao(JobsDAO jobsDao) {
240
		this.jobsDao = jobsDao;
241
	}
242

  
243 96
	public int getJobId() {
244 97
		return jobId;
245 98
	}
......
280 133
		this.updateExisting = updateExisting;
281 134
	}
282 135

  
283
	public int getTotalJobs() {
284
		return totalJobs;
285
	}
286

  
287
	public void setTotalJobs(int totalJobs) {
288
		this.totalJobs = totalJobs;
289
	}
290 136
}
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impls/listeners/CrisListener.java
69 69
					cacheManager.removeCache(cacheName);
70 70
					logger.debug("caches after removal of cache: " + cacheName);
71 71
				}
72
	//			for (String cache : cacheManager.getCacheNames()) {
73
	//				logger.debug("name: " + cache);
74
	//			}
75 72
			}
76 73
		} catch (Exception e) {
77 74
			logger.error("Error while finalizing successful cris job");
modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/listeners/springContext-validator-listeners.xml
15 15
		<lookup-method name="createDnetListener" bean="openaireDnetListener"/>	
16 16
		<lookup-method name="createCrisListener" bean="openaireCrisListener"/>	
17 17
	</bean>
18
	
18

  
19
<!--	<bean id ="abstractValidatorListener" class="eu.dnetlib.validator.service.impls.listeners.AbstractValidatorListener" abstract="true">-->
20
<!--		<property name="jobsDao" ref="jobsDao" />-->
21
<!--	</bean>-->
22

  
23
<!--	<bean id ="openaireValRegListener" class="eu.dnetlib.validator.service.impls.listeners.RegistrationListener" parent="abstractValidatorListener" scope="prototype">-->
19 24
	<bean id ="openaireValRegListener" class="eu.dnetlib.validator.service.impls.listeners.RegistrationListener" scope="prototype">
25
		<property name="jobsDao" ref="jobsDao" />
20 26
		<property name="providerUrl" value="${provider.endpoint}"/>
21
		<property name="jobsDao" ref="jobsDao" />
22
	</bean>	
27
	</bean>
23 28
	
24 29
	<bean id ="openaireValCompTestListener" class="eu.dnetlib.validator.service.impls.listeners.CompatibilityTestListener" scope="prototype">
25 30
		<property name="emailer" ref="emailer" />
modules/uoa-validator-service/trunk/src/main/resources/application.properties
1
#container.hostname = dl114.madgik.di.uoa.gr
2
#container.hostname = mpagasas.di.uoa.gr
3
#container.hostname = adonis.athenarc.gr
4
container.hostname = estella.athenarc.gr
5

  
6
provider.endpoint=http://estella.athenarc.gr:8480/uoa-repository-manager-service
7

  
8

  
9
#container.hostname = validator.mincyt.research-infrastructures.eu
10
container.port = 8080
11
container.context = validator-service
12

  
13
# BASIC SETTINGS
14
services.validator.mode.user = ldap
15
services.validator.mode.repo = dms
16
services.validator.baseUrl = http://${container.hostname}:${container.port}/${container.context}
17
services.validator.dnetWorkflow = true
18
services.validator.deploy.environment = openaire-beta
19
#services.validator.deploy.environment = mincyt
20
services.validator.registration.files.download = true
21
services.validator.autoRestoreOnStartup = false
22
services.validator.mode.standalone = false
23
services.validator.mail.override = false
24
services.validator.adminEmail = antleb@di.uoa.gr
25
services.validator.admins.master = antleb@di.uoa.gr
26
services.validator.admins.secondary = ant.lebesis@gmail.com
27
services.validator.adminBaseUrl = ../validator-admin
28
services.validator.webBaseUrl = http://${container.hostname}:${container.port}/validator
29
services.validator.registrationsReport.email = ant.lebesis@gmail.com
30
services.repo-manager.repository.testing.mode = false
31

  
32
# EMAIL SETTINGS
33
services.validator.mail.host = smtp.gmail.com
34
services.validator.mail.port = 465
35
services.validator.mail.username = test.openaire@gmail.com
36
services.validator.mail.password = ^($*@$)*!$
37
services.validator.mail.authenticate = true
38
services.validator.mail.mode = ssl
39
ervices.validator.mail.fromAddress = no-reply@mpagasas.openaire.eu
40
services.validator.mail.override = false
41
services.validator.mail.overrideEmail = nikonas@di.uoa.gr
42
services.validator.mail.specialRecipients = antleb@di.uoa.gr
43

  
44

  
45
# VALIDATOR DB
46
services.validator.db.driverClassName = org.postgresql.Driver
47
#services.validator.db.url = jdbc:postgresql://194.177.192.119:5432/validator
48
services.validator.db.url = jdbc:postgresql://88.197.53.70:5432/validator
49
services.validator.db.username = dnet
50
services.validator.db.password = dnetPwd
51

  
52
# IS
53
#ISLookUpService.url = http://node1.t.openaire.research-infrastructures.eu:8280/is/services/isLookUp
54
#ISRegistryService.url = http://node1.t.openaire.research-infrastructures.eu:8280/is/services/isRegistry
55
#ISSNService.url = http://node1.t.openaire.research-infrastructures.eu:8280/is/services/isSN
56

  
57
#ISLookUpService.url = http://skalny.icm.edu.pl:8280/is/services/isLookUp
58
#ISRegistryService.url = http://skalny.icm.edu.pl:8280/is/services/isRegistry
59
#ISSNService.url = skalny.icm.edu.pl:8280/is/services/isSN
60

  
61
#ISLookUpService.url = http://node0.t.openaire.research-infrastructures.eu:8080/is/services/isLookUp
62
#ISRegistryService.url = http://node0.t.openaire.research-infrastructures.eu:8080/is/services/isRegistry
63
#ISSNService.url = http://node0.t.openaire.research-infrastructures.eu:8080/is/services/isSN
64

  
65
#ISLookUpService.url = http://node6.t.openaire.research-infrastructures.eu:8980/dnet/services/isLookUp
66
#ISRegistryService.url = http://node6.t.openaire.research-infrastructures.eu:8980/dnet/services/isRegistry
67
#ISSNService.url = http://node6.t.openaire.research-infrastructures.eu:8980/dnet/services/isSN
68

  
69
#ISLookUpService.url = http://node6.t.openaire.research-infrastructures.eu:8280/is/services/isLookUp
70
#ISRegistryService.url = http://node6.t.openaire.research-infrastructures.eu:8280/is/services/isRegistry
71
#ISSNService.url = http://node6.t.openaire.research-infrastructures.eu:8280/is/services/isSN
72

  
73
#ISLookUpService.url = http://aggregator.mincyt.research-infrastructures.eu:8080/is/services/isLookUp
74
#ISRegistryService.url = http://aggregator.mincyt.research-infrastructures.eu:8080/is/services/isRegistry
75
#ISSNService.url = http://aggregator.mincyt.research-infrastructures.eu:8080/is/services/isSN
76

  
77
#ISLookUpService.url = http://node0.d.hudl.research-infrastructures.eu:8080/is/services/isLookUp
78
#ISRegistryService.url = http://node0.d.hudl.research-infrastructures.eu:8080/is/services/isRegistry
79
#ISSNService.url = http://node0.d.hudl.research-infrastructures.eu:8080/is/is/services/isSN
80

  
81
ISLookUpService.url = https://dev-openaire.d4science.org:443/is/services/isLookUp
82
ISRegistryService.url = https://dev-openaire.d4science.org:443/is/services/isRegistry
83
ISSNService.url = https://dev-openaire.d4science.org:443/is/services/isSN
84
ValidatorService.url=http://localhost:8080/validator-service/services/validatorWebService
85

  
86
# LDAP
87
#services.validator.ldap.address = 88.197.53.113
88
#services.validator.ldap.address = 194.197.192.119
89
#services.validator.ldap.port = 389
90
#services.validator.ldap.username = cn=admin,dc=openaire,dc=eu
91
#services.validator.ldap.password = serenata
92
#services.validator.ldap.usersDN = ou=users,dc=openaire,dc=eu
93

  
94
services.users.ldap.address = 194.177.192.119
95
services.users.ldap.port = 389
96
services.users.ldap.username = cn=admin,dc=openaire,dc=eu
97
services.users.ldap.password = serenata
98
services.users.ldap.usersDN = ou=users,dc=openaire,dc=eu
99

  
100
services.validator.ldap.address = 194.177.192.119
101
services.validator.ldap.port = 389
102
services.validator.ldap.username = cn=admin,dc=openaire,dc=eu
103
services.validator.ldap.password = serenata
104
services.validator.ldap.usersDN = ou=users,dc=openaire,dc=eu
105

  
106
#AAI-REDIS
107
redis.host = estella.athenarc.gr
108
redis.port = 6379
109
redis.password = redis123
110

  
111
oidc.dev.home = http://adonis.athenarc.gr:8080/repomanager-service-dev/openid_connect_login
112
webapp.dev.front = http://adonis.athenarc.gr:3000/dashboard
113

  
114

  
115
#uoa-repository-manager-service
116
#oidc.dev.home=http://88.197.53.69:8080/uoa-repository-manager-service/openid_connect_login
117
#webapp.dev.front=http://88.197.53.69/landing
modules/uoa-validator-service/trunk/src/main/webapp/WEB-INF/log4j.properties
20 20
log4j.logger.eu.dnetlib.xml.database.LoggingTrigger=WARN
21 21
log4j.logger.eu.dnetlib.enabling.tools.registration=DEBUG
22 22
log4j.logger.eu.dnetlib.enabling.tools.registration.ServiceRegistrator=INFO
23
log4j.logger.eu.dnetlib.enabling.inspector=FATAL
24 23
log4j.logger.eu.dnetlib.enabling.inspector.SubscriptionController=DEBUG
25 24
log4j.logger.eu.dnetlib.springutils.stringtemplate.StringTemplateViewResolver=FATAL     
26 25
log4j.logger.eu.dnetlib.enabling.is.sn.SynchronousNotificationSenderImpl=WARN
......
47 46
log4j.appender.S.MaxBackupIndex = 10
48 47
log4j.appender.S.layout = org.apache.log4j.PatternLayout
49 48
log4j.appender.S.layout.ConversionPattern = %d %p %t [%c] - %m%n
50

  
51
#org.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger
52
#
53
#log4j.rootLogger=WARN, CONSOLE
54
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
55
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
56
#log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
57
#
58
#log4j.logger.eu.dnetlib=INFO
59
#log4j.logger.org.apache.cxf.interceptor=FATAL
60
#log4j.logger.org.apache.cxf.ws.addressing.ContextUtils=FATAL
61
#log4j.logger.eu.dnetlib.enabling.tools.AbstractBaseService=INFO
62
#log4j.logger.eu.dnetlib.enabling.inspector=DEBUG
63
#log4j.logger.eu.dnetlib.xml.database.LoggingTrigger=WARN
64
#log4j.logger.eu.dnetlib.enabling.tools.registration=DEBUG
65
#log4j.logger.eu.dnetlib.enabling.tools.registration.ServiceRegistrator=INFO
66
#log4j.logger.eu.dnetlib.enabling.inspector=FATAL
67
#log4j.logger.eu.dnetlib.enabling.inspector.SubscriptionController=DEBUG
68
#log4j.logger.eu.dnetlib.springutils.stringtemplate.StringTemplateViewResolver=FATAL             
69
#log4j.logger.eu.dnetlib.enabling.is.sn.SynchronousNotificationSenderImpl=WARN

Also available in: Unified diff