Package org.adempiere.model
Class DocActionDelegate<T extends PO & DocAction>
- java.lang.Object
-
- org.adempiere.model.DocActionDelegate<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected CLogger
log
Logger-
Fields inherited from interface org.compiere.process.DocAction
ACTION_Approve, ACTION_Close, ACTION_Complete, ACTION_Invalidate, ACTION_None, ACTION_Post, ACTION_Prepare, ACTION_ReActivate, ACTION_Reject, ACTION_Reverse_Accrual, ACTION_Reverse_Correct, ACTION_Unlock, ACTION_Void, ACTION_WaitComplete, AD_REFERENCE_ID, DOC_COLUMNNAME_AD_User_ID, DOC_COLUMNNAME_C_Currency_ID, DOC_COLUMNNAME_C_DocType_ID, DOC_COLUMNNAME_C_DocTypeTarget_ID, DOC_COLUMNNAME_DateAcct, DOC_COLUMNNAME_DateTrx, DOC_COLUMNNAME_Description, DOC_COLUMNNAME_DocAction, DOC_COLUMNNAME_DocStatus, DOC_COLUMNNAME_DocumentNo, DOC_COLUMNNAME_IsApproved, DOC_COLUMNNAME_Processed, DOC_COLUMNNAME_Processing, DOC_COLUMNNAME_SalesRep_ID, STATUS_Approved, STATUS_Closed, STATUS_Completed, STATUS_Drafted, STATUS_InProgress, STATUS_Invalid, STATUS_NotApproved, STATUS_Reversed, STATUS_Unknown, STATUS_Voided, STATUS_WaitingConfirmation, STATUS_WaitingPayment
-
-
Constructor Summary
Constructors Constructor Description DocActionDelegate(T po)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
approveIt()
Approve Documentboolean
closeIt()
Close DocumentString
completeIt()
Complete DocumentFile
createPDF()
Create PDFint
get_ID()
Get ID of recordCLogger
get_Logger()
Get Loggerint
get_Table_ID()
Get AD_Table_IDString
get_TrxName()
Get Transactionint
getAD_Client_ID()
Get Document Clientint
getAD_Org_ID()
Get Document OrganizationBigDecimal
getApprovalAmt()
Get Document Approval Amountint
getC_Currency_ID()
Get Document CurrencyProperties
getCtx()
Get Contextint
getDoc_User_ID()
Get Document OwnerString
getDocAction()
Get Doc ActionString
getDocStatus()
Get Doc StatusString
getDocumentInfo()
Get Document InfoString
getDocumentNo()
Get Document NoString
getProcessMsg()
Get Process MessageString
getSummary()
Get Summaryboolean
invalidateIt()
Invalidate Documentboolean
isApproved()
Get Approved.String
prepareIt()
Prepare Documentboolean
processIt(String action)
Process documentboolean
reActivateIt()
Re-activateboolean
rejectIt()
Reject Approvalboolean
reverseAccrualIt()
Reverse Accrualboolean
reverseCorrectIt()
Reverse Correctionboolean
save()
Save Documentvoid
saveEx()
Save throwing exceptionvoid
setActionCallable(String docAction, Callable<String> callable)
set callable for docactionvoid
setDocAction(String DocAction)
Set Document Action.void
setDocStatus(String DocStatus)
Set Doc Statusvoid
setIsApproved(boolean IsApproved)
Set Approved.void
setProcessed(boolean Processed)
Set Processed.void
setProcessing(boolean Processing)
Set Processing Now.boolean
unlockIt()
Unlock Document.boolean
voidIt()
Void Document
-
-
-
Field Detail
-
log
protected transient CLogger log
Logger
-
-
Constructor Detail
-
DocActionDelegate
public DocActionDelegate(T po)
-
-
Method Detail
-
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 interfaceDocAction
- Parameters:
DocStatus
- new Status
-
getDocStatus
public String getDocStatus()
Description copied from interface:DocAction
Get Doc Status- Specified by:
getDocStatus
in interfaceDocAction
- Returns:
- Document Status
-
processIt
public boolean processIt(String action)
Description copied from interface:DocAction
Process document
-
unlockIt
public boolean unlockIt()
Description copied from interface:DocAction
Unlock Document.
-
invalidateIt
public boolean invalidateIt()
Description copied from interface:DocAction
Invalidate Document- Specified by:
invalidateIt
in interfaceDocAction
- Returns:
- true if success
-
approveIt
public boolean approveIt()
Description copied from interface:DocAction
Approve Document
-
rejectIt
public boolean rejectIt()
Description copied from interface:DocAction
Reject Approval
-
completeIt
public String completeIt()
Description copied from interface:DocAction
Complete Document- Specified by:
completeIt
in interfaceDocAction
- Returns:
- new status (Complete, In Progress, Invalid, Waiting ..)
-
voidIt
public boolean voidIt()
Description copied from interface:DocAction
Void Document
-
closeIt
public boolean closeIt()
Description copied from interface:DocAction
Close Document
-
reverseCorrectIt
public boolean reverseCorrectIt()
Description copied from interface:DocAction
Reverse Correction- Specified by:
reverseCorrectIt
in interfaceDocAction
- Returns:
- true if success
-
reverseAccrualIt
public boolean reverseAccrualIt()
Description copied from interface:DocAction
Reverse Accrual- Specified by:
reverseAccrualIt
in interfaceDocAction
- Returns:
- true if success
-
reActivateIt
public boolean reActivateIt()
Description copied from interface:DocAction
Re-activate- Specified by:
reActivateIt
in interfaceDocAction
- Returns:
- true if success
-
getSummary
public String getSummary()
Description copied from interface:DocAction
Get Summary- Specified by:
getSummary
in interfaceDocAction
- Returns:
- Summary of Document
-
getDocumentNo
public String getDocumentNo()
Description copied from interface:DocAction
Get Document No- Specified by:
getDocumentNo
in interfaceDocAction
- Returns:
- Document No
-
getDocumentInfo
public String getDocumentInfo()
Description copied from interface:DocAction
Get Document Info- Specified by:
getDocumentInfo
in interfaceDocAction
- Returns:
- Type and Document No
-
getProcessMsg
public String getProcessMsg()
Description copied from interface:DocAction
Get Process Message- Specified by:
getProcessMsg
in interfaceDocAction
- 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 interfaceDocAction
- 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 interfaceDocAction
- Returns:
- C_Currency_ID
-
getApprovalAmt
public BigDecimal getApprovalAmt()
Description copied from interface:DocAction
Get Document Approval Amount- Specified by:
getApprovalAmt
in interfaceDocAction
- Returns:
- amount
-
getAD_Client_ID
public int getAD_Client_ID()
Description copied from interface:DocAction
Get Document Client- Specified by:
getAD_Client_ID
in interfaceDocAction
- 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 interfaceDocAction
- Returns:
- AD_Org_ID
-
getDocAction
public String getDocAction()
Description copied from interface:DocAction
Get Doc Action- Specified by:
getDocAction
in interfaceDocAction
- Returns:
- Document Action
-
save
public boolean save()
Description copied from interface:DocAction
Save Document
-
saveEx
public void saveEx() throws AdempiereException
Description copied from interface:DocAction
Save throwing exception- Specified by:
saveEx
in interfaceDocAction
- Throws:
AdempiereException
- See Also:
DocAction.save()
-
getCtx
public Properties getCtx()
Description copied from interface:DocAction
Get Context
-
get_ID
public int get_ID()
Description copied from interface:DocAction
Get ID of record
-
get_Table_ID
public int get_Table_ID()
Description copied from interface:DocAction
Get AD_Table_ID- Specified by:
get_Table_ID
in interfaceDocAction
- Returns:
- AD_Table_ID
-
get_Logger
public CLogger get_Logger()
Description copied from interface:DocAction
Get Logger- Specified by:
get_Logger
in interfaceDocAction
- Returns:
- logger
-
get_TrxName
public String get_TrxName()
Description copied from interface:DocAction
Get Transaction- Specified by:
get_TrxName
in interfaceDocAction
- 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
-
-