Class ProcessInfo

java.lang.Object
org.compiere.process.ProcessInfo
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
WProcessInfo

public class ProcessInfo extends Object implements Serializable
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 Details

    • ProcessInfo

      public ProcessInfo(String Title, int AD_Process_ID, int Table_ID, int Record_ID)
      Constructor
      Parameters:
      Title - Title
      AD_Process_ID - AD_Process_ID
      Table_ID - AD_Table_ID
      Record_ID - Record_ID
    • ProcessInfo

      public ProcessInfo(String Title, int AD_Process_ID, int Table_ID, int Record_ID, String Record_UU)
      Constructor
      Parameters:
      Title - Title
      AD_Process_ID - AD_Process_ID
      Table_ID - AD_Table_ID
      Record_ID - Record ID
      Record_UU - Record UUID
    • ProcessInfo

      public ProcessInfo(String Title, int AD_Process_ID)
      Constructor
      Parameters:
      Title - Title
      AD_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

      public String getReportType()
      Get report output type
      Returns:
      report output type
    • setReportType

      public void setReportType(String reportType)
      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

      public void setShowHelp(String showHelp)
      Set Show Help (parameter dialog)
      Parameters:
      showHelp -
    • getShowHelp

      public String getShowHelp()
      Get Show Help (parameter dialog)
      Returns:
      String
    • toString

      public String toString()
      String representation
      Overrides:
      toString in class Object
      Returns:
      String representation
    • setJsonData

      public void setJsonData(String jsonData)
      Set JsonData
      Parameters:
      jsonData - jsonData (valid json string)
    • getJsonData

      public String getJsonData()
      Method getJsonData
      Returns:
      String
    • setSummary

      public void setSummary(String summary)
      Set Summary
      Parameters:
      summary - summary (will be translated)
    • getSummary

      public String getSummary()
      Get summary text
      Returns:
      summary text
    • setSummary

      public void setSummary(String translatedSummary, boolean error)
      Set summary text
      Parameters:
      translatedSummary - translated summary text
      error - true if this is error
    • addSummary

      public void addSummary(String additionalSummary)
      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

      public String getLogInfo(boolean html)
      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

      public String 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

      public String getClassName()
      Get process class name
      Returns:
      process class name or null
    • setClassName

      public void setClassName(String ClassName)
      Set process class name
      Parameters:
      ClassName - process class name
    • getTransientObject

      public Object getTransientObject()
      Get TransientObject for process
      Returns:
      Object
    • setTransientObject

      public void setTransientObject(Object TransientObject)
      Set Transient Object for process
      Parameters:
      TransientObject -
    • getSerializableObject

      public Serializable getSerializableObject()
      Get Serializable Object for process
      Returns:
      Serializable
    • setSerializableObject

      public void setSerializableObject(Serializable SerializableObject)
      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

      public String getRecord_UU()
      Get Record_UU
      Returns:
      Record_UU
    • setRecord_UU

      public void setRecord_UU(String Record_UU)
      Set Record_UU
      Parameters:
      Record_UU -
    • getTitle

      public String getTitle()
      Get Process Title
      Returns:
      process title
    • setTitle

      public void setTitle(String Title)
      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

      public Integer 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

      public Integer getAD_User_ID()
      Get AD_User_ID
      Returns:
      AD_User_ID
    • getParameter

      public ProcessInfoParameter[] getParameter()
      Get Process Info Parameter
      Returns:
      Process Info Parameter Array
    • setParameter

      public void setParameter(ProcessInfoParameter[] parameter)
      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

      public void addLog(int Log_ID, int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
      Add Log
      Parameters:
      Log_ID - Log ID
      P_ID - Process ID
      P_Date - Process Date
      P_Number - Process Number
      P_Msg - Process Message
    • addLog

      public void addLog(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
      Add Log
      Parameters:
      P_ID - Process ID
      P_Date - Process Date
      P_Number - Process Number
      P_Msg - Process Message
    • addLog

      public void addLog(ProcessInfoLog logEntry)
      Add Log
      Parameters:
      logEntry - log entry
    • getLogs

      public ProcessInfoLog[] getLogs()
      Get Logs
      Returns:
      ProcessInfoLog[]
    • saveStatus

      public String saveStatus(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
      Save Status Log to DB immediately
      Parameters:
      P_ID - Process ID
      P_Date - Process Date
      P_Number - Process Number
      P_Msg - Process Message
      Returns:
      String AD_PInstance_Log_UU
    • saveProgress

      public String saveProgress(int P_ID, Timestamp P_Date, BigDecimal P_Number, String P_Msg)
      Save Progress Log to DB immediately
      Parameters:
      P_ID - Process ID
      P_Date - Process Date
      P_Number - Process Number
      P_Msg - Process Message
      Returns:
      String AD_PInstance_Log_UU
    • saveLog

      public String saveLog(ProcessInfoLog logEntry)
      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_UU
      P_ID - Process ID
      P_Date - Process Date
      P_Number - Process Number
      P_Msg - Process Message
      Returns:
      true if log is successfully updated
    • updateLog

      public boolean updateLog(ProcessInfoLog logEntry)
      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

      public ArrayList<ProcessInfoLog> getLogList()
      Get process logs
      Returns:
      process logs
    • setLogList

      public void setLogList(ArrayList<ProcessInfoLog> logs)
      Set process logs
      Parameters:
      logs -
    • getTransactionName

      public String getTransactionName()
      Get transaction name for this process
      Returns:
      String
    • getAD_Process_UU

      public String getAD_Process_UU()
      Get AD_Process_UU
      Returns:
      AD_Process_UU
    • setAD_Process_UU

      public void setAD_Process_UU(String AD_Process_UU)
      Set AD_Process_UU
      Parameters:
      AD_Process_UU -
    • setTransactionName

      public void setTransactionName(String trxName)
      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

      public void setPDFReport(File f)
      Set PDF report file generated
      Parameters:
      f - PDF File
    • getPDFReport

      public 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

      public String getExportFileExtension()
      Get Export File Extension
      Returns:
      export file extension
    • setExportFileExtension

      public void setExportFileExtension(String exportFileExtension)
      Set Export File Extension
      Parameters:
      exportFileExtension -
    • getExportFile

      public File getExportFile()
      Get Export File
      Returns:
    • setExportFile

      public void setExportFile(File exportFile)
      Set Export File
      Parameters:
      exportFile -
    • getRecord_IDs

      public List<Integer> getRecord_IDs()
      Get record ids
      Returns:
      record ids
    • setRecord_IDs

      public void setRecord_IDs(List<Integer> Record_IDs)
      Set record ids
      Parameters:
      Record_IDs -
    • getRecord_UUs

      public List<String> getRecord_UUs()
      Get record uuids
      Returns:
      record uuids
    • setRecord_UUs

      public void setRecord_UUs(List<String> Record_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

      public void setPO(PO po)
      Set PO
      Parameters:
      po -
    • getPO

      public PO getPO()
      Get PO
      Returns:
      PO
    • getPDFFileName

      public String getPDFFileName()
      Get PDF file name
      Returns:
      PDF file name
    • setPDFFileName

      public void setPDFFileName(String fileName)
      Set PDF file name
      Parameters:
      fileName -
    • isProcessRunning

      public boolean isProcessRunning(MPInstancePara[] params)
      Validates to inform a user running again a process that is already in execution.
      Returns:
      true if the same process is already running
    • setProcessUI

      public void setProcessUI(IProcessUI processUI)
      Set UI interface for process
      Parameters:
      processUI -
    • getProcessUI

      public IProcessUI 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

      public Serializable 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

      public void setInternalReportObject(Serializable reportObject)
      Set internal report object (for e.g JasperPrint)
      Parameters:
      reportObject -