IDEMPIERE-1256 2Pack exporting repeated elements / refactor to use common array - previous approach was not working as the array was local
This commit is contained in:
parent
6c03341bc4
commit
b67f23135c
|
@ -114,12 +114,9 @@ public class AdElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
int adElement_id = Env.getContextAsInt(ctx.ctx,
|
int adElement_id = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Element.COLUMNNAME_AD_Element_ID);
|
X_AD_Element.COLUMNNAME_AD_Element_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Element.COLUMNNAME_AD_Element_ID+"|"+adElement_id))
|
||||||
if (processedElements.contains(adElement_id))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processedElements.add(adElement_id);
|
|
||||||
|
|
||||||
X_AD_Element mAdElement = new X_AD_Element(ctx.ctx, adElement_id, null);
|
X_AD_Element mAdElement = new X_AD_Element(ctx.ctx, adElement_id, null);
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
if (mAdElement.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
if (mAdElement.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||||
|
|
|
@ -36,7 +36,6 @@ import org.compiere.model.X_AD_AttachmentNote;
|
||||||
import org.compiere.model.X_AD_Package_Imp_Detail;
|
import org.compiere.model.X_AD_Package_Imp_Detail;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
import org.xml.sax.helpers.AttributesImpl;
|
import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
|
@ -127,12 +126,9 @@ public class AttachmentElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
|
|
||||||
int AD_Attachment_ID = Env.getContextAsInt(ctx.ctx, "AD_Attachment_ID");
|
int AD_Attachment_ID = Env.getContextAsInt(ctx.ctx, "AD_Attachment_ID");
|
||||||
|
if (ctx.packOut.isExported("AD_Attachment_ID"+"|"+AD_Attachment_ID))
|
||||||
if (attachments.contains(AD_Attachment_ID))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
attachments.add(AD_Attachment_ID);
|
|
||||||
|
|
||||||
MAttachment mAttachment = new MAttachment(ctx.ctx, AD_Attachment_ID, getTrxName(ctx));
|
MAttachment mAttachment = new MAttachment(ctx.ctx, AD_Attachment_ID, getTrxName(ctx));
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.sql.Connection;
|
||||||
import java.sql.DatabaseMetaData;
|
import java.sql.DatabaseMetaData;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
@ -50,8 +49,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class ColumnElementHandler extends AbstractElementHandler {
|
public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> processedColumns = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int success = 0;
|
int success = 0;
|
||||||
|
@ -300,12 +297,9 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Column_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_Column_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Column.COLUMNNAME_AD_Column_ID);
|
X_AD_Column.COLUMNNAME_AD_Column_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Column.COLUMNNAME_AD_Column_ID+"|"+AD_Column_ID))
|
||||||
if (processedColumns.contains(AD_Column_ID))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processedColumns.add(AD_Column_ID);
|
|
||||||
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
X_AD_Column m_Column = new X_AD_Column(ctx.ctx, AD_Column_ID,
|
X_AD_Column m_Column = new X_AD_Column(ctx.ctx, AD_Column_ID,
|
||||||
getTrxName(ctx));
|
getTrxName(ctx));
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_Val_Rule;
|
import org.compiere.model.I_AD_Val_Rule;
|
||||||
|
@ -38,8 +37,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class DynValRuleElementHandler extends AbstractElementHandler {
|
public class DynValRuleElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> rules = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
||||||
String entitytype = getStringValue(element, "EntityType");
|
String entitytype = getStringValue(element, "EntityType");
|
||||||
if (isProcessElement(ctx.ctx, entitytype)) {
|
if (isProcessElement(ctx.ctx, entitytype)) {
|
||||||
|
@ -99,9 +96,8 @@ public class DynValRuleElementHandler extends AbstractElementHandler {
|
||||||
protected void create(PIPOContext ctx, TransformerHandler document)
|
protected void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Val_Rule_ID = Env.getContextAsInt(ctx.ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Val_Rule_ID);
|
int AD_Val_Rule_ID = Env.getContextAsInt(ctx.ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Val_Rule_ID);
|
||||||
if (rules.contains(AD_Val_Rule_ID))
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Val_Rule_ID+"|"+AD_Val_Rule_ID))
|
||||||
return;
|
return;
|
||||||
rules.add(AD_Val_Rule_ID);
|
|
||||||
X_AD_Val_Rule m_ValRule = new X_AD_Val_Rule (ctx.ctx, AD_Val_Rule_ID, null);
|
X_AD_Val_Rule m_ValRule = new X_AD_Val_Rule (ctx.ctx, AD_Val_Rule_ID, null);
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -120,11 +120,8 @@ public class EntityTypeElementHandler extends AbstractElementHandler{
|
||||||
|
|
||||||
public void create(PIPOContext ctx, TransformerHandler document) throws SAXException {
|
public void create(PIPOContext ctx, TransformerHandler document) throws SAXException {
|
||||||
int AD_ElementType_ID = Env.getContextAsInt(ctx.ctx, X_AD_EntityType.COLUMNNAME_AD_EntityType_ID);
|
int AD_ElementType_ID = Env.getContextAsInt(ctx.ctx, X_AD_EntityType.COLUMNNAME_AD_EntityType_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_EntityType.COLUMNNAME_AD_EntityType_ID+"|"+AD_ElementType_ID))
|
||||||
if(entityTypes.contains(AD_ElementType_ID))
|
|
||||||
return;
|
return;
|
||||||
entityTypes.add(AD_ElementType_ID);
|
|
||||||
|
|
||||||
|
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
|
|
||||||
|
|
|
@ -16,18 +16,17 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
|
import org.adempiere.pipo2.Element;
|
||||||
import org.adempiere.pipo2.ElementHandler;
|
import org.adempiere.pipo2.ElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -45,8 +44,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class FieldElementHandler extends AbstractElementHandler {
|
public class FieldElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> processedFields = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
String entitytype = getStringValue(element, "EntityType");
|
String entitytype = getStringValue(element, "EntityType");
|
||||||
|
@ -172,12 +169,9 @@ public class FieldElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Field_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_Field_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Field.COLUMNNAME_AD_Field_ID);
|
X_AD_Field.COLUMNNAME_AD_Field_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Field.COLUMNNAME_AD_Field_ID+"|"+AD_Field_ID))
|
||||||
if (processedFields.contains(AD_Field_ID))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processedFields.add(AD_Field_ID);
|
|
||||||
|
|
||||||
X_AD_Field m_Field = new X_AD_Field(ctx.ctx, AD_Field_ID, null);
|
X_AD_Field m_Field = new X_AD_Field(ctx.ctx, AD_Field_ID, null);
|
||||||
|
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
|
|
|
@ -120,12 +120,9 @@ public class FieldGroupElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
int fieldGroup_id = Env.getContextAsInt(ctx.ctx,
|
int fieldGroup_id = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_FieldGroup.COLUMNNAME_AD_FieldGroup_ID);
|
X_AD_FieldGroup.COLUMNNAME_AD_FieldGroup_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_FieldGroup.COLUMNNAME_AD_FieldGroup_ID+"|"+fieldGroup_id))
|
||||||
if (processedFieldGroups.contains(fieldGroup_id))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processedFieldGroups.add(fieldGroup_id);
|
|
||||||
|
|
||||||
X_AD_FieldGroup fieldGroup = new X_AD_FieldGroup(ctx.ctx, fieldGroup_id, null);
|
X_AD_FieldGroup fieldGroup = new X_AD_FieldGroup(ctx.ctx, fieldGroup_id, null);
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -17,17 +17,16 @@
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_Form;
|
import org.compiere.model.I_AD_Form;
|
||||||
|
@ -41,8 +40,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class FormElementHandler extends AbstractElementHandler {
|
public class FormElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> forms = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_Form.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_Form.Table_Name);
|
||||||
|
|
||||||
|
@ -102,9 +99,9 @@ public class FormElementHandler extends AbstractElementHandler {
|
||||||
protected void create(PIPOContext ctx, TransformerHandler document)
|
protected void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Form_ID = Env.getContextAsInt(ctx.ctx, "AD_Form_ID");
|
int AD_Form_ID = Env.getContextAsInt(ctx.ctx, "AD_Form_ID");
|
||||||
if (forms.contains(AD_Form_ID)) return;
|
if (ctx.packOut.isExported("AD_Form_ID"+"|"+AD_Form_ID))
|
||||||
|
return;
|
||||||
|
|
||||||
forms.add(AD_Form_ID);
|
|
||||||
X_AD_Form m_Form = new X_AD_Form (ctx.ctx, AD_Form_ID, null);
|
X_AD_Form m_Form = new X_AD_Form (ctx.ctx, AD_Form_ID, null);
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -18,17 +18,16 @@ package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -46,8 +45,6 @@ public class ImpFormatElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private ImpFormatRowElementHandler rowHandler = new ImpFormatRowElementHandler();
|
private ImpFormatRowElementHandler rowHandler = new ImpFormatRowElementHandler();
|
||||||
|
|
||||||
private List<Integer> formats = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
|
@ -105,10 +102,9 @@ public class ImpFormatElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int import_id = Env.getContextAsInt(ctx.ctx,
|
int import_id = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Package_Exp_Detail.COLUMNNAME_AD_ImpFormat_ID);
|
X_AD_Package_Exp_Detail.COLUMNNAME_AD_ImpFormat_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_ImpFormat_ID+"|"+import_id))
|
||||||
if (formats.contains(import_id))
|
|
||||||
return;
|
return;
|
||||||
formats.add(import_id);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
X_AD_ImpFormat m_ImpFormat = new X_AD_ImpFormat(ctx.ctx, import_id, null);
|
X_AD_ImpFormat m_ImpFormat = new X_AD_ImpFormat(ctx.ctx, import_id, null);
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -40,8 +39,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class ImpFormatRowElementHandler extends AbstractElementHandler {
|
public class ImpFormatRowElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> formatrows = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
||||||
|
|
||||||
String action = null;
|
String action = null;
|
||||||
|
@ -154,9 +151,9 @@ public class ImpFormatRowElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_ImpFormat_Row_ID = Env.getContextAsInt(ctx.ctx, X_AD_ImpFormat_Row.COLUMNNAME_AD_ImpFormat_Row_ID);
|
int AD_ImpFormat_Row_ID = Env.getContextAsInt(ctx.ctx, X_AD_ImpFormat_Row.COLUMNNAME_AD_ImpFormat_Row_ID);
|
||||||
if (formatrows.contains(AD_ImpFormat_Row_ID))
|
if (ctx.packOut.isExported(X_AD_ImpFormat_Row.COLUMNNAME_AD_ImpFormat_Row_ID+"|"+AD_ImpFormat_Row_ID))
|
||||||
return;
|
return;
|
||||||
formatrows.add(AD_ImpFormat_Row_ID);
|
|
||||||
X_AD_ImpFormat_Row m_ImpFormat_Row = new X_AD_ImpFormat_Row (ctx.ctx, AD_ImpFormat_Row_ID, getTrxName(ctx));
|
X_AD_ImpFormat_Row m_ImpFormat_Row = new X_AD_ImpFormat_Row (ctx.ctx, AD_ImpFormat_Row_ID, getTrxName(ctx));
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -203,6 +203,8 @@ public class MenuElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Menu_ID = Env.getContextAsInt(ctx.ctx, "AD_Menu_ID");
|
int AD_Menu_ID = Env.getContextAsInt(ctx.ctx, "AD_Menu_ID");
|
||||||
|
if (ctx.packOut.isExported("AD_Menu_ID"+"|"+AD_Menu_ID))
|
||||||
|
return;
|
||||||
X_AD_Menu m_Menu = new X_AD_Menu(ctx.ctx, AD_Menu_ID, null);
|
X_AD_Menu m_Menu = new X_AD_Menu(ctx.ctx, AD_Menu_ID, null);
|
||||||
if (m_Menu.isSummary() == false) {
|
if (m_Menu.isSummary() == false) {
|
||||||
createApplication(ctx, document, AD_Menu_ID);
|
createApplication(ctx, document, AD_Menu_ID);
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class MessageElementHandler extends AbstractElementHandler {
|
||||||
}
|
}
|
||||||
if (mMessage.save(getTrxName(ctx)) == true){
|
if (mMessage.save(getTrxName(ctx)) == true){
|
||||||
logImportDetail (ctx, impDetail, 1, mMessage.getValue(), mMessage.get_ID(),action);
|
logImportDetail (ctx, impDetail, 1, mMessage.getValue(), mMessage.get_ID(),action);
|
||||||
|
messages.add(mMessage.getAD_Message_ID());
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
logImportDetail (ctx, impDetail, 0, mMessage.getValue(), mMessage.get_ID(),action);
|
logImportDetail (ctx, impDetail, 0, mMessage.getValue(), mMessage.get_ID(),action);
|
||||||
|
@ -103,9 +104,9 @@ public class MessageElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Message_ID = Env.getContextAsInt(ctx.ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Message_ID);
|
int AD_Message_ID = Env.getContextAsInt(ctx.ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Message_ID);
|
||||||
if (messages.contains(AD_Message_ID))
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Message_ID+"|"+AD_Message_ID))
|
||||||
return;
|
return;
|
||||||
messages.add(AD_Message_ID);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
X_AD_Message m_Message = new X_AD_Message (ctx.ctx, AD_Message_ID, null);
|
X_AD_Message m_Message = new X_AD_Message (ctx.ctx, AD_Message_ID, null);
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -99,12 +99,9 @@ public class ModelValidatorElementHandler extends AbstractElementHandler{
|
||||||
|
|
||||||
public void create(PIPOContext ctx, TransformerHandler document) throws SAXException {
|
public void create(PIPOContext ctx, TransformerHandler document) throws SAXException {
|
||||||
int ad_modelvalidator_id = Env.getContextAsInt(ctx.ctx, X_AD_ModelValidator.COLUMNNAME_AD_ModelValidator_ID);
|
int ad_modelvalidator_id = Env.getContextAsInt(ctx.ctx, X_AD_ModelValidator.COLUMNNAME_AD_ModelValidator_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_ModelValidator.COLUMNNAME_AD_ModelValidator_ID+"|"+ad_modelvalidator_id))
|
||||||
if (validators.contains(ad_modelvalidator_id))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
validators.add(ad_modelvalidator_id);
|
|
||||||
|
|
||||||
X_AD_ModelValidator validator = new X_AD_ModelValidator(ctx.ctx, ad_modelvalidator_id, null);
|
X_AD_ModelValidator validator = new X_AD_ModelValidator(ctx.ctx, ad_modelvalidator_id, null);
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -112,12 +112,9 @@ public class ModificationElementHandler extends AbstractElementHandler{
|
||||||
|
|
||||||
public void create(PIPOContext ctx, TransformerHandler document) throws SAXException {
|
public void create(PIPOContext ctx, TransformerHandler document) throws SAXException {
|
||||||
int ad_modification_id = Env.getContextAsInt(ctx.ctx, X_AD_Modification.COLUMNNAME_AD_Modification_ID);
|
int ad_modification_id = Env.getContextAsInt(ctx.ctx, X_AD_Modification.COLUMNNAME_AD_Modification_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Modification.COLUMNNAME_AD_Modification_ID+"|"+ad_modification_id))
|
||||||
if (modifications.contains(ad_modification_id))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
modifications.add(ad_modification_id);
|
|
||||||
|
|
||||||
X_AD_Modification modification = new X_AD_Modification(ctx.ctx, ad_modification_id, null);
|
X_AD_Modification modification = new X_AD_Modification(ctx.ctx, ad_modification_id, null);
|
||||||
|
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_Preference;
|
import org.compiere.model.I_AD_Preference;
|
||||||
|
@ -39,8 +38,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class PreferenceElementHandler extends AbstractElementHandler {
|
public class PreferenceElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer>processedPreferences = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
|
@ -112,11 +109,9 @@ public class PreferenceElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Preference_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_Preference_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Preference.COLUMNNAME_AD_Preference_ID);
|
X_AD_Preference.COLUMNNAME_AD_Preference_ID);
|
||||||
if (processedPreferences.contains(AD_Preference_ID))
|
if (ctx.packOut.isExported(X_AD_Preference.COLUMNNAME_AD_Preference_ID+"|"+AD_Preference_ID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
processedPreferences.add(AD_Preference_ID);
|
|
||||||
|
|
||||||
X_AD_Preference m_Preference = new X_AD_Preference(ctx.ctx,
|
X_AD_Preference m_Preference = new X_AD_Preference(ctx.ctx,
|
||||||
AD_Preference_ID, getTrxName(ctx));
|
AD_Preference_ID, getTrxName(ctx));
|
||||||
|
|
||||||
|
|
|
@ -19,17 +19,16 @@ package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.exceptions.DBException;
|
import org.adempiere.exceptions.DBException;
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_PrintFormat;
|
import org.compiere.model.I_AD_PrintFormat;
|
||||||
|
@ -48,8 +47,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class PrintFormatElementHandler extends AbstractElementHandler {
|
public class PrintFormatElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> formats = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
|
@ -103,10 +100,9 @@ public class PrintFormatElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_PrintFormat_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_PrintFormat_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Package_Exp_Detail.COLUMNNAME_AD_PrintFormat_ID);
|
X_AD_Package_Exp_Detail.COLUMNNAME_AD_PrintFormat_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_PrintFormat_ID+"|"+AD_PrintFormat_ID))
|
||||||
if (formats.contains(AD_PrintFormat_ID))
|
|
||||||
return;
|
return;
|
||||||
formats.add(AD_PrintFormat_ID);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
|
|
||||||
MPrintFormat m_Printformat = new MPrintFormat(ctx.ctx, AD_PrintFormat_ID, null);
|
MPrintFormat m_Printformat = new MPrintFormat(ctx.ctx, AD_PrintFormat_ID, null);
|
||||||
|
|
|
@ -17,17 +17,16 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -41,8 +40,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class PrintFormatItemElementHandler extends AbstractElementHandler {
|
public class PrintFormatItemElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> formatitems = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
|
@ -146,9 +143,9 @@ public class PrintFormatItemElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_PrintFormatItem_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_PrintFormatItem_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_PrintFormatItem.COLUMNNAME_AD_PrintFormatItem_ID);
|
X_AD_PrintFormatItem.COLUMNNAME_AD_PrintFormatItem_ID);
|
||||||
if (formatitems.contains(AD_PrintFormatItem_ID))
|
if (ctx.packOut.isExported(X_AD_PrintFormatItem.COLUMNNAME_AD_PrintFormatItem_ID+"|"+AD_PrintFormatItem_ID))
|
||||||
return;
|
return;
|
||||||
formatitems.add(AD_PrintFormatItem_ID);
|
|
||||||
X_AD_PrintFormatItem m_PrintFormatItem = new X_AD_PrintFormatItem(ctx.ctx,
|
X_AD_PrintFormatItem m_PrintFormatItem = new X_AD_PrintFormatItem(ctx.ctx,
|
||||||
AD_PrintFormatItem_ID, null);
|
AD_PrintFormatItem_ID, null);
|
||||||
|
|
||||||
|
|
|
@ -17,16 +17,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_PrintPaper;
|
import org.compiere.model.I_AD_PrintPaper;
|
||||||
|
@ -38,8 +37,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class PrintPaperElementHandler extends AbstractElementHandler {
|
public class PrintPaperElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> papers = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
|
@ -95,9 +92,9 @@ public class PrintPaperElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_PrintPaper_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_PrintPaper_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_PrintPaper.COLUMNNAME_AD_PrintPaper_ID);
|
X_AD_PrintPaper.COLUMNNAME_AD_PrintPaper_ID);
|
||||||
if (papers.contains(AD_PrintPaper_ID))
|
if (ctx.packOut.isExported(X_AD_PrintPaper.COLUMNNAME_AD_PrintPaper_ID+"|"+AD_PrintPaper_ID))
|
||||||
return;
|
return;
|
||||||
papers.add(AD_PrintPaper_ID);
|
|
||||||
X_AD_PrintPaper printPaper = new X_AD_PrintPaper(ctx.ctx,
|
X_AD_PrintPaper printPaper = new X_AD_PrintPaper(ctx.ctx,
|
||||||
AD_PrintPaper_ID, null);
|
AD_PrintPaper_ID, null);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
@ -52,8 +51,6 @@ public class ProcessElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private ProcessParaElementHandler paraHandler = new ProcessParaElementHandler();
|
private ProcessParaElementHandler paraHandler = new ProcessParaElementHandler();
|
||||||
|
|
||||||
private List<Integer> processes = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
String entitytype = getStringValue(element, "EntityType");
|
String entitytype = getStringValue(element, "EntityType");
|
||||||
|
@ -115,9 +112,9 @@ public class ProcessElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Process_ID = Env.getContextAsInt(ctx.ctx, "AD_Process_ID");
|
int AD_Process_ID = Env.getContextAsInt(ctx.ctx, "AD_Process_ID");
|
||||||
if (processes.contains(AD_Process_ID))
|
if (ctx.packOut.isExported("AD_Process_ID"+"|"+AD_Process_ID))
|
||||||
return;
|
return;
|
||||||
processes.add(AD_Process_ID);
|
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
|
|
||||||
X_AD_Process m_Process = new X_AD_Process(ctx.ctx, AD_Process_ID, getTrxName(ctx));
|
X_AD_Process m_Process = new X_AD_Process(ctx.ctx, AD_Process_ID, getTrxName(ctx));
|
||||||
|
|
|
@ -16,18 +16,17 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
|
import org.adempiere.pipo2.Element;
|
||||||
import org.adempiere.pipo2.ElementHandler;
|
import org.adempiere.pipo2.ElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -42,8 +41,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class ProcessParaElementHandler extends AbstractElementHandler {
|
public class ProcessParaElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> processparas = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_Process_Para.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_Process_Para.Table_Name);
|
||||||
|
@ -126,9 +123,9 @@ public class ProcessParaElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Process_Para_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_Process_Para_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Process_Para.COLUMNNAME_AD_Process_Para_ID);
|
X_AD_Process_Para.COLUMNNAME_AD_Process_Para_ID);
|
||||||
if (processparas.contains(AD_Process_Para_ID))
|
if (ctx.packOut.isExported(X_AD_Process_Para.COLUMNNAME_AD_Process_Para_ID+"|"+AD_Process_Para_ID))
|
||||||
return;
|
return;
|
||||||
processparas.add(AD_Process_Para_ID);
|
|
||||||
X_AD_Process_Para m_Processpara = new X_AD_Process_Para(ctx.ctx,
|
X_AD_Process_Para m_Processpara = new X_AD_Process_Para(ctx.ctx,
|
||||||
AD_Process_Para_ID, getTrxName(ctx));
|
AD_Process_Para_ID, getTrxName(ctx));
|
||||||
|
|
||||||
|
|
|
@ -114,11 +114,9 @@ public class ReferenceElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int Reference_id = Env.getContextAsInt(ctx.ctx,
|
int Reference_id = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Reference.COLUMNNAME_AD_Reference_ID);
|
X_AD_Reference.COLUMNNAME_AD_Reference_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Reference.COLUMNNAME_AD_Reference_ID+"|"+Reference_id))
|
||||||
if (references.contains(Reference_id))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
references.add(Reference_id);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
|
|
||||||
X_AD_Reference m_Reference = new X_AD_Reference(ctx.ctx, Reference_id, getTrxName(ctx));
|
X_AD_Reference m_Reference = new X_AD_Reference(ctx.ctx, Reference_id, getTrxName(ctx));
|
||||||
|
|
|
@ -110,6 +110,8 @@ public class ReferenceListElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Ref_List_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_Ref_List_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Ref_List.COLUMNNAME_AD_Ref_List_ID);
|
X_AD_Ref_List.COLUMNNAME_AD_Ref_List_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Ref_List.COLUMNNAME_AD_Ref_List_ID+"|"+AD_Ref_List_ID))
|
||||||
|
return;
|
||||||
X_AD_Ref_List m_Ref_List = new X_AD_Ref_List(ctx.ctx, AD_Ref_List_ID,
|
X_AD_Ref_List m_Ref_List = new X_AD_Ref_List(ctx.ctx, AD_Ref_List_ID,
|
||||||
getTrxName(ctx));
|
getTrxName(ctx));
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -41,8 +40,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class ReportViewColElementHandler extends AbstractElementHandler {
|
public class ReportViewColElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> viewcols = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_ReportView_Col.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_ReportView_Col.Table_Name);
|
||||||
|
@ -151,10 +148,9 @@ public class ReportViewColElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_ReportView_Col_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_ReportView_Col_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_ReportView_Col.COLUMNNAME_AD_ReportView_Col_ID);
|
X_AD_ReportView_Col.COLUMNNAME_AD_ReportView_Col_ID);
|
||||||
if (viewcols.contains(AD_ReportView_Col_ID))
|
if (ctx.packOut.isExported(X_AD_ReportView_Col.COLUMNNAME_AD_ReportView_Col_ID+"|"+AD_ReportView_Col_ID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
viewcols.add(AD_ReportView_Col_ID);
|
|
||||||
X_AD_ReportView_Col m_Reportview_Col = new X_AD_ReportView_Col(ctx.ctx,
|
X_AD_ReportView_Col m_Reportview_Col = new X_AD_ReportView_Col(ctx.ctx,
|
||||||
AD_ReportView_Col_ID, getTrxName(ctx));
|
AD_ReportView_Col_ID, getTrxName(ctx));
|
||||||
|
|
||||||
|
|
|
@ -18,18 +18,17 @@ package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.exceptions.AdempiereException;
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
|
import org.adempiere.pipo2.Element;
|
||||||
import org.adempiere.pipo2.ElementHandler;
|
import org.adempiere.pipo2.ElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_PrintFormat;
|
import org.compiere.model.I_AD_PrintFormat;
|
||||||
|
@ -48,8 +47,6 @@ public class ReportViewElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private ReportViewColElementHandler columnHandler = new ReportViewColElementHandler();
|
private ReportViewColElementHandler columnHandler = new ReportViewColElementHandler();
|
||||||
|
|
||||||
private List<Integer> views = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
|
@ -104,10 +101,9 @@ public class ReportViewElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
int AD_ReportView_ID = Env.getContextAsInt(ctx.ctx, "AD_ReportView_ID");
|
int AD_ReportView_ID = Env.getContextAsInt(ctx.ctx, "AD_ReportView_ID");
|
||||||
if (views.contains(AD_ReportView_ID))
|
if (ctx.packOut.isExported("AD_ReportView_ID"+"|"+AD_ReportView_ID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
views.add(AD_ReportView_ID);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
X_AD_ReportView m_Reportview = new X_AD_ReportView(ctx.ctx, AD_ReportView_ID, getTrxName(ctx));
|
X_AD_ReportView m_Reportview = new X_AD_ReportView(ctx.ctx, AD_ReportView_ID, getTrxName(ctx));
|
||||||
|
|
||||||
|
|
|
@ -18,17 +18,16 @@ package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
||||||
|
@ -51,8 +50,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class RoleElementHandler extends AbstractElementHandler {
|
public class RoleElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> roles = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
private OrgRoleElementHandler orgHandler = new OrgRoleElementHandler();
|
private OrgRoleElementHandler orgHandler = new OrgRoleElementHandler();
|
||||||
private ProcessAccessElementHandler processHandler = new ProcessAccessElementHandler();
|
private ProcessAccessElementHandler processHandler = new ProcessAccessElementHandler();
|
||||||
private UserRoleElementHandler userHandler = new UserRoleElementHandler();
|
private UserRoleElementHandler userHandler = new UserRoleElementHandler();
|
||||||
|
@ -117,9 +114,8 @@ public class RoleElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int Role_id = Env.getContextAsInt(ctx.ctx,
|
int Role_id = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Package_Exp_Detail.COLUMNNAME_AD_Role_ID);
|
X_AD_Package_Exp_Detail.COLUMNNAME_AD_Role_ID);
|
||||||
if (roles.contains(Role_id))
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Role_ID+"|"+Role_id))
|
||||||
return;
|
return;
|
||||||
roles.add(Role_id);
|
|
||||||
|
|
||||||
boolean createElement = true;
|
boolean createElement = true;
|
||||||
X_AD_Role m_Role = new X_AD_Role(ctx.ctx, Role_id, null);
|
X_AD_Role m_Role = new X_AD_Role(ctx.ctx, Role_id, null);
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
@ -26,11 +25,11 @@ import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.exceptions.AdempiereException;
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
|
import org.adempiere.pipo2.Element;
|
||||||
import org.adempiere.pipo2.ElementHandler;
|
import org.adempiere.pipo2.ElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
||||||
|
@ -51,8 +50,6 @@ public class TabElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private FieldElementHandler fieldHandler = new FieldElementHandler();
|
private FieldElementHandler fieldHandler = new FieldElementHandler();
|
||||||
|
|
||||||
private List<Integer> tabs = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_Tab.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_Tab.Table_Name);
|
||||||
|
|
||||||
|
@ -176,9 +173,8 @@ public class TabElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
int AD_Tab_ID = Env.getContextAsInt(ctx.ctx, "AD_Tab_ID");
|
int AD_Tab_ID = Env.getContextAsInt(ctx.ctx, "AD_Tab_ID");
|
||||||
if (tabs.contains(AD_Tab_ID))
|
if (ctx.packOut.isExported("AD_Tab_ID"+"|"+AD_Tab_ID))
|
||||||
return;
|
return;
|
||||||
tabs.add(AD_Tab_ID);
|
|
||||||
|
|
||||||
boolean createElement = true;
|
boolean createElement = true;
|
||||||
X_AD_Tab m_Tab = new X_AD_Tab (ctx.ctx, AD_Tab_ID, getTrxName(ctx));
|
X_AD_Tab m_Tab = new X_AD_Tab (ctx.ctx, AD_Tab_ID, getTrxName(ctx));
|
||||||
|
|
|
@ -123,11 +123,10 @@ public class TableElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
|
|
||||||
int AD_Table_ID = Env.getContextAsInt(ctx.ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Table_ID);
|
int AD_Table_ID = Env.getContextAsInt(ctx.ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Table_ID);
|
||||||
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Table_ID+"|"+AD_Table_ID))
|
||||||
|
return;
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
boolean exported = isTableProcess(ctx, AD_Table_ID);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
//Export table if not already done so
|
|
||||||
if (!exported){
|
|
||||||
boolean createElement = true;
|
boolean createElement = true;
|
||||||
X_AD_Table m_Table = new X_AD_Table (ctx.ctx, AD_Table_ID, null);
|
X_AD_Table m_Table = new X_AD_Table (ctx.ctx, AD_Table_ID, null);
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
@ -191,7 +190,6 @@ public class TableElementHandler extends AbstractElementHandler {
|
||||||
if (createElement) {
|
if (createElement) {
|
||||||
document.endElement("","",X_AD_Table.Table_Name);
|
document.endElement("","",X_AD_Table.Table_Name);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,16 @@
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
import org.compiere.model.I_AD_Task;
|
import org.compiere.model.I_AD_Task;
|
||||||
|
@ -40,8 +39,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class TaskElementHandler extends AbstractElementHandler {
|
public class TaskElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> tasks = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_Task.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_Task.Table_Name);
|
||||||
|
@ -101,9 +98,9 @@ public class TaskElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Task_ID = Env.getContextAsInt(ctx.ctx, "AD_Task_ID");
|
int AD_Task_ID = Env.getContextAsInt(ctx.ctx, "AD_Task_ID");
|
||||||
if (tasks.contains(AD_Task_ID))
|
if (ctx.packOut.isExported("AD_Task_ID"+"|"+AD_Task_ID))
|
||||||
return;
|
return;
|
||||||
tasks.add(AD_Task_ID);
|
|
||||||
X_AD_Task m_Task = new X_AD_Task(ctx.ctx, AD_Task_ID, null);
|
X_AD_Task m_Task = new X_AD_Task(ctx.ctx, AD_Task_ID, null);
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
if (m_Task.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
if (m_Task.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||||
|
|
|
@ -122,6 +122,8 @@ public class WindowElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Window_ID = Env.getContextAsInt(ctx.ctx, "AD_Window_ID");
|
int AD_Window_ID = Env.getContextAsInt(ctx.ctx, "AD_Window_ID");
|
||||||
|
if (ctx.packOut.isExported("AD_Window_ID"+"|"+AD_Window_ID))
|
||||||
|
return;
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
|
|
||||||
boolean createElement = true;
|
boolean createElement = true;
|
||||||
|
|
|
@ -157,10 +157,9 @@ public class WorkflowElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_Workflow_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_Workflow_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_Package_Exp_Detail.COLUMNNAME_AD_Workflow_ID);
|
X_AD_Package_Exp_Detail.COLUMNNAME_AD_Workflow_ID);
|
||||||
if (workflows.contains(AD_Workflow_ID))
|
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Workflow_ID+"|"+AD_Workflow_ID))
|
||||||
return;
|
return;
|
||||||
PackOut packOut = ctx.packOut;
|
PackOut packOut = ctx.packOut;
|
||||||
workflows.add(AD_Workflow_ID);
|
|
||||||
int ad_wf_nodenext_id = 0;
|
int ad_wf_nodenext_id = 0;
|
||||||
int ad_wf_nodenextcondition_id = 0;
|
int ad_wf_nodenextcondition_id = 0;
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
|
|
|
@ -17,17 +17,16 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -44,8 +43,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class WorkflowNodeElementHandler extends AbstractElementHandler {
|
public class WorkflowNodeElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> nodes = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_WF_Node.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_WF_Node.Table_Name);
|
||||||
|
@ -134,9 +131,9 @@ public class WorkflowNodeElementHandler extends AbstractElementHandler {
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int AD_WF_Node_ID = Env.getContextAsInt(ctx.ctx,
|
int AD_WF_Node_ID = Env.getContextAsInt(ctx.ctx,
|
||||||
X_AD_WF_Node.COLUMNNAME_AD_WF_Node_ID);
|
X_AD_WF_Node.COLUMNNAME_AD_WF_Node_ID);
|
||||||
if (nodes.contains(AD_WF_Node_ID))
|
if (ctx.packOut.isExported(X_AD_WF_Node.COLUMNNAME_AD_WF_Node_ID+"|"+AD_WF_Node_ID))
|
||||||
return;
|
return;
|
||||||
nodes.add(AD_WF_Node_ID);
|
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
MWFNode m_WF_Node = new MWFNode(ctx.ctx, AD_WF_Node_ID,
|
MWFNode m_WF_Node = new MWFNode(ctx.ctx, AD_WF_Node_ID,
|
||||||
getTrxName(ctx));
|
getTrxName(ctx));
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -45,8 +44,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
public class WorkflowNodeNextConditionElementHandler extends
|
public class WorkflowNodeNextConditionElementHandler extends
|
||||||
AbstractElementHandler {
|
AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> nextconds = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element)
|
public void startElement(PIPOContext ctx, Element element)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(X_AD_WF_NextCondition.Table_Name);
|
List<String> excludes = defaultExcludeList(X_AD_WF_NextCondition.Table_Name);
|
||||||
|
@ -157,9 +154,9 @@ public class WorkflowNodeNextConditionElementHandler extends
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int ad_wf_nodenextcondition_id = Env.getContextAsInt(ctx.ctx, "AD_WF_NextCondition_ID");
|
int ad_wf_nodenextcondition_id = Env.getContextAsInt(ctx.ctx, "AD_WF_NextCondition_ID");
|
||||||
if (nextconds.contains(ad_wf_nodenextcondition_id))
|
if (ctx.packOut.isExported("AD_WF_NextCondition_ID"+"|"+ad_wf_nodenextcondition_id))
|
||||||
return;
|
return;
|
||||||
nextconds.add(ad_wf_nodenextcondition_id);
|
|
||||||
MWFNextCondition m_WF_NodeNextCondition = new MWFNextCondition(
|
MWFNextCondition m_WF_NodeNextCondition = new MWFNextCondition(
|
||||||
ctx.ctx, ad_wf_nodenextcondition_id, null);
|
ctx.ctx, ad_wf_nodenextcondition_id, null);
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -16,16 +16,15 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.pipo2.handler;
|
package org.adempiere.pipo2.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.transform.sax.TransformerHandler;
|
import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.pipo2.AbstractElementHandler;
|
import org.adempiere.pipo2.AbstractElementHandler;
|
||||||
import org.adempiere.pipo2.PIPOContext;
|
|
||||||
import org.adempiere.pipo2.PoExporter;
|
|
||||||
import org.adempiere.pipo2.Element;
|
import org.adempiere.pipo2.Element;
|
||||||
|
import org.adempiere.pipo2.PIPOContext;
|
||||||
import org.adempiere.pipo2.PackOut;
|
import org.adempiere.pipo2.PackOut;
|
||||||
|
import org.adempiere.pipo2.PoExporter;
|
||||||
import org.adempiere.pipo2.PoFiller;
|
import org.adempiere.pipo2.PoFiller;
|
||||||
import org.adempiere.pipo2.ReferenceUtils;
|
import org.adempiere.pipo2.ReferenceUtils;
|
||||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||||
|
@ -42,8 +41,6 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
public class WorkflowNodeNextElementHandler extends AbstractElementHandler {
|
public class WorkflowNodeNextElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private List<Integer> nexts = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
||||||
List<String> excludes = defaultExcludeList(MWFNodeNext.Table_Name);
|
List<String> excludes = defaultExcludeList(MWFNodeNext.Table_Name);
|
||||||
|
|
||||||
|
@ -148,9 +145,9 @@ public class WorkflowNodeNextElementHandler extends AbstractElementHandler {
|
||||||
public void create(PIPOContext ctx, TransformerHandler document)
|
public void create(PIPOContext ctx, TransformerHandler document)
|
||||||
throws SAXException {
|
throws SAXException {
|
||||||
int ad_wf_nodenext_id = Env.getContextAsInt(ctx.ctx, "AD_WF_NodeNext_ID");
|
int ad_wf_nodenext_id = Env.getContextAsInt(ctx.ctx, "AD_WF_NodeNext_ID");
|
||||||
if (nexts.contains(ad_wf_nodenext_id))
|
if (ctx.packOut.isExported("AD_WF_NodeNext_ID"+"|"+ad_wf_nodenext_id))
|
||||||
return;
|
return;
|
||||||
nexts.add(ad_wf_nodenext_id);
|
|
||||||
MWFNodeNext m_WF_NodeNext = new MWFNodeNext(
|
MWFNodeNext m_WF_NodeNext = new MWFNodeNext(
|
||||||
ctx.ctx, ad_wf_nodenext_id, null);
|
ctx.ctx, ad_wf_nodenext_id, null);
|
||||||
if (ctx.packOut.getFromDate() != null) {
|
if (ctx.packOut.getFromDate() != null) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.io.OutputStream;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
@ -454,4 +455,13 @@ public class PackOut
|
||||||
public void setCtx(Properties ctx) {
|
public void setCtx(Properties ctx) {
|
||||||
pipoContext.ctx = ctx;
|
pipoContext.ctx = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> processedRecords = new ArrayList<String>();
|
||||||
|
public boolean isExported(String key) {
|
||||||
|
if (processedRecords.contains(key))
|
||||||
|
return true;
|
||||||
|
processedRecords.add(key);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} // PackOut
|
} // PackOut
|
||||||
|
|
Loading…
Reference in New Issue