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.UUID;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.service.config.FeatureNodeDeletionConfigurator;
|
15
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
16
|
import eu.etaxonomy.cdm.model.description.FeatureNode;
|
17
|
|
18
|
/**
|
19
|
* @author n.hoffmann
|
20
|
* @since Aug 5, 2010
|
21
|
* @version 1.0
|
22
|
*/
|
23
|
public interface IFeatureNodeService extends IVersionableService<FeatureNode>{
|
24
|
|
25
|
|
26
|
DeleteResult isDeletable(FeatureNode node, FeatureNodeDeletionConfigurator config);
|
27
|
|
28
|
DeleteResult deleteFeatureNode(UUID nodeUuid, FeatureNodeDeletionConfigurator config);
|
29
|
|
30
|
|
31
|
/**
|
32
|
* Adds the specified term as a child node to the given feature node
|
33
|
* @param parentNode the feature node where the new term should be added
|
34
|
* @param term the term which should be added to the given feature node
|
35
|
* @return the result of the operation
|
36
|
*/
|
37
|
public UpdateResult addChildFeatureNode(FeatureNode parentNode, DefinedTermBase term);
|
38
|
|
39
|
/**
|
40
|
* Adds the specified feature as a child node to the given feature node
|
41
|
* @param parentNode the feature node where the new feature should be added
|
42
|
* @param term the term which should be added to the given feature node
|
43
|
* @param position the position where the child node should be added
|
44
|
* @return the result of the operation
|
45
|
*/
|
46
|
public UpdateResult addChildFeatureNode(FeatureNode parentNode, DefinedTermBase term, int position);
|
47
|
|
48
|
|
49
|
/**
|
50
|
* <b>Saves</b> and adds the specified feature as a child node to the given feature node.
|
51
|
* @see IFeatureNodeService#addChildFeatureNode(FeatureNode, DefinedTermBase)
|
52
|
* @param parentNode the feature node where the new feature should be added
|
53
|
* @param term the term which should be <b>saved</b> and added to the given feature node
|
54
|
* @return the result of the operation
|
55
|
*/
|
56
|
public UpdateResult createChildFeatureNode(FeatureNode node, DefinedTermBase term);
|
57
|
|
58
|
/**
|
59
|
* Adds the specified feature as a child node to the given feature node
|
60
|
* @param parentNodeUUID the UUID of the feature node where the new feature should be added
|
61
|
* @param termChildUuid the UUID of the term which should be added to the given feature node
|
62
|
* @return the result of the operation
|
63
|
*/
|
64
|
public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID termChildUuid);
|
65
|
|
66
|
/**
|
67
|
* Adds the specified feature as a child node to the given feature node at the given position
|
68
|
* @param parentNodeUUID the UUID of the feature node where the new feature should be added
|
69
|
* @param termChildUuid the UUID of the term which should be added to the given feature node
|
70
|
* @param position the position where the child node should be added
|
71
|
* @return the result of the operation
|
72
|
*/
|
73
|
public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID termChildUuid, int position);
|
74
|
|
75
|
/**
|
76
|
* Moves a given {@link FeatureNode} to the target node at the given position;
|
77
|
* @param movedNodeUuid the node to move
|
78
|
* @param targetNodeUuid the target node
|
79
|
* @param position the position in the list of children of the target node
|
80
|
* @return the result of the operation
|
81
|
*/
|
82
|
public UpdateResult moveFeatureNode(UUID movedNodeUuid, UUID targetNodeUuid, int position);
|
83
|
|
84
|
/**
|
85
|
* Moves a given {@link FeatureNode} to the target node;
|
86
|
* @param movedNodeUuid the node to move
|
87
|
* @param targetNodeUuid the target node
|
88
|
* @return the result of the operation
|
89
|
*/
|
90
|
public UpdateResult moveFeatureNode(UUID movedNodeUuid, UUID targetNodeUuid);
|
91
|
|
92
|
}
|