X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/6c511765a2f3837ce5933dd8517c3ecc4b0dbba8..235fd63d77c5b44d0252a80e9806f329b4fda8af:/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java index 8a856d27e..cf5dcd983 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java @@ -1,4 +1,3 @@ -// $Id$ /** * Copyright (C) 2015 EDIT * European Distributed Institute of Taxonomy @@ -33,6 +32,7 @@ public abstract class RemotingCdmOperation extends AbstractOperation { private final Object source; private final Action action; private final boolean async; + protected Class entityType; public RemotingCdmOperation(String label, Action action, Object source, boolean async) { super(label); @@ -66,8 +66,13 @@ public abstract class RemotingCdmOperation extends AbstractOperation { protected void fireDataChangeEvent(UpdateResult updateResult) { Set updatedObjects = updateResult.getUpdatedObjects(); - if(updatedObjects != null && !updatedObjects.isEmpty()) { - CdmApplicationState.getCurrentDataChangeService().fireChangeEvent(new CdmChangeEvent(action, updatedObjects, source.getClass()), async); + CdmApplicationState.getCurrentDataChangeService() + .fireChangeEvent(new CdmChangeEvent(action, updatedObjects, source.getClass(), entityType), async); + } + + protected void fireDataChangeEvent(CdmBase cdmBase) { + if(cdmBase != null) { + CdmApplicationState.getCurrentDataChangeService().fireChangeEvent(new CdmChangeEvent(action, cdmBase, source.getClass()), async); } }