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.description.Feature;
|
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
|
/**
|
27
|
* @param node
|
28
|
* @param config
|
29
|
* @return
|
30
|
*/
|
31
|
DeleteResult isDeletable(FeatureNode node, FeatureNodeDeletionConfigurator config);
|
32
|
|
33
|
/**
|
34
|
* @param nodeUuid
|
35
|
* @param config
|
36
|
* @return
|
37
|
*/
|
38
|
DeleteResult deleteFeatureNode(UUID nodeUuid, FeatureNodeDeletionConfigurator config);
|
39
|
|
40
|
|
41
|
/**
|
42
|
* Adds the specified feature as a child node to the given feature node
|
43
|
* @param parentNode the feature node where the new feature should be added
|
44
|
* @param featureChild the feature which should be added to the given feature node
|
45
|
* @return the result of the operation
|
46
|
*/
|
47
|
public UpdateResult addChildFeatureNode(FeatureNode parentNode, Feature featureChild);
|
48
|
|
49
|
/**
|
50
|
* Adds the specified feature as a child node to the given feature node
|
51
|
* @param parentNodeUUID the UUID of the feature node where the new feature should be added
|
52
|
* @param featureChildUuid the UUID of the feature which should be added to the given feature node
|
53
|
* @return the result of the operation
|
54
|
*/
|
55
|
public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID featureChildUuid);
|
56
|
|
57
|
/**
|
58
|
* Moves a given {@link FeatureNode} to the target node at the given position;
|
59
|
* @param movedNodeUuid the node to move
|
60
|
* @param targetNodeUuid the target node
|
61
|
* @param position the position in the list of children of the target node
|
62
|
* @return the result of the operation
|
63
|
*/
|
64
|
public UpdateResult moveFeatureNode(UUID movedNodeUuid, UUID targetNodeUuid, int position);
|
65
|
|
66
|
/**
|
67
|
* Moves a given {@link FeatureNode} to the target node;
|
68
|
* @param movedNodeUuid the node to move
|
69
|
* @param targetNodeUuid the target node
|
70
|
* @return the result of the operation
|
71
|
*/
|
72
|
public UpdateResult moveFeatureNode(UUID movedNodeUuid, UUID targetNodeUuid);
|
73
|
|
74
|
}
|