Project

General

Profile

Download (2.93 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
     * Creates, saves and adds the specified feature as a child node to the given feature node
52
     * @param parentNode the feature node where the new feature should be added
53
     * @param featureChild the feature which should be added to the given feature node
54
     * @return the result of the operation
55
     */
56
    public UpdateResult createChildFeatureNode(FeatureNode node, Feature featureChild);
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 featureChildUuid the UUID of the feature which should be added to the given feature node
62
     * @return the result of the operation
63
     */
64
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID featureChildUuid);
65

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

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

    
83
}
(40-40/105)