+/**
+* Copyright (C) 2020 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
package eu.etaxonomy.taxeditor.service;
public class CdmServiceInterceptorException extends RuntimeException {
+/**
+* Copyright (C) 2020 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
package eu.etaxonomy.taxeditor.service;
import java.util.HashMap;
/**
* Visualizes an element of type ENTITY in an {@link AbstractEntityCollectionSection}
- * and links listener functionalities to it.
+ * and links listener functionalities to it.
*
- * @param ENTITY the type of the element which is visualized by this class
+ * @param ENTITY the type of the element which is visualized by this class
*
* @author n.hoffmann
* @created Nov 16, 2009
setBackground(selected ? SELECTED : getPersistentBackground());
}
- /** {@inheritDoc} */
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event == null) {
public abstract void handleEvent(Object eventSource);
- /** {@inheritDoc} */
@Override
public void setBackground(Color color) {
if(box.isDisposed() || container.isDisposed()){
}
- /** {@inheritDoc} */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
- /** {@inheritDoc} */
@Override
public Composite getLayoutComposite() {
return container;
"Parent element should be IConversationEnabled");
}
- /** {@inheritDoc} */
@Override
public void update(CdmDataChangeMap changeEvents) {
}
this.selectionElement = selectionElement;\r
}\r
\r
- /** {@inheritDoc} */\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
WizardDialog dialog = new WizardDialog(selectionElement.getShell(),\r
//if the edited entity has already been persisted\r
//but the transient entity is still set in this\r
//EntitySelectionElement, re-load it and set it\r
- IService<T> service = CdmStore.getService(entity);\r
- if(entity.getId()==0){\r
+ if(!entity.isPersited()){\r
+ IService<T> service = CdmStore.getService(entity);\r
T loadedEntity = service.load(entity.getUuid());\r
- if(loadedEntity!=null){\r
+ if(loadedEntity != null){\r
setEntity(loadedEntity);\r
}\r
}\r
}\r
\r
// not used\r
- /** {@inheritDoc} */\r
@Override\r
public void widgetDefaultSelected(SelectionEvent e) {\r
}\r