Adempiere 3.5.2a

org.adempiere.pipo
Class PackIn

java.lang.Object
  extended by org.compiere.process.SvrProcess
      extended by org.adempiere.pipo.PackIn
All Implemented Interfaces:
ProcessCall

public class PackIn
extends SvrProcess

IntPackIn Tool.


Field Summary
static String m_Database
           
static String m_Package_Dir
           
static String m_UpdateMode
           
 int p_PackIn_ID
           
 
Fields inherited from class org.compiere.process.SvrProcess
MSG_InvalidArguments, MSG_SaveErrorRowNotFound
 
Constructor Summary
PackIn()
           
 
Method Summary
 void addColumn(String tableName, String columnName, int columnId)
          add to column id cache
 void addTable(String tableName, int tableId)
          add to table id cache
protected  String doIt()
          Doit
 int getColumnId(String tableName, String columnName)
          find column id from cache
 int getTableId(String tableName)
          Find table id from cache
 String importXML(String fileName, Properties ctx, String trxName)
          Uses PackInHandler to update AD.
static void main(String[] args)
           
protected  void prepare()
          Prepare - e.g., get Parameters.
 
Methods inherited from class org.compiere.process.SvrProcess
addLog, addLog, commit, commitEx, doIt, get_TrxName, getAD_Client_ID, getAD_PInstance_ID, getAD_User_ID, getCtx, getName, getParameter, getProcessInfo, getRecord_ID, getTable_ID, isLocked, lockObject, postProcess, rollback, startProcess, unlockObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_UpdateMode

public static String m_UpdateMode

m_Database

public static String m_Database

m_Package_Dir

public static String m_Package_Dir

p_PackIn_ID

public int p_PackIn_ID
Constructor Detail

PackIn

public PackIn()
Method Detail

addTable

public void addTable(String tableName,
                     int tableId)
add to table id cache

Parameters:
tableName -
tableId -

getTableId

public int getTableId(String tableName)
Find table id from cache

Parameters:
tableName -
Returns:
tableId

addColumn

public void addColumn(String tableName,
                      String columnName,
                      int columnId)
add to column id cache

Parameters:
tableName -
columnName -
columnId -

getColumnId

public int getColumnId(String tableName,
                       String columnName)
find column id from cache

Parameters:
tableName -
columnName -
Returns:
column id

prepare

protected void prepare()
Description copied from class: SvrProcess
Prepare - e.g., get Parameters. ProcessInfoParameter[] para = getParameter(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("A_Asset_Group_ID")) p_A_Asset_Group_ID = para[i].getParameterAsInt(); else if (name.equals("GuaranteeDate")) p_GuaranteeDate = (Timestamp)para[i].getParameter(); else if (name.equals("AttachAsset")) p_AttachAsset = "Y".equals(para[i].getParameter()); else log.log(Level.SEVERE, "Unknown Parameter: " + name); }

Specified by:
prepare in class SvrProcess

importXML

public String importXML(String fileName,
                        Properties ctx,
                        String trxName)
                 throws Exception
Uses PackInHandler to update AD.

Parameters:
fileName - xml file to read
Returns:
status message
Throws:
Exception

doIt

protected String doIt()
               throws Exception
Doit

Specified by:
doIt in class SvrProcess
Returns:
""
Throws:
Exception - if not successful e.g. throw new AdempiereUserError ("@FillMandatory@ @C_BankAccount_ID@");

main

public static void main(String[] args)
Parameters:
args - XMLfile host port db username password

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.