Project

General

Profile

« Previous | Next » 

Revision 56961

fixing from & quantity values for export-to-csv functionality

View differences:

RepositoryServiceImpl.java
535 535

  
536 536
            HttpEntity<String> httpEntity = new HttpEntity <> (json_interface,httpHeaders);
537 537
            restTemplate.postForObject(uriComponents.toUri(),httpEntity,String.class);
538
            submitInterfaceValidation(e, registeredBy, repositoryInterface);
538
            submitInterfaceValidation(e, registeredBy, repositoryInterface, false);
539 539

  
540 540
            return repositoryInterface;
541 541

  
......
554 554
        this.updateBaseUrl(repoId,repositoryInterface.getId(),repositoryInterface.getBaseUrl());
555 555
        this.updateCompliance(repoId,repositoryInterface.getId(),repositoryInterface.getCompliance());
556 556
        this.updateValidationSet(repoId,repositoryInterface.getId(),repositoryInterface.getAccessSet());
557
        submitInterfaceValidation(getRepositoryById(repoId),registeredBy,repositoryInterface);
557
        submitInterfaceValidation(getRepositoryById(repoId),registeredBy,repositoryInterface,true);
558 558
        return repositoryInterface;
559 559
    }
560 560

  
561
    private void submitInterfaceValidation(Repository repo, String userEmail, RepositoryInterface iFace) throws ValidatorServiceException {
561
    private void submitInterfaceValidation(Repository repo, String userEmail, RepositoryInterface iFace, boolean updateExisting) throws ValidatorServiceException {
562 562
        JobForValidation job = new JobForValidation();
563 563

  
564 564
        job.setActivationId(UUID.randomUUID().toString());
......
572 572
        job.setUserEmail(userEmail);
573 573
        job.setValidationSet((iFace.getAccessSet().isEmpty() ? "none" : iFace.getAccessSet()));
574 574
        job.setRecords(-1);
575
        job.setRegistration(true);
576
        job.setUpdateExisting(false);
575
        job.setRegistration(!updateExisting);
576
        job.setUpdateExisting(updateExisting);
577 577

  
578 578
        this.validatorService.submitJobForValidation(job);
579 579
    }

Also available in: Unified diff