1
|
/**
|
2
|
* Copyright (C) 2019 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.service;
|
10
|
|
11
|
import java.util.List;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import org.springframework.transaction.annotation.Transactional;
|
15
|
|
16
|
import eu.etaxonomy.cdm.api.service.dto.RegistrationWorkingSet;
|
17
|
import eu.etaxonomy.cdm.api.service.exception.RegistrationValidationException;
|
18
|
import eu.etaxonomy.cdm.model.name.Registration;
|
19
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
20
|
|
21
|
/**
|
22
|
* @author a.kohlbecker
|
23
|
* @since Mar 26, 2019
|
24
|
*
|
25
|
*/
|
26
|
public interface IRegistrationWorkflowService {
|
27
|
|
28
|
/**
|
29
|
* @param taxonName
|
30
|
* @param relatedBlockingRegistrations
|
31
|
* The blocking registrations to be added to the new Registration
|
32
|
*/
|
33
|
@Transactional
|
34
|
Registration createRegistration(TaxonName taxonName, List<Registration> relatedBlockingRegistrations);
|
35
|
|
36
|
@Transactional
|
37
|
boolean createRegistrationforExistingName(RegistrationWorkingSet workingset, TaxonName typifiedName) throws RegistrationValidationException;
|
38
|
|
39
|
@Transactional(readOnly=true)
|
40
|
void reloadRegistration(Registration registration);
|
41
|
|
42
|
/**
|
43
|
* Creates a new registration for the name referenced by the {@code taxonNameUUID} parameter
|
44
|
* if there isn't one already and adds this new registration as blocking registration to the passed
|
45
|
* {@code registration}.
|
46
|
*
|
47
|
* Already existing registrations must not be added as blocking registration.
|
48
|
*
|
49
|
* @param taxonNameUUID
|
50
|
* @param registration
|
51
|
*/
|
52
|
@Transactional
|
53
|
Registration addBlockingRegistration(UUID nameUUID, Registration registration);
|
54
|
|
55
|
@Transactional
|
56
|
void addTypeDesignation(UUID typeDesignationUuid, Registration registration);
|
57
|
|
58
|
@Transactional(readOnly=true)
|
59
|
boolean canCreateNameRegistrationFor(RegistrationWorkingSet workingset, TaxonName name);
|
60
|
|
61
|
boolean checkWokingsetContainsProtologe(RegistrationWorkingSet workingset, TaxonName name);
|
62
|
|
63
|
}
|