public abstract static class MDRepositoryBean.MDRepositoryConfigBean<A extends DataSourceAware> extends Object implements Initializable, UnregisterAware, ConfigurationChangedAware, RegistrarBean
| Modifier and Type | Field and Description |
|---|---|
protected DataSourceBean |
dataSourceBean |
| Constructor and Description |
|---|
MDRepositoryConfigBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
beanConfigurationChanged(Collection<String> changedFields)
Method called when configuration was applied to bean.
|
void |
beforeUnregister()
Method called before bean unregister.
|
protected String |
getCls() |
protected Class<?> |
getRepositoryClassName()
Method returns class for instance repository matching data source or returning class specified in
cls config field. |
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
protected void |
onDataSourceChange(DataSourceBean.DataSourceChangedEvent event) |
void |
register(Kernel kernel)
Method called when bean is being registered allowing developer to programatically register other beans.
|
void |
setDataSourceAware(A dataSourceAware) |
void |
unregister(Kernel kernel)
Method called while bean is being unregistered.
|
@Inject protected DataSourceBean dataSourceBean
public void beanConfigurationChanged(Collection<String> changedFields)
ConfigurationChangedAwarebeanConfigurationChanged in interface ConfigurationChangedAwarechangedFields - collection of field names which were changedpublic void setDataSourceAware(A dataSourceAware)
public void register(Kernel kernel)
RegistrarBeanregister in interface RegistrarBeankernel - - instance from local scopepublic void unregister(Kernel kernel)
RegistrarBeanunregister in interface RegistrarBeankernel - - instance from local scopepublic void initialize()
Initializableinitialize in interface Initializablepublic void beforeUnregister()
UnregisterAwarebeforeUnregister in interface UnregisterAwareprotected Class<?> getRepositoryClassName() throws DBInitException, ClassNotFoundException
cls config field.protected String getCls()
@HandleEvent protected void onDataSourceChange(DataSourceBean.DataSourceChangedEvent event)
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.