merge from trunk
authorCherian Mathew <c.mathew@bgbm.org>
Wed, 12 Feb 2014 09:10:08 +0000 (09:10 +0000)
committerCherian Mathew <c.mathew@bgbm.org>
Wed, 12 Feb 2014 09:10:08 +0000 (09:10 +0000)
1  2 
.gitattributes
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/dataimport/DerivedUnitEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/dataimport/transientServices/TransientCdmRepository.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
eu.etaxonomy.taxeditor.store/src/main/resources/eu/etaxonomy/cdm/editorApplicationContext.xml

diff --cc .gitattributes
index a5dd5c6ff1620890c8de38140ca69ecbedd4030f,e9d2265cc23aafd6488cb4ae22a38add10fd4496..ab8a127d1fe98183266c50adab642188201c2c61
@@@ -1541,9 -1607,12 +1623,13 @@@ eu.etaxonomy.taxeditor.store/src/main/j
  eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java -text
  eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java -text
  eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/reporting/ReportingViewPart.java -text
+ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenSearchComposite.java -text
+ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenSearchController.java -text
  eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java -text
  eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java -text
+ eu.etaxonomy.taxeditor.store/src/main/java/org/eclipse/wb/swt/ResourceManager.java -text
+ eu.etaxonomy.taxeditor.store/src/main/java/org/eclipse/wb/swt/SWTResourceManager.java -text
 +eu.etaxonomy.taxeditor.store/src/main/resources/config.properties -text
  eu.etaxonomy.taxeditor.store/src/main/resources/eu/etaxonomy/cdm/editorApplicationContext.xml -text
  eu.etaxonomy.taxeditor.store/src/main/resources/log4j.properties -text
  eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/NameProtectTitleCacheTest.java -text
index 0000000000000000000000000000000000000000,0fc3a93cb2a289b4129497d9b3ddf6141de8165d..9f227a4f6881b4a59f6af182042d6a84b9c2792e
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,166 +1,168 @@@
 -            TransientCdmRepository repo = new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
