Project

General

Profile

Download (3.75 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 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

    
10
package eu.etaxonomy.cdm.api.service;
11

    
12
import java.util.List;
13
import java.util.Map;
14
import java.util.UUID;
15

    
16
import eu.etaxonomy.cdm.api.service.config.TermNodeDeletionConfigurator;
17
import eu.etaxonomy.cdm.model.description.Character;
18
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
19
import eu.etaxonomy.cdm.model.term.TermNode;
20
import eu.etaxonomy.cdm.model.term.TermType;
21
import eu.etaxonomy.cdm.persistence.dto.CharacterNodeDto;
22
import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
23
import eu.etaxonomy.cdm.persistence.query.OrderHint;
24

    
25
/**
26
 * @author n.hoffmann
27
 * @since Aug 5, 2010
28
 */
29
public interface ITermNodeService extends IVersionableService<TermNode>{
30

    
31
    public List<TermNode> list(TermType termType, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
32

    
33
    public DeleteResult isDeletable(UUID nodeUuid, TermNodeDeletionConfigurator config);
34

    
35
    public DeleteResult deleteNode(UUID nodeUuid, TermNodeDeletionConfigurator config);
36

    
37

    
38
    /**
39
     * <b>Saves</b> and adds the specified term as a child node to the given term node.
40
     * @see ITermNodeService#addChildNode(TermNode, DefinedTermBase)
41
     * @param parentNodeUuid the term node to which the new term should be added
42
     * @param term the term which should be <b>saved</b> and added to the given term node
43
     * @param vocabularyUuid the UUID of the vocabulary where the term should be saved
44
     * @return the result of the operation
45
     */
46
    public UpdateResult createChildNode(UUID parentNodeUuid, DefinedTermBase term, UUID vocabularyUuid);
47

    
48
    /**
49
     * Adds the specified term as a child node to the given term node
50
     * @param parentNodeUUID the UUID of the term node to which the new term should be added
51
     * @param termChildUuid the UUID of the term which should be added to the given term node
52
     * @return the result of the operation
53
     */
54
    public UpdateResult addChildNode(UUID parentNodeUUID, UUID termChildUuid);
55

    
56
    /**
57
     * Adds the specified term as a child node to the given term node at the given position
58
     * @param parentNodeUUID the UUID of the term node to which the new term should be added
59
     * @param termChildUuid the UUID of the term which should be added to the given term node
60
     * @param position the position where the child node should be added
61
     * @return the result of the operation
62
     */
63
    public UpdateResult addChildNode(UUID parentNodeUUID, UUID termChildUuid, int position);
64

    
65
    /**
66
     * Moves a given {@link TermNode} to the target node at the given position;
67
     * @param movedNodeUuid the node to move
68
     * @param targetNodeUuid the target node
69
     * @param position the position in the list of children of the target node
70
     * @return the result of the operation
71
     */
72
    public UpdateResult moveNode(UUID movedNodeUuid, UUID targetNodeUuid, int position);
73

    
74
    /**
75
     * Moves a given {@link TermNode} to the target node;
76
     * @param movedNodeUuid the node to move
77
     * @param targetNodeUuid the target node
78
     * @return the result of the operation
79
     */
80
    public UpdateResult moveNode(UUID movedNodeUuid, UUID targetNodeUuid);
81

    
82
    /**
83
     * @param dtos
84
     * @return
85
     */
86
    UpdateResult saveTermNodeDtoList(List<TermNodeDto> dtos);
87

    
88
    /**
89
     * @param dtos
90
     * @param vocabularyUuid
91
     * @return
92
     */
93
    UpdateResult saveNewCharacterNodeDtoMap(Map<Character, CharacterNodeDto> dtos, UUID vocabularyUuid);
94

    
95
    /**
96
     * @param dtos
97
     * @return
98
     */
99
    UpdateResult saveCharacterNodeDtoList(List<CharacterNodeDto> dtos);
100

    
101

    
102

    
103

    
104
}
(59-59/97)