diff --git a/modules/core/src/com/haulmont/cuba/core/app/entitylog/LoggedAttributeListener.java b/modules/core/src/com/haulmont/cuba/core/app/entitylog/LoggedAttributeListener.java deleted file mode 100644 index fa015bebef..0000000000 --- a/modules/core/src/com/haulmont/cuba/core/app/entitylog/LoggedAttributeListener.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2008-2015 Haulmont. All rights reserved. - * Use is subject to license terms, see http://www.cuba-platform.com/license for details. - */ - -package com.haulmont.cuba.core.app.entitylog; - -import com.haulmont.cuba.core.listener.AfterDeleteEntityListener; -import com.haulmont.cuba.core.listener.AfterInsertEntityListener; -import com.haulmont.cuba.security.app.EntityLogAPI; -import com.haulmont.cuba.security.entity.LoggedAttribute; - -import javax.annotation.ManagedBean; -import javax.inject.Inject; - -/** - * @author gorelov - * @version $Id$ - */ -@ManagedBean("cuba_LoggedAttributeListener") -public class LoggedAttributeListener implements AfterInsertEntityListener, - AfterDeleteEntityListener { - @Inject - protected EntityLogAPI logAPI; - - @Override - public void onAfterInsert(LoggedAttribute entity) { - logAPI.invalidateCache(); - } - - @Override - public void onAfterDelete(LoggedAttribute entity) { - logAPI.invalidateCache(); - } -} diff --git a/modules/core/src/com/haulmont/cuba/core/app/entitylog/LoggedEntityListener.java b/modules/core/src/com/haulmont/cuba/core/app/entitylog/LoggedEntityListener.java deleted file mode 100644 index 49d024139e..0000000000 --- a/modules/core/src/com/haulmont/cuba/core/app/entitylog/LoggedEntityListener.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2008-2015 Haulmont. All rights reserved. - * Use is subject to license terms, see http://www.cuba-platform.com/license for details. - */ - -package com.haulmont.cuba.core.app.entitylog; - -import com.haulmont.cuba.core.listener.AfterDeleteEntityListener; -import com.haulmont.cuba.core.listener.AfterInsertEntityListener; -import com.haulmont.cuba.core.listener.AfterUpdateEntityListener; -import com.haulmont.cuba.security.app.EntityLogAPI; -import com.haulmont.cuba.security.entity.LoggedEntity; - -import javax.annotation.ManagedBean; -import javax.inject.Inject; - -/** - * @author gorelov - * @version $Id$ - */ -@ManagedBean("cuba_LoggedEntityListener") -public class LoggedEntityListener implements AfterInsertEntityListener, - AfterUpdateEntityListener, AfterDeleteEntityListener { - @Inject - protected EntityLogAPI logAPI; - - @Override - public void onAfterInsert(LoggedEntity entity) { - logAPI.invalidateCache(); - } - - @Override - public void onAfterUpdate(LoggedEntity entity) { - logAPI.invalidateCache(); - } - - @Override - public void onAfterDelete(LoggedEntity entity) { - logAPI.invalidateCache(); - } -} diff --git a/modules/global/src/com/haulmont/cuba/security/entity/LoggedAttribute.java b/modules/global/src/com/haulmont/cuba/security/entity/LoggedAttribute.java index 9ae30b7f70..c271eb3659 100644 --- a/modules/global/src/com/haulmont/cuba/security/entity/LoggedAttribute.java +++ b/modules/global/src/com/haulmont/cuba/security/entity/LoggedAttribute.java @@ -5,7 +5,6 @@ package com.haulmont.cuba.security.entity; import com.haulmont.cuba.core.entity.BaseUuidEntity; -import com.haulmont.cuba.core.entity.annotation.Listeners; import com.haulmont.cuba.core.entity.annotation.SystemLevel; import javax.persistence.*; @@ -19,7 +18,6 @@ import javax.persistence.Entity; */ @Entity(name = "sec$LoggedAttribute") @Table(name = "SEC_LOGGED_ATTR") -@Listeners("cuba_LoggedAttributeListener") @SystemLevel public class LoggedAttribute extends BaseUuidEntity { diff --git a/modules/global/src/com/haulmont/cuba/security/entity/LoggedEntity.java b/modules/global/src/com/haulmont/cuba/security/entity/LoggedEntity.java index 0757dff08f..36c0b5ded4 100644 --- a/modules/global/src/com/haulmont/cuba/security/entity/LoggedEntity.java +++ b/modules/global/src/com/haulmont/cuba/security/entity/LoggedEntity.java @@ -5,12 +5,11 @@ package com.haulmont.cuba.security.entity; import com.haulmont.cuba.core.entity.BaseUuidEntity; +import com.haulmont.cuba.core.entity.annotation.SystemLevel; import javax.persistence.*; import java.util.Set; -import com.haulmont.cuba.core.entity.annotation.Listeners; -import com.haulmont.cuba.core.entity.annotation.SystemLevel; /** * Configuration element of EntityLog bean. @@ -20,7 +19,6 @@ import com.haulmont.cuba.core.entity.annotation.SystemLevel; */ @Entity(name = "sec$LoggedEntity") @Table(name = "SEC_LOGGED_ENTITY") -@Listeners("cuba_LoggedEntityListener") @SystemLevel public class LoggedEntity extends BaseUuidEntity {