+ // $Id$
+ /**
+ * Copyright (C) 2013 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.dataimport;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.net.URISyntaxException;
+ import java.util.Collections;
+ import java.util.List;
+ import org.apache.http.client.ClientProtocolException;
+ import org.apache.log4j.Logger;
+ import org.eclipse.jface.resource.ImageDescriptor;
+ import org.eclipse.ui.IEditorInput;
+ import org.eclipse.ui.IPersistableElement;
++import eu.etaxonomy.cdm.api.application.ICdmApplicationDefaultConfiguration;
+ import eu.etaxonomy.cdm.ext.biocase.BioCaseQuery;
+ import eu.etaxonomy.cdm.ext.biocase.BioCaseQueryServiceWrapper;
+ import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
+ import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
+ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+ import eu.etaxonomy.taxeditor.dataimport.transientServices.TransientCdmRepository;
+ import eu.etaxonomy.taxeditor.store.CdmStore;
+ /**
+  * @author pplitzner
+  * @date 20.09.2013
+  *
+  */
+ public class DerivedUnitEditorInput implements IEditorInput {
+     private static Logger logger = Logger.getLogger(DerivedUnitEditorInput.class);
+     private final BioCaseQuery query;
+     /**
+      * @param results
+      */
+     public DerivedUnitEditorInput(BioCaseQuery query) {
+         this.query = query;
+     }
+     /* (non-Javadoc)
+      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+      */
+     @Override
+     public Object getAdapter(Class adapter) {
+         // TODO Auto-generated method stub
+         return null;
+     }
+     /* (non-Javadoc)
+      * @see org.eclipse.ui.IEditorInput#exists()
+      */
+     @Override
+     public boolean exists() {
+         return false;
+     }
+     /* (non-Javadoc)
+      * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+      */
+     @Override
+     public ImageDescriptor getImageDescriptor() {
+         // TODO Auto-generated method stub
+         return null;
+     }
+     /* (non-Javadoc)
+      * @see org.eclipse.ui.IEditorInput#getName()
+      */
+     @Override
+     public String getName() {
+         return query.toString();
+     }
+     /* (non-Javadoc)
+      * @see org.eclipse.ui.IEditorInput#getPersistable()
+      */
+     @Override
+     public IPersistableElement getPersistable() {
+         return null;
+     }
+     /* (non-Javadoc)
+      * @see org.eclipse.ui.IEditorInput#getToolTipText()
+      */
+     @Override
+     public String getToolTipText() {
+         return query.toString();
+     }
+     /**
+      * @return the results
+      */
+     public List<SpecimenOrObservationBase> getResults() {
+         String errorMessage = "Could not execute query " + query;
+         List<SpecimenOrObservationBase> results = Collections.EMPTY_LIST;
+         try {
+             InputStream resultStream = new BioCaseQueryServiceWrapper().query(query);
+             Abcd206ImportConfigurator configurator = Abcd206ImportConfigurator.NewInstance(resultStream, null, false);
++            TransientCdmRepository repo = 
++                      new TransientCdmRepository((ICdmApplicationDefaultConfiguration)CdmStore.getCurrentApplicationConfiguration());
+             configurator.setCdmAppController(repo);
+             CdmDefaultImport<Abcd206ImportConfigurator> importer = new CdmDefaultImport<Abcd206ImportConfigurator>();
+             importer.invoke(configurator);
+             results = repo.getUnits();
+ //            Abcd206Import abcd206Import = new Abcd206Import();
+ //            Abcd206ImportState state = new Abcd206ImportState(configurator);
+ //            abcd206Import.invoke(state);
+ //            state.countTrees();
+         } catch (ClientProtocolException e) {
+             logger.error(errorMessage, e);
+         } catch (IOException e) {
+             logger.error(errorMessage, e);
+         } catch (URISyntaxException e) {
+             logger.error(errorMessage, e);
+         }
+ //        return new BioCaseQueryServiceWrapper().dummyData();
+         return results;
+     }
+     /* (non-Javadoc)
+      * @see java.lang.Object#hashCode()
+      */
+     @Override
+     public int hashCode() {
+         final int prime = 31;
+         int result = 1;
+         result = prime * result + ((query == null) ? 0 : query.hashCode());
+         return result;
+     }
+     /* (non-Javadoc)
+      * @see java.lang.Object#equals(java.lang.Object)
+      */
+     @Override
+     public boolean equals(Object obj) {
+         if (this == obj) {
+             return true;
+         }
+         if (obj == null) {
+             return false;
+         }
+         if (getClass() != obj.getClass()) {
+             return false;
+         }
+         DerivedUnitEditorInput other = (DerivedUnitEditorInput) obj;
+         if (query == null) {
+             if (other.query != null) {
+                 return false;
+             }
+         } else if (!query.equals(other.query)) {
+             return false;
+         }
+         return true;
+     }
+ }
index 0000000000000000000000000000000000000000,48db0a3c9b12978f4242333001db14cedfc86039..36cc5234578d40859de73acbbcb8b04c6a8ea99c
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,385 +1,386 @@@
 -public class TransientCdmRepository implements ICdmApplicationConfiguration {
+ // $Id$
+ /**
+ * Copyright (C) 2013 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.dataimport.transientServices;
+ import java.util.List;
+ import org.springframework.security.access.PermissionEvaluator;
+ import org.springframework.security.authentication.ProviderManager;
+ import org.springframework.transaction.PlatformTransactionManager;
+ import org.springframework.transaction.TransactionStatus;
+ import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
++import eu.etaxonomy.cdm.api.application.ICdmApplicationDefaultConfiguration;
+ import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+ import eu.etaxonomy.cdm.api.service.IAgentService;
+ import eu.etaxonomy.cdm.api.service.IClassificationService;
+ import eu.etaxonomy.cdm.api.service.ICollectionService;
+ import eu.etaxonomy.cdm.api.service.ICommonService;
+ import eu.etaxonomy.cdm.api.service.IDatabaseService;
+ import eu.etaxonomy.cdm.api.service.IDescriptionService;
+ import eu.etaxonomy.cdm.api.service.IFeatureNodeService;
+ import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
+ import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
+ import eu.etaxonomy.cdm.api.service.IGroupService;
+ import eu.etaxonomy.cdm.api.service.IIdentificationKeyService;
+ import eu.etaxonomy.cdm.api.service.ILocationService;
+ import eu.etaxonomy.cdm.api.service.IMediaService;
+ import eu.etaxonomy.cdm.api.service.INameService;
+ import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+ import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
+ import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
+ import eu.etaxonomy.cdm.api.service.IReferenceService;
+ import eu.etaxonomy.cdm.api.service.IService;
+ import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+ import eu.etaxonomy.cdm.api.service.ITaxonService;
+ import eu.etaxonomy.cdm.api.service.ITermService;
+ import eu.etaxonomy.cdm.api.service.IUserService;
+ import eu.etaxonomy.cdm.api.service.IVocabularyService;
+ import eu.etaxonomy.cdm.api.service.IWorkingSetService;
+ import eu.etaxonomy.cdm.model.common.CdmBase;
+ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+ import eu.etaxonomy.cdm.persistence.hibernate.permission.ICdmPermissionEvaluator;
+ /**
+  * @author pplitzner
+  * @date 26.09.2013
+  *
+  */
 -    private ICdmApplicationConfiguration defaultApplicationConfiguration;
++public class TransientCdmRepository implements ICdmApplicationDefaultConfiguration {
 -    public TransientCdmRepository(ICdmApplicationConfiguration defaultApplicationConfiguration) {
++    private ICdmApplicationDefaultConfiguration defaultApplicationConfiguration;
+     private TransientOccurenceService occurenceService;
+     public List<SpecimenOrObservationBase> getUnits(){
+         return occurenceService.getUnits();
+     }
+     /**
+      * @param defaultApplicationConfiguration
+      */
++    public TransientCdmRepository(ICdmApplicationDefaultConfiguration defaultApplicationConfiguration) {
+         this.defaultApplicationConfiguration = defaultApplicationConfiguration;
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#NewConversation()
+      */
+     @Override
+     public ConversationHolder NewConversation() {
+         return defaultApplicationConfiguration.NewConversation();
+     }
+     /**
+      * @param arg0
+      * @param arg1
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#authenticate(java.lang.String, java.lang.String)
+      */
+     @Override
+     public void authenticate(String arg0, String arg1) {
+         defaultApplicationConfiguration.authenticate(arg0, arg1);
+     }
+     /**
+      * @param arg0
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#commitTransaction(org.springframework.transaction.TransactionStatus)
+      */
+     @Override
+     public void commitTransaction(TransactionStatus arg0) {
+         defaultApplicationConfiguration.commitTransaction(arg0);
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getAgentService()
+      */
+     @Override
+     public IAgentService getAgentService() {
+         return new TransientAgentService(defaultApplicationConfiguration.getAgentService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getAuthenticationManager()
+      */
+     @Override
+     public ProviderManager getAuthenticationManager() {
+         return defaultApplicationConfiguration.getAuthenticationManager();
+     }
+     /**
+      * @param arg0
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getBean(java.lang.String)
+      */
+     @Override
+     public Object getBean(String arg0) {
+         return defaultApplicationConfiguration.getBean(arg0);
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getClassificationService()
+      */
+     @Override
+     public IClassificationService getClassificationService() {
+         return new TransientClassificationService(defaultApplicationConfiguration.getClassificationService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getCollectionService()
+      */
+     @Override
+     public ICollectionService getCollectionService() {
+         return new TransientCollectionService(defaultApplicationConfiguration.getCollectionService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getCommonService()
+      */
+     @Override
+     public ICommonService getCommonService() {
+         return defaultApplicationConfiguration.getCommonService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getDatabaseService()
+      */
+     @Override
+     public IDatabaseService getDatabaseService() {
+         return defaultApplicationConfiguration.getDatabaseService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getDescriptionService()
+      */
+     @Override
+     public IDescriptionService getDescriptionService() {
+         return new TransientDescriptionService(defaultApplicationConfiguration.getDescriptionService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getFeatureNodeService()
+      */
+     @Override
+     public IFeatureNodeService getFeatureNodeService() {
+         return defaultApplicationConfiguration.getFeatureNodeService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getFeatureTreeService()
+      */
+     @Override
+     public IFeatureTreeService getFeatureTreeService() {
+         return defaultApplicationConfiguration.getFeatureTreeService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getGrantedAuthorityService()
+      */
+     @Override
+     public IGrantedAuthorityService getGrantedAuthorityService() {
+         return defaultApplicationConfiguration.getGrantedAuthorityService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getGroupService()
+      */
+     @Override
+     public IGroupService getGroupService() {
+         return defaultApplicationConfiguration.getGroupService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getIdentificationKeyService()
+      */
+     @Override
+     public IIdentificationKeyService getIdentificationKeyService() {
+         return defaultApplicationConfiguration.getIdentificationKeyService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getLocationService()
+      */
+     @Override
+     public ILocationService getLocationService() {
+         return defaultApplicationConfiguration.getLocationService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getMainService()
+      */
+     @Override
+     public IService<CdmBase> getMainService() {
+         return defaultApplicationConfiguration.getMainService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getMediaService()
+      */
+     @Override
+     public IMediaService getMediaService() {
+         return defaultApplicationConfiguration.getMediaService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getNameService()
+      */
+     @Override
+     public INameService getNameService() {
+         return new TransientNameService(defaultApplicationConfiguration.getNameService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getOccurrenceService()
+      */
+     @Override
+     public IOccurrenceService getOccurrenceService() {
+         if(occurenceService==null){
+             occurenceService = new TransientOccurenceService(defaultApplicationConfiguration.getOccurrenceService());
+         }
+         return occurenceService;
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getPermissionEvaluator()
+      */
+     @Override
+     public ICdmPermissionEvaluator getPermissionEvaluator() {
+         return defaultApplicationConfiguration.getPermissionEvaluator();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getPolytomousKeyNodeService()
+      */
+     @Override
+     public IPolytomousKeyNodeService getPolytomousKeyNodeService() {
+         return defaultApplicationConfiguration.getPolytomousKeyNodeService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getPolytomousKeyService()
+      */
+     @Override
+     public IPolytomousKeyService getPolytomousKeyService() {
+         return defaultApplicationConfiguration.getPolytomousKeyService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getReferenceService()
+      */
+     @Override
+     public IReferenceService getReferenceService() {
+         return new TransientReferenceService(defaultApplicationConfiguration.getReferenceService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTaxonNodeService()
+      */
+     @Override
+     public ITaxonNodeService getTaxonNodeService() {
+         return defaultApplicationConfiguration.getTaxonNodeService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTaxonService()
+      */
+     @Override
+     public ITaxonService getTaxonService() {
+         return new TransientTaxonService(defaultApplicationConfiguration.getTaxonService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTermService()
+      */
+     @Override
+     public ITermService getTermService() {
+         return new TransientTermService(defaultApplicationConfiguration.getTermService());
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getTransactionManager()
+      */
+     @Override
+     public PlatformTransactionManager getTransactionManager() {
+         return defaultApplicationConfiguration.getTransactionManager();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getUserService()
+      */
+     @Override
+     public IUserService getUserService() {
+         return defaultApplicationConfiguration.getUserService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getVocabularyService()
+      */
+     @Override
+     public IVocabularyService getVocabularyService() {
+         return defaultApplicationConfiguration.getVocabularyService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#getWorkingSetService()
+      */
+     @Override
+     public IWorkingSetService getWorkingSetService() {
+         return defaultApplicationConfiguration.getWorkingSetService();
+     }
+     /**
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()
+      */
+     @Override
+     public TransactionStatus startTransaction() {
+         return defaultApplicationConfiguration.startTransaction();
+     }
+     /**
+      * @param arg0
+      * @return
+      * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction(java.lang.Boolean)
+      */
+     @Override
+     public TransactionStatus startTransaction(Boolean arg0) {
+         return defaultApplicationConfiguration.startTransaction(arg0);
+     }
+ }
index 9b3b1ada9941074997befda33422d1f7825a9cb9,02097b6f25ee1bc53d71548259f45b7ea9d3bfe6..0845dee945e6fdeaa29ff2007ad05f9ad75bd9bc
@@@ -11,6 -11,7 +11,7 @@@ import org.eclipse.core.runtime.IStatus
  import org.eclipse.jface.dialogs.MessageDialog;
  import org.eclipse.ui.handlers.HandlerUtil;
  
 -import eu.etaxonomy.cdm.api.application.CdmApplicationController;
++import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
  import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
  import eu.etaxonomy.cdm.api.service.ITaxonService;
  import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
index 159840d6531da0917db99d22f394842d580dc5ef,cba17dc0758906191e20b0e8e7736a81bbb05e66..8b5a61b59438153b66c920a1acb7f073d0bf2d21
@@@ -17,6 -17,7 +17,7 @@@ import org.eclipse.core.runtime.IAdapta
  import org.eclipse.core.runtime.IProgressMonitor;
  import org.eclipse.core.runtime.IStatus;
  
 -import eu.etaxonomy.cdm.api.application.CdmApplicationController;
++import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
  import eu.etaxonomy.cdm.api.service.ITaxonService;
  import eu.etaxonomy.cdm.model.taxon.Synonym;
  import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
@@@ -60,21 -60,21 +60,21 @@@ public class DeleteSynonymOperation ext
        @Override
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
-               
                // Store synonymRelationshipType for later undo operations
-                               synonymTypes = synonym.getRelationType(taxon);
+                               synonymTypes = synonym.getRelationType(element);
                                monitor.worked(20);
-                               
                                // Remove synonym from taxon
-                               
 -                              CdmApplicationController controller;
 +                              ICdmApplicationConfiguration controller;
-                               
 -                              controller = (CdmApplicationController) CdmStore.getCurrentApplicationConfiguration();
 +                              controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
-                               
                                ITaxonService service = controller.getTaxonService();
                                if (synonym.getId() == 0){
-                                       taxon.removeSynonym(synonym);
-                                       
+                                       element.removeSynonym(synonym);
                                } else {
                                        service.deleteSynonym(synonym, null);
                                }
index ddc6e90bae234be2bb592e12da344646ecced197,49f714668504e8c48eadc17c513410b377069871..b7b3b75e2ab893a735828cc783721ff767036d21
@@@ -9,16 -8,9 +8,9 @@@ import org.eclipse.core.commands.operat
  import org.eclipse.core.runtime.IAdaptable;\r
  import org.eclipse.core.runtime.IProgressMonitor;\r
  import org.eclipse.core.runtime.IStatus;\r
- import org.eclipse.core.runtime.Status;\r
- import org.eclipse.ui.IEditorInput;\r
- import org.eclipse.ui.IEditorReference;\r
- import org.eclipse.ui.IPerspectiveDescriptor;\r
- import org.eclipse.ui.IViewPart;\r
- import org.eclipse.ui.IViewReference;\r
  import org.eclipse.ui.IWorkbenchPage;\r
- import org.eclipse.ui.PartInitException;\r
- import org.eclipse.ui.handlers.HandlerUtil;\r
  \r
 -import eu.etaxonomy.cdm.api.application.CdmApplicationController;\r
++import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;\r
  import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
  import eu.etaxonomy.cdm.api.service.ITaxonService;\r
  import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;\r
@@@ -68,20 -56,20 +56,20 @@@ public class DeleteTaxonOperation exten
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-                               \r
\r
                                monitor.worked(20);\r
                                bind();\r
-                               \r
-                               \r
\r
\r
 -                              CdmApplicationController controller;\r
 +                              ICdmApplicationConfiguration controller;\r
-                               \r
\r
 -                              controller = (CdmApplicationController) CdmStore.getCurrentApplicationConfiguration();\r
 +                              controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();\r
-                               \r
\r
                                ITaxonService service = controller.getTaxonService();\r
                                try {\r
-                                       \r
-                                       service.deleteTaxon(taxon, new TaxonDeletionConfigurator(), classification);\r
-                                       \r
\r
+                                       service.deleteTaxon(element, new TaxonDeletionConfigurator(), classification);\r
\r
                                } catch (DataChangeNoRollbackException e) {\r
                                        // TODO Auto-generated catch block\r
                                        e.printStackTrace();\r
index 2ea0a5d6a4d58e0b1567eb178de9fd9ea02283f2,70d4ba028f39302bf9ebe680fbfb156836087b90..46768210331d339f4784d5cc00c041a7ad70eff8
@@@ -54,7 -59,9 +59,9 @@@ import org.eclipse.ui.progress.IWorkben
  import org.eclipse.ui.themes.ITheme;
  import org.eclipse.ui.themes.IThemeManager;
  
+ import eu.etaxonomy.cdm.database.PermissionDeniedException;
  import eu.etaxonomy.cdm.model.common.IEnumTerm;
 -import eu.etaxonomy.cdm.persistence.hibernate.permission.SecurityExceptionUtils;
++//import eu.etaxonomy.cdm.persistence.hibernate.permission.SecurityExceptionUtils;
  import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
  import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
@@@ -477,7 -484,31 +484,31 @@@ public abstract class AbstractUtility 
                                        status = getOperationHistory().execute(operation, monitor,
                                                        uiInfoAdapter);
                                } catch (ExecutionException e) {
-                                       errorDialog("Error executing operation", getClass(), String.format("An error occured while executing %s.", operation.getLabel()), e);
+                                       MultiStatus info = null;
+                                       String title = null;
+                                       // FIXME cannot access TaxonomicEditorPlugin.PLUGIN_ID from here 
+                                       // String PID = TaxonomicEditorPlugin.PLUGIN_ID;
+                                       String PID = "eu.etaxonomy.taxeditor.application";
+                                       
 -                                      RuntimeException securityRuntimeException = SecurityExceptionUtils.findSecurityRuntimeException(e);
++                                      RuntimeException securityRuntimeException = null;//SecurityExceptionUtils.findSecurityRuntimeException(e);
+                                       
+                                       if(securityRuntimeException != null){
+                                               title = "Your changes could not be saved!";
+                                               info = new MultiStatus(PID, 1, String.format("You are missing sufficient permissions for the operation \"%s\".", operation.getLabel()), null);
+                                               info.add(new Status(IStatus.WARNING, PID, 1, securityRuntimeException.getMessage(), null));
+                                               
+                                       } else {
+                                               title = "Error executing operation";
+                                               info = new MultiStatus(PID, 1, String.format("An error occured while executing %s.", operation.getLabel()), null);
+                                               Writer writer = new StringWriter();
+                                           PrintWriter printWriter = new PrintWriter(writer);
+                                           e.printStackTrace(printWriter);
+                                               info.add(new Status(IStatus.ERROR, PID, 1, writer.toString(), null));
+                                       }
+                               
+                                       errorDialog(title, getClass(), info);
+                                       
                                } finally {
                                        monitor.done();
                                }
index 6859731558e522222ca6ab73b862b97c7475de21,6eabada4751c750a5f1441ae08a80c1829ed9291..a1a67688d5f9af0409ff57be917fb7f3ec51d1e4
@@@ -20,7 -20,7 +20,8 @@@ import org.eclipse.core.runtime.jobs.Jo
  import org.eclipse.swt.widgets.Display;
  import org.springframework.core.io.Resource;
  
 -import eu.etaxonomy.cdm.api.application.CdmApplicationController;
++import eu.etaxonomy.cdm.api.application.CdmApplicationDefaultController;
 +import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
  import eu.etaxonomy.cdm.database.DatabaseTypeEnum;
  import eu.etaxonomy.cdm.database.DbSchemaValidation;
  import eu.etaxonomy.cdm.database.ICdmDataSource;
@@@ -91,9 -90,9 +92,14 @@@ class CdmStoreConnector extends Job 
                                        .CreateSubMonitor(monitor, 7);
                        // This is where we instantiate the application controller
                        try {
 -                              applicationController = CdmApplicationController.NewInstance(
 -                                              applicationContextBean, dataSource, dbSchemaValidation,
 -                                              false, subprogressMonitor);
 +                              //FIXME:Remoting change this to toggle remoting
-                               //applicationController = CdmApplicationDefaultController.NewInstance();
-                               applicationController = CdmApplicationRemoteController.NewInstance();
++                              applicationController = 
++                                              CdmApplicationDefaultController.NewInstance(applicationContextBean, 
++                                                              dataSource, 
++                                                              dbSchemaValidation,
++                                                              false, 
++                                                              subprogressMonitor);
++                              //applicationController = CdmApplicationRemoteController.NewInstance();
                        } catch (Exception e) {
                                if(! causeIsCancelationExceptionRecursive(e)){
                                        return new Status(IStatus.ERROR, "Could not connect to CDM Store", "An error occurred while trying to connect to datasource: " + dataSource.getName(), e);
index eda9d21c496236d29992ff369c57c0fbdc0dd2ca,88fb565d81c8ed059a37cb928d7d6097844cc769..14bb1278b644118a6d9fa29c704717b440bcc467
@@@ -7,19 -7,12 +7,17 @@@
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">\r
  \r
-   <!-- <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/> -->\r
-   <import resource="classpath:/eu/etaxonomy/cdm/remotingApplicationContext.xml"/>\r
 -  <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/>\r
 -  <!-- <import resource="classpath:/eu/etaxonomy/cdm/remotingApplicationContext.xml"/> -->\r
 -  <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">\r
++  <import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/> \r
++  <!--import resource="classpath:/eu/etaxonomy/cdm/remotingApplicationContext.xml"/>-->\r
 +  \r
 +   <!-- <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">\r
      <property name="omit" value="false" />\r
 -  </bean>\r
 +  </bean> -->\r
 +   \r
 +  <!-- <bean id="remoteTermInitializer" class="eu.etaxonomy.cdm.remote.service.RemoteTermInitializer">    \r
 +  </bean> -->\r
    \r
-  \r
\r
 +    \r
    <import resource="classpath:/eu/etaxonomy/cdm/remote.xml"/>\r
    <import resource="classpath:eu/etaxonomy/cdm/remote/json/jsonConfigurations.xml"/>\r
    \r