Project

General

Profile

Download (3.54 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.api.service.registration;
10

    
11
import java.io.IOException;
12
import java.util.Collection;
13
import java.util.List;
14
import java.util.Set;
15
import java.util.UUID;
16

    
17
import eu.etaxonomy.cdm.api.service.dto.RegistrationDTO;
18
import eu.etaxonomy.cdm.api.service.dto.RegistrationWorkingSet;
19
import eu.etaxonomy.cdm.api.service.exception.RegistrationValidationException;
20
import eu.etaxonomy.cdm.api.service.pager.Pager;
21
import eu.etaxonomy.cdm.database.PermissionDeniedException;
22
import eu.etaxonomy.cdm.model.name.Registration;
23
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
24
import eu.etaxonomy.cdm.persistence.query.MatchMode;
25
import eu.etaxonomy.cdm.persistence.query.OrderHint;
26

    
27
/**
28
 * @author a.kohlbecker
29
 * @since May 4, 2017
30
 */
31
public interface IRegistrationWorkingSetService {
32

    
33
    /**
34
     * @param id the CDM Entity id
35
     * @return
36
     */
37
    public RegistrationDTO loadDtoById(Integer id);
38

    
39
    public RegistrationDTO loadDtoByUuid(UUID uuid);
40

    
41
    public Pager<RegistrationDTO> pageDTOs(Integer pageSize, Integer pageIndex);
42

    
43
    public Pager<RegistrationDTO> pageDTOs(String identifier, Integer pageIndex,  Integer pageSize) throws IOException;
44

    
45
    /**
46
     * @param referenceID
47
     * @param resolveSections resolve the higher publication unit and build the RegistrationWorkingSet for that reference. E.e. For journal sections the
48
     *  use the inReference which is the journal article.
49
     *
50
     * @return
51
     */
52
    @Deprecated
53
    public RegistrationWorkingSet loadWorkingSetByReferenceID(Integer referenceID, boolean resolveSections) throws RegistrationValidationException;
54

    
55
    /**
56
     * Loads the working set specified by the <code>referenceUuid</code> from the database. The list of {@link RegistrationDTO}s can be empty in case
57
     * there is no registration which is related to the reference.
58
     *
59
     * @param referenceUuid
60
     * @param resolveSections resolve the higher publication unit and build the RegistrationWorkingSet for that reference. E.e. For journal sections the
61
     *  use the inReference which is the journal article.
62
     * @return
63
     */
64
    public RegistrationWorkingSet loadWorkingSetByReferenceUuid(UUID referenceUuid, boolean resolveSections) throws RegistrationValidationException, PermissionDeniedException;
65

    
66
    public Set<RegistrationDTO> loadBlockingRegistrations(UUID blockedRegistrationUuid);
67

    
68
    public Pager<RegistrationDTO> convertToDTOPager(Pager<Registration> regPager);
69

    
70
    public List<RegistrationDTO> makeDTOs(Collection<Registration> regs);
71

    
72
    Pager<RegistrationDTO> pageDTOs(UUID submitterUuid, Collection<RegistrationStatus> includedStatus, String identifierFilterPattern,
73
            String taxonNameFilterPattern, String referenceFilterPattern, Collection<UUID> typeDesignationStatusUuids, Integer pageSize,
74
            Integer pageIndex, List<OrderHint> orderHints);
75

    
76
    public Pager<RegistrationDTO> findInTaxonGraph(UUID submitterUuid, Collection<RegistrationStatus> includedStatus,
77
            String taxonNameFilterPattern, MatchMode matchMode, Integer pageSize, Integer pageIndex,
78
            List<OrderHint> orderHints);
79

    
80
    public Pager<RegistrationDTO> pageWorkingSetsByNameUUID(Collection<UUID> taxonNameUuids, Integer pageIndex, Integer pageSize, List<OrderHint> orderHints) throws RegistrationValidationException, PermissionDeniedException;
81
}
(1-1/2)