Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 45fb2003 by tchemit at 2019-05-21T13:47:53Z Diverses corrections sur le modèle LL - - - - - 14 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 - observe-i18n/src/main/i18n/translations/observe_en_GB.properties - observe-i18n/src/main/i18n/translations/observe_es_ES.properties - observe-i18n/src/main/i18n/translations/observe_fr_FR.properties - 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: ===================================== client-core/src/main/i18n/getters/jaxx.getter ===================================== @@ -714,6 +714,8 @@ observe.common.TargetCatchDto.table.deleteExtraMessage observe.common.TargetCatchDto.table.speciesThon.tip observe.common.TargetCatchDto.table.weightCategory.tip observe.common.TargetCatchDto.table.well.tip +observe.common.TargetCatchDto.targetCatchCompositionEstimatedByObserver +observe.common.TargetCatchDto.targetDiscardCatchCompositionEstimatedByObserver observe.common.TargetCatchDto.title observe.common.TargetCatchDto.weightCategory observe.common.TargetCatchDto.well ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/CommonTable.jcss ===================================== @@ -34,6 +34,10 @@ JButton { _protectFocus:true; } +BeanCheckBox { + i18nProperty:"" +} + /*#comment { minimumSize:{new Dimension(10,50)}; }*/ ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/BranchlineObsUI.jaxx ===================================== @@ -120,7 +120,7 @@ public void edit(BranchlineObsDto branchline) { getHandler().edit(branchline); } <JLabel id='timeSinceContactLabel'/> </cell> <cell> - <TimeEditor id='timeSinceContact' constructorParams='this'/> + <TimeEditor id='timeSinceContact' constructorParams='this' beanScope="model"/> </cell> </row> ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/BranchlineObsUIModel.java ===================================== @@ -24,6 +24,9 @@ package fr.ird.observe.client.ui.content.data.ll.observation; import fr.ird.observe.client.ui.content.api.data.simple.ContentSimpleUIModel; import fr.ird.observe.dto.data.ll.observation.BranchlineObsDto; +import io.ultreia.java4all.bean.JavaBean; +import io.ultreia.java4all.bean.definition.JavaBeanDefinition; +import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition; import java.util.Date; @@ -33,7 +36,8 @@ import java.util.Date; * @author Tony Chemit - dev@tchemit.fr * @since 3.10 */ -public class BranchlineObsUIModel extends ContentSimpleUIModel<BranchlineObsDto> { +@GenerateJavaBeanDefinition +public class BranchlineObsUIModel extends ContentSimpleUIModel<BranchlineObsDto> implements JavaBean { public static final String PROPERTY_SAVED = "saved"; private static final long serialVersionUID = 1L; @@ -68,4 +72,16 @@ public class BranchlineObsUIModel extends ContentSimpleUIModel<BranchlineObsDto> firePropertyChange(PROPERTY_SAVED, null, true); } + + /** + * Lazy helper class that manages all java bean operations. + * + * @see #javaBeanDefinition() + */ + private transient final JavaBeanDefinition javaBeanDefinition = new LonglineDetailCompositionObsUIModelJavaBeanDefinition(); + + @Override + public JavaBeanDefinition javaBeanDefinition() { + return null; + } } ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/CatchLonglineObsUI.jaxx ===================================== @@ -281,7 +281,7 @@ <!-- depredated --> <row> <cell anchor='west' fill="both"> - <BeanCheckBox id='depredated'/> + <BeanCheckBox id='depredated' /> </cell> </row> @@ -397,10 +397,10 @@ <cell anchor='east'> <BeanCheckBox id='timer'/> </cell> - <cell> - <JLabel id='timeSinceContactLabel'/> - </cell> - <cell> +<!-- <cell>--> +<!-- <JLabel id='timeSinceContactLabel'/>--> +<!-- </cell>--> + <cell columns="2"> <TimeEditor id='timeSinceContact' constructorParams='this' beanScope="model"/> </cell> </row> ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/CatchLonglineObsUIHandler.java ===================================== @@ -503,7 +503,7 @@ public class CatchLonglineObsUIHandler extends ContentTableUIHandler<SetLongline CatchLonglineObsUIModel model = getModel(); if (BooleanUtils.isTrue(branchline.getTimer())) { Calendar calendar = Calendar.getInstance(); - calendar.setTime(model.getTimeSinceContact()); + calendar. setTime(model.getTimeSinceContact()); int minutes = calendar.get(Calendar.MINUTE); int hours = calendar.get(Calendar.HOUR); branchline.setTimeSinceContact(minutes + 60L * hours); @@ -642,7 +642,7 @@ public class CatchLonglineObsUIHandler extends ContentTableUIHandler<SetLongline } private void onCatchFateChanged(CatchFateLonglineReference newValue) { - if (newValue == null || !" fr.ird.referential.ll.common.CatchFateLongline#1239832686125#0.3".equals(newValue.getId())) { + if (newValue == null || !"fr.ird.referential.ll.common.CatchFateLongline#1239832686125#0.3".equals(newValue.getId())) { // not discarded ui.getDiscardHealthness().setEnabled(false); ui.getHookWhenDiscarded().setEnabled(false); ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/LonglineDetailCompositionObsUI.jaxx ===================================== @@ -112,7 +112,7 @@ <!-- canGenerate --> <row> <cell anchor='west' fill="both"> - <BeanCheckBox id='canGenerate'/> + <BeanCheckBox id='canGenerate' beanScope="model"/> </cell> </row> ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/LonglineDetailCompositionObsUIModel.java ===================================== @@ -24,6 +24,9 @@ package fr.ird.observe.client.ui.content.data.ll.observation; import fr.ird.observe.client.ui.content.api.data.simple.ContentSimpleUIModel; import fr.ird.observe.dto.data.ll.observation.SetLonglineObsDetailCompositionDto; +import io.ultreia.java4all.bean.JavaBean; +import io.ultreia.java4all.bean.definition.JavaBeanDefinition; +import io.ultreia.java4all.bean.spi.GenerateJavaBeanDefinition; /** * Created on 12/5/14. @@ -32,7 +35,8 @@ import fr.ird.observe.dto.data.ll.observation.SetLonglineObsDetailCompositionDto * @since 3.8 */ @SuppressWarnings("WeakerAccess") -public class LonglineDetailCompositionObsUIModel extends ContentSimpleUIModel<SetLonglineObsDetailCompositionDto> { +@GenerateJavaBeanDefinition +public class LonglineDetailCompositionObsUIModel extends ContentSimpleUIModel<SetLonglineObsDetailCompositionDto> implements JavaBean { public static final String PROPERTY_CAN_GENERATE = "canGenerate"; @@ -130,4 +134,15 @@ public class LonglineDetailCompositionObsUIModel extends ContentSimpleUIModel<Se firePropertyChange(PROPERTY_GENERATE_TAB_VALID, null, generateTabValid); } + /** + * Lazy helper class that manages all java bean operations. + * + * @see #javaBeanDefinition() + */ + private transient final JavaBeanDefinition javaBeanDefinition = new LonglineDetailCompositionObsUIModelJavaBeanDefinition(); + + @Override + public JavaBeanDefinition javaBeanDefinition() { + return javaBeanDefinition; + } } ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/data/ll/observation/TdrObsUI.jcss ===================================== @@ -74,6 +74,7 @@ #enableTimestamp { toolTipText:"observe.common.TdrObsDto.enableTimestamp.tip"; + _skipBindingToBean:true; } #timestampPanel { ===================================== observe-i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -1997,8 +1997,6 @@ observe.common.SetLonglineObsDto.shooterSpeed=Shooter speed (kts) observe.common.SetLonglineObsDto.shooterUsed=Shooter used observe.common.SetLonglineObsDto.snapWeight=Snap weight (kg) observe.common.SetLonglineObsDto.swivelWeight=swivel weight (kg) -observe.common.SetLonglineObsDto.targetCatchCompositionEstimatedByObserver=Composition estimated by observer? -observe.common.SetLonglineObsDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimated by observer? observe.common.SetLonglineObsDto.timeBetweenHooks=time between hooks observe.common.SetLonglineObsDto.title=Fishing operation observe.common.SetLonglineObsDto.totalBasketsCount=Total baskets count @@ -2147,6 +2145,8 @@ observe.common.TargetCatchDto.table.weightCategory=Weight category observe.common.TargetCatchDto.table.weightCategory.tip=Weight category observe.common.TargetCatchDto.table.well=Well observe.common.TargetCatchDto.table.well.tip=Well +observe.common.TargetCatchDto.targetCatchCompositionEstimatedByObserver=Composition estimated by observer? +observe.common.TargetCatchDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimated by observer? observe.common.TargetCatchDto.title=Target catch observe.common.TargetCatchDto.type=Target catch observe.common.TargetCatchDto.types=Target catches ===================================== observe-i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -1997,8 +1997,6 @@ observe.common.SetLonglineObsDto.shooterSpeed=Velocidad shooter (nd) observe.common.SetLonglineObsDto.shooterUsed=Shooter used \#TODO observe.common.SetLonglineObsDto.snapWeight=Peso snap (kg) observe.common.SetLonglineObsDto.swivelWeight=Peso de el destorcedor (kg) -observe.common.SetLonglineObsDto.targetCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? \#TODO -observe.common.SetLonglineObsDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? \#TODO observe.common.SetLonglineObsDto.timeBetweenHooks=Temps entre anzuelos (s) observe.common.SetLonglineObsDto.title=Operación de pesca observe.common.SetLonglineObsDto.totalBasketsCount=Número total de baskets @@ -2147,6 +2145,8 @@ observe.common.TargetCatchDto.table.weightCategory=Categoría de peso observe.common.TargetCatchDto.table.weightCategory.tip=Categoría de peso observe.common.TargetCatchDto.table.well=Tanque observe.common.TargetCatchDto.table.well.tip=Tanque +observe.common.TargetCatchDto.targetCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? \#TODO +observe.common.TargetCatchDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? \#TODO observe.common.TargetCatchDto.title=Captura de atún observe.common.TargetCatchDto.type=Captura destinataria observe.common.TargetCatchDto.types=Capturas destinatarias ===================================== observe-i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -1997,8 +1997,6 @@ observe.common.SetLonglineObsDto.shooterSpeed=Vitesse shooter (nd) observe.common.SetLonglineObsDto.shooterUsed=Utilisation du shooter observe.common.SetLonglineObsDto.snapWeight=Poids snap (kg) observe.common.SetLonglineObsDto.swivelWeight=Poids de l'émerillon (kg) -observe.common.SetLonglineObsDto.targetCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? -observe.common.SetLonglineObsDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? observe.common.SetLonglineObsDto.timeBetweenHooks=Temps entre hameçons (s) observe.common.SetLonglineObsDto.title=Opération de pêche observe.common.SetLonglineObsDto.totalBasketsCount=Nombre total de paniers @@ -2147,6 +2145,8 @@ observe.common.TargetCatchDto.table.weightCategory=Catégorie de poids observe.common.TargetCatchDto.table.weightCategory.tip=Catégorie de poids observe.common.TargetCatchDto.table.well=Cuve observe.common.TargetCatchDto.table.well.tip=Cuve +observe.common.TargetCatchDto.targetCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? +observe.common.TargetCatchDto.targetDiscardCatchCompositionEstimatedByObserver=Composition estimée par l'observateur ? observe.common.TargetCatchDto.title=Thons conservés observe.common.TargetCatchDto.type=Thons conservés observe.common.TargetCatchDto.types=Thons conservés ===================================== services-client/src/test/java/fr/ird/observe/services/client/service/actions/validate/ValidateServiceClientTest.java ===================================== @@ -180,7 +180,7 @@ public class ValidateServiceClientTest extends ServiceClientTestSupport { request.setDataIds(ImmutableSet.of(ObserveFixtures.TRIP_SEINE_ID_1, ObserveFixtures.TRIP_SEINE_ID_2)); SeineBycatchObservedSystemConfig seineBycatchObservedSystemConfig = new SeineBycatchObservedSystemConfig(); ArrayListMultimap<String, String> data = ArrayListMultimap.create(); - data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", " fr.ird.referential.ps.observation.ObservedSystem#0#1.0"); + data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", "fr.ird.referential.ps.observation.ObservedSystem#0#1.0"); seineBycatchObservedSystemConfig.setData(data); request.setSeineBycatchObservedSystemConfig(seineBycatchObservedSystemConfig); @@ -210,7 +210,7 @@ public class ValidateServiceClientTest extends ServiceClientTestSupport { SeineBycatchObservedSystemConfig seineBycatchObservedSystemConfig = new SeineBycatchObservedSystemConfig(); ArrayListMultimap<String, String> data = ArrayListMultimap.create(); - data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", " fr.ird.referential.ps.observation.ObservedSystem#0#1.0"); + data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", "fr.ird.referential.ps.observation.ObservedSystem#0#1.0"); seineBycatchObservedSystemConfig.setData(data); request.setSeineBycatchObservedSystemConfig(seineBycatchObservedSystemConfig); ===================================== services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java ===================================== @@ -96,7 +96,7 @@ public class ValidateServiceLocalTest extends ServiceLocalTestSupport { request.setValidationContext(ValidationContext.UPDATE_VALIDATION_CONTEXT); SeineBycatchObservedSystemConfig seineBycatchObservedSystemConfig = new SeineBycatchObservedSystemConfig(); ArrayListMultimap<String, String> data = ArrayListMultimap.create(); - data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", " fr.ird.referential.ps.observation.ObservedSystem#0#1.0"); + data.put("fr.ird.referential.common.Species#1239832684537#0.2397229787936519", "fr.ird.referential.ps.observation.ObservedSystem#0#1.0"); seineBycatchObservedSystemConfig.setData(data); request.setSeineBycatchObservedSystemConfig(seineBycatchObservedSystemConfig); request.setScopes(ImmutableSet.copyOf(NuitonValidatorScope.values())); View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/45fb2003593810eb04965d053e76... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/45fb2003593810eb04965d053e76... You're receiving this email because of your account on gitlab.com.