Project

General

Profile

Download (1.98 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 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.UUID;
12

    
13
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
14
import eu.etaxonomy.cdm.model.common.VersionableEntity;
15
import eu.etaxonomy.cdm.model.name.Registration;
16
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationSetDTO;
17

    
18
/**
19
 * @author a.kohlbecker
20
 * @since May 4, 2017
21
 *
22
 */
23
public interface ISpecimenTypeDesignationSetService {
24

    
25
    public SpecimenTypeDesignationSetDTO<Registration> create(UUID registrationUuid, UUID typifiedNameUuid);
26

    
27
    /**
28
     * @param id the CDM Entity id
29
     * @return
30
     */
31
    public SpecimenTypeDesignationSetDTO<Registration> load(UUID registrationUuid,
32
            IdentifiableEntity<?> baseEntityRef);
33

    
34
    public SpecimenTypeDesignationSetDTO<Registration> fixMissingFieldUnit(SpecimenTypeDesignationSetDTO<Registration> bean);
35

    
36
    /**
37
     * Saves the {@link SpecimenTypeDesignationSetDTO} and takes care for consistency in the working set:
38
     * <ul>
39
     *  <li>New TypeDesignations are associated with the OWNER.</li>
40
     *  <li>The citation and typified name of newly created TypeDesignations are set.</li>
41
     *  <li>All type specimens are assured to be derivatives of the FieldUnit which is the base entity of the set.</li>
42
     * </ul>
43
     *
44
     * @param dto the DTO to be persisted
45
     */
46
    void save(SpecimenTypeDesignationSetDTO<? extends VersionableEntity> dto);
47

    
48
    /**
49
     * @param bean The {@link SpecimenTypeDesignationSetDTO} to be deleted
50
     * @param deleteFieldUnit The fieldunit and all derivatives which is the base entity of the workingset will
51
     * also be deleted once this is set to <code>true</code>.
52
     */
53
    public void delete(SpecimenTypeDesignationSetDTO bean, boolean deleteFieldUnit);
54

    
55
}
(8-8/13)