Package org.adempiere.model
Class DocActionDelegate<T extends PO & DocAction>
java.lang.Object
org.adempiere.model.DocActionDelegate<T>
- All Implemented Interfaces:
DocAction
Helper class to simplify the implementation of
DocAction
interface.- Author:
- hengsin
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Approve Documentboolean
closeIt()
Close DocumentComplete DocumentCreate PDFint
get_ID()
Get ID of recordGet Loggerint
Get AD_Table_IDGet Transactionint
Get Document Clientint
Get Document OrganizationGet Document Approval Amountint
Get Document CurrencygetCtx()
Get Contextint
Get Document OwnerGet Doc ActionGet Doc StatusGet Document InfoGet Document NoGet Process Message from last execution of a document actionGet Summaryboolean
Invalidate Documentboolean
Get Approved.Prepare Document for a document actionboolean
Process document with document actionboolean
Re-activate (typically from Complete to In Progress)boolean
rejectIt()
Reject Approvalboolean
Reverse Accrualboolean
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 Details
-
log
Logger
-
-
Constructor Details
-
DocActionDelegate
- Parameters:
po
-
-
-
Method Details
-
setActionCallable
set callable for docaction- Parameters:
docAction
-callable
-
-
setDocStatus
Description copied from interface:DocAction
Set Doc Status- Specified by:
setDocStatus
in interfaceDocAction
- Parameters:
DocStatus
- new Status
-
getDocStatus
Description copied from interface:DocAction
Get Doc Status- Specified by:
getDocStatus
in interfaceDocAction
- Returns:
- Document Status
-
processIt
Description copied from interface:DocAction
Process document with document action -
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
-
prepareIt
Description copied from interface:DocAction
Prepare Document for a document action -
approveIt
public boolean approveIt()Description copied from interface:DocAction
Approve Document -
rejectIt
public boolean rejectIt()Description copied from interface:DocAction
Reject Approval -
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 (typically from Complete to In Progress)- Specified by:
reActivateIt
in interfaceDocAction
- Returns:
- true if success
-
getSummary
Description copied from interface:DocAction
Get Summary- Specified by:
getSummary
in interfaceDocAction
- Returns:
- Summary of Document
-
getDocumentNo
Description copied from interface:DocAction
Get Document No- Specified by:
getDocumentNo
in interfaceDocAction
- Returns:
- Document No
-
getDocumentInfo
Description copied from interface:DocAction
Get Document Info- Specified by:
getDocumentInfo
in interfaceDocAction
- Returns:
- Type and Document No
-
createPDF
Description copied from interface:DocAction
Create PDF -
getProcessMsg
Description copied from interface:DocAction
Get Process Message from last execution of a document action- 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
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
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
Description copied from interface:DocAction
Save throwing exception- Specified by:
saveEx
in interfaceDocAction
- Throws:
AdempiereException
- if save fail- See Also:
-
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
Description copied from interface:DocAction
Get Logger- Specified by:
get_Logger
in interfaceDocAction
- Returns:
- logger
-
get_TrxName
Description copied from interface:DocAction
Get Transaction- Specified by:
get_TrxName
in interfaceDocAction
- Returns:
- trx name
-
setDocAction
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
-