public abstract class AbstractTopiaApplicationContext<K extends TopiaPersistenceContext> extends Object implements TopiaListenableSupport, TopiaServiceSupport
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected com.google.common.collect.ImmutableMap<String,String> |
configuration |
protected HibernateProvider |
hibernateProvider |
protected Set<TopiaPersistenceContext> |
persistenceContexts |
protected TopiaHibernateSessionRegistry |
sessionRegistry |
protected TopiaFiresSupport |
topiaFiresSupport |
protected TopiaIdFactory |
topiaIdFactory |
protected TopiaServiceSupport |
topiaServiceSupport |
| Constructor and Description |
|---|
AbstractTopiaApplicationContext(Map<String,String> configuration) |
AbstractTopiaApplicationContext(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Register to the context a PropertyChangeListener about some entity's
property change.
|
void |
addTopiaEntitiesVetoable(TopiaEntitiesVetoable vetoable)
Register to the context a TopiaEntitiesVetoable about any TopiaEntity.
|
void |
addTopiaEntityListener(Class<? extends TopiaEntity> entityClass,
TopiaEntityListener listener)
Register to the context a TopiaEntityListener about the given entity
class.
|
void |
addTopiaEntityListener(TopiaEntityListener listener)
Register to the context a TopiaEntityListener about any TopiaEntity.
|
void |
addTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass,
TopiaEntityVetoable vetoable)
Register to the context a TopiaEntityVetoable about the given entity
class.
|
void |
addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
Register to the context a TopiaEntityVetoable about any TopiaEntity.
|
void |
addTopiaSchemaListener(TopiaSchemaListener listener)
Register to the context a TopiaSchemaListener about any schema
modification.
|
void |
addTopiaTransactionListener(TopiaTransactionListener listener)
Register to the context a TopiaTransactionListener about the transaction.
|
void |
addTopiaTransactionVetoable(TopiaTransactionVetoable vetoable)
Register to the context a TopiaTransactionVetoable about the transaction.
|
void |
closeContext() |
void |
createSchema() |
void |
dropSchema() |
com.google.common.collect.ImmutableMap<String,String> |
getConfiguration() |
HibernateProvider |
getHibernateProvider() |
protected abstract Class<? extends TopiaEntity>[] |
getImplementationClasses() |
protected String |
getImplementationClassesAsString() |
List<Class<?>> |
getPersistenceClasses() |
String |
getSchemaName() |
<E extends TopiaService> |
getService(Class<E> interfaceService)
Return the service.
|
Map<String,TopiaService> |
getServices()
The list of registered services.
|
TopiaHibernateSessionRegistry |
getSessionRegistry() |
protected TopiaIdFactory |
getTopiaIdFactory() |
protected TopiaListenableSupport |
getTopiaListenableSupport() |
boolean |
isClosed() |
boolean |
isSchemaEmpty() |
boolean |
isTableExists(Class<?> clazz) |
abstract K |
newPersistenceContext() |
protected void |
registerPersistenceContext(TopiaPersistenceContext persistenceContext) |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Unregister the given PropertyChangeListener about some entity's
property change from the context
|
void |
removeTopiaEntitiesVetoable(TopiaEntitiesVetoable vetoable)
Unregister the given TopiaEntitiesVetoable about any TopiaEntity from the
context
|
void |
removeTopiaEntityListener(Class<? extends TopiaEntity> entityClass,
TopiaEntityListener listener)
Unregister the given TopiaEntityListener about the given entity class
from the context
|
void |
removeTopiaEntityListener(TopiaEntityListener listener)
Unregister the given TopiaEntityListener about any TopiaEntity from the
context
|
void |
removeTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass,
TopiaEntityVetoable vetoable)
Unregister the given TopiaEntityVetoable about the given entity class
from the context
|
void |
removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
Unregister the given TopiaEntityVetoable about any TopiaEntity from the
context
|
void |
removeTopiaSchemaListener(TopiaSchemaListener listener)
Unregister the given TopiaSchemaListener about any schema modification
from the context
|
void |
removeTopiaTransactionListener(TopiaTransactionListener listener)
Unregister the given TopiaTransactionListener about the transaction from
the context
|
void |
removeTopiaTransactionVetoable(TopiaTransactionVetoable vetoable)
Unregister the given TopiaTransactionVetoable about the transaction from
the context
|
<E extends TopiaService> |
serviceEnabled(Class<E> interfaceService)
Return true if specific service is available.
|
void |
showCreateSchema() |
void |
updateSchema() |
protected TopiaIdFactory topiaIdFactory
protected TopiaFiresSupport topiaFiresSupport
protected TopiaServiceSupport topiaServiceSupport
protected HibernateProvider hibernateProvider
protected TopiaHibernateSessionRegistry sessionRegistry
protected boolean closed
protected Set<TopiaPersistenceContext> persistenceContexts
public AbstractTopiaApplicationContext(Properties properties)
public abstract K newPersistenceContext()
protected abstract Class<? extends TopiaEntity>[] getImplementationClasses()
protected String getImplementationClassesAsString()
protected void registerPersistenceContext(TopiaPersistenceContext persistenceContext)
public HibernateProvider getHibernateProvider()
protected TopiaListenableSupport getTopiaListenableSupport()
protected TopiaIdFactory getTopiaIdFactory()
public TopiaHibernateSessionRegistry getSessionRegistry()
public void addTopiaEntityListener(TopiaEntityListener listener)
TopiaListenableSupportlistener instance will be notified AFTER any operation on
the entity.addTopiaEntityListener in interface TopiaListenableSupportlistener - the listener instance to registerpublic void addTopiaEntityListener(Class<? extends TopiaEntity> entityClass, TopiaEntityListener listener)
TopiaListenableSupportlistener instance will be notified AFTER any
operation on the entity.addTopiaEntityListener in interface TopiaListenableSupportentityClass - the TopiaEntity's class to listenlistener - the listener instance to registerpublic void removeTopiaEntityListener(TopiaEntityListener listener)
TopiaListenableSupportremoveTopiaEntityListener in interface TopiaListenableSupportlistener - the listener instance to unregisterpublic void removeTopiaEntityListener(Class<? extends TopiaEntity> entityClass, TopiaEntityListener listener)
TopiaListenableSupportremoveTopiaEntityListener in interface TopiaListenableSupportentityClass - the listened TopiaEntity's classlistener - the listener instance to unregisterpublic void addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
TopiaListenableSupportvetoable instance will be notified BEFORE any operation on
the entity.addTopiaEntityVetoable in interface TopiaListenableSupportvetoable - the vetoable instance to registerpublic void addTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass, TopiaEntityVetoable vetoable)
TopiaListenableSupportvetoable instance will be notified BEFORE any
operation on the entity.addTopiaEntityVetoable in interface TopiaListenableSupportentityClass - the TopiaEntity's class to listenvetoable - the vetoable instance to registerpublic void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
TopiaListenableSupportremoveTopiaEntityVetoable in interface TopiaListenableSupportvetoable - the vetoable instance to unregisterpublic void removeTopiaEntityVetoable(Class<? extends TopiaEntity> entityClass, TopiaEntityVetoable vetoable)
TopiaListenableSupportremoveTopiaEntityVetoable in interface TopiaListenableSupportentityClass - the listened TopiaEntity's classvetoable - the vetoable instance to unregisterpublic void addTopiaEntitiesVetoable(TopiaEntitiesVetoable vetoable)
TopiaListenableSupportvetoable instance will be notified BEFORE any entity loadaddTopiaEntitiesVetoable in interface TopiaListenableSupportvetoable - the vetoable instance to registerpublic void removeTopiaEntitiesVetoable(TopiaEntitiesVetoable vetoable)
TopiaListenableSupportremoveTopiaEntitiesVetoable in interface TopiaListenableSupportvetoable - the vetoable instance to unregisterpublic void addTopiaTransactionListener(TopiaTransactionListener listener)
TopiaListenableSupportlistener instance will be notified AFTER any operation on
the transaction.addTopiaTransactionListener in interface TopiaListenableSupportlistener - the listener instance to registerpublic void removeTopiaTransactionListener(TopiaTransactionListener listener)
TopiaListenableSupportremoveTopiaTransactionListener in interface TopiaListenableSupportlistener - the listener instance to unregisterpublic void addTopiaTransactionVetoable(TopiaTransactionVetoable vetoable)
TopiaListenableSupportvetoable instance will be notified BEFORE any operation on
the transaction.addTopiaTransactionVetoable in interface TopiaListenableSupportvetoable - the vetoable instance to registerpublic void removeTopiaTransactionVetoable(TopiaTransactionVetoable vetoable)
TopiaListenableSupportremoveTopiaTransactionVetoable in interface TopiaListenableSupportvetoable - the vetoable instance to unregisterpublic void addPropertyChangeListener(PropertyChangeListener listener)
TopiaListenableSupportlistener instance will be notified AFTER
any change on the entity's propertyaddPropertyChangeListener in interface TopiaListenableSupportlistener - the listener instance to registerpublic void removePropertyChangeListener(PropertyChangeListener listener)
TopiaListenableSupportremovePropertyChangeListener in interface TopiaListenableSupportlistener - the listener instance to unregisterpublic void addTopiaSchemaListener(TopiaSchemaListener listener)
TopiaListenableSupportlistener instance will be notified BEFORE and
AFTER any change on the schemaaddTopiaSchemaListener in interface TopiaListenableSupportlistener - the listener instance to registerpublic void removeTopiaSchemaListener(TopiaSchemaListener listener)
TopiaListenableSupportremoveTopiaSchemaListener in interface TopiaListenableSupportlistener - the listener instance to unregisterpublic <E extends TopiaService> boolean serviceEnabled(Class<E> interfaceService)
TopiaServiceSupportserviceEnabled in interface TopiaServiceSupportinterfaceService - fqn of the servicepublic <E extends TopiaService> E getService(Class<E> interfaceService) throws TopiaNotFoundException
TopiaServiceSupportgetService in interface TopiaServiceSupportinterfaceService - class of the serviceTopiaNotFoundException - if service can't be retrievedpublic Map<String,TopiaService> getServices()
TopiaServiceSupportgetServices in interface TopiaServiceSupportpublic boolean isSchemaEmpty()
public boolean isTableExists(Class<?> clazz)
public String getSchemaName()
public void createSchema()
public void showCreateSchema()
public void updateSchema()
public void dropSchema()
public void closeContext()
throws TopiaException
TopiaExceptionpublic boolean isClosed()
Copyright © 2004–2013 CodeLutin. All rights reserved.