Package org.compiere.model
Class CalloutEngine
- java.lang.Object
-
- org.compiere.model.CalloutEngine
-
- All Implemented Interfaces:
Callout
- Direct Known Subclasses:
Callout_AD_Column
,Callout_AD_Process_Para
,CalloutAddressValidation
,CalloutAssignment
,CalloutBankAcctProcessor
,CalloutBankStatement
,CalloutBOM
,CalloutBPartnerLocation
,CalloutCashJournal
,CalloutClient
,CalloutFillLocator
,CalloutGLJournal
,CalloutImportTemplate
,CalloutInOut
,CalloutInventory
,CalloutInvoice
,CalloutInvoiceBatch
,CalloutMovement
,CalloutOpportunity
,CalloutOrder
,CalloutPackage
,CalloutPayment
,CalloutPaymentAllocate
,CalloutPaySelection
,CalloutProcessCustomization
,CalloutProductCategory
,CalloutProduction
,CalloutProject
,CalloutRequest
,CalloutRequisition
,CalloutRMA
,CalloutShipper
,CalloutShippingProcessor
,CalloutTaxProvider
,CalloutTimeExpense
,CalloutWindowCustomization
,MAssetType.Callout
public class CalloutEngine extends Object implements Callout
Callout Engine.- Version:
- $Id: CalloutEngine.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
- BF [ 2104021 ] CalloutEngine returns null if the exception has null message
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]
additionalArgs
static String
ARG_SEPARATOR
protected CLogger
log
Loggerstatic String
NO_ERROR
No error return value.
-
Constructor Summary
Constructors Constructor Description CalloutEngine()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
checkPeriodOpen(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
Check Account Date is on a opened periodString
convert(String methodAndArgs, String value)
Conversion Rules.String
dateAcct(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
Set Account Date Value.GridField
getGridField()
GridTab
getGridTab()
protected boolean
isCalloutActive()
Is the current callout being called in the middle of another callout doing her works.String
rate(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
Rate - set Multiply Rate from Divide Rate and vice versa org.compiere.model.CalloutEngine.rateprotected static void
setCalloutActive(boolean active)
Deprecated.String
start(Properties ctx, String methodName, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue)
Start Callout.
-
-
-
Field Detail
-
NO_ERROR
public static final String NO_ERROR
No error return value. Use this when you are returning from a callout without error- See Also:
- Constant Field Values
-
log
protected CLogger log
Logger
-
additionalArgs
protected String[] additionalArgs
-
ARG_SEPARATOR
public static final String ARG_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public String start(Properties ctx, String methodName, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue)
Start Callout.Callout's are used for cross field validation and setting values in other fields when returning a non empty (error message) string, an exception is raised
When invoked, the Tab model has the new value!
-
convert
public String convert(String methodAndArgs, String value)
Conversion Rules. Convert a String
-
isCalloutActive
protected boolean isCalloutActive()
Is the current callout being called in the middle of another callout doing her works. Callout can use GridTab.getActiveCalloutInstance() method to find out callout for which field is running.- Returns:
- true if active
-
setCalloutActive
protected static void setCalloutActive(boolean active)
Deprecated.Set Callout (in)active. Depreciated as the implementation is not thread safe and fragile - break other callout if developer forget to call setCalloutActive(false) after calling setCalloutActive(true).- Parameters:
active
- active
-
dateAcct
public String dateAcct(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
Set Account Date Value. org.compiere.model.CalloutEngine.dateAcct- Parameters:
ctx
- contextWindowNo
- window nomTab
- tabmField
- fieldvalue
- value- Returns:
- null or error message
-
checkPeriodOpen
public String checkPeriodOpen(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
Check Account Date is on a opened period- Parameters:
ctx
- contextWindowNo
- window nomTab
- tabmField
- fieldvalue
- value- Returns:
- null or error message
-
rate
public String rate(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
Rate - set Multiply Rate from Divide Rate and vice versa org.compiere.model.CalloutEngine.rate- Parameters:
ctx
- contextWindowNo
- window nomTab
- tabmField
- fieldvalue
- value- Returns:
- null or error message
-
getGridTab
public GridTab getGridTab()
- Returns:
- gridTab
-
getGridField
public GridField getGridField()
- Returns:
- gridField
-
-