Project

General

Profile

Download (1.77 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.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
	 * @param changeEvents a {@link eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap} object.
32
	 */
33
	public void reactOnDataChange(CdmDataChangeMap changeEvents);
34
	
35
	/**
36
	 * Define what should happen when an insert occurs. Clients may do
37
	 * further checking to see if the insert really affects their data
38
	 *
39
	 * @param events a {@link java.util.Vector} object.
40
	 */
41
	public void reactOnInsert(Vector<CdmDataChangeEvent> events);
42
	
43
	/**
44
	 * Define what should happen when an update occurs. Clients may do
45
	 * further checking to see if the update really affects their data
46
	 *
47
	 * @param events a {@link java.util.Vector} object.
48
	 */
49
	public void reactOnUpdate(Vector<CdmDataChangeEvent> events);
50
	
51
	/**
52
	 * Define what should happen when an delete occurs. Clients may do
53
	 * further checking to see if the delete really affects their data
54
	 *
55
	 * @param events a {@link java.util.Vector} object.
56
	 */
57
	public void reactOnDelete(Vector<CdmDataChangeEvent> events);
58

    
59
	
60
	
61
}
(20-20/41)