From 84eff33ebf973f0434e78710d44a78fb2fe0033c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 12 Feb 2021 12:12:31 +0100 Subject: [PATCH] IDEMPIERE-4700 PackOut is creating index and view data for Dictionary entries when export dictionary is disabled (#578) --- .../pipo2/handler/IndexColumnElementHandler.java | 7 ++----- .../pipo2/handler/TableIndexElementHandler.java | 7 +------ .../pipo2/handler/ViewColumnElementHandler.java | 7 ++----- .../pipo2/handler/ViewComponentElementHandler.java | 11 +++-------- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/IndexColumnElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/IndexColumnElementHandler.java index 87a72b0bd3..badc78c894 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/IndexColumnElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/IndexColumnElementHandler.java @@ -122,11 +122,8 @@ public class IndexColumnElementHandler extends AbstractElementHandler { int AD_IndexColumn_ID = Env.getContextAsInt(ctx.ctx, MIndexColumn.COLUMNNAME_AD_IndexColumn_ID); MIndexColumn m_IndexColumn = new MIndexColumn(ctx.ctx, AD_IndexColumn_ID, getTrxName(ctx)); - if (ctx.packOut.getFromDate() != null) { - if (m_IndexColumn.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) { - return; - } - } + if (!isPackOutElement(ctx, m_IndexColumn)) + return; AttributesImpl atts = new AttributesImpl(); addTypeName(atts, "table"); diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java index 006725fd66..f39ae1c45a 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/TableIndexElementHandler.java @@ -132,12 +132,7 @@ public class TableIndexElementHandler extends AbstractElementHandler { MTableIndex m_TableIndex = new MTableIndex(ctx.ctx, AD_TableIndex_ID, null); - boolean createElement = true; - if (ctx.packOut.getFromDate() != null) { - if (m_TableIndex.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) { - createElement = false; - } - } + boolean createElement = isPackOutElement(ctx, m_TableIndex); if (createElement) { if (m_TableIndex.getAD_Message_ID() > 0) { diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewColumnElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewColumnElementHandler.java index cd06306bfa..fb8c998623 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewColumnElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewColumnElementHandler.java @@ -113,11 +113,8 @@ public class ViewColumnElementHandler extends AbstractElementHandler { int AD_ViewColumn_ID = Env.getContextAsInt(ctx.ctx, MViewColumn.COLUMNNAME_AD_ViewColumn_ID); MViewColumn m_ViewColumn = new MViewColumn(ctx.ctx, AD_ViewColumn_ID, getTrxName(ctx)); - if (ctx.packOut.getFromDate() != null) { - if (m_ViewColumn.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) { - return; - } - } + if (!isPackOutElement(ctx, m_ViewColumn)) + return; AttributesImpl atts = new AttributesImpl(); addTypeName(atts, "table"); diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewComponentElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewComponentElementHandler.java index 80be1bf5ea..7aa2e04ce9 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewComponentElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/ViewComponentElementHandler.java @@ -94,14 +94,9 @@ public class ViewComponentElementHandler extends AbstractElementHandler { AttributesImpl atts = new AttributesImpl(); MViewComponent m_ViewComponent = new MViewComponent(ctx.ctx, AD_ViewComponent_ID, null); - - boolean createElement = true; - if (ctx.packOut.getFromDate() != null) { - if (m_ViewComponent.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) { - createElement = false; - } - } - + + boolean createElement = isPackOutElement(ctx, m_ViewComponent); + if (createElement) { verifyPackOutRequirement(m_ViewComponent); addTypeName(atts, "table");