1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.api.validation;
|
11
|
|
12
|
import org.apache.log4j.Logger;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
|
15
|
import eu.etaxonomy.cdm.model.common.ICdmBase;
|
16
|
import eu.etaxonomy.cdm.model.validation.CRUDEventType;
|
17
|
import eu.etaxonomy.cdm.persistence.dao.validation.IEntityValidationCrud;
|
18
|
import eu.etaxonomy.cdm.persistence.hibernate.Level3ValidationEventListener;
|
19
|
import eu.etaxonomy.cdm.persistence.validation.EntityValidationTaskBase;
|
20
|
|
21
|
@SuppressWarnings("serial")
|
22
|
class Level3TransactionalValidationEventListener extends Level3ValidationEventListener{
|
23
|
|
24
|
@SuppressWarnings("unused")
|
25
|
private static final Logger logger = Logger.getLogger(Level3TransactionalValidationEventListener.class);
|
26
|
|
27
|
private final ICdmApplicationConfiguration repository;
|
28
|
|
29
|
public Level3TransactionalValidationEventListener(ICdmApplicationConfiguration repository, IEntityValidationCrud dao){
|
30
|
super(dao);
|
31
|
this.repository = repository;
|
32
|
}
|
33
|
|
34
|
|
35
|
@Override
|
36
|
protected EntityValidationTaskBase createValidationTask(ICdmBase entity, CRUDEventType trigger) {
|
37
|
return new Level3TransactionalValidationTask(entity, trigger, getDao(), repository);
|
38
|
}
|
39
|
|
40
|
}
|