Project

General

Profile

Revision 07ac49bc

ID07ac49bc01dc0cdd9e802841de81b96ec8057625
Parent 886ba3e2
Child a53c0e28

Added by Andreas Kohlbecker over 2 years ago

ref #8059 fixing RegistrationServiceImpl.assureIsPersisted() for situations when the save does not persist immediately

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/RegistrationServiceImpl.java
375 375

  
376 376
        prepareForSave(reg);
377 377
        reg = super.save(reg);
378
        userHelper.createAuthorityForCurrentUser(Registration.class, reg.getUuid(), Operation.UPDATE, RegistrationStatus.PREPARATION.name());
378
        userHelper.createAuthorityForCurrentUser(reg, Operation.UPDATE, RegistrationStatus.PREPARATION.name());
379 379

  
380 380
        return reg;
381 381
    }
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/registration/IRegistrationWorkingSetService.java
72 72

  
73 73
    public Set<RegistrationDTO> loadBlockingRegistrations(UUID blockedRegistrationUuid);
74 74

  
75
    Pager<RegistrationDTO> convertToDTOPager(Pager<Registration> regPager);
75
    public Pager<RegistrationDTO> convertToDTOPager(Pager<Registration> regPager);
76

  
77
    public List<RegistrationDTO> makeDTOs(Collection<Registration> regs);
76 78

  
77 79
    Pager<RegistrationDTO> pageDTOs(UUID submitterUuid, Collection<RegistrationStatus> includedStatus, String identifierFilterPattern, String taxonNameFilterPattern, Collection<UUID> typeDesignationStatusUuids, Integer pageSize, Integer pageIndex,
78 80
            List<OrderHint> orderHints);
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/registration/RegistrationWorkingSetService.java
425 425
     * @param regs
426 426
     * @return
427 427
     */
428
    private List<RegistrationDTO> makeDTOs(List<Registration> regs) {
428
    @Override
429
    public List<RegistrationDTO> makeDTOs(Collection<Registration> regs) {
429 430
        initializeSpecimens(regs);
430 431
        List<RegistrationDTO> dtos = new ArrayList<>(regs.size());
431 432
        regs.forEach(reg -> {dtos.add(new RegistrationDTO(reg));});
......
436 437
    /**
437 438
     * @param regs
438 439
     */
439
    public void initializeSpecimens(List<Registration> regs) {
440
    public void initializeSpecimens(Collection<Registration> regs) {
440 441
        for(Registration reg : regs){
441 442
            inititializeSpecimen(reg);
442 443
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)