Project

General

Profile

« Previous | Next » 

Revision cc0fa0be

Added by Patrick Plitzner about 5 years ago

ref #8153 Adapt cdmlib to model changes

  • Add constructor for creating a FeatureNode for a given termType
  • Adjust feature node service to model changes

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IFeatureNodeService.java
12 12
import java.util.UUID;
13 13

  
14 14
import eu.etaxonomy.cdm.api.service.config.FeatureNodeDeletionConfigurator;
15
import eu.etaxonomy.cdm.model.description.Feature;
15
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
16 16
import eu.etaxonomy.cdm.model.description.FeatureNode;
17 17

  
18 18
/**
......
23 23
public interface IFeatureNodeService extends IVersionableService<FeatureNode>{
24 24

  
25 25

  
26
    /**
27
     * @param node
28
     * @param config
29
     * @return
30
     */
31 26
    DeleteResult isDeletable(FeatureNode node, FeatureNodeDeletionConfigurator config);
32 27

  
33
    /**
34
     * @param nodeUuid
35
     * @param config
36
     * @return
37
     */
38 28
    DeleteResult deleteFeatureNode(UUID nodeUuid, FeatureNodeDeletionConfigurator config);
39 29

  
40 30

  
41 31
    /**
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
32
     * Adds the specified term as a child node to the given feature node
33
     * @param parentNode the feature node where the new term should be added
34
     * @param term the term which should be added to the given feature node
45 35
     * @return the result of the operation
46 36
     */
47
    public UpdateResult addChildFeatureNode(FeatureNode parentNode, Feature featureChild);
37
    public UpdateResult addChildFeatureNode(FeatureNode parentNode, DefinedTermBase term);
48 38

  
49 39
    /**
50 40
     * Adds the specified feature as a child node to the given feature node
51 41
     * @param parentNode the feature node where the new feature should be added
52
     * @param featureChild the feature which should be added to the given feature node
42
     * @param term the term which should be added to the given feature node
53 43
     * @param position the position where the child node should be added
54 44
     * @return the result of the operation
55 45
     */
56
    public UpdateResult addChildFeatureNode(FeatureNode parentNode, Feature featureChild, int position);
46
    public UpdateResult addChildFeatureNode(FeatureNode parentNode, DefinedTermBase term, int position);
57 47

  
58 48

  
59 49
    /**
60 50
     * <b>Saves</b> and adds the specified feature as a child node to the given feature node.
61
     * @see IFeatureNodeService#addChildFeatureNode(FeatureNode, Feature)
51
     * @see IFeatureNodeService#addChildFeatureNode(FeatureNode, DefinedTermBase)
62 52
     * @param parentNode the feature node where the new feature should be added
63
     * @param featureChild the feature which should be <b>saved</b> and added to the given feature node
53
     * @param term the term which should be <b>saved</b> and added to the given feature node
64 54
     * @return the result of the operation
65 55
     */
66
    public UpdateResult createChildFeatureNode(FeatureNode node, Feature featureChild);
56
    public UpdateResult createChildFeatureNode(FeatureNode node, DefinedTermBase term);
67 57

  
68 58
    /**
69 59
     * Adds the specified feature as a child node to the given feature node
70 60
     * @param parentNodeUUID the UUID of the feature node where the new feature should be added
71
     * @param featureChildUuid the UUID of the feature which should be added to the given feature node
61
     * @param termChildUuid the UUID of the term which should be added to the given feature node
72 62
     * @return the result of the operation
73 63
     */
74
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID featureChildUuid);
64
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID termChildUuid);
75 65

  
76 66
    /**
77 67
     * Adds the specified feature as a child node to the given feature node at the given position
78 68
     * @param parentNodeUUID the UUID of the feature node where the new feature should be added
79
     * @param featureChildUuid the UUID of the feature which should be added to the given feature node
69
     * @param termChildUuid the UUID of the term which should be added to the given feature node
80 70
     * @param position the position where the child node should be added
81 71
     * @return the result of the operation
82 72
     */
83
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID featureChildUuid, int position);
73
    public UpdateResult addChildFeatureNode(UUID parentNodeUUID, UUID termChildUuid, int position);
84 74

  
85 75
    /**
86 76
     * Moves a given {@link FeatureNode} to the target node at the given position;

Also available in: Unified diff