2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.util
.List
;
13 import java
.util
.UUID
;
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
.query
.OrderHint
;
25 public interface ITermNodeService
extends IVersionableService
<TermNode
>{
27 public List
<TermNode
> list(TermType termType
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
29 public DeleteResult
isDeletable(UUID nodeUuid
, TermNodeDeletionConfigurator config
);
31 public DeleteResult
deleteNode(UUID nodeUuid
, TermNodeDeletionConfigurator config
);
35 * <b>Saves</b> and adds the specified term as a child node to the given term node.
36 * @see ITermNodeService#addChildNode(TermNode, DefinedTermBase)
37 * @param parentNodeUuid the term node to which the new term should be added
38 * @param term the term which should be <b>saved</b> and added to the given term node
39 * @param vocabularyUuid the UUID of the vocabulary where the term should be saved
40 * @return the result of the operation
42 public UpdateResult
createChildNode(UUID parentNodeUuid
, DefinedTermBase term
, UUID vocabularyUuid
);
45 * Adds the specified term as a child node to the given term node
46 * @param parentNodeUUID the UUID of the term node to which the new term should be added
47 * @param termChildUuid the UUID of the term which should be added to the given term node
48 * @return the result of the operation
50 public UpdateResult
addChildNode(UUID parentNodeUUID
, UUID termChildUuid
);
53 * Adds the specified term as a child node to the given term node at the given position
54 * @param parentNodeUUID the UUID of the term node to which the new term should be added
55 * @param termChildUuid the UUID of the term which should be added to the given term node
56 * @param position the position where the child node should be added
57 * @return the result of the operation
59 public UpdateResult
addChildNode(UUID parentNodeUUID
, UUID termChildUuid
, int position
);
62 * Moves a given {@link TermNode} to the target node at the given position;
63 * @param movedNodeUuid the node to move
64 * @param targetNodeUuid the target node
65 * @param position the position in the list of children of the target node
66 * @return the result of the operation
68 public UpdateResult
moveNode(UUID movedNodeUuid
, UUID targetNodeUuid
, int position
);
71 * Moves a given {@link TermNode} to the target node;
72 * @param movedNodeUuid the node to move
73 * @param targetNodeUuid the target node
74 * @return the result of the operation
76 public UpdateResult
moveNode(UUID movedNodeUuid
, UUID targetNodeUuid
);