Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*2 3 This software is OSI Certified Open Source Software.4 OSI Certified is a certification mark of the Open Source Initiative.5 6 The license (Mozilla version 1.0) can be read at the MMBase site.7 See http://www.MMBase.org/license8 9 */10 11 package org.mmbase.bridge;12 13 /**14 * A transaction is an environment that allows for the editing of nodes15 * within a 'safe' context. Either all edits in a transaction are comitted, or16 * all fail. A transaction acts as a cloud. All that can be done in a cloud can17 * be done in a transaction.18 * For example a node retrieved using the transaction's getNode method resides19 * in the transaction, if you change or remove the node, you can later roll it20 * back by calling the transaction's cancel method.21 *22 * @author Pierre van Rooden23 * @version $Id: Transaction.java,v 1.5 2006/06/19 14:16:21 nklasens Exp $24 */25 publicinterface Transaction extendsCloud {26 27 /**28 * Commits this transaction. This has no effect if the transaction itself29 * was 'nested' in another transaction. In that case, nothing happens until30 * the 'outer' transaction commits. This routine also removes the31 * transaction as an 'active' transaction (it cannot be opened again).32 *33 * @return <code>true</code> if the commit succeeded, <code>false</code>34 * otherwise35 */36 publicboolean commit();37 38 /**39 * Cancels this transaction. If the transaction itself was 'nested' in40 * another transaction, that 'outer' transaction is also canceled.41 * This routine also removes the transaction (and all outer transactions)42 * as an 'active' transaction (it cannot be opened again).43 */44 publicvoid cancel();45 46 /**47 * @since MMBase-1.848 */49 publicboolean isCommitted();50 51 /**52 * @since MMBase-1.853 */54 publicboolean isCanceled();55 56 57 /**58 * Returns the name of the cloud this transaction uses59 *60 * @return the name of the cloud61 * @since MMBase-1.862 */63 publicString getCloudName();64 65 }66