Revision 210b9aa6
Added by Andreas Kohlbecker about 7 years ago
src/main/java/eu/etaxonomy/cdm/mock/RegistrationService.java | ||
---|---|---|
16 | 16 |
import java.util.Set; |
17 | 17 |
import java.util.UUID; |
18 | 18 |
|
19 |
import org.apache.log4j.Logger; |
|
19 | 20 |
import org.springframework.beans.factory.annotation.Autowired; |
20 | 21 |
import org.springframework.beans.factory.annotation.Qualifier; |
21 | 22 |
import org.springframework.stereotype.Service; |
... | ... | |
27 | 28 |
import eu.etaxonomy.cdm.model.name.Rank; |
28 | 29 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
29 | 30 |
import eu.etaxonomy.cdm.vaadin.presenter.registration.RegistrationDTO; |
31 |
import eu.etaxonomy.cdm.vaadin.presenter.registration.RegistrationValidationException; |
|
30 | 32 |
|
31 | 33 |
/** |
32 | 34 |
* @author a.kohlbecker |
... | ... | |
73 | 75 |
Registration nameReg = new Registration(); |
74 | 76 |
nameReg.setName(name); |
75 | 77 |
cdmEntities.add(name); |
76 |
put(nameReg, new RegistrationDTO(nameReg, null)); |
|
78 |
try { |
|
79 |
put(nameReg, new RegistrationDTO(nameReg)); |
|
80 |
} catch (RegistrationValidationException e) { |
|
81 |
//FIXME throw and handle Exception |
|
82 |
Logger.getLogger(this.getClass()).error(e); |
|
83 |
} |
|
77 | 84 |
|
78 | 85 |
// typedesignation |
79 | 86 |
Registration typedesignationReg = new Registration(); |
80 | 87 |
typedesignationReg.addTypeDesignations(name.getTypeDesignations()); |
81 | 88 |
cdmEntities.addAll(name.getTypeDesignations()); |
82 |
put(typedesignationReg, new RegistrationDTO(typedesignationReg, name)); |
|
89 |
try { |
|
90 |
put(typedesignationReg, new RegistrationDTO(typedesignationReg)); |
|
91 |
} catch (RegistrationValidationException e) { |
|
92 |
//FIXME throw and handle Exception |
|
93 |
Logger.getLogger(this.getClass()).error(e); |
|
94 |
} |
|
83 | 95 |
} |
84 | 96 |
} |
85 | 97 |
} |
Also available in: Unified diff
better WorkflowView title, validation, some EventListeners