Class DocActionDelegate<T extends PO & DocAction>

java.lang.Object
org.adempiere.model.DocActionDelegate<T>
All Implemented Interfaces:
DocAction

public class DocActionDelegate<T extends PO & DocAction> extends Object implements DocAction
Helper class to simplify the implementation of DocAction interface.
Author:
hengsin
  • Field Details

    • log

      protected transient CLogger log
      Logger
  • Constructor Details

    • DocActionDelegate

      public DocActionDelegate(T po)
      Parameters:
      po -
  • Method Details

    • setActionCallable

      public void setActionCallable(String docAction, Callable<String> callable)
      set callable for docaction
      Parameters:
      docAction -
      callable -
    • setDocStatus

      public void setDocStatus(String DocStatus)
      Description copied from interface: DocAction
      Set Doc Status
      Specified by:
      setDocStatus in interface DocAction
      Parameters:
      DocStatus - new Status
    • getDocStatus

      public String getDocStatus()
      Description copied from interface: DocAction
      Get Doc Status
      Specified by:
      getDocStatus in interface DocAction
      Returns:
      Document Status
    • processIt

      public boolean processIt(String action)
      Description copied from interface: DocAction
      Process document
      Specified by:
      processIt in interface DocAction
      Parameters:
      action - document action
      Returns:
      true if performed
    • unlockIt

      public boolean unlockIt()
      Description copied from interface: DocAction
      Unlock Document.
      Specified by:
      unlockIt in interface DocAction
      Returns:
      true if success
    • invalidateIt

      public boolean invalidateIt()
      Description copied from interface: DocAction
      Invalidate Document
      Specified by:
      invalidateIt in interface DocAction
      Returns:
      true if success
    • prepareIt

      public String prepareIt()
      Description copied from interface: DocAction
      Prepare Document
      Specified by:
      prepareIt in interface DocAction
      Returns:
      new status (In Progress or Invalid)
    • approveIt

      public boolean approveIt()
      Description copied from interface: DocAction
      Approve Document
      Specified by:
      approveIt in interface DocAction
      Returns:
      true if success
    • rejectIt

      public boolean rejectIt()
      Description copied from interface: DocAction
      Reject Approval
      Specified by:
      rejectIt in interface DocAction
      Returns:
      true if success
    • completeIt

      public String completeIt()
      Description copied from interface: DocAction
      Complete Document
      Specified by:
      completeIt in interface DocAction
      Returns:
      new status (Complete, In Progress, Invalid, Waiting ..)
    • voidIt

      public boolean voidIt()
      Description copied from interface: DocAction
      Void Document
      Specified by:
      voidIt in interface DocAction
      Returns:
      true if success
    • closeIt

      public boolean closeIt()
      Description copied from interface: DocAction
      Close Document
      Specified by:
      closeIt in interface DocAction
      Returns:
      true if success
    • reverseCorrectIt

      public boolean reverseCorrectIt()
      Description copied from interface: DocAction
      Reverse Correction
      Specified by:
      reverseCorrectIt in interface DocAction
      Returns:
      true if success
    • reverseAccrualIt

      public boolean reverseAccrualIt()
      Description copied from interface: DocAction
      Reverse Accrual
      Specified by:
      reverseAccrualIt in interface DocAction
      Returns:
      true if success
    • reActivateIt

      public boolean reActivateIt()
      Description copied from interface: DocAction
      Re-activate
      Specified by:
      reActivateIt in interface DocAction
      Returns:
      true if success
    • getSummary

      public String getSummary()
      Description copied from interface: DocAction
      Get Summary
      Specified by:
      getSummary in interface DocAction
      Returns:
      Summary of Document
    • getDocumentNo

      public String getDocumentNo()
      Description copied from interface: DocAction
      Get Document No
      Specified by:
      getDocumentNo in interface DocAction
      Returns:
      Document No
    • getDocumentInfo

      public String getDocumentInfo()
      Description copied from interface: DocAction
      Get Document Info
      Specified by:
      getDocumentInfo in interface DocAction
      Returns:
      Type and Document No
    • createPDF

      public File createPDF()
      Description copied from interface: DocAction
      Create PDF
      Specified by:
      createPDF in interface DocAction
      Returns:
      file
    • getProcessMsg

      public String getProcessMsg()
      Description copied from interface: DocAction
      Get Process Message
      Specified by:
      getProcessMsg in interface DocAction
      Returns:
      clear text message
    • getDoc_User_ID

      public int getDoc_User_ID()
      Description copied from interface: DocAction
      Get Document Owner
      Specified by:
      getDoc_User_ID in interface DocAction
      Returns:
      AD_User_ID
    • getC_Currency_ID

      public int getC_Currency_ID()
      Description copied from interface: DocAction
      Get Document Currency
      Specified by:
      getC_Currency_ID in interface DocAction
      Returns:
      C_Currency_ID
    • getApprovalAmt

      public BigDecimal getApprovalAmt()
      Description copied from interface: DocAction
      Get Document Approval Amount
      Specified by:
      getApprovalAmt in interface DocAction
      Returns:
      amount
    • getAD_Client_ID

      public int getAD_Client_ID()
      Description copied from interface: DocAction
      Get Document Client
      Specified by:
      getAD_Client_ID in interface DocAction
      Returns:
      AD_Client_ID
    • getAD_Org_ID

      public int getAD_Org_ID()
      Description copied from interface: DocAction
      Get Document Organization
      Specified by:
      getAD_Org_ID in interface DocAction
      Returns:
      AD_Org_ID
    • getDocAction

      public String getDocAction()
      Description copied from interface: DocAction
      Get Doc Action
      Specified by:
      getDocAction in interface DocAction
      Returns:
      Document Action
    • save

      public boolean save()
      Description copied from interface: DocAction
      Save Document
      Specified by:
      save in interface DocAction
      Returns:
      true if saved
    • saveEx

      public void saveEx() throws AdempiereException
      Description copied from interface: DocAction
      Save throwing exception
      Specified by:
      saveEx in interface DocAction
      Throws:
      AdempiereException
      See Also:
    • getCtx

      public Properties getCtx()
      Description copied from interface: DocAction
      Get Context
      Specified by:
      getCtx in interface DocAction
      Returns:
      context
    • get_ID

      public int get_ID()
      Description copied from interface: DocAction
      Get ID of record
      Specified by:
      get_ID in interface DocAction
      Returns:
      ID
    • get_Table_ID

      public int get_Table_ID()
      Description copied from interface: DocAction
      Get AD_Table_ID
      Specified by:
      get_Table_ID in interface DocAction
      Returns:
      AD_Table_ID
    • get_Logger

      public CLogger get_Logger()
      Description copied from interface: DocAction
      Get Logger
      Specified by:
      get_Logger in interface DocAction
      Returns:
      logger
    • get_TrxName

      public String get_TrxName()
      Description copied from interface: DocAction
      Get Transaction
      Specified by:
      get_TrxName in interface DocAction
      Returns:
      trx name
    • setDocAction

      public void setDocAction(String DocAction)
      Set Document Action.
      Parameters:
      DocAction - The targeted status of the document
    • setProcessing

      public void setProcessing(boolean Processing)
      Set Processing Now.
      Parameters:
      Processing - Process Now
    • setProcessed

      public void setProcessed(boolean Processed)
      Set Processed.
      Parameters:
      Processed - The document has been processed
    • isApproved

      public boolean isApproved()
      Get Approved.
      Returns:
      Indicates if this document requires approval
    • setIsApproved

      public void setIsApproved(boolean IsApproved)
      Set Approved.
      Parameters:
      IsApproved - Indicates if this document requires approval