1
|
/**
|
2
|
* Copyright (C) 2017 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.vaadin.view.name;
|
10
|
|
11
|
import java.util.Arrays;
|
12
|
import java.util.EnumSet;
|
13
|
import java.util.HashMap;
|
14
|
import java.util.HashSet;
|
15
|
import java.util.Map;
|
16
|
import java.util.Set;
|
17
|
import java.util.Stack;
|
18
|
|
19
|
import org.springframework.beans.factory.DisposableBean;
|
20
|
import org.springframework.beans.factory.annotation.Autowired;
|
21
|
import org.springframework.context.annotation.Scope;
|
22
|
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
23
|
import org.vaadin.viritin.fields.AbstractElementCollection;
|
24
|
|
25
|
import com.vaadin.spring.annotation.SpringComponent;
|
26
|
|
27
|
import eu.etaxonomy.cdm.api.service.IRegistrationService;
|
28
|
import eu.etaxonomy.cdm.cache.CdmTransientEntityAndUuidCacher;
|
29
|
import eu.etaxonomy.cdm.model.ICdmEntityUuidCacher;
|
30
|
import eu.etaxonomy.cdm.model.agent.AgentBase;
|
31
|
import eu.etaxonomy.cdm.model.agent.Person;
|
32
|
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
|
33
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
34
|
import eu.etaxonomy.cdm.model.common.TermType;
|
35
|
import eu.etaxonomy.cdm.model.location.Country;
|
36
|
import eu.etaxonomy.cdm.model.name.Registration;
|
37
|
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
|
38
|
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
39
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
40
|
import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
|
41
|
import eu.etaxonomy.cdm.persistence.dao.common.Restriction.Operator;
|
42
|
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
|
43
|
import eu.etaxonomy.cdm.persistence.query.MatchMode;
|
44
|
import eu.etaxonomy.cdm.service.CdmFilterablePagingProvider;
|
45
|
import eu.etaxonomy.cdm.service.CdmFilterablePagingProviderFactory;
|
46
|
import eu.etaxonomy.cdm.service.CdmStore;
|
47
|
import eu.etaxonomy.cdm.service.ISpecimenTypeDesignationWorkingSetService;
|
48
|
import eu.etaxonomy.cdm.service.UserHelperAccess;
|
49
|
import eu.etaxonomy.cdm.service.initstrategies.AgentBaseInit;
|
50
|
import eu.etaxonomy.cdm.vaadin.component.CdmBeanItemContainerFactory;
|
51
|
import eu.etaxonomy.cdm.vaadin.component.CollectionRowItemCollection;
|
52
|
import eu.etaxonomy.cdm.vaadin.event.EditorActionContext;
|
53
|
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent;
|
54
|
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEventFilter;
|
55
|
import eu.etaxonomy.cdm.vaadin.event.ToOneRelatedEntityButtonUpdater;
|
56
|
import eu.etaxonomy.cdm.vaadin.event.ToOneRelatedEntityReloader;
|
57
|
import eu.etaxonomy.cdm.vaadin.model.registration.RegistrationTermLists;
|
58
|
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationDTO;
|
59
|
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationWorkingSetDTO;
|
60
|
import eu.etaxonomy.cdm.vaadin.ui.RegistrationUIDefaults;
|
61
|
import eu.etaxonomy.cdm.vaadin.util.CdmTitleCacheCaptionGenerator;
|
62
|
import eu.etaxonomy.cdm.vaadin.util.CollectionCaptionGenerator;
|
63
|
import eu.etaxonomy.cdm.vaadin.view.occurrence.CollectionPopupEditor;
|
64
|
import eu.etaxonomy.cdm.vaadin.view.reference.ReferencePopupEditor;
|
65
|
import eu.etaxonomy.vaadin.component.ToOneRelatedEntityCombobox;
|
66
|
import eu.etaxonomy.vaadin.mvp.AbstractEditorPresenter;
|
67
|
import eu.etaxonomy.vaadin.mvp.AbstractPopupEditor;
|
68
|
import eu.etaxonomy.vaadin.mvp.AbstractView;
|
69
|
/**
|
70
|
* SpecimenTypeDesignationWorkingsetPopupEditorView implementation must override the showInEditor() method,
|
71
|
* see {@link #prepareAsFieldGroupDataSource()} for details.
|
72
|
*
|
73
|
* @author a.kohlbecker
|
74
|
* @since Jun 13, 2017
|
75
|
*
|
76
|
*/
|
77
|
@SpringComponent
|
78
|
@Scope("prototype")
|
79
|
public class SpecimenTypeDesignationWorkingsetEditorPresenter
|
80
|
extends AbstractEditorPresenter<SpecimenTypeDesignationWorkingSetDTO , SpecimenTypeDesignationWorkingsetPopupEditorView>
|
81
|
implements CachingPresenter, DisposableBean {
|
82
|
|
83
|
private static final long serialVersionUID = 4255636253714476918L;
|
84
|
|
85
|
private static final EnumSet<CRUD> COLLECTION_EDITOR_CRUD = EnumSet.of(CRUD.UPDATE, CRUD.DELETE);
|
86
|
|
87
|
CdmStore<Registration, IRegistrationService> store;
|
88
|
|
89
|
|
90
|
/**
|
91
|
* This object for this field will either be injected by the {@link PopupEditorFactory} or by a Spring
|
92
|
* {@link BeanFactory}
|
93
|
*/
|
94
|
@Autowired
|
95
|
private ISpecimenTypeDesignationWorkingSetService specimenTypeDesignationWorkingSetService;
|
96
|
|
97
|
/**
|
98
|
* if not null, this CRUD set is to be used to create a CdmAuthoritiy for the base entitiy which will be
|
99
|
* granted to the current use as long this grant is not assigned yet.
|
100
|
*/
|
101
|
private EnumSet<CRUD> crud = null;
|
102
|
|
103
|
private ICdmEntityUuidCacher cache;
|
104
|
|
105
|
@Autowired
|
106
|
protected CdmFilterablePagingProviderFactory pagingProviderFactory;
|
107
|
|
108
|
SpecimenTypeDesignationWorkingSetDTO<Registration> workingSetDto;
|
109
|
|
110
|
private Map<CollectionPopupEditor, SpecimenTypeDesignationDTORow> collectionPopupEditorsRowMap = new HashMap<>();
|
111
|
|
112
|
private Map<ReferencePopupEditor, SpecimenTypeDesignationDTORow> referencePopupEditorsRowMap = new HashMap<>();
|
113
|
|
114
|
private Set<CollectionRowItemCollection> popuEditorTypeDesignationSourceRows = new HashSet<>();
|
115
|
|
116
|
private java.util.Collection<CdmBase> rootEntities = new HashSet<>();
|
117
|
|
118
|
protected CdmStore<Registration, IRegistrationService> getStore() {
|
119
|
if(store == null){
|
120
|
store = new CdmStore<>(getRepo(), getRepo().getRegistrationService());
|
121
|
}
|
122
|
return store;
|
123
|
}
|
124
|
|
125
|
/**
|
126
|
* Loads an existing working set from the database. This process actually involves
|
127
|
* loading the Registration specified by the <code>RegistrationAndWorkingsetId.registrationId</code> and in
|
128
|
* a second step to find the workingset by the <code>registrationAndWorkingsetId.workingsetId</code>.
|
129
|
* <p>
|
130
|
* The <code>identifier</code> must be of the type {@link TypeDesignationWorkingsetEditorIdSet} whereas the field <code>egistrationId</code>
|
131
|
* must be present, the field <code>workingsetId</code>, however can be null. I this case a new workingset with a new {@link FieldUnit} as
|
132
|
* base entity is being created.
|
133
|
*
|
134
|
* @param identifier a {@link TypeDesignationWorkingsetEditorIdSet}
|
135
|
*/
|
136
|
@Override
|
137
|
protected SpecimenTypeDesignationWorkingSetDTO<Registration> loadBeanById(Object identifier) {
|
138
|
|
139
|
cache = new CdmTransientEntityAndUuidCacher(this);
|
140
|
if(identifier != null){
|
141
|
|
142
|
TypeDesignationWorkingsetEditorIdSet idset = (TypeDesignationWorkingsetEditorIdSet)identifier;
|
143
|
|
144
|
if(idset.baseEntityRef != null){
|
145
|
workingSetDto = specimenTypeDesignationWorkingSetService.load(idset.registrationUuid, idset.baseEntityRef);
|
146
|
if(workingSetDto.getFieldUnit() == null){
|
147
|
workingSetDto = specimenTypeDesignationWorkingSetService.fixMissingFieldUnit(workingSetDto);
|
148
|
// FIXME open Dialog to warn user about adding an empty fieldUnit to the typeDesignations
|
149
|
// This method must go again into the presenter !!!!
|
150
|
logger.info("Basing all typeDesignations on a new fieldUnit");
|
151
|
}
|
152
|
// need to use load but put see #7214
|
153
|
cache.load(workingSetDto.getOwner());
|
154
|
rootEntities.add(workingSetDto.getOwner());
|
155
|
} else {
|
156
|
// create a new workingset, for a new fieldunit which is the base for the workingset
|
157
|
workingSetDto = specimenTypeDesignationWorkingSetService.create(idset.registrationUuid, idset.publicationUuid, idset.typifiedNameUuid);
|
158
|
// need to use load but put see #7214
|
159
|
cache.load(workingSetDto.getOwner());
|
160
|
cache.load(workingSetDto.getTypifiedName());
|
161
|
rootEntities.add(workingSetDto.getOwner());
|
162
|
}
|
163
|
|
164
|
} else {
|
165
|
workingSetDto = null;
|
166
|
}
|
167
|
|
168
|
return workingSetDto;
|
169
|
}
|
170
|
|
171
|
|
172
|
/**
|
173
|
* {@inheritDoc}
|
174
|
*/
|
175
|
@SuppressWarnings("serial")
|
176
|
@Override
|
177
|
public void handleViewEntered() {
|
178
|
|
179
|
CdmBeanItemContainerFactory selectFactory = new CdmBeanItemContainerFactory(getRepo());
|
180
|
getView().getCountrySelectField().setContainerDataSource(selectFactory.buildBeanItemContainer(Country.uuidCountryVocabulary));
|
181
|
|
182
|
CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> termOrPersonPagingProvider = new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(getRepo().getAgentService(), TeamOrPersonBase.class);
|
183
|
CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider = new CdmFilterablePagingProvider<AgentBase, Person>(getRepo().getAgentService(), Person.class);
|
184
|
termOrPersonPagingProvider.setInitStrategy(AgentBaseInit.TEAM_OR_PERSON_INIT_STRATEGY);
|
185
|
getView().getCollectorField().setFilterablePersonPagingProvider(personPagingProvider, this);
|
186
|
getView().getCollectorField().setFilterableTeamPagingProvider(termOrPersonPagingProvider, this);
|
187
|
|
188
|
getView().getExactLocationField().getReferenceSystemSelect().setContainerDataSource(selectFactory.buildBeanItemContainer(TermType.ReferenceSystem));
|
189
|
getView().getExactLocationField().getReferenceSystemSelect().setItemCaptionPropertyId("label");
|
190
|
|
191
|
getView().getTypeDesignationsCollectionField().addElementRemovedListener(e -> deleteTypeDesignation(e.getElement()));
|
192
|
getView().getTypeDesignationsCollectionField().addElementAddedListener(e -> addTypeDesignation(e.getElement()));
|
193
|
|
194
|
popuEditorTypeDesignationSourceRows.clear();
|
195
|
CdmFilterablePagingProvider<Collection, Collection> collectionPagingProvider = new CdmFilterablePagingProvider<Collection, Collection>(getRepo().getCollectionService());
|
196
|
collectionPagingProvider.getRestrictions().add(new Restriction<>("institute.titleCache", Operator.OR, MatchMode.ANYWHERE, CdmFilterablePagingProvider.QUERY_STRING_PLACEHOLDER));
|
197
|
|
198
|
CdmFilterablePagingProvider<Reference, Reference> referencePagingProvider = pagingProviderFactory.referencePagingProvider();
|
199
|
|
200
|
getView().getTypeDesignationsCollectionField().setEditorInstantiator(new AbstractElementCollection.Instantiator<SpecimenTypeDesignationDTORow>() {
|
201
|
|
202
|
@Override
|
203
|
public SpecimenTypeDesignationDTORow create() {
|
204
|
|
205
|
SpecimenTypeDesignationDTORow row = new SpecimenTypeDesignationDTORow();
|
206
|
|
207
|
row.kindOfUnit.setContainerDataSource(selectFactory.buildTermItemContainer(
|
208
|
RegistrationTermLists.KIND_OF_UNIT_TERM_UUIDS())
|
209
|
);
|
210
|
row.kindOfUnit.setNullSelectionAllowed(false);
|
211
|
|
212
|
row.typeStatus.setContainerDataSource(selectFactory.buildTermItemContainer(
|
213
|
RegistrationTermLists.SPECIMEN_TYPE_DESIGNATION_STATUS_UUIDS())
|
214
|
);
|
215
|
row.typeStatus.setNullSelectionAllowed(false);
|
216
|
|
217
|
|
218
|
row.collection.loadFrom(
|
219
|
collectionPagingProvider,
|
220
|
collectionPagingProvider,
|
221
|
collectionPagingProvider.getPageSize()
|
222
|
);
|
223
|
row.collection.getSelect().setCaptionGenerator(new CollectionCaptionGenerator());
|
224
|
row.collection.setNestedButtonStateUpdater(new ToOneRelatedEntityButtonUpdater<Collection>(row.collection));
|
225
|
row.collection.getSelect().addValueChangeListener(new ToOneRelatedEntityReloader<Collection>(row.collection.getSelect(),
|
226
|
SpecimenTypeDesignationWorkingsetEditorPresenter.this));
|
227
|
row.collection.addClickListenerAddEntity(e -> doCollectionEditorAdd(row));
|
228
|
row.collection.addClickListenerEditEntity(e -> {
|
229
|
if(row.collection.getValue() != null){
|
230
|
doCollectionEditorEdit(row);
|
231
|
}
|
232
|
});
|
233
|
|
234
|
row.mediaSpecimenReference.loadFrom(
|
235
|
referencePagingProvider,
|
236
|
referencePagingProvider,
|
237
|
collectionPagingProvider.getPageSize()
|
238
|
);
|
239
|
|
240
|
row.mediaSpecimenReference.getSelect().setCaptionGenerator(new CdmTitleCacheCaptionGenerator<Reference>());
|
241
|
row.mediaSpecimenReference.getSelect().addValueChangeListener(new ToOneRelatedEntityButtonUpdater<Reference>(row.mediaSpecimenReference));
|
242
|
row.mediaSpecimenReference.getSelect().addValueChangeListener(new ToOneRelatedEntityReloader<Reference>(row.mediaSpecimenReference.getSelect(),
|
243
|
SpecimenTypeDesignationWorkingsetEditorPresenter.this));
|
244
|
row.mediaSpecimenReference.addClickListenerAddEntity(e -> doReferenceEditorAdd(row));
|
245
|
row.mediaSpecimenReference.addClickListenerEditEntity(e -> {
|
246
|
if(row.mediaSpecimenReference.getValue() != null){
|
247
|
doReferenceEditorEdit(row);
|
248
|
}
|
249
|
});
|
250
|
|
251
|
getView().applyDefaultComponentStyle(row.components());
|
252
|
|
253
|
popuEditorTypeDesignationSourceRows.add(row);
|
254
|
|
255
|
return row;
|
256
|
}
|
257
|
|
258
|
});
|
259
|
|
260
|
}
|
261
|
|
262
|
|
263
|
/**
|
264
|
* {@inheritDoc}
|
265
|
*/
|
266
|
@Override
|
267
|
protected void saveBean(SpecimenTypeDesignationWorkingSetDTO dto) {
|
268
|
|
269
|
if(crud != null){
|
270
|
UserHelperAccess.userHelper().createAuthorityForCurrentUser(dto.getFieldUnit(), crud, null);
|
271
|
}
|
272
|
|
273
|
specimenTypeDesignationWorkingSetService.save(dto);
|
274
|
}
|
275
|
|
276
|
/**
|
277
|
* {@inheritDoc}
|
278
|
*/
|
279
|
@Override
|
280
|
protected void deleteBean(SpecimenTypeDesignationWorkingSetDTO bean) {
|
281
|
specimenTypeDesignationWorkingSetService.delete(bean, true);
|
282
|
}
|
283
|
|
284
|
/**
|
285
|
* @param element
|
286
|
* @return
|
287
|
*/
|
288
|
private void addTypeDesignation(SpecimenTypeDesignationDTO element) {
|
289
|
getView().updateAllowDelete();
|
290
|
}
|
291
|
|
292
|
|
293
|
/**
|
294
|
* In this method the SpecimenTypeDesignation is dissociated from the Registration.
|
295
|
* The actual deletion of the SpecimenTypeDesignation and DerivedUnit will take place in {@link #saveBean(SpecimenTypeDesignationWorkingSetDTO)}
|
296
|
*
|
297
|
* TODO once https://dev.e-taxonomy.eu/redmine/issues/7077 is fixed dissociating from the Registration could be removed here
|
298
|
*
|
299
|
* @param e
|
300
|
* @return
|
301
|
*/
|
302
|
private void deleteTypeDesignation(SpecimenTypeDesignationDTO element) {
|
303
|
|
304
|
Registration reg = workingSetDto.getOwner();
|
305
|
SpecimenTypeDesignation std = element.asSpecimenTypeDesignation();
|
306
|
|
307
|
reg.getTypeDesignations().remove(std);
|
308
|
|
309
|
getView().updateAllowDelete();
|
310
|
}
|
311
|
|
312
|
/**
|
313
|
* @param crud
|
314
|
*/
|
315
|
public void setGrantsForCurrentUser(EnumSet<CRUD> crud) {
|
316
|
this.crud = crud;
|
317
|
|
318
|
}
|
319
|
|
320
|
/**
|
321
|
* {@inheritDoc}
|
322
|
*/
|
323
|
@Override
|
324
|
public ICdmEntityUuidCacher getCache() {
|
325
|
return cache;
|
326
|
}
|
327
|
|
328
|
@Override
|
329
|
public void disposeCache() {
|
330
|
cache.dispose();
|
331
|
}
|
332
|
|
333
|
public void doCollectionEditorAdd(SpecimenTypeDesignationDTORow row) {
|
334
|
|
335
|
CollectionPopupEditor collectionPopupEditor = openPopupEditor(CollectionPopupEditor.class, null);
|
336
|
|
337
|
collectionPopupEditor.grantToCurrentUser(COLLECTION_EDITOR_CRUD);
|
338
|
collectionPopupEditor.withDeleteButton(true);
|
339
|
collectionPopupEditor.loadInEditor(null);
|
340
|
|
341
|
collectionPopupEditorsRowMap.put(collectionPopupEditor, row);
|
342
|
}
|
343
|
|
344
|
public void doCollectionEditorEdit(SpecimenTypeDesignationDTORow row) {
|
345
|
|
346
|
CollectionPopupEditor collectionPopupEditor = openPopupEditor(CollectionPopupEditor.class, null);
|
347
|
|
348
|
collectionPopupEditor.grantToCurrentUser(COLLECTION_EDITOR_CRUD);
|
349
|
collectionPopupEditor.withDeleteButton(true);
|
350
|
collectionPopupEditor.loadInEditor(row.collection.getValue().getUuid());
|
351
|
|
352
|
collectionPopupEditorsRowMap.put(collectionPopupEditor, row);
|
353
|
}
|
354
|
|
355
|
|
356
|
@EventBusListenerMethod(filter = EntityChangeEventFilter.OccurrenceCollectionFilter.class)
|
357
|
public void onCollectionEvent(EntityChangeEvent event){
|
358
|
|
359
|
if(event.getSourceView() instanceof AbstractPopupEditor) {
|
360
|
|
361
|
Stack<EditorActionContext> context = ((AbstractPopupEditor) event.getSourceView()).getEditorActionContext();
|
362
|
if(context.size() > 1){
|
363
|
AbstractView<?> parentView = context.get(context.size() - 2).getParentView();
|
364
|
if(getView().equals(parentView)){
|
365
|
Collection newCollection = getRepo().getCollectionService().load(
|
366
|
event.getEntityUuid(), Arrays.asList(new String[]{"$.institute"})
|
367
|
);
|
368
|
cache.load(newCollection);
|
369
|
|
370
|
if(event.isCreatedType()){
|
371
|
SpecimenTypeDesignationDTORow row = collectionPopupEditorsRowMap.get(event.getSourceView());
|
372
|
ToOneRelatedEntityCombobox<Collection> combobox = row.getComponent(ToOneRelatedEntityCombobox.class, 3);
|
373
|
combobox.setValue((Collection) event.getEntity());
|
374
|
}
|
375
|
for( CollectionRowItemCollection row : popuEditorTypeDesignationSourceRows) {
|
376
|
ToOneRelatedEntityCombobox<Collection> combobox = row.getComponent(ToOneRelatedEntityCombobox.class, 3);
|
377
|
combobox.reload();
|
378
|
}
|
379
|
}
|
380
|
}
|
381
|
|
382
|
}
|
383
|
}
|
384
|
|
385
|
public void doReferenceEditorAdd(SpecimenTypeDesignationDTORow row) {
|
386
|
|
387
|
ReferencePopupEditor referencePopupEditor = openPopupEditor(ReferencePopupEditor.class, null);
|
388
|
|
389
|
referencePopupEditor.withReferenceTypes(RegistrationUIDefaults.MEDIA_REFERENCE_TYPES);
|
390
|
referencePopupEditor.grantToCurrentUser(COLLECTION_EDITOR_CRUD);
|
391
|
referencePopupEditor.withDeleteButton(true);
|
392
|
referencePopupEditor.loadInEditor(null);
|
393
|
|
394
|
referencePopupEditorsRowMap.put(referencePopupEditor, row);
|
395
|
}
|
396
|
|
397
|
public void doReferenceEditorEdit(SpecimenTypeDesignationDTORow row) {
|
398
|
|
399
|
ReferencePopupEditor referencePopupEditor = openPopupEditor(ReferencePopupEditor.class, null);
|
400
|
referencePopupEditor.withReferenceTypes(RegistrationUIDefaults.MEDIA_REFERENCE_TYPES);
|
401
|
referencePopupEditor.grantToCurrentUser(COLLECTION_EDITOR_CRUD);
|
402
|
referencePopupEditor.withDeleteButton(true);
|
403
|
referencePopupEditor.loadInEditor(row.mediaSpecimenReference.getValue().getUuid());
|
404
|
|
405
|
referencePopupEditorsRowMap.put(referencePopupEditor, row);
|
406
|
}
|
407
|
|
408
|
@EventBusListenerMethod(filter = EntityChangeEventFilter.ReferenceFilter.class)
|
409
|
public void onReferenceEvent(EntityChangeEvent event){
|
410
|
|
411
|
Reference newRef = getRepo().getReferenceService().load(event.getEntityUuid(), Arrays.asList(new String[]{"$"}));
|
412
|
cache.load(newRef);
|
413
|
|
414
|
if(event.isCreatedType()){
|
415
|
SpecimenTypeDesignationDTORow row = referencePopupEditorsRowMap.get(event.getSourceView());
|
416
|
ToOneRelatedEntityCombobox<Reference> combobox = row.getComponent(ToOneRelatedEntityCombobox.class, 7);
|
417
|
combobox.setValue((Reference) event.getEntity());
|
418
|
|
419
|
} else {
|
420
|
for( CollectionRowItemCollection row : popuEditorTypeDesignationSourceRows) {
|
421
|
ToOneRelatedEntityCombobox<Reference> combobox = row.getComponent(ToOneRelatedEntityCombobox.class, 7);
|
422
|
combobox.reload();
|
423
|
}
|
424
|
}
|
425
|
}
|
426
|
|
427
|
/**
|
428
|
* {@inheritDoc}
|
429
|
*/
|
430
|
@Override
|
431
|
public void addRootEntity(CdmBase entity) {
|
432
|
rootEntities.add(entity);
|
433
|
}
|
434
|
|
435
|
/**
|
436
|
* {@inheritDoc}
|
437
|
*/
|
438
|
@Override
|
439
|
public java.util.Collection<CdmBase> getRootEntities() {
|
440
|
return rootEntities ;
|
441
|
}
|
442
|
|
443
|
/**
|
444
|
* {@inheritDoc}
|
445
|
*/
|
446
|
@Override
|
447
|
public void destroy() throws Exception {
|
448
|
super.destroy();
|
449
|
cache.dispose();
|
450
|
}
|
451
|
|
452
|
}
|