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 57086)
+++ modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManagerImpl.java	(revision 57087)
@@ -219,7 +219,7 @@
 			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(job.getDesiredCompatibilityLevel())) {
@@ -227,35 +227,35 @@
 					job.setSelectedUsageRules(ruleset.getUsageRulesIds());
 				}
 			}
-			
-			if ( job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire4.0$") ) {
-				logger.debug("Chosen set: OpenAIRE For Thematic + Institutional Repositories");
-				logger.debug("Setting METADATA_PREFIX to: oai_openaire");
-				job.setMetadataPrefix("oai_openaire");
-			} else if (
+			if(job.getMetadataPrefix() == null || job.getMetadataPrefix().equals("")) {
+				if (job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire4.0$")) {
+					logger.debug("Chosen set: OpenAIRE For Thematic + Institutional Repositories");
+					logger.debug("Setting METADATA_PREFIX to: oai_openaire");
+					job.setMetadataPrefix("oai_openaire");
+				} else if (
 //					job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0") ||
-					job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d$") ||
+						job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d$") ||
 //					job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire3.0") ||
 //					job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire4.0") ||
-					job.getDesiredCompatibilityLevel().equalsIgnoreCase("driver") ) {
-				logger.debug("Chosen set: OpenAIRE For Literature Repositories");
-				logger.debug("Setting METADATA_PREFIX to: oai_dc");
-				job.setMetadataPrefix("oai_dc");
-			} else if ( job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d_data$")) {
+								job.getDesiredCompatibilityLevel().equalsIgnoreCase("driver")) {
+					logger.debug("Chosen set: OpenAIRE For Literature Repositories");
+					logger.debug("Setting METADATA_PREFIX to: oai_dc");
+					job.setMetadataPrefix("oai_dc");
+				} else if (job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d_data$")) {
 					// job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0_data")) {
-				logger.debug("Chosen set: OpenAIRE For Data Archives");
-				logger.debug("Setting METADATA_PREFIX to: oai_datacite");
-				job.setMetadataPrefix("oai_datacite");			
-			} else if ( job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d(.\\d)?_cris$")) {
+					logger.debug("Chosen set: OpenAIRE For Data Archives");
+					logger.debug("Setting METADATA_PREFIX to: oai_datacite");
+					job.setMetadataPrefix("oai_datacite");
+				} else if (job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d(.\\d)?_cris$")) {
 					// job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire3.0_cris")) {
-				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");
+					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");
+				}
 			}
 			
-			
 			StoredJob newJob = new StoredJob(job);
 
 			int usageJobs = 0;
@@ -317,7 +317,7 @@
 
 			newJob.setValidationType(validationType);
 
-			if (job.isRegistration()) {
+			if (job.isRegistration() || job.isUpdateExisting()) {
 				newJob.setJobType("Registration Request");
 				//TODO move in uoa-domain
 				newJob.setActivationId(job.getActivationId());
@@ -339,7 +339,7 @@
 			int jobIdStored = jobsDao.save(newJob);
 			
 			RegistrationListener regListener = null;
-			if (job.isRegistration()) {
+			if (job.isRegistration() || job.isUpdateExisting()) {
 				regListener = listenersManager.createRegListener();
 				regListener.setUserMail(job.getUserEmail());
 				regListener.setDatasourceId(job.getDatasourceId());
@@ -398,7 +398,7 @@
 					
 					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);
@@ -428,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);
