Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

17 changed files:

Changes:

  • client/datasource/editor/api-test/pom.xml
    ... ... @@ -42,12 +42,21 @@
    42 42
           <artifactId>client-datasource-editor-api</artifactId>
    
    43 43
           <version>${project.version}</version>
    
    44 44
         </dependency>
    
    45
    +    <dependency>
    
    46
    +      <groupId>${project.groupId}</groupId>
    
    47
    +      <artifactId>models-dto-java</artifactId>
    
    48
    +      <version>${project.version}</version>
    
    49
    +    </dependency>
    
    45 50
         <dependency>
    
    46 51
           <groupId>${project.groupId}</groupId>
    
    47 52
           <artifactId>test</artifactId>
    
    48 53
           <version>${project.version}</version>
    
    49 54
           <scope>test</scope>
    
    50 55
         </dependency>
    
    56
    +    <dependency>
    
    57
    +      <groupId>io.ultreia.java4all</groupId>
    
    58
    +      <artifactId>java-lang</artifactId>
    
    59
    +    </dependency>
    
    51 60
     
    
    52 61
         <dependency>
    
    53 62
           <groupId>org.apache.logging.log4j</groupId>
    

  • client/datasource/editor/api-test/src/main/java/fr/ird/observe/client/datasource/editor/api/NavigationModelNodeTestSupport.java
    ... ... @@ -39,6 +39,8 @@ import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationSco
    39 39
     import fr.ird.observe.client.datasource.editor.api.navigation.tree.NavigationScopes;
    
    40 40
     import fr.ird.observe.dto.data.DataDto;
    
    41 41
     import fr.ird.observe.dto.reference.DataDtoReference;
    
    42
    +import fr.ird.observe.spi.module.ObserveBusinessModule;
    
    43
    +import io.ultreia.java4all.lang.Objects2;
    
    42 44
     import org.apache.logging.log4j.LogManager;
    
    43 45
     import org.apache.logging.log4j.Logger;
    
    44 46
     import org.junit.Assert;
    
    ... ... @@ -55,22 +57,23 @@ import java.util.Set;
    55 57
     public abstract class NavigationModelNodeTestSupport {
    
    56 58
         private static final Logger log = LogManager.getLogger(NavigationModelNodeTestSupport.class);
    
    57 59
     
    
    58
    -    protected final int expectedNodeCount;
    
    59
    -    protected final int expectedScopeCount;
    
    60
    -    protected final int expectedScopeBuilderCount = 8;
    
    60
    +    protected final int expectedCount;
    
    61 61
     
    
    62
    -    protected NavigationModelNodeTestSupport(int expectedNodeCount) {
    
    63
    -        this.expectedNodeCount = expectedNodeCount;
    
    64
    -        this.expectedScopeCount = this.expectedNodeCount;
    
    62
    +    protected NavigationModelNodeTestSupport(ObserveBusinessModule... businessModule) {
    
    63
    +        int expectedCount = 1; // root node
    
    64
    +        for (ObserveBusinessModule module : businessModule) {
    
    65
    +            expectedCount += module.computeNodeCount();
    
    66
    +        }
    
    67
    +        this.expectedCount = expectedCount;
    
    65 68
         }
    
    66 69
     
    
    67 70
         @Test
    
    68
    -    public void loadNodes() throws IllegalAccessException, InstantiationException {
    
    71
    +    public void loadNodes() {
    
    69 72
             Set<Class<? extends NavigationNode>> nodeTypes = NavigationNodes.get().getNodes();
    
    70 73
             log.info(String.format("Load %d node(s).", nodeTypes.size()));
    
    71
    -        Assert.assertEquals(expectedNodeCount, nodeTypes.size());
    
    74
    +        Assert.assertEquals(expectedCount, nodeTypes.size());
    
    72 75
             for (Class<? extends NavigationNode> nodeType : nodeTypes) {
    
    73
    -            NavigationNode instance = nodeType.newInstance();
    
    76
    +            NavigationNode instance = Objects2.newInstance(nodeType);
    
    74 77
                 Assert.assertNotNull(instance);
    
    75 78
             }
    
    76 79
         }
    
    ... ... @@ -79,7 +82,7 @@ public abstract class NavigationModelNodeTestSupport {
    79 82
         public void loadScopes() {
    
    80 83
             ImmutableMap<Class<? extends NavigationNode>, NavigationScope> scopes = NavigationScopes.get().getScopes();
    
    81 84
             log.info(String.format("Load %d scopes(s).", scopes.size()));
    
    82
    -        Assert.assertEquals(expectedScopeCount, scopes.size());
    
    85
    +        Assert.assertEquals(expectedCount, scopes.size());
    
    83 86
         }
    
    84 87
     
    
    85 88
         protected void assertOpenableNode(ContentOpenableUINavigationNode node, Class<? extends DataDto> expectedDtoType, Class<? extends DataDtoReference> expectedReferenceType, Class<? extends ContentOpenableUI<?, ?>> expectedUiType) {
    
    ... ... @@ -105,8 +108,8 @@ public abstract class NavigationModelNodeTestSupport {
    105 108
             Assert.assertEquals(node.getScope().getContentUiType(), expectedUiType);
    
    106 109
         }
    
    107 110
     
    
    108
    -    protected void assertTableNode(ContentTableUINavigationNode node, Class<? extends DataDto> expectedDtoDtpye, Class<? extends ContentTableUI<?, ?, ?>> expectedUiType) {
    
    109
    -        Assert.assertEquals(node.getScope().getNodeDataType(), expectedDtoDtpye);
    
    111
    +    protected void assertTableNode(ContentTableUINavigationNode node, Class<? extends DataDto> expectedDtoType, Class<? extends ContentTableUI<?, ?, ?>> expectedUiType) {
    
    112
    +        Assert.assertEquals(node.getScope().getNodeDataType(), expectedDtoType);
    
    110 113
             Assert.assertEquals(node.getScope().getContentUiType(), expectedUiType);
    
    111 114
         }
    
    112 115
     }

  • client/datasource/editor/common/src/test/java/fr/ird/observe/client/datasource/editor/content/CommonNavigationModelNodeTest.java
    ... ... @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.content;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.client.datasource.editor.api.NavigationModelNodeTestSupport;
    
    26
    +import fr.ird.observe.spi.module.common.BusinessModule;
    
    26 27
     
    
    27 28
     /**
    
    28 29
      * Created on 19/10/2020.
    
    ... ... @@ -33,7 +34,7 @@ import fr.ird.observe.client.datasource.editor.api.NavigationModelNodeTestSuppor
    33 34
     public class CommonNavigationModelNodeTest extends NavigationModelNodeTestSupport {
    
    34 35
     
    
    35 36
         public CommonNavigationModelNodeTest() {
    
    36
    -        super(28 + 1);
    
    37
    +        super(BusinessModule.get());
    
    37 38
         }
    
    38 39
     
    
    39 40
     }

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUIHandler.java
    ... ... @@ -232,7 +232,7 @@ public class SetCatchUIHandler extends GeneratedSetCatchUIHandler {
    232 232
                     String prefix = model.getPrefix();
    
    233 233
                     log.info(String.format("%sSaved modified branchline", prefix));
    
    234 234
                     BranchlineDto branchline = ui.getBranchlineBean();
    
    235
    -                SaveResultDto saveResult = getServicesProvider().getLlObservationBranchlineService().save(branchline);
    
    235
    +                SaveResultDto saveResult = getServicesProvider().getLlObservationSetCatchService().saveBranchline(branchline);
    
    236 236
                     saveResult.toDto(branchline);
    
    237 237
     
    
    238 238
                     // on recopie le last update car c'est le last update de Set qui est renvoyé.
    
    ... ... @@ -304,7 +304,7 @@ public class SetCatchUIHandler extends GeneratedSetCatchUIHandler {
    304 304
             } else {
    
    305 305
                 log.info(String.format("%s Use branchline: %s", prefix, newValue.getId()));
    
    306 306
     
    
    307
    -            Form<BranchlineDto> form = getLlObservationBranchlineService().loadForm(newValue.getId());
    
    307
    +            Form<BranchlineDto> form = getLlObservationSetCatchService().loadBranchlineForm(newValue.getId());
    
    308 308
                 form.getObject().copy(branchlineBean);
    
    309 309
     
    
    310 310
                 if (ui.getValidator().getBean() == null) {
    

  • client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/branchline/SaveBranchline.java
    ... ... @@ -39,10 +39,5 @@ public abstract class SaveBranchline<U extends ContentUI> extends ContentUIActio
    39 39
         public SaveBranchline() {
    
    40 40
             super(t("observe.data.ll.observation.Branchline.action.save"), t("observe.data.ll.observation.Branchline.action.save.tip"), "save", ObserveLLKeyStrokes.KEY_STROKE_SAVE_BRANCHLINE);
    
    41 41
         }
    
    42
    -//
    
    43
    -//    @Override
    
    44
    -//    protected void doActionPerformed(ActionEvent e, U ui) {
    
    45
    -//        ui.getHandler().doSaveBranchline();
    
    46
    -//    }
    
    47 42
     
    
    48 43
     }

  • client/datasource/editor/ll/src/test/java/fr/ird/observe/client/datasource/editor/ll/LlNavigationModelNodeTest.java
    ... ... @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.ll;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.client.datasource.editor.api.NavigationModelNodeTestSupport;
    
    26
    +import fr.ird.observe.spi.module.ll.BusinessModule;
    
    26 27
     import org.junit.Test;
    
    27 28
     
    
    28 29
     /**
    
    ... ... @@ -34,7 +35,7 @@ import org.junit.Test;
    34 35
     public class LlNavigationModelNodeTest extends NavigationModelNodeTestSupport {
    
    35 36
     
    
    36 37
         public LlNavigationModelNodeTest() {
    
    37
    -        super(65 + 1);
    
    38
    +        super(BusinessModule.get());
    
    38 39
         }
    
    39 40
     
    
    40 41
         @Test
    

  • client/datasource/editor/ps/src/test/java/fr/ird/observe/client/datasource/editor/ps/PsNavigationTreeNodeTest.java
    ... ... @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.ps;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.client.datasource.editor.api.NavigationModelNodeTestSupport;
    
    26
    +import fr.ird.observe.spi.module.ps.BusinessModule;
    
    26 27
     import fr.ird.observe.client.datasource.editor.ps.data.common.TripGearUseFeaturesUINavigationNode;
    
    27 28
     import fr.ird.observe.client.datasource.editor.ps.data.common.TripUINavigationNode;
    
    28 29
     import fr.ird.observe.client.datasource.editor.ps.data.observation.ActivityListUINavigationNode;
    
    ... ... @@ -61,10 +62,8 @@ import org.junit.Test;
    61 62
      */
    
    62 63
     public class PsNavigationTreeNodeTest extends NavigationModelNodeTestSupport {
    
    63 64
     
    
    64
    -    //    public static final int EXPECTED_NODE_COUNT = 41/*47*/;
    
    65
    -
    
    66 65
         public PsNavigationTreeNodeTest() {
    
    67
    -        super(41 + 1);
    
    66
    +        super(BusinessModule.get());
    
    68 67
         }
    
    69 68
     
    
    70 69
         @Test
    

  • client/runner/src/test/java/fr/ird/observe/client/datasource/editor/content/AllNavigationModelNodeTest.java
    ... ... @@ -33,7 +33,11 @@ import fr.ird.observe.client.datasource.editor.api.NavigationModelNodeTestSuppor
    33 33
     public class AllNavigationModelNodeTest extends NavigationModelNodeTestSupport {
    
    34 34
     
    
    35 35
         public AllNavigationModelNodeTest() {
    
    36
    -        super(1 + 28 + 41 + 65);
    
    36
    +        super(
    
    37
    +                fr.ird.observe.spi.module.common.BusinessModule.get(),
    
    38
    +                fr.ird.observe.spi.module.ps.BusinessModule.get(),
    
    39
    +                fr.ird.observe.spi.module.ll.BusinessModule.get()
    
    40
    +        );
    
    37 41
         }
    
    38 42
     
    
    39 43
     }

  • models/dto/definition/src/main/models/Observe/dto/30-data-ll-observation.model
    ... ... @@ -44,7 +44,7 @@ branchline + {*} data.ll.observation.Branchline
    44 44
     parentId + {*:1} String
    
    45 45
     notUsed + {*:1} boolean
    
    46 46
     
    
    47
    -data.ll.observation.Branchline > data.Simple >> data.ll.observation.LonglineElementAware
    
    47
    +data.ll.observation.Branchline > data.Data >> data.ll.observation.LonglineElementAware
    
    48 48
     settingIdentifier + {*:1} Integer
    
    49 49
     haulingIdentifier + {*:1} Integer
    
    50 50
     depthRecorder + {*:1} Boolean
    

  • models/dto/java/src/main/java/fr/ird/observe/spi/module/ObserveBusinessModule.java
    ... ... @@ -22,6 +22,8 @@ package fr.ird.observe.spi.module;
    22 22
      * #L%
    
    23 23
      */
    
    24 24
     
    
    25
    +import com.google.common.collect.ImmutableSet;
    
    26
    +import fr.ird.observe.dto.referential.ReferentialDto;
    
    25 27
     import fr.ird.observe.dto.referential.common.GearType;
    
    26 28
     import fr.ird.observe.dto.referential.common.ProgramReference;
    
    27 29
     
    
    ... ... @@ -46,4 +48,39 @@ public interface ObserveBusinessModule {
    46 48
         default GearType getGearType() {
    
    47 49
             return null;
    
    48 50
         }
    
    51
    +
    
    52
    +    default int computeNodeCount() {
    
    53
    +        int expectedNodeCount = 0;
    
    54
    +        for (BusinessSubModule subModule : ((BusinessModule) this).getSubModules()) {
    
    55
    +            ImmutableSet<Class<? extends ReferentialDto>> referentialTypes = subModule.getReferentialTypes();
    
    56
    +            int tmp = expectedNodeCount;
    
    57
    +            int referentialSize = referentialTypes.size();
    
    58
    +            if (referentialSize > 0) {
    
    59
    +                expectedNodeCount += 1 + referentialSize; // home referential + one for each referential type
    
    60
    +            }
    
    61
    +            int total=expectedNodeCount-tmp;
    
    62
    +            System.out.printf("Found %s-%s REFERENTIAL.... %d%n", ((BusinessModule) this).getName(), subModule.getName(), total);
    
    63
    +            tmp = expectedNodeCount;
    
    64
    +
    
    65
    +            int openableSize = subModule.getOpenableDataTypes().size();
    
    66
    +            int editableSize = subModule.getEditableDataTypes().size();
    
    67
    +            int simpleSize = subModule.getSimpleDataTypes().size();
    
    68
    +            int containerChildSize = subModule.getContainerChildDataTypes().size();
    
    69
    +            System.out.printf("Found %s-%s OPEN........... %d%n", ((BusinessModule) this).getName(), subModule.getName(), openableSize);
    
    70
    +            System.out.printf("Found %s-%s OPEN_LIST...... %d%n", ((BusinessModule) this).getName(), subModule.getName(), openableSize);
    
    71
    +            System.out.printf("Found %s-%s EDIT........... %d%n", ((BusinessModule) this).getName(), subModule.getName(), editableSize);
    
    72
    +            System.out.printf("Found %s-%s SIMPLE......... %d%n", ((BusinessModule) this).getName(), subModule.getName(), simpleSize);
    
    73
    +            System.out.printf("Found %s-%s CONTAINER_CHILD %d%n", ((BusinessModule) this).getName(), subModule.getName(), containerChildSize);
    
    74
    +            expectedNodeCount += openableSize; // open form
    
    75
    +            expectedNodeCount += openableSize; // open list form
    
    76
    +            expectedNodeCount += editableSize; // edit form
    
    77
    +            expectedNodeCount += simpleSize; // simple form
    
    78
    +            expectedNodeCount += containerChildSize; // container form
    
    79
    +            System.out.printf("Found %s-%s DATA........... %d%n", ((BusinessModule) this).getName(), subModule.getName(), expectedNodeCount - tmp);
    
    80
    +            total+=expectedNodeCount-tmp;
    
    81
    +            System.out.printf("Found %s-%s ............... %d%n", ((BusinessModule) this).getName(), subModule.getName(), total);
    
    82
    +        }
    
    83
    +        System.out.printf("Found %s ...................... %d%n", ((BusinessModule) this).getName(), expectedNodeCount);
    
    84
    +        return expectedNodeCount;
    
    85
    +    }
    
    49 86
     }

  • pom.xml
    ... ... @@ -18,13 +18,13 @@
    18 18
       <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    19 19
       #L%
    
    20 20
       -->
    
    21
    -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    
    21
    +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    
    22 22
       <modelVersion>4.0.0</modelVersion>
    
    23 23
     
    
    24 24
       <parent>
    
    25 25
         <groupId>io.ultreia.maven</groupId>
    
    26 26
         <artifactId>pom</artifactId>
    
    27
    -    <version>2021.17</version>
    
    27
    +    <version>2021.22</version>
    
    28 28
       </parent>
    
    29 29
     
    
    30 30
       <groupId>fr.ird.observe</groupId>
    
    ... ... @@ -151,7 +151,7 @@
    151 151
         <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
    
    152 152
         <buildDate>${maven.build.timestamp}</buildDate>
    
    153 153
     
    
    154
    -    <toolkit.version>5.0.10</toolkit.version>
    
    154
    +    <toolkit.version>5.0.12</toolkit.version>
    
    155 155
     
    
    156 156
         <lib.version.ognl>3.1.28</lib.version.ognl>
    
    157 157
         <!--can't use 1.4.197 (date has changed + blob also)-->
    
    ... ... @@ -207,6 +207,9 @@
    207 207
         <!-- Always deploy asap -->
    
    208 208
         <deployAtEnd>false</deployAtEnd>
    
    209 209
     
    
    210
    +    <jgitflow.masterBranchName>master-9</jgitflow.masterBranchName>
    
    211
    +    <jgitflow.developBranchName>develop-9</jgitflow.developBranchName>
    
    212
    +
    
    210 213
       </properties>
    
    211 214
     
    
    212 215
       <dependencyManagement>
    
    ... ... @@ -735,11 +738,15 @@
    735 738
                     <input>classpath:friend:/models/Observe/dto:01-referential-common.model</input>
    
    736 739
                     <input>classpath:friend:/models/Observe/dto:02-referential-ps-common.model</input>
    
    737 740
                     <input>classpath:friend:/models/Observe/dto:03-referential-ps-observation.model</input>
    
    741
    +                <input>classpath:friend:/models/Observe/dto:04-referential-ps-logbook.model</input>
    
    742
    +                <input>classpath:friend:/models/Observe/dto:05-referential-ps-landing.model</input>
    
    743
    +                <input>classpath:friend:/models/Observe/dto:06-referential-ps-localmarket.model</input>
    
    738 744
                     <input>classpath:friend:/models/Observe/dto:10-referential-ll-common.model</input>
    
    739 745
                     <input>classpath:friend:/models/Observe/dto:11-referential-ll-observation.model</input>
    
    740 746
                     <input>classpath:friend:/models/Observe/dto:12-referential-ll-logbook.model</input>
    
    741 747
                     <input>classpath:friend:/models/Observe/dto:13-referential-ll-landing.model</input>
    
    742 748
                     <input>classpath:friend:/models/Observe/dto:20-data-ps-observation.model</input>
    
    749
    +                <input>classpath:friend:/models/Observe/dto:21-data-ps-logbook.model</input>
    
    743 750
                     <input>classpath:friend:/models/Observe/dto:25-data-ps-common.model</input>
    
    744 751
                     <input>classpath:friend:/models/Observe/dto:30-data-ll-observation.model</input>
    
    745 752
                     <input>classpath:friend:/models/Observe/dto:31-data-ll-logbook.model</input>
    
    ... ... @@ -804,11 +811,15 @@
    804 811
                     <input>classpath:friend:/models/Observe/persistence:01-referential-common.model</input>
    
    805 812
                     <input>classpath:friend:/models/Observe/persistence:02-referential-ps-common.model</input>
    
    806 813
                     <input>classpath:friend:/models/Observe/persistence:03-referential-ps-observation.model</input>
    
    814
    +                <input>classpath:friend:/models/Observe/persistence:04-referential-ps-logbook.model</input>
    
    815
    +                <input>classpath:friend:/models/Observe/persistence:05-referential-ps-landing.model</input>
    
    816
    +                <input>classpath:friend:/models/Observe/persistence:06-referential-ps-localmarket.model</input>
    
    807 817
                     <input>classpath:friend:/models/Observe/persistence:10-referential-ll-common.model</input>
    
    808 818
                     <input>classpath:friend:/models/Observe/persistence:11-referential-ll-observation.model</input>
    
    809 819
                     <input>classpath:friend:/models/Observe/persistence:12-referential-ll-logbook.model</input>
    
    810 820
                     <input>classpath:friend:/models/Observe/persistence:13-referential-ll-landing.model</input>
    
    811 821
                     <input>classpath:friend:/models/Observe/persistence:20-data-ps-observation.model</input>
    
    822
    +                <input>classpath:friend:/models/Observe/persistence:21-data-ps-logbook.model</input>
    
    812 823
                     <input>classpath:friend:/models/Observe/persistence:25-data-ps-common.model</input>
    
    813 824
                     <input>classpath:friend:/models/Observe/persistence:30-data-ll-observation.model</input>
    
    814 825
                     <input>classpath:friend:/models/Observe/persistence:31-data-ll-logbook.model</input>
    
    ... ... @@ -867,9 +878,9 @@
    867 878
           </activation>
    
    868 879
     
    
    869 880
           <properties>
    
    870
    -        <model.classifier />
    
    871
    -        <model.defaultPackage />
    
    872
    -        <model.fullPackagePath />
    
    881
    +        <model.classifier/>
    
    882
    +        <model.defaultPackage/>
    
    883
    +        <model.fullPackagePath/>
    
    873 884
           </properties>
    
    874 885
           <build>
    
    875 886
             <plugins>
    
    ... ... @@ -883,10 +894,10 @@
    883 894
                       <target>
    
    884 895
                         <copy failonerror="true" overwrite="true" filtering="true" todir="${project.build.outputDirectory}/models">
    
    885 896
                           <filterset>
    
    886
    -                        <filter value="${observe.model.version}" token="observe.model.version" />
    
    897
    +                        <filter value="${observe.model.version}" token="observe.model.version"/>
    
    887 898
                           </filterset>
    
    888 899
                           <fileset dir="${basedir}/src/main/models">
    
    889
    -                        <include name="**/*" />
    
    900
    +                        <include name="**/*"/>
    
    890 901
                           </fileset>
    
    891 902
                         </copy>
    
    892 903
                       </target>
    
    ... ... @@ -902,12 +913,12 @@
    902 913
                       <target>
    
    903 914
                         <delete includeEmptyDirs="true">
    
    904 915
                           <fileset dir="${project.build.outputDirectory}/models/Observe/${model.classifier}">
    
    905
    -                        <include name="package/*" />
    
    906
    -                        <include name="package" />
    
    907
    -                        <include name="class/*" />
    
    908
    -                        <include name="class" />
    
    909
    -                        <include name="attribute/*" />
    
    910
    -                        <include name="attribute" />
    
    916
    +                        <include name="package/*"/>
    
    917
    +                        <include name="package"/>
    
    918
    +                        <include name="class/*"/>
    
    919
    +                        <include name="class"/>
    
    920
    +                        <include name="attribute/*"/>
    
    921
    +                        <include name="attribute"/>
    
    911 922
                           </fileset>
    
    912 923
                         </delete>
    
    913 924
                       </target>
    

  • server/core/src/main/filtered-resources/mapping
    ... ... @@ -176,10 +176,10 @@ GET /api/v1/data/ll/observation/ActivityService/loadForm
    176 176
     POST   /api/v1/data/ll/observation/ActivityService/move                                                                              v1.data.ll.observation.ActivityServiceRestApi.move
    
    177 177
     GET    /api/v1/data/ll/observation/ActivityService/preCreate                                                                         v1.data.ll.observation.ActivityServiceRestApi.preCreate
    
    178 178
     POST   /api/v1/data/ll/observation/ActivityService/save                                                                              v1.data.ll.observation.ActivityServiceRestApi.save
    
    179
    -GET    /api/v1/data/ll/observation/BranchlineService/loadForm                                                                        v1.data.ll.observation.BranchlineServiceRestApi.loadForm
    
    180
    -POST   /api/v1/data/ll/observation/BranchlineService/save                                                                            v1.data.ll.observation.BranchlineServiceRestApi.save
    
    179
    +GET    /api/v1/data/ll/observation/SetCatchService/loadBranchlineForm                                                                v1.data.ll.observation.SetCatchServiceRestApi.loadBranchlineForm
    
    181 180
     GET    /api/v1/data/ll/observation/SetCatchService/loadForm                                                                          v1.data.ll.observation.SetCatchServiceRestApi.loadForm
    
    182 181
     POST   /api/v1/data/ll/observation/SetCatchService/save                                                                              v1.data.ll.observation.SetCatchServiceRestApi.save
    
    182
    +GET    /api/v1/data/ll/observation/SetCatchService/saveBranchline                                                                    v1.data.ll.observation.SetCatchServiceRestApi.saveBranchline
    
    183 183
     GET    /api/v1/data/ll/observation/SetDetailCompositionService/loadForm                                                              v1.data.ll.observation.SetDetailCompositionServiceRestApi.loadForm
    
    184 184
     POST   /api/v1/data/ll/observation/SetDetailCompositionService/save                                                                  v1.data.ll.observation.SetDetailCompositionServiceRestApi.save
    
    185 185
     GET    /api/v1/data/ll/observation/SetGlobalCompositionService/loadForm                                                              v1.data.ll.observation.SetGlobalCompositionServiceRestApi.loadForm
    

  • services/api-test/src/main/resources/fixtures/fr/ird/observe/services/service/data/ll/observation/BranchlineService.properties deleted
    1
    -###
    
    2
    -# #%L
    
    3
    -# ObServe Services :: API Test
    
    4
    -# %%
    
    5
    -# Copyright (C) 2008 - 2021 IRD, Code Lutin, Ultreia.io
    
    6
    -# %%
    
    7
    -# This program is free software: you can redistribute it and/or modify
    
    8
    -# it under the terms of the GNU General Public License as
    
    9
    -# published by the Free Software Foundation, either version 3 of the
    
    10
    -# License, or (at your option) any later version.
    
    11
    -#
    
    12
    -# This program is distributed in the hope that it will be useful,
    
    13
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    -# GNU General Public License for more details.
    
    16
    -#
    
    17
    -# You should have received a copy of the GNU General Public
    
    18
    -# License along with this program.  If not, see
    
    19
    -# <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    -# #L%
    
    21
    -###
    
    22
    -defaultId=${LL_OBSERVATION_BRANCHLINE}
    
    23
    -loadForm.id=${defaultId}

  • services/api-test/src/main/resources/fixtures/fr/ird/observe/services/service/data/ll/observation/SetCatchService.properties
    ... ... @@ -20,5 +20,6 @@
    20 20
     # #L%
    
    21 21
     ###
    
    22 22
     defaultId=${LL_OBSERVATION_SET}
    
    23
    +loadBranchlineForm.id=${LL_OBSERVATION_BRANCHLINE}
    
    23 24
     loadForm.count=9
    
    24 25
     loadForm.id=${defaultId}

  • services/api-test/src/main/java/fr/ird/observe/services/service/data/ll/observation/BranchlineServiceFixtures.javaservices/api/src/main/java/fr/ird/observe/services/service/data/ll/observation/SetCatchService.java
    ... ... @@ -2,7 +2,7 @@ package fr.ird.observe.services.service.data.ll.observation;
    2 2
     
    
    3 3
     /*-
    
    4 4
      * #%L
    
    5
    - * ObServe Services :: API Test
    
    5
    + * ObServe Services :: API
    
    6 6
      * %%
    
    7 7
      * Copyright (C) 2008 - 2021 IRD, Code Lutin, Ultreia.io
    
    8 8
      * %%
    
    ... ... @@ -22,24 +22,15 @@ package fr.ird.observe.services.service.data.ll.observation;
    22 22
      * #L%
    
    23 23
      */
    
    24 24
     
    
    25
    +import fr.ird.observe.dto.data.ll.observation.BranchlineDto;
    
    26
    +import fr.ird.observe.dto.form.Form;
    
    27
    +import fr.ird.observe.dto.result.SaveResultDto;
    
    25 28
     
    
    26
    -import fr.ird.observe.services.service.data.SimpleDataServiceFixtures;
    
    29
    +public interface SetCatchService extends GeneratedSetCatchService {
    
    27 30
     
    
    28
    -public class BranchlineServiceFixtures extends GeneratedBranchlineServiceFixtures {
    
    31
    +    Form<BranchlineDto> loadBranchlineForm(String id);
    
    29 32
     
    
    30
    -    @Override
    
    31
    -    public void loadForm(BranchlineService service) {
    
    32
    -        SimpleDataServiceFixtures.loadForm(this, service);
    
    33
    -    }
    
    33
    +    SaveResultDto saveBranchline(BranchlineDto dto);
    
    34 34
     
    
    35
    -    @Override
    
    36
    -    public void save(BranchlineService service) {
    
    37
    -        SimpleDataServiceFixtures.save(
    
    38
    -                this,
    
    39
    -                service,
    
    40
    -                d -> {
    
    41
    -                    //FIXME:Test
    
    42
    -                });
    
    43
    -    }
    
    44 35
     
    
    45 36
     }

  • services/api/src/test/resources/fixtures/service.properties
    ... ... @@ -21,5 +21,5 @@
    21 21
     ###
    
    22 22
     OPENABLE_SERVICE_COUNT=8
    
    23 23
     EDITABLE_SERVICE_COUNT=5
    
    24
    -SIMPLE_SERVICE_COUNT=4
    
    24
    +SIMPLE_SERVICE_COUNT=3
    
    25 25
     CONTAINER_SERVICE_COUNT=18

  • services/local-impl/src/main/java/fr/ird/observe/services/local/service/data/ll/observation/BranchlineServiceLocalSupport.javaservices/local-impl/src/main/java/fr/ird/observe/services/local/service/data/ll/observation/SetCatchServiceLocalSupport.java
    ... ... @@ -23,29 +23,34 @@ package fr.ird.observe.services.local.service.data.ll.observation;
    23 23
      */
    
    24 24
     
    
    25 25
     import fr.ird.observe.dto.data.ll.observation.BranchlineDto;
    
    26
    +import fr.ird.observe.dto.data.ll.observation.CatchDto;
    
    27
    +import fr.ird.observe.dto.data.ll.observation.SetCatchDto;
    
    26 28
     import fr.ird.observe.dto.form.Form;
    
    27 29
     import fr.ird.observe.dto.result.SaveResultDto;
    
    28 30
     import fr.ird.observe.entities.Entity;
    
    29 31
     import fr.ird.observe.entities.data.ll.observation.Basket;
    
    30 32
     import fr.ird.observe.entities.data.ll.observation.Branchline;
    
    33
    +import fr.ird.observe.entities.data.ll.observation.Catch;
    
    31 34
     import fr.ird.observe.entities.data.ll.observation.Section;
    
    32 35
     import fr.ird.observe.entities.data.ll.observation.Set;
    
    33
    -import fr.ird.observe.services.local.service.ObserveServiceLocal;
    
    34
    -import fr.ird.observe.services.service.data.ll.observation.BranchlineService;
    
    36
    +import fr.ird.observe.services.local.service.data.ContainerDataServiceLocalSupport;
    
    37
    +import fr.ird.observe.services.service.data.ll.observation.SetCatchService;
    
    38
    +
    
    39
    +public abstract class SetCatchServiceLocalSupport extends ContainerDataServiceLocalSupport<Set, CatchDto, SetCatchDto, Catch> implements SetCatchService {
    
    40
    +
    
    41
    +    public SetCatchServiceLocalSupport() {
    
    42
    +        super(Set.SPI, Set.SET_CATCH_SPI, Catch.SPI);
    
    43
    +    }
    
    35 44
     
    
    36
    -/**
    
    37
    - * @author Tony Chemit - dev@tchemit.fr
    
    38
    - */
    
    39
    -class BranchlineServiceLocalSupport extends ObserveServiceLocal implements BranchlineService {
    
    40 45
     
    
    41 46
         @Override
    
    42
    -    public Form<BranchlineDto> loadForm(String id) {
    
    47
    +    public Form<BranchlineDto> loadBranchlineForm(String id) {
    
    43 48
             Branchline entity = Branchline.loadEntity(getApplicationLocale(), getTopiaPersistenceContext(), id);
    
    44 49
             return Branchline.entityToForm(getReferentialLocale(), entity);
    
    45 50
         }
    
    46 51
     
    
    47 52
         @Override
    
    48
    -    public SaveResultDto save(BranchlineDto dto) {
    
    53
    +    public SaveResultDto saveBranchline(BranchlineDto dto) {
    
    49 54
             Set parent = getParent(dto);
    
    50 55
             Branchline entity = Branchline.loadOrCreateEntityFromDto(getApplicationLocale(), getTopiaPersistenceContext(), dto);
    
    51 56
             checkLastUpdateDate(entity, dto);