diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java index 06c8b11a206a85688797809633e4a5f916c4025f..a271ac4cc2a677962d6e57dba29b61bcbfcb8878 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java @@ -23,12 +23,12 @@ import org.hibernate.Transaction; import org.hibernate.type.Type; import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.DynamicPropertiesInterceptor; -import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.EntityVerificationInterceptor; +import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.EntityValidationInterceptor; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ServiceVersionHolder; /** * A wrapper for two interceptors. {@link DynamicPropertiesInterceptor} and - * {@link EntityVerificationInterceptor}. This class only provides implementation for the three + * {@link EntityValidationInterceptor}. This class only provides implementation for the three * methods implemented in both our implementations. Implemetation assumes, that our interceptors * don't change entities when called, and thus always return false from the methods onFlushDirty and * onSave. @@ -41,13 +41,13 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se DynamicPropertiesInterceptor dynamicPropertiesInterceptor; - EntityVerificationInterceptor entityVerificationInterceptor; + EntityValidationInterceptor entityValidationInterceptor; public HibernateInterceptorsWrapper(DynamicPropertiesInterceptor hibernateInterceptor, - EntityVerificationInterceptor entityVerificationInterceptor) + EntityValidationInterceptor entityValidationInterceptor) { this.dynamicPropertiesInterceptor = hibernateInterceptor; - this.entityVerificationInterceptor = entityVerificationInterceptor; + this.entityValidationInterceptor = entityValidationInterceptor; } @Override @@ -56,7 +56,7 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se { dynamicPropertiesInterceptor.onFlushDirty(entity, id, currentState, previousState, propertyNames, types); - entityVerificationInterceptor.onFlushDirty(entity, id, currentState, previousState, + entityValidationInterceptor.onFlushDirty(entity, id, currentState, previousState, propertyNames, types); return false; } @@ -66,7 +66,7 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se Type[] types) { dynamicPropertiesInterceptor.onSave(entity, id, state, propertyNames, types); - entityVerificationInterceptor.onSave(entity, id, state, propertyNames, types); + entityValidationInterceptor.onSave(entity, id, state, propertyNames, types); return false; } @@ -77,10 +77,10 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se dynamicPropertiesInterceptor.afterTransactionCompletion(tx); } - // This method is only overriden in entity verification interceptor + // This method is only overriden in entity validation interceptor @Override public void beforeTransactionCompletion(Transaction tx) { - entityVerificationInterceptor.beforeTransactionCompletion(tx); + entityValidationInterceptor.beforeTransactionCompletion(tx); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityVerificationInterceptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityValidationInterceptor.java similarity index 97% rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityVerificationInterceptor.java rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityValidationInterceptor.java index 3d2ecaa0fe82a43045cc6d844364d61673ae50b0..82fea297b59dfd60abdf5aa4f840a8c61ce256f2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityVerificationInterceptor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityValidationInterceptor.java @@ -45,13 +45,13 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ScriptPE; * * @author Jakub Straszewski */ -public class EntityVerificationInterceptor extends EmptyInterceptor +public class EntityValidationInterceptor extends EmptyInterceptor { private static final long serialVersionUID = ServiceVersionHolder.VERSION; private IDAOFactory daoFactory; - public EntityVerificationInterceptor(IHibernateTransactionManagerCallback callback, + public EntityValidationInterceptor(IHibernateTransactionManagerCallback callback, IDAOFactory daoFactory) { this.callback = callback; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java index 94de1fa7989c6e417943cbb35aaadde8500b0649..aa194994e985755e34ded5590635db1d7c86e9bf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java @@ -33,7 +33,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ServiceVersionHolder; /** * The implementation of {@link HibernateTransactionManager}, that creates a new - * EntityVerificationInterceptor for each hibernate session. + * EntityValidationInterceptor for each hibernate session. * * @author Jakub Straszewski */ @@ -71,11 +71,11 @@ public class OpenBISHibernateTransactionManager extends HibernateTransactionMana @Override public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException { - EntityVerificationInterceptor entityVerificationInterceptor = - new EntityVerificationInterceptor(this, daoFactory); + EntityValidationInterceptor entityValidationInterceptor = + new EntityValidationInterceptor(this, daoFactory); return new HibernateInterceptorsWrapper(dynamicPropertiesInterceptor, - entityVerificationInterceptor); + entityValidationInterceptor); } @Override diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityVerificationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityValidationTest.java similarity index 97% rename from openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityVerificationTest.java rename to openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityValidationTest.java index 447cfb7cd35e494b941f3ec3d193dcc1fc1d2c67..5a6316b331a44a88b7983814059f872c57ada40a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityVerificationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityValidationTest.java @@ -43,13 +43,13 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifi import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier; /** - * Tests that the entity verification scripts are called when creating or updating the entities + * Tests that the entity validation scripts are called when creating or updating the entities * * @author Jakub Straszewski */ // NOTE: we depend on transaction beeing committed as part of this test. @Transactional(propagation = Propagation.NOT_SUPPORTED) -public class EntityVerificationTest extends GenericSystemTestCase +public class EntityValidationTest extends GenericSystemTestCase { // create sample of a type, that has attached script that forbids creation