Revision a6edfc5a
Added by Andreas Kohlbecker about 5 years ago
src/main/java/eu/etaxonomy/cdm/service/IRegistrationWorkflowService.java | ||
---|---|---|
37 | 37 |
boolean createRegistrationforExistingName(RegistrationWorkingSet workingset, TaxonName typifiedName) throws RegistrationValidationException; |
38 | 38 |
|
39 | 39 |
@Transactional(readOnly=true) |
40 |
void reloadRegistration(Registration registration);
|
|
40 |
Registration reloadRegistration(Registration registration);
|
|
41 | 41 |
|
42 | 42 |
/** |
43 | 43 |
* Creates a new registration for the name referenced by the {@code taxonNameUUID} parameter |
src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java | ||
---|---|---|
103 | 103 |
|
104 | 104 |
@Override |
105 | 105 |
public void addTypeDesignation(UUID typeDesignationUuid, Registration registration) { |
106 |
reloadRegistration(registration); |
|
106 |
registration = reloadRegistration(registration);
|
|
107 | 107 |
getRepo().getRegistrationService().addTypeDesignation(registration, typeDesignationUuid); |
108 | 108 |
getRepo().getRegistrationService().saveOrUpdate(registration); |
109 | 109 |
} |
... | ... | |
127 | 127 |
|
128 | 128 |
if(!registrationExists){ |
129 | 129 |
Registration blockingRegistration = getRepo().getRegistrationService().createRegistrationForName(nameUUID); |
130 |
reloadRegistration(registration); |
|
130 |
registration = reloadRegistration(registration);
|
|
131 | 131 |
registration.getBlockedBy().add(blockingRegistration); |
132 | 132 |
if(registration.isPersited()){ |
133 | 133 |
getRepo().getRegistrationService().saveOrUpdate(registration); |
... | ... | |
143 | 143 |
* @return |
144 | 144 |
*/ |
145 | 145 |
@Override |
146 |
public void reloadRegistration(Registration registration) {
|
|
146 |
public Registration reloadRegistration(Registration registration) {
|
|
147 | 147 |
if(registration.isPersited()){ |
148 | 148 |
Registration registrationReloaded = getRepo().getRegistrationService().load(registration.getUuid()); |
149 | 149 |
if(registrationReloaded == null){ |
... | ... | |
153 | 153 |
} else { |
154 | 154 |
logger.trace("Registration is not yet persisted."); |
155 | 155 |
} |
156 |
|
|
157 |
return registration; |
|
156 | 158 |
} |
157 | 159 |
|
158 | 160 |
/** |
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java | ||
---|---|---|
468 | 468 |
namesToCheck.add(nameEditor.getOrthographicVariantField().getRelatedNameComboBox().getValue()); |
469 | 469 |
|
470 | 470 |
for(TaxonName name : namesToCheck){ |
471 |
if(name != null){ |
|
471 |
if(name != null) {
|
|
472 | 472 |
doRefreshView |= registrationWorkflowService.addBlockingRegistration(name.getUuid(), registration) != null; |
473 | 473 |
} |
474 | 474 |
} |
... | ... | |
641 | 641 |
|
642 | 642 |
try { |
643 | 643 |
registration = findRegistrationInContext(event.getPopup()); |
644 |
getRepo().getSession().clear(); |
|
644 |
Stack<EditorActionContext>context = ((AbstractPopupEditor)event.getPopup()).getEditorActionContext(); |
|
645 |
registration = findRegistrationInContext(context); |
|
645 | 646 |
registrationWorkflowService.addTypeDesignation(typeDesignationUuid, registration); |
646 | 647 |
nameTypeDesignationPopupEditorRegistrationUUIDMap.remove(event.getPopup()); |
647 | 648 |
} finally { |
Also available in: Unified diff
ref #8050 fixing bug in reloadRegistrtions() and removing remain from previous conflict