Project

General

Profile

Download (3.02 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.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
    /**
51
     * <b>Saves</b> and adds the specified feature as a child node to the given feature node.
52
     * @see IFeatureNodeService#addChildFeatureNode(FeatureNode, Feature)
53
     * @param parentNode the feature node where the new feature should be added
54
     * @param featureChild the feature which should be <b>saved</b> and added to the given feature node
55
     * @return the result of the operation
56
     */
57
    public UpdateResult createChildFeatureNode(FeatureNode node, Feature featureChild);
58

    
59
    /**
60
     * Adds the specified feature as a child node to the given feature node
61
     * @param parentNodeUUID the UUID of the feature node where the new feature should be added
62
     * @param featureChildUuid the UUID of the feature which should be added to the given feature node
63
     * @return the result of the operation
64
     */
65
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID featureChildUuid);
66

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

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

    
84
}
(40-40/103)