Revision 97312e07
Added by Andreas Kohlbecker over 5 years ago
src/main/java/eu/etaxonomy/cdm/addon/config/CdmVaadinConfiguration.java | ||
---|---|---|
49 | 49 |
import eu.etaxonomy.cdm.cache.CdmTransientEntityCacher; |
50 | 50 |
import eu.etaxonomy.cdm.dataInserter.RegistrationRequiredDataInserter; |
51 | 51 |
import eu.etaxonomy.cdm.persistence.hibernate.GrantedAuthorityRevokingRegistrationUpdateLister; |
52 |
import eu.etaxonomy.cdm.persistence.hibernate.TaxonGraphHibernateListener; |
|
52 | 53 |
import eu.etaxonomy.cdm.vaadin.permission.annotation.EnableAnnotationBasedAccessControl; |
53 | 54 |
import eu.etaxonomy.cdm.vaadin.ui.ConceptRelationshipUI; |
54 | 55 |
import eu.etaxonomy.cdm.vaadin.ui.DistributionStatusUI; |
... | ... | |
164 | 165 |
public RegistrationUI registrationUI() { |
165 | 166 |
if(isUIEnabled(RegistrationUI.class)){ |
166 | 167 |
registerRegistrationUiHibernateEventListeners(); |
167 |
|
|
168 | 168 |
return new RegistrationUI(); |
169 | 169 |
} |
170 | 170 |
return null; |
171 | 171 |
} |
172 | 172 |
|
173 |
|
|
174 |
|
|
173 | 175 |
/** |
174 | 176 |
* this is only a quick implementation for testing, |
175 | 177 |
* TODO see also the NOTE on CdmListenerIntegrator class declaration for a prospective better solution |
... | ... | |
178 | 180 |
if(!registrationUiHibernateEventListenersDone){ |
179 | 181 |
EventListenerRegistry listenerRegistry = ((SessionFactoryImpl) sessionFactory).getServiceRegistry().getService( |
180 | 182 |
EventListenerRegistry.class); |
181 |
GrantedAuthorityRevokingRegistrationUpdateLister listener = new GrantedAuthorityRevokingRegistrationUpdateLister(); |
|
182 |
listenerRegistry.appendListeners(EventType.POST_UPDATE, listener); |
|
183 |
|
|
184 |
listenerRegistry.appendListeners(EventType.POST_UPDATE, new GrantedAuthorityRevokingRegistrationUpdateLister()); |
|
185 |
// TODO also POST_DELETE needed for GrantedAuthorityRevokingRegistrationUpdateLister? |
|
186 |
|
|
187 |
listenerRegistry.appendListeners(EventType.POST_UPDATE, new TaxonGraphHibernateListener()); |
|
188 |
listenerRegistry.appendListeners(EventType.POST_INSERT, new TaxonGraphHibernateListener()); |
|
189 |
|
|
183 | 190 |
registrationUiHibernateEventListenersDone = true; |
184 | 191 |
} |
185 | 192 |
} |
... | ... | |
227 | 234 |
return null; |
228 | 235 |
} |
229 | 236 |
|
230 |
|
|
231 |
|
|
232 |
|
|
233 | 237 |
static final String PROPERTIES_FILE_NAME = "vaadin-apps"; |
234 | 238 |
|
235 | 239 |
private Properties appProps = null; |
Also available in: Unified diff
ref #7648 registering TaxonGraphHibernateListener for RefistrationUI