Adempiere 3.5.2a

org.compiere.model
Class CalloutEngine

java.lang.Object
  extended by org.compiere.model.CalloutEngine
All Implemented Interfaces:
Callout
Direct Known Subclasses:
CalloutAssignment, CalloutBankStatement, CalloutBOM, CalloutBPartnerLocation, CalloutCashJournal, CalloutClient, CalloutCostCollector, CalloutDistributionOrder, CalloutFA, CalloutGLJournal, CalloutInOut, CalloutInventory, CalloutInvoice, CalloutInvoiceBatch, CalloutMovement, CalloutMRP, CalloutOrder, CalloutOrder, CalloutPayment, CalloutPaymentAllocate, CalloutPayroll, CalloutPaySelection, CalloutProductCategory, CalloutProduction, CalloutProfile, CalloutProject, CalloutRequest, CalloutRequisition, CalloutRMA, CalloutTemplate, CalloutTimeExpense, CalloutUser

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

Field Summary
protected  CLogger log
          Logger
static String NO_ERROR
          No error return value.
 
Constructor Summary
CalloutEngine()
          Constructor
 
Method Summary
 String convert(String methodName, 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.rate
protected static void setCalloutActive(boolean active)
          Deprecated.  
 String start(Properties ctx, String methodName, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue)
          Start Callout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

Constructor Detail

CalloutEngine

public CalloutEngine()
Constructor

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!

Specified by:
start in interface Callout
Parameters:
ctx - Context
methodName - Method name
WindowNo - current Window No
mTab - Model Tab
mField - Model Field
value - The new value
oldValue - The old value
Returns:
Error message or ""

convert

public String convert(String methodName,
                      String value)
Conversion Rules. Convert a String

Specified by:
convert in interface Callout
Parameters:
methodName - method name
value - the value
Returns:
converted String or Null if no method found

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. Deprecated 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 - context
WindowNo - window no
mTab - tab
mField - field
value - 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 - context
WindowNo - window no
mTab - tab
mField - field
value - value
Returns:
null or error message

getGridTab

public GridTab getGridTab()
Returns:
gridTab

getGridField

public GridField getGridField()
Returns:
gridField

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.