Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
63734157
by tchemit at 2019-05-21T08:56:21Z
2 changed files:
- client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/save/SaveFloatingObjectSeineUIAction.java
- dto/src/main/java/fr/ird/observe/dto/referential/ps/observation/ObjectMaterialDto.java
Changes:
| ... | ... | @@ -28,13 +28,19 @@ import fr.ird.observe.client.ui.ObserveMainUI; |
| 28 | 28 |
import fr.ird.observe.client.ui.actions.content.api.data.edit.SaveEditDataUIActionSupport;
|
| 29 | 29 |
import fr.ird.observe.client.ui.content.data.ps.observation.FloatingObjectUI;
|
| 30 | 30 |
import fr.ird.observe.client.ui.content.data.ps.observation.FloatingObjectUIModel;
|
| 31 |
+import fr.ird.observe.client.ui.tree.navigation.nodes.NavigationTreeNodeSupport;
|
|
| 31 | 32 |
import fr.ird.observe.dto.data.ps.observation.FloatingObjectDto;
|
| 32 | 33 |
import fr.ird.observe.dto.data.ps.observation.FloatingObjectPartDto;
|
| 33 | 34 |
import fr.ird.observe.dto.data.ps.observation.FloatingObjectReference;
|
| 34 | 35 |
import fr.ird.observe.dto.result.SaveResultDto;
|
| 35 | 36 |
import fr.ird.observe.navigation.model.edit.ObserveEditNode;
|
| 37 |
+import fr.ird.observe.navigation.tree.MultipleReferenceContainerNode;
|
|
| 38 |
+import fr.ird.observe.navigation.tree.ReferenceNode;
|
|
| 36 | 39 |
import org.apache.logging.log4j.LogManager;
|
| 37 | 40 |
import org.apache.logging.log4j.Logger;
|
| 41 |
+import org.jetbrains.annotations.NotNull;
|
|
| 42 |
+ |
|
| 43 |
+import java.util.function.Function;
|
|
| 38 | 44 |
|
| 39 | 45 |
/**
|
| 40 | 46 |
* Created by tchemit on 28/09/2018.
|
| ... | ... | @@ -68,4 +74,8 @@ public class SaveFloatingObjectSeineUIAction extends SaveEditDataUIActionSupport |
| 68 | 74 |
return true;
|
| 69 | 75 |
}
|
| 70 | 76 |
|
| 77 |
+ @Override
|
|
| 78 |
+ protected @NotNull Function<FloatingObjectReference, ReferenceNode<FloatingObjectDto, FloatingObjectReference>> getNodeFactory(NavigationTreeNodeSupport parent) {
|
|
| 79 |
+ return ((MultipleReferenceContainerNode) parent)::newChildNode;
|
|
| 80 |
+ }
|
|
| 71 | 81 |
}
|
| ... | ... | @@ -29,19 +29,19 @@ public class ObjectMaterialDto extends GeneratedObjectMaterialDto { |
| 29 | 29 |
private static final long serialVersionUID = 1L;
|
| 30 | 30 |
//FIXME-PROTECTED-ID
|
| 31 | 31 |
public boolean isBoolean() {
|
| 32 |
- return objectMaterialType != null && " fr.ird.referential.ps.ObjectMaterialType#0#0".equals(objectMaterialType.getId());
|
|
| 32 |
+ return objectMaterialType != null && "fr.ird.referential.ps.observation.ObjectMaterialType#0#0".equals(objectMaterialType.getId());
|
|
| 33 | 33 |
}
|
| 34 | 34 |
//FIXME-PROTECTED-ID
|
| 35 | 35 |
public boolean isText() {
|
| 36 |
- return objectMaterialType != null && " fr.ird.referential.ps.ObjectMaterialType#0#3".equals(objectMaterialType.getId());
|
|
| 36 |
+ return objectMaterialType != null && "fr.ird.referential.ps.observation.ObjectMaterialType#0#3".equals(objectMaterialType.getId());
|
|
| 37 | 37 |
}
|
| 38 | 38 |
//FIXME-PROTECTED-ID
|
| 39 | 39 |
public boolean isInteger() {
|
| 40 |
- return objectMaterialType != null && " fr.ird.referential.ps.ObjectMaterialType#0#2".equals(objectMaterialType.getId());
|
|
| 40 |
+ return objectMaterialType != null && "fr.ird.referential.ps.observation.ObjectMaterialType#0#2".equals(objectMaterialType.getId());
|
|
| 41 | 41 |
}
|
| 42 | 42 |
//FIXME-PROTECTED-ID
|
| 43 | 43 |
public boolean isFloat() {
|
| 44 |
- return objectMaterialType != null && " fr.ird.referential.ps.ObjectMaterialType#0#1".equals(objectMaterialType.getId());
|
|
| 44 |
+ return objectMaterialType != null && "fr.ird.referential.ps.observation.ObjectMaterialType#0#1".equals(objectMaterialType.getId());
|
|
| 45 | 45 |
}
|
| 46 | 46 |
|
| 47 | 47 |
public boolean withValidation() {
|