Revision c4f5e696
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/cdm/mock/RegistrationService.java | ||
---|---|---|
35 | 35 |
import eu.etaxonomy.cdm.vaadin.view.registration.RegistrationValidationException; |
36 | 36 |
|
37 | 37 |
/** |
38 |
* Mock service which creates Registration on the fly. |
|
39 |
* Registrations are never persisted they are only kept in memory. |
|
40 |
* |
|
38 | 41 |
* @author a.kohlbecker |
39 | 42 |
* @since Mar 10, 2017 |
40 | 43 |
* |
41 | 44 |
*/ |
42 | 45 |
@Service("registrationServiceMock") |
43 | 46 |
@Transactional(readOnly=true) |
44 |
public class RegistrationService { |
|
47 |
public class RegistrationService implements IRegistrationWorkingSetService {
|
|
45 | 48 |
|
46 | 49 |
private static final int SIZE = 50; // FIXME test performance with 50 !!!!! |
47 | 50 |
|
... | ... | |
166 | 169 |
return registrationsByUUID.values(); |
167 | 170 |
} |
168 | 171 |
|
172 |
@Override |
|
169 | 173 |
public Collection<RegistrationDTO> listDTOs() { |
170 | 174 |
init(); |
171 | 175 |
return registrationDTOsById.values(); |
... | ... | |
198 | 202 |
* @param id the CDM Entity id |
199 | 203 |
* @return |
200 | 204 |
*/ |
205 |
@Override |
|
201 | 206 |
public RegistrationDTO loadDtoById(Integer id) { |
202 | 207 |
init(); |
203 | 208 |
return registrationDTOsById.get(id); |
... | ... | |
208 | 213 |
* @return |
209 | 214 |
* @throws RegistrationValidationException |
210 | 215 |
*/ |
216 |
@Override |
|
211 | 217 |
public RegistrationWorkingSet loadWorkingSetByRegistrationID(Integer id) throws RegistrationValidationException { |
212 | 218 |
init(); |
213 | 219 |
RegistrationDTO dto = registrationDTOsById.get(id); |
Also available in: Unified diff
ref #6621 new RegistrationWorkingSetService can create missing Registations for IAPT records