2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.model
;
12 import java
.util
.Vector
;
14 import eu
.etaxonomy
.cdm
.persistence
.hibernate
.CdmDataChangeEvent
;
15 import eu
.etaxonomy
.cdm
.persistence
.hibernate
.CdmDataChangeMap
;
18 * Exchangeable algorithm defining what should happen after a client receives a notification
19 * that data was changed
25 public interface IDataChangeBehavior
{
28 * If a DataChangeEvent was considered relevant for the calling object
29 * the instructions implemented in this method will get executed
31 * @param changeEvents a {@link eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap} object.
33 public void reactOnDataChange(CdmDataChangeMap changeEvents
);
36 * Define what should happen when an insert occurs. Clients may do
37 * further checking to see if the insert really affects their data
39 * @param events a {@link java.util.Vector} object.
41 public void reactOnInsert(Vector
<CdmDataChangeEvent
> events
);
44 * Define what should happen when an update occurs. Clients may do
45 * further checking to see if the update really affects their data
47 * @param events a {@link java.util.Vector} object.
49 public void reactOnUpdate(Vector
<CdmDataChangeEvent
> events
);
52 * Define what should happen when an delete occurs. Clients may do
53 * further checking to see if the delete really affects their data
55 * @param events a {@link java.util.Vector} object.
57 public void reactOnDelete(Vector
<CdmDataChangeEvent
> events
);