Search in sources :

Example 36 with AttributesImpl

use of org.xml.sax.helpers.AttributesImpl in project adempiere by adempiere.

the class BrowseAccessElementHandler method create.

public void create(Properties ctx, TransformerHandler document) throws SAXException {
    int AD_Browse_ID = Env.getContextAsInt(ctx, X_AD_Browse.COLUMNNAME_AD_Browse_ID);
    int AD_Role_ID = Env.getContextAsInt(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID);
    AttributesImpl atts = new AttributesImpl();
    createBrowseAccessBinding(atts, AD_Browse_ID, AD_Role_ID);
    document.startElement("", "", "browseaccess", atts);
    document.endElement("", "", "browseaccess");
}
Also used : AttributesImpl(org.xml.sax.helpers.AttributesImpl)

Example 37 with AttributesImpl

use of org.xml.sax.helpers.AttributesImpl in project adempiere by adempiere.

the class BrowseFieldElementHandler method create.

public void create(Properties ctx, TransformerHandler document) throws SAXException {
    int AD_Browse_Field_ID = Env.getContextAsInt(ctx, X_AD_Browse_Field.COLUMNNAME_AD_Browse_Field_ID);
    MBrowseField m_BrowseField = new MBrowseField(ctx, AD_Browse_Field_ID, null);
    AttributesImpl atts = new AttributesImpl();
    createBrowseFieldBinding(atts, m_BrowseField);
    PackOut packOut = (PackOut) ctx.get("PackOutProcess");
    if (m_BrowseField.getAD_Reference_ID() > 0) {
        packOut.createReference(m_BrowseField.getAD_Reference_ID(), document);
    }
    if (m_BrowseField.getAD_Reference_Value_ID() > 0) {
        packOut.createReference(m_BrowseField.getAD_Reference_Value_ID(), document);
    }
    if (m_BrowseField.getAD_Val_Rule_ID() > 0) {
        packOut.createDynamicRuleValidation(m_BrowseField.getAD_Val_Rule_ID(), document);
    }
    document.startElement("", "", "browsefield", atts);
    document.endElement("", "", "browsefield");
}
Also used : MBrowseField(org.adempiere.model.MBrowseField) AttributesImpl(org.xml.sax.helpers.AttributesImpl) PackOut(org.adempiere.pipo.PackOut)

Example 38 with AttributesImpl

use of org.xml.sax.helpers.AttributesImpl in project adempiere by adempiere.

the class CodeSnipitElementHandler method create.

public void create(Properties ctx, TransformerHandler document) throws SAXException {
    String FileDir = Env.getContext(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_File_Directory);
    String FileName = Env.getContext(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_FileName);
    String OldCode = Env.getContext(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Package_Code_Old);
    String NewCode = Env.getContext(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Package_Code_New);
    String ReleaseNo = Env.getContext(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_ReleaseNo);
    AttributesImpl atts = new AttributesImpl();
    createSnipitBinding(atts, FileDir, FileName, OldCode, NewCode, ReleaseNo);
    document.startElement("", "", "codesnipit", atts);
    document.endElement("", "", "codesnipit");
}
Also used : AttributesImpl(org.xml.sax.helpers.AttributesImpl)

Example 39 with AttributesImpl

use of org.xml.sax.helpers.AttributesImpl in project adempiere by adempiere.

the class ImpFormatRowElementHandler method create.

public void create(Properties ctx, TransformerHandler document) throws SAXException {
    int AD_ImpFormat_Row_ID = Env.getContextAsInt(ctx, X_AD_ImpFormat_Row.COLUMNNAME_AD_ImpFormat_Row_ID);
    X_AD_ImpFormat_Row m_ImpFormat_Row = new X_AD_ImpFormat_Row(ctx, AD_ImpFormat_Row_ID, getTrxName(ctx));
    AttributesImpl atts = new AttributesImpl();
    createImpFormatRowBinding(atts, m_ImpFormat_Row);
    document.startElement("", "", "impformatrow", atts);
    document.endElement("", "", "impformatrow");
}
Also used : AttributesImpl(org.xml.sax.helpers.AttributesImpl) X_AD_ImpFormat_Row(org.compiere.model.X_AD_ImpFormat_Row)

Example 40 with AttributesImpl

use of org.xml.sax.helpers.AttributesImpl in project adempiere by adempiere.

the class MenuElementHandler method create.

public void create(Properties ctx, TransformerHandler document) throws SAXException {
    int AD_Menu_ID = Env.getContextAsInt(ctx, "AD_Menu_ID");
    X_AD_Menu m_Menu = new X_AD_Menu(ctx, AD_Menu_ID, null);
    if (m_Menu.isSummary() == false) {
        createApplication(ctx, document, AD_Menu_ID);
    } else {
        AttributesImpl atts = new AttributesImpl();
        createMenuBinding(atts, m_Menu);
        document.startElement("", "", "menu", atts);
        createModule(ctx, document, AD_Menu_ID);
        document.endElement("", "", "menu");
    }
}
Also used : AttributesImpl(org.xml.sax.helpers.AttributesImpl) X_AD_Menu(org.compiere.model.X_AD_Menu)

Aggregations

AttributesImpl (org.xml.sax.helpers.AttributesImpl)310 SAXException (org.xml.sax.SAXException)53 Test (org.junit.Test)34 DiskWriteAttributesImpl (org.apache.geode.internal.cache.DiskWriteAttributesImpl)23 PartitionAttributesImpl (org.apache.geode.internal.cache.PartitionAttributesImpl)23 ContentHandler (org.xml.sax.ContentHandler)21 Attributes (org.xml.sax.Attributes)17 PreparedStatement (java.sql.PreparedStatement)16 ResultSet (java.sql.ResultSet)16 Map (java.util.Map)16 PackOut (org.adempiere.pipo.PackOut)16 IOException (java.io.IOException)15 POSaveFailedException (org.adempiere.pipo.exception.POSaveFailedException)12 Iterator (java.util.Iterator)11 TransformerHandler (javax.xml.transform.sax.TransformerHandler)11 StreamResult (javax.xml.transform.stream.StreamResult)11 Metadata (org.apache.tika.metadata.Metadata)11 File (java.io.File)9 SAXTransformerFactory (javax.xml.transform.sax.SAXTransformerFactory)9 DatabaseAccessException (org.adempiere.pipo.exception.DatabaseAccessException)9