Project

General

Profile

Download (3.02 KB) Statistics
| Branch: | Tag: | Revision:
1 a89899fb Katja Luther
/**
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 fbc64294 Patrick Plitzner
import eu.etaxonomy.cdm.model.description.Feature;
16 a89899fb Katja Luther
import eu.etaxonomy.cdm.model.description.FeatureNode;
17
18
/**
19
 * @author n.hoffmann
20 a88578ce Andreas Müller
 * @since Aug 5, 2010
21 a89899fb Katja Luther
 * @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 fbc64294 Patrick Plitzner
41
    /**
42
     * Adds the specified feature as a child node to the given feature node
43 fe7208bf Patrick Plitzner
     * @param parentNode the feature node where the new feature should be added
44 fbc64294 Patrick Plitzner
     * @param featureChild the feature which should be added to the given feature node
45
     * @return the result of the operation
46
     */
47 fe7208bf Patrick Plitzner
    public UpdateResult addChildFeatureNode(FeatureNode parentNode, Feature featureChild);
48 fbc64294 Patrick Plitzner
49 69f6fe4f Patrick Plitzner
50
    /**
51 85d5ad40 Patrick Plitzner
     * <b>Saves</b> and adds the specified feature as a child node to the given feature node.
52
     * @see IFeatureNodeService#addChildFeatureNode(FeatureNode, Feature)
53 69f6fe4f Patrick Plitzner
     * @param parentNode the feature node where the new feature should be added
54 85d5ad40 Patrick Plitzner
     * @param featureChild the feature which should be <b>saved</b> and added to the given feature node
55 69f6fe4f Patrick Plitzner
     * @return the result of the operation
56
     */
57
    public UpdateResult createChildFeatureNode(FeatureNode node, Feature featureChild);
58
59 fbc64294 Patrick Plitzner
    /**
60
     * Adds the specified feature as a child node to the given feature node
61 fe7208bf Patrick Plitzner
     * @param parentNodeUUID the UUID of the feature node where the new feature should be added
62 fbc64294 Patrick Plitzner
     * @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 fe7208bf Patrick Plitzner
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID featureChildUuid);
66 fbc64294 Patrick Plitzner
67 489923b4 Patrick Plitzner
    /**
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 a89899fb Katja Luther
}