Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
1663a048
by Tony CHEMIT at 2017-08-03T00:20:50+02:00
-
a2029feb
by Tony CHEMIT at 2017-08-03T00:21:26+02:00
6 changed files:
- client/src/main/java/fr/ird/observe/client/ui/actions/storage/UseRemoteConfigurationUIAction.java
- client/src/main/java/fr/ird/observe/client/ui/actions/storage/UseServerConfigurationUIAction.java
- client/src/main/java/fr/ird/observe/client/ui/content/impl/seine/FloatingObjectUIModel.java
- services-topia/src/main/java/fr/ird/observe/services/topia/service/actions/consolidate/ConsolidateActivitySeineDataResultBuilder.java
- services-topia/src/main/java/fr/ird/observe/services/topia/service/actions/consolidate/ConsolidateDataServiceTopia.java
- services-topia/src/main/java/fr/ird/observe/services/topia/service/actions/consolidate/SimplifiedObjectTypeManager.java
Changes:
| ... | ... | @@ -78,7 +78,9 @@ public class UseRemoteConfigurationUIAction extends AbstractUIAction { |
| 78 | 78 |
SwingUtilities.invokeLater(() -> {
|
| 79 | 79 |
configUI.getTestRemoteAction().doClick();
|
| 80 | 80 |
if (ConnexionStatus.SUCCESS == configUI.getModel().getConnexionStatus()) {
|
| 81 |
- parentContainer.getNextAction().doClick();
|
|
| 81 |
+ if (parentContainer.getModel().getNextStep()!=null) {
|
|
| 82 |
+ parentContainer.getNextAction().doClick();
|
|
| 83 |
+ }
|
|
| 82 | 84 |
if (getMainUI() != null) {
|
| 83 | 85 |
parentContainer.getApplyAction().doClick();
|
| 84 | 86 |
}
|
| ... | ... | @@ -79,7 +79,9 @@ public class UseServerConfigurationUIAction extends AbstractUIAction { |
| 79 | 79 |
SwingUtilities.invokeLater(() -> {
|
| 80 | 80 |
configUI.getTestRemoteAction().doClick();
|
| 81 | 81 |
if (ConnexionStatus.SUCCESS == configUI.getModel().getConnexionStatus()) {
|
| 82 |
- parentContainer.getNextAction().doClick();
|
|
| 82 |
+ if (parentContainer.getModel().getNextStep() != null) {
|
|
| 83 |
+ parentContainer.getNextAction().doClick();
|
|
| 84 |
+ }
|
|
| 83 | 85 |
if (getMainUI() != null) {
|
| 84 | 86 |
parentContainer.getApplyAction().doClick();
|
| 85 | 87 |
}
|
| ... | ... | @@ -30,6 +30,7 @@ import fr.ird.observe.common.constants.seine.DcpComputedValue; |
| 30 | 30 |
import fr.ird.observe.services.binder.ReferenceBinderEngine;
|
| 31 | 31 |
import fr.ird.observe.services.dto.FloatingObjectReference;
|
| 32 | 32 |
import fr.ird.observe.services.dto.constants.ReferentialLocale;
|
| 33 |
+import fr.ird.observe.services.dto.form.Form;
|
|
| 33 | 34 |
import fr.ird.observe.services.dto.referential.seine.ObjectMaterialDto;
|
| 34 | 35 |
import fr.ird.observe.services.dto.seine.FloatingObjectDto;
|
| 35 | 36 |
import fr.ird.observe.services.dto.seine.FloatingObjectPartDto;
|
| ... | ... | @@ -136,6 +137,9 @@ public class FloatingObjectUIModel extends ContentUIModel<FloatingObjectDto> { |
| 136 | 137 |
public void reset() {
|
| 137 | 138 |
whenArriving.clear();
|
| 138 | 139 |
whenLeaving.clear();
|
| 140 |
+ firePropertyChange("computedBiodegradableValue", getComputedBiodegradableValue());
|
|
| 141 |
+ firePropertyChange("computedNonEntanglingValue", getComputedNonEntanglingValue());
|
|
| 142 |
+ firePropertyChange("computedSimplifiedObjectTypeValue", getComputedSimplifiedObjectTypeValue());
|
|
| 139 | 143 |
}
|
| 140 | 144 |
|
| 141 | 145 |
public Map<ObjectMaterialDto, String> getWhenArriving() {
|
| ... | ... | @@ -84,7 +84,7 @@ public class ConsolidateActivitySeineDataResultBuilder { |
| 84 | 84 |
|
| 85 | 85 |
void flushDcpModification(FloatingObject dcp, String... propertyNamesModified) {
|
| 86 | 86 |
|
| 87 |
- String dcpLabel = activitySeine.getVesselActivitySeine().getLabel2() + "[" + activitySeine.getTime() + "]" + " - " + dcp.getObjectOperation().getLabel2();
|
|
| 87 |
+ String dcpLabel = activitySeine.getVesselActivitySeine().getLabel2() + "[" + activitySeine.getTime() + "]" + " - " + (dcp.getObjectOperation() == null ? "" : dcp.getObjectOperation().getLabel2());
|
|
| 88 | 88 |
for (String modifiedProperty : propertyNamesModified) {
|
| 89 | 89 |
switch (modifiedProperty) {
|
| 90 | 90 |
case FloatingObject.PROPERTY_COMPUTED_BIODEGRADABLE: {
|
| ... | ... | @@ -131,9 +131,9 @@ public class ConsolidateDataServiceTopia extends ObserveServiceTopia implements |
| 131 | 131 |
|
| 132 | 132 |
for (ActivitySeine activitySeine : route.getActivitySeine()) {
|
| 133 | 133 |
|
| 134 |
- if (!activitySeine.isSetOperation()) {
|
|
| 134 |
+ if (!activitySeine.isSetOperation() && !activitySeine.isDCPOperation()) {
|
|
| 135 | 135 |
if (log.isDebugEnabled()) {
|
| 136 |
- log.debug("No set on activity " + activitySeine);
|
|
| 136 |
+ log.debug("No set nor dcp on activity " + activitySeine);
|
|
| 137 | 137 |
}
|
| 138 | 138 |
continue;
|
| 139 | 139 |
}
|
| ... | ... | @@ -59,6 +59,10 @@ class SimplifiedObjectTypeManager { |
| 59 | 59 |
// get highest level first
|
| 60 | 60 |
availableNodes.sort(Comparator.comparing(SimplifiedObjectTypeNode::getLevel).reversed());
|
| 61 | 61 |
|
| 62 |
+ if (availableNodes.isEmpty()) {
|
|
| 63 |
+ return getNodeForStandardCode("FOB").getStandardCode();
|
|
| 64 |
+ }
|
|
| 65 |
+ |
|
| 62 | 66 |
// remove from available nodes, all nodes in the path of other ones
|
| 63 | 67 |
List<SimplifiedObjectTypeNode> mainNodes = new LinkedList<>(availableNodes);
|
| 64 | 68 |
|