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 cacheintgetColumnId(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.booleanbooleanbyte[]File[]readFilesFromBlob(String fileName) 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
-
setSuccess
public void setSuccess(boolean success) -
isSuccess
public boolean isSuccess()
-