1 /****************************************************************************** 2 * The contents of this file are subject to the Compiere License Version 1.1 3 * ("License"); You may not use this file except in compliance with the License 4 * You may obtain a copy of the License at http://www.compiere.org/license.html 5 * Software distributed under the License is distributed on an "AS IS" basis, 6 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 7 * the specific language governing rights and limitations under the License. 8 * The Original Code is Compiere ERP & CRM Business Solution 9 * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc. 10 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts 11 * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved. 12 * Contributor(s): ______________________________________. 13 *****************************************************************************/ 14 package org.compiere.model; 15 16 import java.util.*; 17 18 /** 19 * Callout Interface for Callout. 20 * Used in MTab and ImpFormatRow 21 * 22 * @author Jorg Janke 23 * @version $Id: Callout.java,v 1.3 2002/08/12 01:55:12 danb Exp $ 24 */ 25 public interface Callout 26 { 27 /** 28 * Start Callout. 29 * <p> 30 * Callout's are used for cross field validation and setting values in other fields 31 * when returning a non empty (error message) string, an exception is raised 32 * <p> 33 * When invoked, the Tab model has the new value! 34 * 35 * @param ctx Context 36 * @param method Method name 37 * @param WindowNo current Window No 38 * @param mTab Model Tab 39 * @param mField Model Field 40 * @param value The new value 41 * @param oldValue The old value 42 * @return Error message or "" 43 */ 44 public String start (Properties ctx, String method, int WindowNo, 45 MTab mTab, MField mField, Object value, Object oldValue); 46 47 /** 48 * Conversion Rules. 49 * Convert a String 50 * 51 * @param method in notation User_Function 52 * @param value the value 53 * @return converted String or Null if no method found 54 */ 55 public String convert (String method, String value); 56 57 } // callout 58