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)
ConfigurationChangedAware
beanConfigurationChanged
in interface ConfigurationChangedAware
changedFields
- collection of field names which were changedpublic void setDataSourceAware(A dataSourceAware)
public void register(Kernel kernel)
RegistrarBean
register
in interface RegistrarBean
kernel
- - instance from local scopepublic void unregister(Kernel kernel)
RegistrarBean
unregister
in interface RegistrarBean
kernel
- - instance from local scopepublic void initialize()
Initializable
initialize
in interface Initializable
public void beforeUnregister()
UnregisterAware
beforeUnregister
in interface UnregisterAware
protected Class<?> getRepositoryClassName() throws DBInitException, ClassNotFoundException
cls
config field.protected String getCls()
@HandleEvent protected void onDataSourceChange(DataSourceBean.DataSourceChangedEvent event)
Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.