Package org.compiere.process
Class ProcessInfo
java.lang.Object
org.compiere.process.ProcessInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
WProcessInfo
Process Information (Value Object)
- Version:
- $Id: ProcessInfo.java,v 1.2 2006/07/30 00:54:44 jjanke Exp $
- Author:
- Jorg Janke, victor.perez@e-evolution.com see FR 1906632 https://sourceforge.net/p/adempiere/feature-requests/382/
- See Also:
-
Constructor Summary
ConstructorDescriptionProcessInfo
(String Title, int AD_Process_ID) ConstructorProcessInfo
(String Title, int AD_Process_ID, int Table_ID, int Record_ID) ConstructorProcessInfo
(String Title, int AD_Process_ID, int Table_ID, int Record_ID, String Record_UU) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLog
(int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg) Add Logvoid
addLog
(int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg, int tableId, int recordId) Add logvoid
addLog
(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg) Add Logvoid
addLog
(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg, int tableId, int recordId) Add logvoid
addLog
(ProcessInfoLog logEntry) Add Logvoid
addSummary
(String additionalSummary) Append text to summaryGet AD_Client_IDint
Get AD_InfoWindow_IDint
Get AD_PInstance_IDint
Get AD_Process_IDGet AD_Process_UUint
Get AD_Scheduler_IDGet AD_User_IDGet process class nameint
Get estimated process duration in secondsGet Export FileGet Export File Extensionint[]
getIDs()
Get ids from process logGet internal report object.
For Jasper Report, to get JasperPrint, set export to true and ExportFileExtension to "JasperPrint".Method getJsonDataint
Get language idGet ASCII Log InfogetLogInfo
(boolean html) Get Log of Process.Get process logsgetLogs()
Get LogsGet Process Info ParameterGet PDF file nameGet generated PDF report filegetPO()
Get POGet UI interface for processint
Get Record_IDGet record idsGet Record_UUGet record uuidsGet report output typeint
Get row countGet Serializable Object for processGet Show Help (parameter dialog)Get summary textint
Get AD_Table_IDgetTitle()
Get Process TitleGet transaction name for this processGet TransientObject for processboolean
isBatch()
Batch - i.e. started from server instead of from UIboolean
isError()
Is process has errorboolean
isExport()
Is this a export or print process?boolean
boolean
Is print preview instead of direct print ?boolean
isProcessRunning
(MPInstancePara[] params) Validates to inform a user running again a process that is already in execution.boolean
Determines, if current tab content should be replaced, or a new tab should be opened (for report)boolean
Is this a reporting process ?boolean
Is summary reportboolean
Is Timeout - i.e process did not completesaveLog
(ProcessInfoLog logEntry) Save Log to DB immediatelysaveProgress
(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg) Save Progress Log to DB immediatelysaveStatus
(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg) Save Status Log to DB immediatelyvoid
setAD_Client_ID
(int AD_Client_ID) Set AD_Client_IDvoid
setAD_InfoWindow_ID
(int infoWindowID) Set AD_InfoWindow_IDvoid
setAD_PInstance_ID
(int AD_PInstance_ID) Set AD_PInstance_IDvoid
setAD_Process_ID
(int AD_Process_ID) Set AD_Process_IDvoid
setAD_Process_UU
(String AD_Process_UU) Set AD_Process_UUvoid
setAD_Scheduler_ID
(int AD_Scheduler_ID) Set AD_Scheduler_IDvoid
setAD_User_ID
(int AD_User_ID) Set AD_User_IDvoid
setClassName
(String ClassName) Set process class namevoid
setError
(boolean error) Set is error flagvoid
setEstSeconds
(int EstSeconds) Set estimated process duration in secondsvoid
setExport
(boolean export) Set Export flagvoid
setExportFile
(File exportFile) Set Export Filevoid
setExportFileExtension
(String exportFileExtension) Set Export File Extensionvoid
setInternalReportObject
(Serializable reportObject) Set internal report object (for e.g JasperPrint)void
setIsBatch
(boolean batch) Batchvoid
setIsSummary
(boolean isSummary) Set is summary (for report)void
setIsTimeout
(boolean timeout) Set is Timeoutvoid
setJsonData
(String jsonData) Set JsonDatavoid
setLanguageID
(int languageID) Set language idvoid
setLogList
(ArrayList<ProcessInfoLog> logs) Set process logsvoid
setNotifyRecipients
(boolean isNotifyRecipients) void
setParameter
(ProcessInfoParameter[] parameter) Set Process Info Parametervoid
setPDFFileName
(String fileName) Set PDF file namevoid
setPDFReport
(File f) Set PDF report file generatedvoid
Set POvoid
setPrintPreview
(boolean b) Set print preview flag, only relevant if this is a reporting processvoid
setProcessUI
(IProcessUI processUI) Set UI interface for processvoid
setRecord_ID
(int Record_ID) Set Record_IDvoid
setRecord_IDs
(List<Integer> Record_IDs) Set record idsvoid
setRecord_UU
(String Record_UU) Set Record_UUvoid
setRecord_UUs
(List<String> Record_UUs) Set record uuidsvoid
Sets, if current tab content should be replaced, or a new tab should be opened (from AD_SysConfig)void
setReportingProcess
(boolean f) Set is this a reporting processvoid
setReportType
(String reportType) Set report output typevoid
setRowCount
(int rowCount) Set row countvoid
setSerializableObject
(Serializable SerializableObject) Set Serializable Object for processvoid
setShowHelp
(String showHelp) Set Show Help (parameter dialog)void
setSummary
(String summary) Set Summaryvoid
setSummary
(String translatedSummary, boolean error) Set summary textvoid
setTable_ID
(int AD_Table_ID) Set AD_Table_IDvoid
Set process titlevoid
setTransactionName
(String trxName) Set transaction name for this processvoid
setTransientObject
(Object TransientObject) Set Transient Object for processtoString()
String representationboolean
updateLog
(ProcessInfoLog logEntry) Update existing Log immediatelyboolean
updateProgress
(String pInstanceLogUU, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg) Update Progress Log to DB immediately
-
Constructor Details
-
ProcessInfo
Constructor- Parameters:
Title
- TitleAD_Process_ID
- AD_Process_IDTable_ID
- AD_Table_IDRecord_ID
- Record_ID
-
ProcessInfo
Constructor- Parameters:
Title
- TitleAD_Process_ID
- AD_Process_IDTable_ID
- AD_Table_IDRecord_ID
- Record IDRecord_UU
- Record UUID
-
ProcessInfo
Constructor- Parameters:
Title
- TitleAD_Process_ID
- AD_Process_ID
-
-
Method Details
-
getLanguageID
public int getLanguageID()Get language id- Returns:
- AD_Language_ID
-
setLanguageID
public void setLanguageID(int languageID) Set language id- Parameters:
languageID
- AD_Language_ID
-
getReportType
Get report output type- Returns:
- report output type
-
setReportType
Set report output type- Parameters:
reportType
-
-
setIsSummary
public void setIsSummary(boolean isSummary) Set is summary (for report)- Parameters:
isSummary
-
-
isSummary
public boolean isSummary()Is summary report- Returns:
- true if it is summary report
-
setShowHelp
Set Show Help (parameter dialog)- Parameters:
showHelp
-
-
getShowHelp
Get Show Help (parameter dialog)- Returns:
- String
-
toString
String representation -
setJsonData
Set JsonData- Parameters:
jsonData
- jsonData (valid json string)
-
getJsonData
Method getJsonData- Returns:
- String
-
setSummary
Set Summary- Parameters:
summary
- summary (will be translated)
-
getSummary
Get summary text- Returns:
- summary text
-
setSummary
Set summary text- Parameters:
translatedSummary
- translated summary texterror
- true if this is error
-
addSummary
Append text to summary- Parameters:
additionalSummary
- text to append to summary
-
setError
public void setError(boolean error) Set is error flag- Parameters:
error
- is error flag
-
isError
public boolean isError()Is process has error- Returns:
- true if process has error
-
setIsBatch
public void setIsBatch(boolean batch) Batch- Parameters:
batch
- true if batch processing
-
isBatch
public boolean isBatch()Batch - i.e. started from server instead of from UI- Returns:
- true if it is batch processing
-
setIsTimeout
public void setIsTimeout(boolean timeout) Set is Timeout- Parameters:
timeout
- true if timeout
-
isTimeout
public boolean isTimeout()Is Timeout - i.e process did not complete- Returns:
- true if process terminated due to transaction timeout
-
getLogInfo
Get Log of Process.- Translated Process Message - List of log entries Date - Number - Msg
- Parameters:
html
- if true with HTML markup- Returns:
- Log Info
-
getLogInfo
Get ASCII Log Info- Returns:
- Log Info
-
getAD_PInstance_ID
public int getAD_PInstance_ID()Get AD_PInstance_ID- Returns:
- AD_PInstance_ID
-
setAD_PInstance_ID
public void setAD_PInstance_ID(int AD_PInstance_ID) Set AD_PInstance_ID- Parameters:
AD_PInstance_ID
-
-
getAD_InfoWindow_ID
public int getAD_InfoWindow_ID()Get AD_InfoWindow_ID- Returns:
- AD_InfoWindow_ID
-
setAD_InfoWindow_ID
public void setAD_InfoWindow_ID(int infoWindowID) Set AD_InfoWindow_ID- Parameters:
infoWindowID
- AD_InfoWindow_ID
-
getAD_Process_ID
public int getAD_Process_ID()Get AD_Process_ID- Returns:
- AD_Process_ID
-
setAD_Process_ID
public void setAD_Process_ID(int AD_Process_ID) Set AD_Process_ID- Parameters:
AD_Process_ID
-
-
getClassName
Get process class name- Returns:
- process class name or null
-
setClassName
Set process class name- Parameters:
ClassName
- process class name
-
getTransientObject
Get TransientObject for process- Returns:
- Object
-
setTransientObject
Set Transient Object for process- Parameters:
TransientObject
-
-
getSerializableObject
Get Serializable Object for process- Returns:
- Serializable
-
setSerializableObject
Set Serializable Object for process- Parameters:
SerializableObject
-
-
getEstSeconds
public int getEstSeconds()Get estimated process duration in seconds- Returns:
- int
-
setEstSeconds
public void setEstSeconds(int EstSeconds) Set estimated process duration in seconds- Parameters:
EstSeconds
- int
-
getTable_ID
public int getTable_ID()Get AD_Table_ID- Returns:
- AD_Table_ID
-
setTable_ID
public void setTable_ID(int AD_Table_ID) Set AD_Table_ID- Parameters:
AD_Table_ID
-
-
getRecord_ID
public int getRecord_ID()Get Record_ID- Returns:
- Record_ID
-
setRecord_ID
public void setRecord_ID(int Record_ID) Set Record_ID- Parameters:
Record_ID
-
-
getRecord_UU
Get Record_UU- Returns:
- Record_UU
-
setRecord_UU
Set Record_UU- Parameters:
Record_UU
-
-
getTitle
Get Process Title- Returns:
- process title
-
setTitle
Set process title- Parameters:
Title
-
-
setAD_Client_ID
public void setAD_Client_ID(int AD_Client_ID) Set AD_Client_ID- Parameters:
AD_Client_ID
- int
-
getAD_Client_ID
Get AD_Client_ID- Returns:
- AD_Client_ID
-
setAD_User_ID
public void setAD_User_ID(int AD_User_ID) Set AD_User_ID- Parameters:
AD_User_ID
-
-
getAD_User_ID
Get AD_User_ID- Returns:
- AD_User_ID
-
getParameter
Get Process Info Parameter- Returns:
- Process Info Parameter Array
-
setParameter
Set Process Info Parameter- Parameters:
parameter
- Parameter Array
-
addLog
public void addLog(int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg, int tableId, int recordId) Add log- Parameters:
Log_ID
-P_ID
-P_Date
-P_Number
-P_Msg
-tableId
-recordId
-
-
addLog
public void addLog(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg, int tableId, int recordId) Add log- Parameters:
P_ID
-P_Date
-P_Number
-P_Msg
-tableId
-recordId
-
-
addLog
Add Log- Parameters:
Log_ID
- Log IDP_ID
- Process IDP_Date
- Process DateP_Number
- Process NumberP_Msg
- Process Message
-
addLog
Add Log- Parameters:
P_ID
- Process IDP_Date
- Process DateP_Number
- Process NumberP_Msg
- Process Message
-
addLog
Add Log- Parameters:
logEntry
- log entry
-
getLogs
Get Logs- Returns:
- ProcessInfoLog[]
-
saveStatus
Save Status Log to DB immediately- Parameters:
P_ID
- Process IDP_Date
- Process DateP_Number
- Process NumberP_Msg
- Process Message- Returns:
- String AD_PInstance_Log_UU
-
saveProgress
Save Progress Log to DB immediately- Parameters:
P_ID
- Process IDP_Date
- Process DateP_Number
- Process NumberP_Msg
- Process Message- Returns:
- String AD_PInstance_Log_UU
-
saveLog
Save Log to DB immediately- Parameters:
logEntry
- log entry- Returns:
- String AD_PInstance_Log_UU
-
updateProgress
public boolean updateProgress(String pInstanceLogUU, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg) Update Progress Log to DB immediately- Parameters:
pInstanceLogUU
- AD_PInstance_Log_UUP_ID
- Process IDP_Date
- Process DateP_Number
- Process NumberP_Msg
- Process Message- Returns:
- true if log is successfully updated
-
updateLog
Update existing Log immediately- Parameters:
logEntry
- log entry- Returns:
- true if log is successfully updated
-
getIDs
public int[] getIDs()Get ids from process log- Returns:
- ids from process log
-
getLogList
Get process logs- Returns:
- process logs
-
setLogList
Set process logs- Parameters:
logs
-
-
getTransactionName
Get transaction name for this process- Returns:
- String
-
getAD_Process_UU
Get AD_Process_UU- Returns:
- AD_Process_UU
-
setAD_Process_UU
Set AD_Process_UU- Parameters:
AD_Process_UU
-
-
setTransactionName
Set transaction name for this process- Parameters:
trxName
- transaction name
-
setPrintPreview
public void setPrintPreview(boolean b) Set print preview flag, only relevant if this is a reporting process- Parameters:
b
-
-
isPrintPreview
public boolean isPrintPreview()Is print preview instead of direct print ? Only relevant if this is a reporting process- Returns:
- true if is print preview
-
isReportingProcess
public boolean isReportingProcess()Is this a reporting process ?- Returns:
- true if this is reporting process
-
setReportingProcess
public void setReportingProcess(boolean f) Set is this a reporting process- Parameters:
f
-
-
setPDFReport
Set PDF report file generated- Parameters:
f
- PDF File
-
getPDFReport
Get generated PDF report file- Returns:
- PDF report file
-
isExport
public boolean isExport()Is this a export or print process?- Returns:
-
setExport
public void setExport(boolean export) Set Export flag- Parameters:
export
-
-
getExportFileExtension
Get Export File Extension- Returns:
- export file extension
-
setExportFileExtension
Set Export File Extension- Parameters:
exportFileExtension
-
-
getExportFile
Get Export File- Returns:
-
setExportFile
Set Export File- Parameters:
exportFile
-
-
getRecord_IDs
Get record ids- Returns:
- record ids
-
setRecord_IDs
Set record ids- Parameters:
Record_IDs
-
-
getRecord_UUs
Get record uuids- Returns:
- record uuids
-
setRecord_UUs
Set record uuids- Parameters:
Record_UUs
-
-
setRowCount
public void setRowCount(int rowCount) Set row count- Parameters:
rowCount
-
-
getRowCount
public int getRowCount()Get row count- Returns:
- row count
-
setPO
Set PO- Parameters:
po
-
-
getPO
Get PO- Returns:
- PO
-
getPDFFileName
Get PDF file name- Returns:
- PDF file name
-
setPDFFileName
Set PDF file name- Parameters:
fileName
-
-
isProcessRunning
Validates to inform a user running again a process that is already in execution.- Returns:
- true if the same process is already running
-
setProcessUI
Set UI interface for process- Parameters:
processUI
-
-
getProcessUI
Get UI interface for process- Returns:
- UI interface for process or null
-
isReplaceTabContent
public boolean isReplaceTabContent()Determines, if current tab content should be replaced, or a new tab should be opened (for report)- Returns:
- true, if current tab content should be replaced
-
setReplaceTabContent
public void setReplaceTabContent()Sets, if current tab content should be replaced, or a new tab should be opened (from AD_SysConfig) -
getAD_Scheduler_ID
public int getAD_Scheduler_ID()Get AD_Scheduler_ID- Returns:
- AD_Scheduler_ID or 0 if not running from scheduler
-
setAD_Scheduler_ID
public void setAD_Scheduler_ID(int AD_Scheduler_ID) Set AD_Scheduler_ID- Parameters:
AD_Scheduler_ID
-
-
isNotifyRecipients
public boolean isNotifyRecipients()- Returns:
- true if scheduler should notify scheduler recipients with process execution result
-
setNotifyRecipients
public void setNotifyRecipients(boolean isNotifyRecipients) - Parameters:
isNotifyRecipients
- if true, scheduler should notify scheduler recipients with process execution result
-
getInternalReportObject
Get internal report object.
For Jasper Report, to get JasperPrint, set export to true and ExportFileExtension to "JasperPrint".- Returns:
- internal report object (for e.g JasperPrint)
-
setInternalReportObject
Set internal report object (for e.g JasperPrint)- Parameters:
reportObject
-
-