Index: modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManagerImpl.java
===================================================================
--- modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManagerImpl.java	(revision 57005)
+++ modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManagerImpl.java	(revision 57006)
@@ -218,14 +218,14 @@
 		try {
 			logger.info("Submiting validation job requested by user: " + job.getUserEmail());
 
-			if (job.isRegistration()) {
+
+			if (job.isRegistration() || job.isUpdateExisting()) {
 				logger.debug("initiating preregistration validations on repo " + job.getBaseUrl() + " for user " + job.getUserEmail() + "and desired compatibility: " + job.getDesiredCompatibilityLevel());
-				for (RuleSet ruleset : rulesetsDao.getRuleSets()) {
-					if (ruleset.getGuidelinesAcronym().equals(job.getDesiredCompatibilityLevel())) {
-						job.setSelectedContentRules(ruleset.getContentRulesIds());
-						job.setSelectedUsageRules(ruleset.getUsageRulesIds());
-					}	
-				}	
+
+				for (RuleSet ruleset : rulesetsDao.getRuleSets(job.getDesiredCompatibilityLevel())) {
+					job.setSelectedContentRules(ruleset.getContentRulesIds());
+					job.setSelectedUsageRules(ruleset.getUsageRulesIds());
+				}
 			}
 			
 			if ( job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire4.0$") ) {
@@ -251,6 +251,8 @@
 				logger.debug("Chosen set: OpenAIRE For Cris");
 				logger.debug("Setting METADATA_PREFIX to: oai_CERIF_openaire");
 				job.setMetadataPrefix("oai_CERIF_openaire");			
+			} else {
+				logger.error("Cannot set metadata prefx for " + job.getDesiredCompatibilityLevel() + " guidelines");
 			}
 			
 			
@@ -264,16 +266,18 @@
 			
 			if (job.getSelectedContentRules() != null) {
 				contentJobs = 1;
-				validationType +="C";
+				validationType += "C";
 				totalRules.addAll(job.getSelectedContentRules());
 				newJob.setContentJobStatus("ongoing");
 			} else {
 				newJob.setContentJobStatus("none");
 			}
+
 			if (job.getSelectedUsageRules() != null) {
 				logger.debug("Creating map for provider information");
 				verbRuleMap= new HashMap<String,Set<Integer>>();
 				Set<Integer> old,temp = null;
+
 				for (Integer id : job.getSelectedUsageRules()){
 					eu.dnetlib.domain.functionality.validator.Rule ruleStored = rulesDao.get(id);
 					logger.debug("Checking for verb : "+ruleStored.getProvider_information());
@@ -310,8 +314,10 @@
 				newJob.setSelectedCrisEntities(job.getSelectedCrisEntities());
 				newJob.setCrisReferentialChecks(job.isCrisReferentialChecks());
 			}
+
 			newJob.setValidationType(validationType);
-			if (job.isRegistration()) {
+
+			if (job.isRegistration() || job.isUpdateExisting()) {
 				newJob.setJobType("Registration Request");
 				//TODO move in uoa-domain
 				newJob.setActivationId(job.getActivationId());
@@ -332,23 +338,13 @@
 	
 			int jobIdStored = jobsDao.save(newJob);
 			
-
 			RegistrationListener regListener = null;
-			if (job.isRegistration()) {
+			if (job.isRegistration() || job.isUpdateExisting()) {
 				regListener = listenersManager.createRegListener();
-//				regListener.setActivationId(job.getActivationId());
-//				regListener.setBaseUrl(job.getBaseUrl());
-//				regListener.setActivationId(job.getActivationId());
-//				regListener.setAdminEmails(job.getAdminEmails());
-//				regListener.setOfficialName(job.getOfficialName());
 				regListener.setUserMail(job.getUserEmail());
 				regListener.setDatasourceId(job.getDatasourceId());
 				regListener.setInterfaceId(job.getInterfaceId());
-//				regListener.setValidationSet(job.getValidationSet());
-//				regListener.setDesiredCompLevel(job.getDesiredCompatibilityLevel());
-//				regListener.setRepoType(job.getRepoType());
-//				regListener.setInterfaceIdOld(job.getInterfaceIdOld());
-				regListener.setUpdateExisting(job.isUpdateExisting());	
+				regListener.setUpdateExisting(job.isUpdateExisting());
 				regListener.setTotalJobs(usageJobs + contentJobs);
 			}
 			
@@ -356,60 +352,53 @@
 			compTestListener.setValidationSet(job.getValidationSet());
 			compTestListener.setGuidelines(job.getDesiredCompatibilityLevel());
 			compTestListener.setTotalJobs(usageJobs + contentJobs);
-
 			
-//CONTENT
+			//CONTENT
 			if (job.getSelectedContentRules() != null) {
-			
 				Set<Rule> rulesContent = new HashSet<Rule>();
-				
 				Properties props = new Properties();
+
 				props.setProperty(OAIPMHRecordProvider.BASEURL, job.getBaseUrl());
 				props.setProperty(OAIPMHRecordProvider.METADATA_PREFIX, newJob.getMetadataPrefix());
 				props.setProperty(OAIPMHRecordProvider.RECORDS,Integer.toString(job.getRecords()));
 				props.setProperty(OAIPMHRecordProvider.SET,job.getValidationSet());
 				
-		
 				Job jobContent = null;
 				
 				ValidatorJobListener listenerContent = listenersManager.createListener();
+
 				listenerContent.setJobSubmittedId(jobIdStored);
 				listenerContent.setJobSubmittedUser(job.getUserEmail());
 				listenerContent.setGroupBy_xpath(newJob.getGroupByXpath());
 				listenerContent.setValidationType("content");
 				listenerContent.setInternalJobsSum(contentJobs);
-				
 
 				if (job.isCris()) {
 					logger.debug("Submiting job for cris.");
 					logger.debug("Total content jobs: " + contentJobs);
-//					logger.debug("Selected content rules number: " + job.getSelectedContentRules().size());
 					jobContent = new Job(jobIdStored, 4, rulesContent, props);
-// acz					validator.submitJobForCris(jobContent, entityChosenRulesMap, entityChosenRulesMapReferential, listenerContent, compTestListener);
-// send cris validation to Guideline team member. Could be moved into MemoryThreadValidator.submitJobForCris method
-                                        List<String> recipientsMailAddr = new ArrayList<String>();
-                                        recipientsMailAddr.add("andreas.czerniak@uni-bielefeld.de");
-                                        emailer.sendMail( recipientsMailAddr, "CrisJob submitting", "baseUrl: " + job.getBaseUrl() , false, recipientsMailAddr);
-                                } else {
-					
+					// acz
+					// validator.submitJobForCris(jobContent, entityChosenRulesMap, entityChosenRulesMapReferential, listenerContent, compTestListener);
+					// send cris validation to Guideline team member. Could be moved into MemoryThreadValidator.submitJobForCris method
+					List<String> recipientsMailAddr = new ArrayList<String>();
+					recipientsMailAddr.add("andreas.czerniak@uni-bielefeld.de");
+					emailer.sendMail( recipientsMailAddr, "CrisJob submitting", "baseUrl: " + job.getBaseUrl() , false, recipientsMailAddr);
+				} else {
 					logger.debug("Selected content rules number: " + job.getSelectedContentRules().size());
 					for (Integer ruleId : job.getSelectedContentRules()){
+						eu.dnetlib.domain.functionality.validator.Rule tempRule= rulesDao.get(ruleId);
 						
-						eu.dnetlib.domain.functionality.validator.Rule tempRule=rulesDao.get(ruleId);
-						
 						//special behaviour type of rule is chain
-						if(tempRule.getType().equals("ChainRule")) {
+						if (tempRule.getType().equals("ChainRule")) {
 							ChainRule<Rule> chainRule = this.handleChain(tempRule);
 							rulesContent.add(chainRule);
-						}
-						else {
+						} else
 							rulesContent.add((Rule) this.getRuleClassInstanceByType(tempRule.getType(), tempRule.getConfiguration(), tempRule.getId()));
-						}
 					}
 					
 					jobContent = new Job(jobIdStored, 1, rulesContent, props);
 					
-					if (job.isRegistration()) {
+					if (job.isRegistration() || job.isUpdateExisting()) {
 						validator.submitJob(jobContent, 1, listenerContent, regListener);
 					} else {
 						validator.submitJob(jobContent, 1, listenerContent, compTestListener);
@@ -439,7 +428,7 @@
 					jobsUsage.add(new Job(jobIdStored, 2, rulesUsage, pros));
 				}
 				for (Job jobUsage : jobsUsage ) {
-					if (job.isRegistration()) {
+					if (job.isRegistration() || job.isUpdateExisting()) {
 						validator.submitJob(jobUsage, 1, listenerUsage, regListener);
 					} else {
 						validator.submitJob(jobUsage, 1, listenerUsage, compTestListener);
Index: modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/listeners/springContext-validator-listeners.xml
===================================================================
--- modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/listeners/springContext-validator-listeners.xml	(revision 57005)
+++ modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/listeners/springContext-validator-listeners.xml	(revision 57006)
@@ -1,21 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:cxf="http://cxf.apache.org/core"
-	xmlns:jaxws="http://cxf.apache.org/jaxws"
 	xmlns:p="http://http://www.springframework.org/schema/p"
-	xmlns:template="http://dnetlib.eu/springbeans/template"
 	xmlns:t="http://dnetlib.eu/springbeans/t"
-	xmlns:tx="http://www.springframework.org/schema/tx"
-	
+
 	xsi:schemaLocation="
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
-        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
-        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
-        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
-        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
-        http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"
 	default-autowire="no">
 	
 	<bean id="listenersManager" class="eu.dnetlib.validator.service.impls.listeners.ListenersManager">
@@ -27,7 +17,6 @@
 	</bean>
 	
 	<bean id ="openaireValRegListener" class="eu.dnetlib.validator.service.impls.listeners.RegistrationListener" scope="prototype">
-<!--		<property name="valBaseUrl" value="${services.validator.webBaseUrl}" />-->
 		<property name="providerUrl" value="${provider.endpoint}"/>
 		<property name="jobsDao" ref="jobsDao" />
 	</bean>	
Index: modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/springContext-validator-blackboard.xml
===================================================================
--- modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/springContext-validator-blackboard.xml	(revision 57005)
+++ modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/springContext-validator-blackboard.xml	(revision 57006)
@@ -1,18 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws"
-	xmlns:p="http://http://www.springframework.org/schema/p"
-	xmlns:template="http://dnetlib.eu/springbeans/template" xmlns:t="http://dnetlib.eu/springbeans/t"
-	xmlns:tx="http://www.springframework.org/schema/tx"
-
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
-        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
-        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
-        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
-        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
-        http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"
 	default-autowire="no">
 
 	<bean id="blackboardHandler"
@@ -26,8 +16,7 @@
 		</property>
 	</bean>
 
-	<bean id="notificationListener" class="eu.dnetlib.validator.service.impl.NotificationListener"
-		scope="singleton">
+	<bean id="notificationListener" class="eu.dnetlib.validator.service.impl.NotificationListener">
 		<property name="valManager" ref="validatorManager" />
 		<property name="blackboardHandler" ref="blackboardHandler" />
 	</bean>
Index: modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/providers/springContext-validator-providers.xml
===================================================================
--- modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/providers/springContext-validator-providers.xml	(revision 57005)
+++ modules/uoa-validator-service/trunk/src/main/resources/eu/dnetlib/validator/service/providers/springContext-validator-providers.xml	(revision 57006)
@@ -1,21 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:cxf="http://cxf.apache.org/core"
-	xmlns:jaxws="http://cxf.apache.org/jaxws"
 	xmlns:p="http://http://www.springframework.org/schema/p"
-	xmlns:template="http://dnetlib.eu/springbeans/template"
 	xmlns:t="http://dnetlib.eu/springbeans/t"
-	xmlns:tx="http://www.springframework.org/schema/tx"
-	
 	xsi:schemaLocation="
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
-        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
-        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
-        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
-        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
-        http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"
 	default-autowire="no">
 	
 	<bean id="providersManager" class="eu.dnetlib.validator.service.impls.providers.ProvidersManager">
@@ -40,7 +29,6 @@
 	</bean>	
 	
 	<bean id ="dnetProvider" class="eu.dnetlib.validator.service.impls.providers.DnetProviderNew" scope="prototype">
-	
 		<property name="mdStoreServiceLocator" ref="mdStoreServiceLocator" />
 		<property name="rsFactory" ref="resultSetFactory" />
 		<property name="harvesterExecutor" ref="jobExecutor" />
