Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
9316f9c6
by tchemit at 2019-05-21T13:33:52Z
11 changed files:
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/CommonTable.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/BranchlineObsUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/BranchlineObsUIModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/CatchLonglineObsUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/CatchLonglineObsUIHandler.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/LonglineDetailCompositionObsUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/LonglineDetailCompositionObsUIModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/TdrObsUI.jcss
- services-client/src/test/java/fr/ird/observe/services/client/service/actions/validate/ValidateServiceClientTest.java
- services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java
Changes:
| ... | ... | @@ -714,6 +714,8 @@ observe.common.TargetCatchDto.table.deleteExtraMessage |
| 714 | 714 |
observe.common.TargetCatchDto.table.speciesThon.tip
|
| 715 | 715 |
observe.common.TargetCatchDto.table.weightCategory.tip
|
| 716 | 716 |
observe.common.TargetCatchDto.table.well.tip
|
| 717 |
+observe.common.TargetCatchDto.targetCatchCompositionEstimatedByObserver
|
|
| 718 |
+observe.common.TargetCatchDto.targetDiscardCatchCompositionEstimatedByObserver
|
|
| 717 | 719 |
observe.common.TargetCatchDto.title
|
| 718 | 720 |
observe.common.TargetCatchDto.weightCategory
|
| 719 | 721 |
observe.common.TargetCatchDto.well
|
| ... | ... | @@ -34,6 +34,10 @@ JButton { |
| 34 | 34 |
_protectFocus:true;
|
| 35 | 35 |
}
|
| 36 | 36 |
|
| 37 |
+BeanCheckBox {
|
|
| 38 |
+ i18nProperty:""
|
|
| 39 |
+}
|
|
| 40 |
+ |
|
| 37 | 41 |
/*#comment {
|
| 38 | 42 |
minimumSize:{new Dimension(10,50)};
|
| 39 | 43 |
}*/
|
| ... | ... | @@ -120,7 +120,7 @@ public void edit(BranchlineObsDto branchline) { getHandler().edit(branchline); } |
| 120 | 120 |
<JLabel id='timeSinceContactLabel'/>
|
| 121 | 121 |
</cell>
|
| 122 | 122 |
<cell>
|
| 123 |
- <TimeEditor id='timeSinceContact' constructorParams='this'/>
|
|
| 123 |
+ <TimeEditor id='timeSinceContact' constructorParams='this' beanScope="model"/>
|
|
| 124 | 124 |
</cell>
|
| 125 | 125 |
</row>
|
| 126 | 126 |
|
| ... | ... | @@ -24,6 +24,9 @@ package fr.ird.observe.client.ui.content.data.ll.observation; |
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.client.ui.content.api.data.simple.ContentSimpleUIModel;
|
| 26 | 26 |
import fr.ird.observe.dto.data.ll.observation.BranchlineObsDto;
|
| 27 |
+import io.ultreia.java4all.bean.JavaBean;
|
|
| 28 |
+import io.ultreia.java4all.bean.definition.JavaBeanDefinition;
|
|
| 29 |
+import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
|
|
| 27 | 30 |
|
| 28 | 31 |
import java.util.Date;
|
| 29 | 32 |
|
| ... | ... | @@ -33,7 +36,8 @@ import java.util.Date; |
| 33 | 36 |
* @author Tony Chemit - dev@tchemit.fr
|
| 34 | 37 |
* @since 3.10
|
| 35 | 38 |
*/
|
| 36 |
-public class BranchlineObsUIModel extends ContentSimpleUIModel<BranchlineObsDto> {
|
|
| 39 |
+@GenerateJavaBeanDefinition
|
|
| 40 |
+public class BranchlineObsUIModel extends ContentSimpleUIModel<BranchlineObsDto> implements JavaBean {
|
|
| 37 | 41 |
|
| 38 | 42 |
public static final String PROPERTY_SAVED = "saved";
|
| 39 | 43 |
private static final long serialVersionUID = 1L;
|
| ... | ... | @@ -68,4 +72,16 @@ public class BranchlineObsUIModel extends ContentSimpleUIModel<BranchlineObsDto> |
| 68 | 72 |
firePropertyChange(PROPERTY_SAVED, null, true);
|
| 69 | 73 |
}
|
| 70 | 74 |
|
| 75 |
+ |
|
| 76 |
+ /**
|
|
| 77 |
+ * Lazy helper class that manages all java bean operations.
|
|
| 78 |
+ *
|
|
| 79 |
+ * @see #javaBeanDefinition()
|
|
| 80 |
+ */
|
|
| 81 |
+ private transient final JavaBeanDefinition javaBeanDefinition = new LonglineDetailCompositionObsUIModelJavaBeanDefinition();
|
|
| 82 |
+ |
|
| 83 |
+ @Override
|
|
| 84 |
+ public JavaBeanDefinition javaBeanDefinition() {
|
|
| 85 |
+ return null;
|
|
| 86 |
+ }
|
|
| 71 | 87 |
}
|
| ... | ... | @@ -281,7 +281,7 @@ |
| 281 | 281 |
<!-- depredated -->
|
| 282 | 282 |
<row>
|
| 283 | 283 |
<cell anchor='west' fill="both">
|
| 284 |
- <BeanCheckBox id='depredated'/>
|
|
| 284 |
+ <BeanCheckBox id='depredated' />
|
|
| 285 | 285 |
</cell>
|
| 286 | 286 |
</row>
|
| 287 | 287 |
|
| ... | ... | @@ -397,10 +397,10 @@ |
| 397 | 397 |
<cell anchor='east'>
|
| 398 | 398 |
<BeanCheckBox id='timer'/>
|
| 399 | 399 |
</cell>
|
| 400 |
- <cell>
|
|
| 401 |
- <JLabel id='timeSinceContactLabel'/>
|
|
| 402 |
- </cell>
|
|
| 403 |
- <cell>
|
|
| 400 |
+<!-- <cell>-->
|
|
| 401 |
+<!-- <JLabel id='timeSinceContactLabel'/>-->
|
|
| 402 |
+<!-- </cell>-->
|
|
| 403 |
+ <cell columns="2">
|
|
| 404 | 404 |
<TimeEditor id='timeSinceContact' constructorParams='this' beanScope="model"/>
|
| 405 | 405 |
</cell>
|
| 406 | 406 |
</row>
|
| ... | ... | @@ -503,7 +503,7 @@ public class CatchLonglineObsUIHandler extends ContentTableUIHandler<SetLongline |
| 503 | 503 |
CatchLonglineObsUIModel model = getModel();
|
| 504 | 504 |
if (BooleanUtils.isTrue(branchline.getTimer())) {
|
| 505 | 505 |
Calendar calendar = Calendar.getInstance();
|
| 506 |
- calendar.setTime(model.getTimeSinceContact());
|
|
| 506 |
+ calendar. setTime(model.getTimeSinceContact());
|
|
| 507 | 507 |
int minutes = calendar.get(Calendar.MINUTE);
|
| 508 | 508 |
int hours = calendar.get(Calendar.HOUR);
|
| 509 | 509 |
branchline.setTimeSinceContact(minutes + 60L * hours);
|
| ... | ... | @@ -642,7 +642,7 @@ public class CatchLonglineObsUIHandler extends ContentTableUIHandler<SetLongline |
| 642 | 642 |
}
|
| 643 | 643 |
|
| 644 | 644 |
private void onCatchFateChanged(CatchFateLonglineReference newValue) {
|
| 645 |
- if (newValue == null || !" fr.ird.referential.ll.common.CatchFateLongline#1239832686125#0.3".equals(newValue.getId())) {
|
|
| 645 |
+ if (newValue == null || !"fr.ird.referential.ll.common.CatchFateLongline#1239832686125#0.3".equals(newValue.getId())) {
|
|
| 646 | 646 |
// not discarded
|
| 647 | 647 |
ui.getDiscardHealthness().setEnabled(false);
|
| 648 | 648 |
ui.getHookWhenDiscarded().setEnabled(false);
|
| ... | ... | @@ -112,7 +112,7 @@ |
| 112 | 112 |
<!-- canGenerate -->
|
| 113 | 113 |
<row>
|
| 114 | 114 |
<cell anchor='west' fill="both">
|
| 115 |
- <BeanCheckBox id='canGenerate'/>
|
|
| 115 |
+ <BeanCheckBox id='canGenerate' beanScope="model"/>
|
|
| 116 | 116 |
</cell>
|
| 117 | 117 |
</row>
|
| 118 | 118 |
|
| ... | ... | @@ -24,6 +24,9 @@ package fr.ird.observe.client.ui.content.data.ll.observation; |
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.client.ui.content.api.data.simple.ContentSimpleUIModel;
|
| 26 | 26 |
import fr.ird.observe.dto.data.ll.observation.SetLonglineObsDetailCompositionDto;
|
| 27 |
+import io.ultreia.java4all.bean.JavaBean;
|
|
| 28 |
+import io.ultreia.java4all.bean.definition.JavaBeanDefinition;
|
|
| 29 |
+import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition;
|
|
| 27 | 30 |
|
| 28 | 31 |
/**
|
| 29 | 32 |
* Created on 12/5/14.
|
| ... | ... | @@ -32,7 +35,8 @@ import fr.ird.observe.dto.data.ll.observation.SetLonglineObsDetailCompositionDto |
| 32 | 35 |
* @since 3.8
|
| 33 | 36 |
*/
|
| 34 | 37 |
@SuppressWarnings("WeakerAccess")
|
| 35 |
-public class LonglineDetailCompositionObsUIModel extends ContentSimpleUIModel<SetLonglineObsDetailCompositionDto> {
|
|
| 38 |
+@GenerateJavaBeanDefinition
|
|
| 39 |
+public class LonglineDetailCompositionObsUIModel extends ContentSimpleUIModel<SetLonglineObsDetailCompositionDto> implements JavaBean {
|
|
| 36 | 40 |
|
| 37 | 41 |
public static final String PROPERTY_CAN_GENERATE = "canGenerate";
|
| 38 | 42 |
|
| ... | ... | @@ -130,4 +134,15 @@ public class LonglineDetailCompositionObsUIModel extends ContentSimpleUIModel<Se |
| 130 | 134 |
firePropertyChange(PROPERTY_GENERATE_TAB_VALID, null, generateTabValid);
|
| 131 | 135 |
}
|
| 132 | 136 |
|
| 137 |
+ /**
|
|
| 138 |
+ * Lazy helper class that manages all java bean operations.
|
|
| 139 |
+ *
|
|
| 140 |
+ * @see #javaBeanDefinition()
|
|
| 141 |
+ */
|
|
| 142 |
+ private transient final JavaBeanDefinition javaBeanDefinition = new LonglineDetailCompositionObsUIModelJavaBeanDefinition();
|
|
| 143 |
+ |
|
| 144 |
+ @Override
|
|
| 145 |
+ public JavaBeanDefinition javaBeanDefinition() {
|
|
| 146 |
+ return javaBeanDefinition;
|
|
| 147 |
+ }
|
|
| 133 | 148 |
}
|
| ... | ... | @@ -74,6 +74,7 @@ |
| 74 | 74 |
|
| 75 | 75 |
#enableTimestamp {
|
| 76 | 76 |
toolTipText:"observe.common.TdrObsDto.enableTimestamp.tip";
|
| 77 |
+ _skipBindingToBean:true;
|
|
| 77 | 78 |
}
|
| 78 | 79 |
|
| 79 | 80 |
#timestampPanel {
|
| ... | ... | @@ -180,7 +180,7 @@ public class ValidateServiceClientTest extends ServiceClientTestSupport { |
| 180 | 180 |
request.setDataIds(ImmutableSet.of(ObserveFixtures.TRIP_SEINE_ID_1, ObserveFixtures.TRIP_SEINE_ID_2));
|
| 181 | 181 |
SeineBycatchObservedSystemConfig seineBycatchObservedSystemConfig = new SeineBycatchObservedSystemConfig();
|
| 182 | 182 |
ArrayListMultimap<String, String> data = ArrayListMultimap.create();
|
| 183 |
- data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", " fr.ird.referential.ps.observation.ObservedSystem#0#1.0");
|
|
| 183 |
+ data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", "fr.ird.referential.ps.observation.ObservedSystem#0#1.0");
|
|
| 184 | 184 |
seineBycatchObservedSystemConfig.setData(data);
|
| 185 | 185 |
request.setSeineBycatchObservedSystemConfig(seineBycatchObservedSystemConfig);
|
| 186 | 186 |
|
| ... | ... | @@ -210,7 +210,7 @@ public class ValidateServiceClientTest extends ServiceClientTestSupport { |
| 210 | 210 |
|
| 211 | 211 |
SeineBycatchObservedSystemConfig seineBycatchObservedSystemConfig = new SeineBycatchObservedSystemConfig();
|
| 212 | 212 |
ArrayListMultimap<String, String> data = ArrayListMultimap.create();
|
| 213 |
- data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", " fr.ird.referential.ps.observation.ObservedSystem#0#1.0");
|
|
| 213 |
+ data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", "fr.ird.referential.ps.observation.ObservedSystem#0#1.0");
|
|
| 214 | 214 |
seineBycatchObservedSystemConfig.setData(data);
|
| 215 | 215 |
request.setSeineBycatchObservedSystemConfig(seineBycatchObservedSystemConfig);
|
| 216 | 216 |
|
| ... | ... | @@ -96,7 +96,7 @@ public class ValidateServiceLocalTest extends ServiceLocalTestSupport { |
| 96 | 96 |
request.setValidationContext(ValidationContext.UPDATE_VALIDATION_CONTEXT);
|
| 97 | 97 |
SeineBycatchObservedSystemConfig seineBycatchObservedSystemConfig = new SeineBycatchObservedSystemConfig();
|
| 98 | 98 |
ArrayListMultimap<String, String> data = ArrayListMultimap.create();
|
| 99 |
- data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", " fr.ird.referential.ps.observation.ObservedSystem#0#1.0");
|
|
| 99 |
+ data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", "fr.ird.referential.ps.observation.ObservedSystem#0#1.0");
|
|
| 100 | 100 |
seineBycatchObservedSystemConfig.setData(data);
|
| 101 | 101 |
request.setSeineBycatchObservedSystemConfig(seineBycatchObservedSystemConfig);
|
| 102 | 102 |
request.setScopes(ImmutableSet.copyOf(NuitonValidatorScope.values()));
|