Project

General

Profile

Download (1.59 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.taxeditor.store.model;
11

    
12
import java.util.Vector;
13

    
14
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent;
15
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
16

    
17
/**
18
 * Exchangeable algorithm defining what should happen after a client receives a notification
19
 * that data was changed
20
 * 
21
 * @author n.hoffmann
22
 * @created 01.04.2009
23
 * @version 1.0
24
 */
25
public interface IDataChangeBehavior {
26

    
27
	/**
28
	 * If a DataChangeEvent was considered relevant for the calling object
29
	 * the instructions implemented in this method will get executed
30
	 */
31
	public void reactOnDataChange(CdmDataChangeMap changeEvents);
32
	
33
	/**
34
	 * Define what should happen when an insert occurs. Clients may do 
35
	 * further checking to see if the insert really affects their data 
36
	 * 
37
	 * @param source
38
	 */
39
	public void reactOnInsert(Vector<CdmDataChangeEvent> events);
40
	
41
	/**
42
	 * Define what should happen when an update occurs. Clients may do 
43
	 * further checking to see if the update really affects their data 
44
	 * 
45
	 * @param source
46
	 */
47
	public void reactOnUpdate(Vector<CdmDataChangeEvent> events);
48
	
49
	/**
50
	 * Define what should happen when an delete occurs. Clients may do 
51
	 * further checking to see if the delete really affects their data 
52
	 * 
53
	 * @param source
54
	 */
55
	public void reactOnDelete(Vector<CdmDataChangeEvent> events);
56

    
57
	
58
	
59
}
(5-5/18)