Merge branch 'develop' of ssh://dev.e-taxonomy.eu/var/git/cdmlib into develop
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IFeatureNodeService.java
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.TermNodeDeletionConfigurator;
15 import eu.etaxonomy.cdm.model.term.DefinedTermBase;
16 import eu.etaxonomy.cdm.model.term.TermNode;
17
18 /**
19 * @author n.hoffmann
20 * @since Aug 5, 2010
21 * @deprecated use ITermNodeService instead
22 */
23 @Deprecated
24 public interface IFeatureNodeService extends IVersionableService<TermNode>{
25
26 DeleteResult isDeletable(UUID nodeUuid, TermNodeDeletionConfigurator config);
27
28 DeleteResult deleteFeatureNode(UUID nodeUuid, TermNodeDeletionConfigurator config);
29
30
31 /**
32 * <b>Saves</b> and adds the specified feature as a child node to the given feature node.
33 * @see ITermNodeService#addChildFeatureNode(FeatureNode, DefinedTermBase)
34 * @param parentNodeUuid the feature node where the new feature should be added
35 * @param term the term which should be <b>saved</b> and added to the given feature node
36 * @param vocabularyUuid the UUID of the vocabulary where the term should be saved
37 * @return the result of the operation
38 */
39 public UpdateResult createChildFeatureNode(UUID parentNodeUuid, DefinedTermBase term, UUID vocabularyUuid);
40
41 /**
42 * Adds the specified feature as a child node to the given feature node
43 * @param parentNodeUUID the UUID of the feature node where the new feature should be added
44 * @param termChildUuid the UUID of the term which should be added to the given feature node
45 * @return the result of the operation
46 */
47 public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID termChildUuid);
48
49 /**
50 * Adds the specified feature as a child node to the given feature node at the given position
51 * @param parentNodeUUID the UUID of the feature node where the new feature should be added
52 * @param termChildUuid the UUID of the term which should be added to the given feature node
53 * @param position the position where the child node should be added
54 * @return the result of the operation
55 */
56 public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID termChildUuid, int position);
57
58 /**
59 * Moves a given {@link TermNode} to the target node at the given position;
60 * @param movedNodeUuid the node to move
61 * @param targetNodeUuid the target node
62 * @param position the position in the list of children of the target node
63 * @return the result of the operation
64 */
65 public UpdateResult moveFeatureNode(UUID movedNodeUuid, UUID targetNodeUuid, int position);
66
67 /**
68 * Moves a given {@link TermNode} to the target node;
69 * @param movedNodeUuid the node to move
70 * @param targetNodeUuid the target node
71 * @return the result of the operation
72 */
73 public UpdateResult moveFeatureNode(UUID movedNodeUuid, UUID targetNodeUuid);
74
75 }