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.UUID;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.service.config.TermNodeDeletionConfigurator;
|
16
|
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
|
17
|
import eu.etaxonomy.cdm.model.term.TermNode;
|
18
|
import eu.etaxonomy.cdm.model.term.TermType;
|
19
|
import eu.etaxonomy.cdm.persistence.dto.CharacterNodeDto;
|
20
|
import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
|
21
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
22
|
|
23
|
/**
|
24
|
* @author n.hoffmann
|
25
|
* @since Aug 5, 2010
|
26
|
*/
|
27
|
public interface ITermNodeService extends IVersionableService<TermNode>{
|
28
|
|
29
|
public List<TermNode> list(TermType termType, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
|
30
|
|
31
|
public DeleteResult isDeletable(UUID nodeUuid, TermNodeDeletionConfigurator config);
|
32
|
|
33
|
public DeleteResult deleteNode(UUID nodeUuid, TermNodeDeletionConfigurator config);
|
34
|
|
35
|
|
36
|
/**
|
37
|
* <b>Saves</b> and adds the specified term as a child node to the given term node.
|
38
|
* @see ITermNodeService#addChildNode(TermNode, DefinedTermBase)
|
39
|
* @param parentNodeUuid the term node to which the new term should be added
|
40
|
* @param term the term which should be <b>saved</b> and added to the given term node
|
41
|
* @param vocabularyUuid the UUID of the vocabulary where the term should be saved
|
42
|
* @return the result of the operation
|
43
|
*/
|
44
|
public UpdateResult createChildNode(UUID parentNodeUuid, DefinedTermBase term, UUID vocabularyUuid);
|
45
|
|
46
|
/**
|
47
|
* Adds the specified term as a child node to the given term node
|
48
|
* @param parentNodeUUID the UUID of the term node to which the new term should be added
|
49
|
* @param termChildUuid the UUID of the term which should be added to the given term node
|
50
|
* @return the result of the operation
|
51
|
*/
|
52
|
public UpdateResult addChildNode(UUID parentNodeUUID, UUID termChildUuid);
|
53
|
|
54
|
/**
|
55
|
* Adds the specified term as a child node to the given term node at the given position
|
56
|
* @param parentNodeUUID the UUID of the term node to which the new term should be added
|
57
|
* @param termChildUuid the UUID of the term which should be added to the given term node
|
58
|
* @param position the position where the child node should be added
|
59
|
* @return the result of the operation
|
60
|
*/
|
61
|
public UpdateResult addChildNode(UUID parentNodeUUID, UUID termChildUuid, int position);
|
62
|
|
63
|
/**
|
64
|
* Moves a given {@link TermNode} to the target node at the given position;
|
65
|
* @param movedNodeUuid the node to move
|
66
|
* @param targetNodeUuid the target node
|
67
|
* @param position the position in the list of children of the target node
|
68
|
* @return the result of the operation
|
69
|
*/
|
70
|
public UpdateResult moveNode(UUID movedNodeUuid, UUID targetNodeUuid, int position);
|
71
|
|
72
|
/**
|
73
|
* Moves a given {@link TermNode} to the target node;
|
74
|
* @param movedNodeUuid the node to move
|
75
|
* @param targetNodeUuid the target node
|
76
|
* @return the result of the operation
|
77
|
*/
|
78
|
public UpdateResult moveNode(UUID movedNodeUuid, UUID targetNodeUuid);
|
79
|
|
80
|
/**
|
81
|
* @param dtos
|
82
|
* @return
|
83
|
*/
|
84
|
UpdateResult saveTermNodeDtoList(List<TermNodeDto> dtos);
|
85
|
|
86
|
/**
|
87
|
* @param dtos
|
88
|
* @return
|
89
|
*/
|
90
|
public UpdateResult saveCharacterNodeDtoList(List<CharacterNodeDto> dtos);
|
91
|
|
92
|
}
|