branch feature/7615-LL-VerifEcranSchemaPalangre created (now a0de51a)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7615-LL-VerifEcranSchemaPalangre in repository tutti. See http://git.codelutin.com/tutti.git at a0de51a - Charger les références dans le modél principal et le sous modél du détail avançon - Correction de la synchronisation des sections du tableau sur le bean du model (see #7615). This branch includes the following new commits: new e832b4e Ajout de trace dans les appels des services (see #7615). new 025d2fb Charger les références dans le modél principal et ses sous modéls (see #7614). new ec721e2 Utiliser le decorateur définit pour le type en paramétre (et non le type de ce type) (see #7615). new a0de51a - Charger les références dans le modél principal et le sous modél du détail avançon - Correction de la synchronisation des sections du tableau sur le bean du model (see #7615). The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit a0de51aba14d15cbf31a83ab97d72cf1d59f6268 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 16:38:41 2016 +0100 - Charger les références dans le modél principal et le sous modél du détail avançon - Correction de la synchronisation des sections du tableau sur le bean du model (see #7615). commit ec721e278c761558575c13235ab5b6055877db9e Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 16:35:35 2016 +0100 Utiliser le decorateur définit pour le type en paramétre (et non le type de ce type) (see #7615). commit 025d2fb16600a203fc2dca5cb067fa79c7a9ee68 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 10:12:48 2016 +0100 Charger les références dans le modél principal et ses sous modéls (see #7614). commit e832b4ea58aa7a19c7716c17e61f9d86208f9497 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 11:24:58 2016 +0100 Ajout de trace dans les appels des services (see #7615). -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7615-LL-VerifEcranSchemaPalangre in repository tutti. See http://git.codelutin.com/tutti.git commit e832b4ea58aa7a19c7716c17e61f9d86208f9497 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 11:24:58 2016 +0100 Ajout de trace dans les appels des services (see #7615). --- .../SetLonglineDetailCompositionServiceTopia.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/SetLonglineDetailCompositionServiceTopia.java b/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/SetLonglineDetailCompositionServiceTopia.java index 8476de2..4eb40d5 100644 --- a/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/SetLonglineDetailCompositionServiceTopia.java +++ b/observe-services-topia/src/main/java/fr/ird/observe/services/service/longline/SetLonglineDetailCompositionServiceTopia.java @@ -34,14 +34,21 @@ import fr.ird.observe.services.dto.longline.SectionDto; import fr.ird.observe.services.dto.longline.SetLonglineDetailCompositionDto; import fr.ird.observe.services.dto.reference.request.ReferenceSetRequestDefinitions; import fr.ird.observe.services.dto.result.SaveResultDto; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com */ public class SetLonglineDetailCompositionServiceTopia extends ObserveServiceTopia implements SetLonglineDetailCompositionService { + private static final Log log = LogFactory.getLog(SetLonglineDetailCompositionServiceTopia.class); + @Override public Form<SetLonglineDetailCompositionDto> loadForm(String setLonglineId) { + if (log.isTraceEnabled()) { + log.trace("loadForm(" + setLonglineId + ")"); + } SetLongline setLongline = loadEntity(SetLonglineDetailCompositionDto.class, setLonglineId); @@ -56,6 +63,9 @@ public class SetLonglineDetailCompositionServiceTopia extends ObserveServiceTopi @Override public boolean canDeleteSection(String sectionId) { + if (log.isTraceEnabled()) { + log.trace("canDeleteSection(" + sectionId + ")"); + } Section section = loadEntity(SectionDto.class, sectionId); @@ -70,6 +80,9 @@ public class SetLonglineDetailCompositionServiceTopia extends ObserveServiceTopi @Override public boolean canDeleteBasket(String basketId) { + if (log.isTraceEnabled()) { + log.trace("canDeleteBasket(" + basketId + ")"); + } Basket basket = loadEntity(BasketDto.class, basketId); @@ -84,6 +97,9 @@ public class SetLonglineDetailCompositionServiceTopia extends ObserveServiceTopi @Override public boolean canDeleteBranchline(String branchlineId) { + if (log.isTraceEnabled()) { + log.trace("canDeleteBranchline(" + branchlineId + ")"); + } Branchline branchline = loadEntity(BranchlineDto.class, branchlineId); @@ -95,6 +111,9 @@ public class SetLonglineDetailCompositionServiceTopia extends ObserveServiceTopi @Override public SaveResultDto save(SetLonglineDetailCompositionDto dto) { + if (log.isTraceEnabled()) { + log.trace("save(" + dto.getId() + ")"); + } SetLongline entity = loadOrCreateEntityAndCheckLastUpdate(dto); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7615-LL-VerifEcranSchemaPalangre in repository tutti. See http://git.codelutin.com/tutti.git commit 025d2fb16600a203fc2dca5cb067fa79c7a9ee68 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 10:12:48 2016 +0100 Charger les références dans le modél principal et ses sous modéls (see #7614). --- .../src/main/java/fr/ird/observe/ui/content/ContentUIModel.java | 8 ++++++++ .../content/impl/longline/LonglineGlobalCompositionUIHandler.java | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIModel.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIModel.java index 52d2642..0ea3c04 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIModel.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIModel.java @@ -290,6 +290,14 @@ public abstract class ContentUIModel<E extends IdDto> extends AbstractSerializab this.dataReferenceSetsByPropertyName = dataReferenceSetsByPropertyName; } + public ImmutableMap<String, ReferentialReferenceSet<?>> getReferentialReferenceSets() { + return referentialReferenceSetsByPropertyName; + } + + public ImmutableMap<String, DataReferenceSet<?>> getDataReferenceSets() { + return dataReferenceSetsByPropertyName; + } + protected <R extends DataDto> Optional<Set<DataReference<R>>> tryToGetDataReferenceSet(String propertyName) { DataReferenceSet<R> referenceSet = getDataReferenceSet(propertyName); Set<DataReference<R>> references = null; diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineGlobalCompositionUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineGlobalCompositionUIHandler.java index f0d857a..41f46fd 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineGlobalCompositionUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineGlobalCompositionUIHandler.java @@ -144,6 +144,9 @@ public class LonglineGlobalCompositionUIHandler extends ContentUIHandler<SetLong // update mode Form<SetLonglineGlobalCompositionDto> form = getSetLonglineGlobalCompositionService().loadForm(setId); + + loadReferentialReferenceSetsInModel(form); + getModel().setForm(form); SetLonglineGlobalCompositionDtos.copySetLonglineGlobalCompositionDto(form.getObject(), getBean()); @@ -157,6 +160,7 @@ public class LonglineGlobalCompositionUIHandler extends ContentUIHandler<SetLong { // open floatlinesComposition tab FloatlinesCompositionUIModel floatlinesCompositionModel = getUi().getFloatlinesCompositionModel(); + floatlinesCompositionModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets()); floatlinesCompositionModel.setForm(form); SetLonglineGlobalCompositionDtos.copySetLonglineGlobalCompositionDto(form.getObject(), floatlinesCompositionModel.getBean()); @@ -168,6 +172,7 @@ public class LonglineGlobalCompositionUIHandler extends ContentUIHandler<SetLong { // open branchlinesComposition tab BranchlinesCompositionUIModel branchlinesCompositionModel = getUi().getBranchlinesCompositionModel(); + branchlinesCompositionModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets()); branchlinesCompositionModel.setForm(form); SetLonglineGlobalCompositionDtos.copySetLonglineGlobalCompositionDto(form.getObject(), branchlinesCompositionModel.getBean()); @@ -179,6 +184,7 @@ public class LonglineGlobalCompositionUIHandler extends ContentUIHandler<SetLong { // open hooksComposition tab HooksCompositionUIModel hooksCompositionModel = getUi().getHooksCompositionModel(); + hooksCompositionModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets()); hooksCompositionModel.setForm(form); SetLonglineGlobalCompositionDtos.copySetLonglineGlobalCompositionDto(form.getObject(), hooksCompositionModel.getBean()); @@ -190,6 +196,7 @@ public class LonglineGlobalCompositionUIHandler extends ContentUIHandler<SetLong { // open baitsComposition tab BaitsCompositionUIModel baitsCompositionModel = getUi().getBaitsCompositionModel(); + baitsCompositionModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets()); baitsCompositionModel.setForm(form); SetLonglineGlobalCompositionDtos.copySetLonglineGlobalCompositionDto(form.getObject(), baitsCompositionModel.getBean()); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7615-LL-VerifEcranSchemaPalangre in repository tutti. See http://git.codelutin.com/tutti.git commit ec721e278c761558575c13235ab5b6055877db9e Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 16:35:35 2016 +0100 Utiliser le decorateur définit pour le type en paramétre (et non le type de ce type) (see #7615). --- .../src/main/java/fr/ird/observe/ui/UIHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/UIHelper.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/UIHelper.java index dcc5651..4ad9a89 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/UIHelper.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/UIHelper.java @@ -344,13 +344,13 @@ public class UIHelper extends SwingUtil { public static DecoratorTableCellRenderer newDecorateTableCellRenderer( TableCellRenderer renderer, Class<?> entityClass) { - Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecorator(entityClass); + Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(entityClass); return new DecoratorTableCellRenderer(renderer, decorator); } public static DecoratorTableCellRenderer newDecorateTableCellRenderer( TableCellRenderer renderer, Class<?> entityClass, String context) { - Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecorator(entityClass, context); + Decorator<?> decorator = ObserveSwingApplicationContext.get().getDecoratorService().getDecoratorByType(entityClass, context); return new DecoratorTableCellRenderer(renderer, decorator); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7615-LL-VerifEcranSchemaPalangre in repository tutti. See http://git.codelutin.com/tutti.git commit a0de51aba14d15cbf31a83ab97d72cf1d59f6268 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 16:38:41 2016 +0100 - Charger les références dans le modél principal et le sous modél du détail avançon - Correction de la synchronisation des sections du tableau sur le bean du model (see #7615). --- .../impl/longline/LonglineDetailCompositionUIHandler.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java index 7c415ef..b76bee7 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java @@ -64,6 +64,7 @@ import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; +import java.util.stream.Collectors; import static org.nuiton.i18n.I18n.t; @@ -412,6 +413,9 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong SetLonglineDetailCompositionService setLonglineService = getSetLonglineDetailCompositionService(); Form<SetLonglineDetailCompositionDto> setLonglineDtoForm = setLonglineService.loadForm(setId); + + loadReferentialReferenceSetsInModel(setLonglineDtoForm); + getModel().setForm(setLonglineDtoForm); SetLonglineDetailCompositionDto bean = getBean(); @@ -420,7 +424,9 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong //FIXME Voir comment gérer ça Form<BranchlineDto> branchlineDtoForm = Form.newFormDto(BranchlineDto.class, null, null, null); - getUi().getBranchlineDetailUI().getModel().setForm(branchlineDtoForm); + BranchlineUIModel branchlineUIModel = getUi().getBranchlineDetailUI().getModel(); + branchlineUIModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets()); + branchlineUIModel.setForm(branchlineDtoForm); //FIXME Validate this default date if (log.isInfoEnabled()) { @@ -613,6 +619,12 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong sectionsTableModel.rearrangeIds(sections); sectionsTableModel.setData(sections); + List<SectionDto> sectionDtos = sections.stream() + .map(SectionWithTemplate::getDelegate) + .collect(Collectors.toList()); + + getBean().addAllSection(sectionDtos); + getModel().setModified(true); } finally { @@ -673,6 +685,7 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong try { getSectionsTableModel().setData(Lists.<SectionWithTemplate>newArrayList()); + getBean().getSection().clear(); getModel().setModified(true); } finally { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm