1 /* 2 wsmo4j extension - a Choreography API and Reference Implementation 3 4 Copyright (c) 2005, University of Innsbruck, Austria 5 6 This library is free software; you can redistribute it and/or modify it under 7 the terms of the GNU Lesser General Public License as published by the Free 8 Software Foundation; either version 2.1 of the License, or (at your option) 9 any later version. 10 This library is distributed in the hope that it will be useful, but WITHOUT 11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 13 details. 14 You should have received a copy of the GNU Lesser General Public License along 15 with this library; if not, write to the Free Software Foundation, Inc., 16 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 package org.wsmo.service.rule; 20 21 /** 22 * An update may have two forms: - update(oldFact => newFact). - 23 * update(newFact). In the first form, the oldFact object must be defined. In 24 * the second form, this must not be defined. 25 * 26 * <pre> 27 * Created on Jul 26, 2005 28 * Committed by $Author: vassil_momtchev $ 29 * $Source$ 30 * </pre> 31 * 32 * @author James Scicluna 33 * @author Thomas Haselwanter 34 * @author Holger Lausen 35 * 36 * @version $Revision: 1844 $ $Date: 2006-10-24 17:11:48 +0300 (Tue, 24 Oct 2006) $ 37 */ 38 public interface Update extends UpdateRule { 39 40 /** 41 * Returns the new fact defined by the update rule. 42 * 43 * @return A CompoundFact object representing the new fact to be added to 44 * the knowledge base 45 */ 46 public CompoundFact getNewFact(); 47 48 /** 49 * Sets the new fact associated with the update rule. 50 * 51 * @param newFact 52 * A CompoundFact object representing the new fact to be added to 53 * the knowledge base 54 */ 55 public void setNewFact(CompoundFact newFact); 56 57 /** 58 * Returns the old fact defined by the update rule. 59 * 60 * @return A CompoundFact object representing the old fact to be deleted 61 * from the knowledge base 62 */ 63 public CompoundFact getOldFact(); 64 65 /** 66 * Sets the old fact associated with the update rule. 67 * 68 * @param oldFact 69 * A CompoundFact object representing the old fact to be deleted 70 * from the knowledge base 71 */ 72 public void setOldFact(CompoundFact oldFact); 73 } 74 75 /* 76 * $Log$ 77 * Revision 1.1 2006/10/24 14:11:48 vassil_momtchev 78 * choreography/orchestration rules refactored. different types where appropriate now supported 79 * 80 * Revision 1.6 2006/01/31 10:22:08 vassil_momtchev 81 * Update is composed by 2 CompoundFacts the new facts, and the facts to be deleted; log footer added 82 * 83 */