blob: 6c1dc045a1d02802a2ca78eeec23e4cbed93fec5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/***************************************************************************
* Copyright (c) 2004 - 2008 Eike Stepper, Germany.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eike Stepper - initial API and implementation
* Simon McDuff - https://bugs.eclipse.org/bugs/show_bug.cgi?id=201266
* Simon McDuff - https://bugs.eclipse.org/bugs/show_bug.cgi?id=233314
**************************************************************************/
package org.eclipse.emf.cdo;
import org.eclipse.emf.cdo.protocol.revision.delta.CDOFeatureDelta;
/**
* TODO Enhance API: Return exceptions instead of letting them be thrown
*
* @author Eike Stepper
*/
public interface CDOTransactionHandler
{
/**
* Called by a <code>CDOTransaction</code> <b>before</b> an object is added. The implementor of this method is
* allowed to throw an unchecked exception that will propagate up to the operation that is about to add the object.
*/
public void addingObject(CDOTransaction transaction, CDOObject object);
/**
* Called by a <code>CDOTransaction</code> <b>before</b> an object is modified. The implementor of this method is
* allowed to throw an unchecked exception that will propagate up to the operation that is about to modify the object.
* <p>
* Note: This method will be called at most once per object until the associated transaction is committed.
*/
public void modifyingObject(CDOTransaction transaction, CDOObject object, CDOFeatureDelta featureDelta);
/**
* Called by a <code>CDOTransaction</code> <b>before</b> it is being committed. The implementor of this method is
* allowed to throw an unchecked exception that will propagate up to the operation that is about to commit the
* transaction.
*/
public void committingTransaction(CDOTransaction transaction);
/**
* Called by a <code>CDOTransaction</code> <b>after</b> it is being rolled back. If the implementor of this method
* throw an exception other listener would not be notify and the exception will be propagated.
*/
public void rollingbackTransaction(CDOTransaction transaction);
}
|