Package org.adempiere.pipo2
Class PackIn
java.lang.Object
org.adempiere.pipo2.PackIn
IntPackIn Tool.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd to column id cachevoidaddImportDetail(X_AD_Package_Imp_Detail importDetail) voidadd to table id cacheintintgetColumnId(String tableName, String columnName) find column id from cacheintgetTableId(String tableName) Find table id from cacheimportDataPack(InputStream input, Properties ctx, String trxName, String format) Import a 2Pack from a JSON or YAML input stream by replaying synthetic SAX events into the existing PackInHandler.importXML(InputStream input, Properties ctx, String trxName) importXML(String fileName, Properties ctx, String trxName) Uses PackInHandler to update AD.booleanbooleanvoidMark the import as failed, the PK_Status of the AD_Package_Imp and AD_Package_Imp_Inst records is set to Import Failed.byte[]File[]readFilesFromBlob(String fileName) voidsetAD_Package_Imp_ID(int adPackageImpId) voidsetAD_Package_Imp_Proc(X_AD_Package_Imp_Proc packinProc) voidsetPackageDirectory(String packageDirectory) voidsetPackageName(String packageName) voidsetPackageVersion(String packageVersion) voidsetSuccess(boolean success) voidsetUpdateDictionary(boolean updateDictionary)
-
Constructor Details
-
PackIn
public PackIn()
-
-
Method Details
-
addTable
add to table id cache- Parameters:
tableName-tableId-
-
getTableId
Find table id from cache- Parameters:
tableName-- Returns:
- tableId
-
addColumn
add to column id cache- Parameters:
tableName-columnName-columnId-
-
getColumnId
find column id from cache- Parameters:
tableName-columnName-- Returns:
- column id
-
importXML
Uses PackInHandler to update AD.- Parameters:
fileName- xml file to read- Returns:
- status message
- Throws:
Exception
-
addImportDetail
-
importXML
- Parameters:
input-ctx-trxName-- Returns:
- status message
-
importDataPack
Import a 2Pack from a JSON or YAML input stream by replaying synthetic SAX events into the existing PackInHandler.- Parameters:
input- stream of the JSON or YAML fileformat- "json" or "yaml"
-
getPackageDirectory
-
setPackageDirectory
-
isUpdateDictionary
public boolean isUpdateDictionary() -
setUpdateDictionary
public void setUpdateDictionary(boolean updateDictionary) -
readBlob
- Throws:
IOException
-
readFilesFromBlob
- Throws:
IOException
-
getPackageName
- Returns:
- package name
-
setPackageName
- Parameters:
packageName-
-
getPackageVersion
- Returns:
- package Version
-
setPackageVersion
- Parameters:
packageVersion-
-
getNotifier
-
getAD_Package_Imp_Proc
-
setAD_Package_Imp_Proc
-
getAD_Package_Imp_ID
public int getAD_Package_Imp_ID()- Returns:
- AD_Package_Imp_ID of the record created for the current import
-
setAD_Package_Imp_ID
public void setAD_Package_Imp_ID(int adPackageImpId) - Parameters:
adPackageImpId- AD_Package_Imp_ID of the record created for the current import
-
markImportFailed
public void markImportFailed()Mark the import as failed, the PK_Status of the AD_Package_Imp and AD_Package_Imp_Inst records is set to Import Failed. To be called by the import entry points when the import or the commit of the import transaction fails. -
setSuccess
public void setSuccess(boolean success) -
isSuccess
public boolean isSuccess()
-