Class AbstractTopiaListenableSupport
java.lang.Object
org.nuiton.topia.persistence.internal.support.AbstractTopiaListenableSupport
- All Implemented Interfaces:
TopiaListenableSupport
- Direct Known Subclasses:
TopiaFiresSupport
public abstract class AbstractTopiaListenableSupport
extends Object
implements TopiaListenableSupport
- Author:
- Arnaud Thimel (Code Lutin)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.nuiton.util.ListenerSet<TopiaEntitiesVetoable>Listeners on list of entities eventsprotected org.nuiton.util.CategorisedListenerSet<TopiaEntityListener>Listeners on entity eventsprotected org.nuiton.util.CategorisedListenerSet<TopiaEntityVetoable>Listeners on entity events that can prevent thingsprotected Set<PropertyChangeListener>Listeners on entity's properties eventsprotected org.nuiton.util.ListenerSet<TopiaSchemaListener>Listeners on schema eventsprotected Map<TopiaEntity,EntityState> Map to collect entities modifications during the current transactionprotected org.nuiton.util.ListenerSet<TopiaTransactionListener>Listeners on transaction eventsprotected org.nuiton.util.ListenerSet<TopiaTransactionVetoable>Listeners on transaction events that can prevent things -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRegister to the context a PropertyChangeListener about some entity's property change.voidRegister to the context a TopiaEntitiesVetoable about any TopiaEntity.voidaddTopiaEntityListener(Class<? extends TopiaEntity> entityClass, TopiaEntityListener listener) Register to the context a TopiaEntityListener about the given entity class.voidaddTopiaEntityListener(TopiaEntityListener listener) Register to the context a TopiaEntityListener about any TopiaEntity.voidaddTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass, TopiaEntityVetoable vetoable) Register to the context a TopiaEntityVetoable about the given entity class.voidaddTopiaEntityVetoable(TopiaEntityVetoable vetoable) Register to the context a TopiaEntityVetoable about any TopiaEntity.voidaddTopiaSchemaListener(TopiaSchemaListener listener) Register to the context a TopiaSchemaListener about any schema modification.voidRegister to the context a TopiaTransactionListener about the transaction.voidRegister to the context a TopiaTransactionVetoable about the transaction.voidUnregister the given PropertyChangeListener about some entity's property change from the contextvoidUnregister the given TopiaEntitiesVetoable about any TopiaEntity from the contextvoidremoveTopiaEntityListener(Class<? extends TopiaEntity> entityClass, TopiaEntityListener listener) Unregister the given TopiaEntityListener about the given entity class from the contextvoidremoveTopiaEntityListener(TopiaEntityListener listener) Unregister the given TopiaEntityListener about any TopiaEntity from the contextvoidremoveTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass, TopiaEntityVetoable vetoable) Unregister the given TopiaEntityVetoable about the given entity class from the contextvoidremoveTopiaEntityVetoable(TopiaEntityVetoable vetoable) Unregister the given TopiaEntityVetoable about any TopiaEntity from the contextvoidremoveTopiaSchemaListener(TopiaSchemaListener listener) Unregister the given TopiaSchemaListener about any schema modification from the contextvoidUnregister the given TopiaTransactionListener about the transaction from the contextvoidUnregister the given TopiaTransactionVetoable about the transaction from the context
-
Field Details
-
transactionEntities
Map to collect entities modifications during the current transaction -
propertyChangeListeners
Listeners on entity's properties events -
topiaSchemaListeners
Listeners on schema events -
transactionListeners
Listeners on transaction events -
transactionVetoables
Listeners on transaction events that can prevent things -
entityListeners
Listeners on entity events -
entityVetoables
Listeners on entity events that can prevent things -
entitiesVetoables
Listeners on list of entities events
-
-
Constructor Details
-
AbstractTopiaListenableSupport
public AbstractTopiaListenableSupport()
-
-
Method Details
-
addTopiaEntityListener
Description copied from interface:TopiaListenableSupportRegister to the context a TopiaEntityListener about any TopiaEntity.listenerinstance will be notified AFTER any operation on the entity.- Specified by:
addTopiaEntityListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to register
-
addTopiaEntityListener
public void addTopiaEntityListener(Class<? extends TopiaEntity> entityClass, TopiaEntityListener listener) Description copied from interface:TopiaListenableSupportRegister to the context a TopiaEntityListener about the given entity class.listenerinstance will be notified AFTER any operation on the entity.- Specified by:
addTopiaEntityListenerin interfaceTopiaListenableSupport- Parameters:
entityClass- the TopiaEntity's class to listenlistener- the listener instance to register
-
addTopiaEntityVetoable
Description copied from interface:TopiaListenableSupportRegister to the context a TopiaEntityVetoable about any TopiaEntity.vetoableinstance will be notified BEFORE any operation on the entity.- Specified by:
addTopiaEntityVetoablein interfaceTopiaListenableSupport- Parameters:
vetoable- the vetoable instance to register
-
addTopiaEntityVetoable
public void addTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass, TopiaEntityVetoable vetoable) Description copied from interface:TopiaListenableSupportRegister to the context a TopiaEntityVetoable about the given entity class.vetoableinstance will be notified BEFORE any operation on the entity.- Specified by:
addTopiaEntityVetoablein interfaceTopiaListenableSupport- Parameters:
entityClass- the TopiaEntity's class to listenvetoable- the vetoable instance to register
-
addTopiaTransactionListener
Description copied from interface:TopiaListenableSupportRegister to the context a TopiaTransactionListener about the transaction.listenerinstance will be notified AFTER any operation on the transaction.- Specified by:
addTopiaTransactionListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to register
-
addTopiaTransactionVetoable
Description copied from interface:TopiaListenableSupportRegister to the context a TopiaTransactionVetoable about the transaction.vetoableinstance will be notified BEFORE any operation on the transaction.- Specified by:
addTopiaTransactionVetoablein interfaceTopiaListenableSupport- Parameters:
vetoable- the vetoable instance to register
-
addPropertyChangeListener
Description copied from interface:TopiaListenableSupportRegister to the context a PropertyChangeListener about some entity's property change.listenerinstance will be notified AFTER any change on the entity's property- Specified by:
addPropertyChangeListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to register
-
addTopiaSchemaListener
Description copied from interface:TopiaListenableSupportRegister to the context a TopiaSchemaListener about any schema modification.listenerinstance will be notified BEFORE and AFTER any change on the schema- Specified by:
addTopiaSchemaListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to register
-
addTopiaEntitiesVetoable
Description copied from interface:TopiaListenableSupportRegister to the context a TopiaEntitiesVetoable about any TopiaEntity.vetoableinstance will be notified BEFORE any entity load- Specified by:
addTopiaEntitiesVetoablein interfaceTopiaListenableSupport- Parameters:
vetoable- the vetoable instance to register
-
removeTopiaEntityListener
Description copied from interface:TopiaListenableSupportUnregister the given TopiaEntityListener about any TopiaEntity from the context- Specified by:
removeTopiaEntityListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to unregister
-
removeTopiaEntityListener
public void removeTopiaEntityListener(Class<? extends TopiaEntity> entityClass, TopiaEntityListener listener) Description copied from interface:TopiaListenableSupportUnregister the given TopiaEntityListener about the given entity class from the context- Specified by:
removeTopiaEntityListenerin interfaceTopiaListenableSupport- Parameters:
entityClass- the listened TopiaEntity's classlistener- the listener instance to unregister
-
removeTopiaEntityVetoable
Description copied from interface:TopiaListenableSupportUnregister the given TopiaEntityVetoable about any TopiaEntity from the context- Specified by:
removeTopiaEntityVetoablein interfaceTopiaListenableSupport- Parameters:
vetoable- the vetoable instance to unregister
-
removeTopiaEntityVetoable
public void removeTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass, TopiaEntityVetoable vetoable) Description copied from interface:TopiaListenableSupportUnregister the given TopiaEntityVetoable about the given entity class from the context- Specified by:
removeTopiaEntityVetoablein interfaceTopiaListenableSupport- Parameters:
entityClass- the listened TopiaEntity's classvetoable- the vetoable instance to unregister
-
removeTopiaTransactionListener
Description copied from interface:TopiaListenableSupportUnregister the given TopiaTransactionListener about the transaction from the context- Specified by:
removeTopiaTransactionListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to unregister
-
removeTopiaTransactionVetoable
Description copied from interface:TopiaListenableSupportUnregister the given TopiaTransactionVetoable about the transaction from the context- Specified by:
removeTopiaTransactionVetoablein interfaceTopiaListenableSupport- Parameters:
vetoable- the vetoable instance to unregister
-
removePropertyChangeListener
Description copied from interface:TopiaListenableSupportUnregister the given PropertyChangeListener about some entity's property change from the context- Specified by:
removePropertyChangeListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to unregister
-
removeTopiaSchemaListener
Description copied from interface:TopiaListenableSupportUnregister the given TopiaSchemaListener about any schema modification from the context- Specified by:
removeTopiaSchemaListenerin interfaceTopiaListenableSupport- Parameters:
listener- the listener instance to unregister
-
removeTopiaEntitiesVetoable
Description copied from interface:TopiaListenableSupportUnregister the given TopiaEntitiesVetoable about any TopiaEntity from the context- Specified by:
removeTopiaEntitiesVetoablein interfaceTopiaListenableSupport- Parameters:
vetoable- the vetoable instance to unregister
-