Merge branch 'develop' of ssh://dev.e-taxonomy.eu/var/git/taxeditor into
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 30 Nov 2015 09:27:54 +0000 (10:27 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 30 Nov 2015 09:27:54 +0000 (10:27 +0100)
develop

23 files changed:
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/update/UpdateHandler.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientAgentService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientClassificationService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientCollectionService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientDescriptionService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientNameService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientReferenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTermService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchCompositeController.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/CdmErrorDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/MessagingUtils.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ApplicationUtil.java
eu.etaxonomy.taxeditor/eu.etaxonomy.taxeditor.product

index 1d3e864b345dfe372955d009ba72eceff61ee1a6..204810682d7821e9578efb59e34e8e6213eeb71f 100644 (file)
@@ -14,7 +14,8 @@ Import-Package: eu.etaxonomy.cdm.database,
  org.eclipse.equinox.app,
  org.eclipse.equinox.p2.repository.metadata,
  org.osgi.framework,
- org.osgi.service.packageadmin
+ org.osgi.service.packageadmin,
+ org.springframework.remoting
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  eu.etaxonomy.taxeditor.store,
index f02297f4b69c6eddb79350405e44ec297ed3dcf0..51828f268ee501e954946b6871e1ad57dd755393 100644 (file)
@@ -8,6 +8,8 @@ import org.eclipse.ui.application.WorkbenchAdvisor;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 import org.eclipse.ui.statushandlers.AbstractStatusHandler;
 import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.springframework.remoting.RemoteAccessException;
+import org.springframework.remoting.RemoteConnectFailureException;
 
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
@@ -22,6 +24,7 @@ import eu.etaxonomy.taxeditor.model.MessagingUtils;
 public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 
        private CdmStatusHandler cdmStatusHandler;
+
        /*
         * (non-Javadoc)
         * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
@@ -88,31 +91,73 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
         */
        class CdmStatusHandler extends AbstractStatusHandler {
 
+           private Throwable previousT;
                /* (non-Javadoc)
                 * @see org.eclipse.ui.statushandlers.AbstractStatusHandler#handle(org.eclipse.ui.statushandlers.StatusAdapter, int)
                 */
                @Override
                public void handle(StatusAdapter statusAdapter, int style)
                {
+
                    if(statusAdapter.getStatus().matches(IStatus.ERROR)) {
 
                        IStatus status = statusAdapter.getStatus();
                        Throwable t = statusAdapter.getStatus().getException();
+                       // NOTE : the global status handling mechanism in the case of
+                       //        runtime exceptions is called twice, once by the application
+                       //        throwing the exception and then by the rcp logging mechanism
+                       //        The check below is to make sure that the same exception is
+                       //        not shown twice in succession.
+                       if(t != null && previousT == t) {
+                       return;
+                   }
+                       previousT = t;
                        // NOTE : Currently we only allow RuntimeExceptions since
                        //        allowing all kinds of exceptions would also include
                        //        those in generated status objects coming from from logging triggers
                        //        leading to a recursive infinite loop of :
                        //        initial exception thrown -> status handling -> dialog opening + logging of status ->
                        //        status handling -> dialog opening + logging of status ... and so on
-                       if(t != null && t instanceof RuntimeException && ! "Widget is disposed".equals(t.getMessage())){
-                               MessagingUtils.errorDialog("Unexpected error",
-                                               null,
-                                               MessagingUtils.UNEXPECTED_ERROR_MESSAGE,
-                                               statusAdapter.getStatus().getPlugin(),
-                                               t,
-                                               true);
-                       }
+                       if(t != null &&
+                               t instanceof RuntimeException &&
+                               ! "Widget is disposed".equals(t.getMessage()) &&
+                               ! handleKnownRuntimeException(t,statusAdapter.getStatus().getPlugin())) {
+
+                           MessagingUtils.errorDialog("Unexpected error",
+                                   null,
+                                   MessagingUtils.UNEXPECTED_ERROR_MESSAGE,
+                                   statusAdapter.getStatus().getPlugin(),
+                                   t,
+                                   true);
+
+                       }
+                   }
+               }
+
+               private boolean handleKnownRuntimeException(Throwable t, String pluginId) {
+                   if(t instanceof RemoteConnectFailureException ||
+                           t.getCause() instanceof RemoteConnectFailureException) {
+                       MessagingUtils.errorDialog("Connection Failure",
+                               null,
+                               MessagingUtils.CONNECTION_FAILURE_MESSAGE + System.getProperty("line.separator"),
+                               pluginId,
+                               t,
+                               true,
+                               false);
+                       return true;
+                   }
+                   if(t instanceof RemoteAccessException ||
+                           t.getCause() instanceof RemoteAccessException) {
+                       MessagingUtils.errorDialog("Remote Access Error",
+                               null,
+                               MessagingUtils.REMOTE_ACCESS_FAILURE_MESSAGE + System.getProperty("line.separator"),
+                               pluginId,
+                               t,
+                               true,
+                               false);
+                       return true;
                    }
+                   return false;
                }
        }
 
index 3894b0432f13dec8553829f174b8158c2b32d77c..a835cdc5c2b0eb65e778fcc88b6bfabd9cbe2aaa 100644 (file)
-/**
-* Copyright (C) 2007 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.
-*/
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package eu.etaxonomy.taxeditor.update;
 
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
 import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-import eu.etaxonomy.taxeditor.TaxonomicEditorPlugin;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.jface.wizard.WizardDialog;
 
 /**
  * UpdateHandler invokes the check for updates UI
  *
+ * @since 3.4
  */
-public class UpdateHandler extends AbstractHandler {
-
-    private static final String ERROR_PERFORMING_UPDATES = "Error performing updates";
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object execute(ExecutionEvent event) throws ExecutionException {
-        // update using a progress monitor
-        IRunnableWithProgress runnable = new IRunnableWithProgress() {
-            @Override
-            public void run(IProgressMonitor monitor) throws InvocationTargetException,
-                    InterruptedException {
-                doExecute(monitor);
-            }
-        };
-
-        try {
-            new ProgressMonitorDialog(null).run(true, true, runnable);
-        } catch (InvocationTargetException | InterruptedException e) {
-            showError(e);
-        }
-        return null;
-    }
-
-    private void doExecute(IProgressMonitor monitor) {
-
-        //UpdateOperation operation = new UpdateOperation(ProvisioningUI.getDefaultUI().getSession());
-
-        BundleContext bundleContext = TaxonomicEditorPlugin.getContext();
-        ServiceReference reference = bundleContext.getServiceReference(IProvisioningAgent.SERVICE_NAME);
-        if (reference == null) {
-            showMessage(MessageDialog.ERROR, ERROR_PERFORMING_UPDATES, "No provisioning agent found.  This application is not set up for updates.");
-            return;
-        }
-
-        final IProvisioningAgent agent = (IProvisioningAgent) bundleContext.getService(reference);
-        final IWorkbench workbench = PlatformUI.getWorkbench();
-
-        ProvisioningSession session = new ProvisioningSession(agent);
-        // update all user-visible installable units
-        UpdateOperation operation = new UpdateOperation(session);
+public class UpdateHandler extends PreloadingRepositoryHandler {
 
-        // force refresh all the repository caches before update
-        IMetadataRepositoryManager metaManager = ProvUI.getMetadataRepositoryManager(ProvisioningUI.getDefaultUI().getSession());
-        URI[] repos = metaManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+    boolean hasNoRepos = false;
 
-        for(URI repo : repos) {
-            try {
-                metaManager.refreshRepository(repo, null);
-            } catch (ProvisionException | OperationCanceledException e) {
-                showError(e);
-            }
-        }
-
-        // set location of artifact and metadata repo
-        operation.getProvisioningContext().setArtifactRepositories(repos);
-        operation.getProvisioningContext().setMetadataRepositories(repos);
-
-        IStatus status = operation.resolveModal(monitor);
-
-//        if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
-//            if (UpdateSingleIUWizard.validFor(operation)) {
-//                // Special case for only updating a single root
-//                UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
-//                WizardDialog dialog = new WizardDialog(getShell(), wizard);
-//                dialog.create();
-//                dialog.open();
-//            } else {
-//                // Open the normal version of the update wizard
-//                getProvisioningUI().openUpdateWizard(false, operation, job);
-//            }
-//        }
-
-        if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
-            showMessage(MessageDialog.INFORMATION, "Checking for updates", "No updates were found");
+    @Override
+    protected void doExecute(LoadMetadataRepositoryJob job) {
+        if (hasNoRepos) {
             return;
         }
-
-        final ProvisioningJob provisioningJob = operation.getProvisioningJob(monitor);
-        if (provisioningJob != null) {
-            Display.getDefault().syncExec(new Runnable() {
-                @Override
-                public void run() {
-                    boolean performUpdate = MessageDialog.openQuestion(
-                            null,
-                            "Updates available",
-                            "There are updates available. Do you want to install them now?");
-                    if (performUpdate) {
-                        provisioningJob.addJobChangeListener(new JobChangeAdapter() {
-                            @Override
-                            public void done(IJobChangeEvent event) {
-                                if (event.getResult().isOK()) {
-                                    Display.getDefault().syncExec(new Runnable() {
-                                        @Override
-                                        public void run() {
-                                            boolean restart = MessageDialog.openQuestion(null,
-                                                    "Updates installed, restart?",
-                                                    "Updates have been installed successfully, do you want to restart?");
-                                            if (restart) {
-                                                workbench.restart();
-                                            }
-                                        }
-                                    });
-                                } else {
-                                    MessageDialog.openInformation(
-                                            null,
-                                            ERROR_PERFORMING_UPDATES,
-                                            event.getResult().getMessage());
-                                }
-                            }
-                        });
-                        provisioningJob.schedule();
-                    }
-                }
-            });
-        } else {
-            if (operation.hasResolved()) {
-                showMessage(MessageDialog.ERROR, ERROR_PERFORMING_UPDATES, "Couldn't get provisioning job: " + operation.getResolutionResult());
+        UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
+
+
+        // check for updates
+        operation.resolveModal(null);
+        if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
+            if (UpdateSingleIUWizard.validFor(operation)) {
+                // Special case for only updating a single root
+                UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
+                WizardDialog dialog = new WizardDialog(getShell(), wizard);
+                dialog.create();
+                dialog.open();
             } else {
-                showMessage(MessageDialog.ERROR, ERROR_PERFORMING_UPDATES, "Couldn't resolve provisioning job");
+                // Open the normal version of the update wizard
+                getProvisioningUI().openUpdateWizard(false, operation, job);
             }
         }
     }
 
-    private void showMessage(final int kind, final String title, final String info) {
-        Display.getDefault().syncExec(new Runnable() {
-            @Override
-            public void run() {
-                MessageDialog.open(kind, null, title, info, SWT.NONE);
-            }
-        });
-    }
-
-    private void showError(final Throwable t) {
-        Display.getDefault().syncExec(new Runnable() {
-            @Override
-            public void run() {
-                MessagingUtils.errorDialog(ERROR_PERFORMING_UPDATES,
-                        this,
-                        t.getMessage(),
-                        TaxonomicEditorPlugin.PLUGIN_ID,
-                        t,
-                        true);
-            }
-        });
+    @Override
+    protected boolean preloadRepositories() {
+        hasNoRepos = false;
+        RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
+        if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
+            hasNoRepos = true;
+            return false;
+        }
+        return super.preloadRepositories();
     }
-
-
 }
index 52bb763b0aea0be09eaa91bdbd215714e1dff59c..47757c9863f8fc05198f383250ff08ddeeb690a9 100644 (file)
@@ -303,6 +303,11 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
         return (IUserService) getService(IUserService.class, "/remoting-public/user.service", new CdmServiceRequestExecutor());\r
     }\r
 \r
+\r
+    public static IUserService getUserService(ICdmRemoteSource remoteSource) {\r
+        return (IUserService) getService(IUserService.class, "/remoting-public/user.service", remoteSource, new CommonsHttpInvokerRequestExecutor());\r
+    }\r
+\r
     @Override\r
     public IMetadataService getMetadataService() {\r
         return (IMetadataService) getService(IMetadataService.class, "/remoting-public/metadata.service", new CommonsHttpInvokerRequestExecutor());\r
@@ -328,17 +333,22 @@ public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfigu
         if(authenticationManager != null) {\r
             return authenticationManager;\r
         }\r
+\r
+        authenticationManager = getAuthenticationManager(getUserService());\r
+        return authenticationManager;\r
+    }\r
+\r
+    public static ProviderManager getAuthenticationManager(IUserService userService) {\r
         Md5PasswordEncoder passwordEncoder = new Md5PasswordEncoder();\r
         ReflectionSaltSource saltSource = new ReflectionSaltSource();\r
         saltSource.setUserPropertyToUse("getUsername");\r
 \r
         DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();\r
-        daoAuthenticationProvider.setUserDetailsService(getUserService());\r
+        daoAuthenticationProvider.setUserDetailsService(userService);\r
         daoAuthenticationProvider.setSaltSource(saltSource);\r
         daoAuthenticationProvider.setPasswordEncoder(passwordEncoder);\r
 \r
-        authenticationManager = new ProviderManager(Arrays.asList((AuthenticationProvider)daoAuthenticationProvider));\r
-        return authenticationManager;\r
+        return new ProviderManager(Arrays.asList((AuthenticationProvider)daoAuthenticationProvider));\r
     }\r
 \r
 \r
index 5b29bd6f36cda2ae7771462cf5778b7aa22fb1da..c1f84f998899e5d56e6102951cc6b370d65dfaf5 100644 (file)
@@ -832,4 +832,12 @@ public class TransientAgentService implements IAgentService {
     public Person convertTeam2Person(UUID arg0) throws MergeException {
         return defaultService.convertTeam2Person(arg0);
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<AgentBase> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
 }
index 5f642230a03e94c64bc1730c01cee3246cde67f6..9a8a1b83ab794cc5969196afe37cab2674cb3795 100644 (file)
@@ -979,9 +979,17 @@ public class TransientClassificationService implements IClassificationService {
        @Override
        public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
                        UUID classificationUuid, List<UUID> excludeTaxa) {
-               
+
                return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classificationUuid, excludeTaxa);
        }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<Classification> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 
 }
index b9e208351c368adf6b431339c40f42528148ac38..006809900ddd8d45b5783371cd2a92689df5341b 100644 (file)
@@ -751,5 +751,13 @@ public class TransientCollectionService implements ICollectionService {
         return defaultService.loadWithUpdate(arg0);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<Collection> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 
 }
index 2954833fc67296f5ddad51a71da81f925115058d..83536502d479e2691c2c6e81c9fbf31b5e692c9c 100644 (file)
@@ -1232,4 +1232,12 @@ public class TransientDescriptionService implements IDescriptionService {
         return defaultService.moveTaxonDescriptions(arg0, arg1);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<DescriptionBase> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 }
index dde29a060dc584f67aeda00692e9d484a46da33c..30289e812679e846f5b8a2dc2fabe7386a455e70 100644 (file)
@@ -1223,4 +1223,12 @@ public class TransientNameService implements INameService {
         return defaultService.loadWithUpdate(arg0);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<TaxonNameBase> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 }
index 73c3b517fa7388ba391dcd246d1c7bc859e9d096..d1acdcdc10d48cca113dba3a121920ffc6ad9a67 100644 (file)
@@ -1069,6 +1069,7 @@ public class TransientOccurenceService implements IOccurrenceService {
         return defaultService.listDeterminationEvents(arg0, arg1, arg2, arg3, arg4);
     }
 
+<<<<<<< HEAD
     @Override
     public Collection<TaxonBase<?>> listDeterminedTaxa(SpecimenOrObservationBase<?> arg0, Integer arg1, Integer arg2,
             List<OrderHint> arg3, List<String> arg4) {
@@ -1085,6 +1086,13 @@ public class TransientOccurenceService implements IOccurrenceService {
     public Collection<TaxonBase<?>> listTypeDesignationTaxa(SpecimenOrObservationBase<?> arg0, Integer arg1,
             Integer arg2, List<OrderHint> arg3, List<String> arg4) {
         return defaultService.listTypeDesignationTaxa(arg0, arg1, arg2, arg3, arg4);
+
+     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<SpecimenOrObservationBase> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
     }
 
 }
index 606139a39322ae1bbebe8c8360df649a1e9440e6..605f12b780543a8423881eadf4bbeb7bf438fa22 100644 (file)
@@ -759,5 +759,13 @@ public class TransientReferenceService implements IReferenceService {
         return defaultService.loadWithUpdate(arg0);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<Reference> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 
 }
index 242d58f28b910960418ca96aaa341cf993ae7ee6..fc6cf73c4eb9e1793235a90249fffa5ca232bdfc 100644 (file)
@@ -1550,5 +1550,13 @@ public class TransientTaxonService implements ITaxonService {
         return defaultService.loadWithUpdate(arg0);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<TaxonBase> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 
 }
index 2264aa95446629ebd75e754f2726167b9338ecf9..109a80899fca31e51f50cd529ba8de9b80b08149 100644 (file)
@@ -937,4 +937,12 @@ public class TransientTermService implements ITermService {
         return defaultService.getLanguageByLabel(arg0);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<DefinedTermBase> load(List<UUID> arg0, List<String> arg1) {
+        return defaultService.load(arg0, arg1);
+    }
+
 }
index 95d3b939215a3751ee4284f09775142d35c8c6fe..c526da1f8e55decbbe46728d511cbffa8a3483e3 100644 (file)
@@ -210,7 +210,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
     }
 
     public void updateRootEntities() {
-        updateRootEntities(null);
+        updateRootEntities((Collection)null);
     }
 
     public void updateRootEntities(Collection<UUID> derivativeUuids) {
@@ -234,8 +234,23 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
             if(derivativeUuids!=null){
                 this.derivateToRootEntityMap = new HashMap<SpecimenOrObservationBase<?>, SpecimenOrObservationBase<?>>();
                 this.rootElements = new HashSet<SpecimenOrObservationBase<?>>();
-                for (UUID uuid : derivativeUuids) {
-                    SpecimenOrObservationBase<?> derivate = CdmStore.getService(IOccurrenceService.class).load(uuid, SPECIMEN_INIT_STRATEGY);
+                List<SpecimenOrObservationBase> derivates =
+                        CdmStore.getService(IOccurrenceService.class).load(new ArrayList(derivativeUuids), SPECIMEN_INIT_STRATEGY);
+                updateRootEntities(derivates);
+            }
+            refreshTree(false);
+            previousCdmEntitySession.bind();
+        }
+    }
+
+
+    public void updateRootEntities(List<SpecimenOrObservationBase> derivates) {
+
+            if(derivates!=null){
+                this.derivateToRootEntityMap = new HashMap<SpecimenOrObservationBase<?>, SpecimenOrObservationBase<?>>();
+                this.rootElements = new HashSet<SpecimenOrObservationBase<?>>();
+                for (SpecimenOrObservationBase derivate : derivates) {
+
                     if(derivate instanceof FieldUnit){
                         derivateToRootEntityMap.put(derivate, derivate);
                     }
@@ -254,9 +269,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
                 }
             }
             viewer.setInput(rootElements);
-            refreshTree(false);
-            previousCdmEntitySession.bind();
-        }
+
     }
 
     @Override
index e87fcc5aa4b7b4af58379b51f6f7a24485697511..73ac228364331d4ff8be01dc62e7cbf5873eeb8c 100644 (file)
@@ -119,7 +119,7 @@ public class DerivateSearchCompositeController implements Listener{
         for (SpecimenOrObservationBase specimenOrObservationBase : occurrences) {
             derivateUuids.add(specimenOrObservationBase.getUuid());
         }
-        derivativeEditor.updateRootEntities(derivateUuids);
+        derivativeEditor.updateRootEntities(occurrences);
     }
 
     @Override
index 087fa83c40241b425b7a74348d0e6ec32dccabeb..8e39946ecd94d5e2ef9b35b8907a82e32766c52a 100644 (file)
@@ -47,33 +47,20 @@ public      class CdmErrorDialog extends ErrorDialog {
             String dialogTitle,
             String message,
             IStatus status,
-            String stackTrace) {
+            String stackTrace,
+            boolean showStatusMessage) {
         super(parentShell,
                 dialogTitle,
                 message, status,
                 IStatus.OK| IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
         this.stackTrace = stackTrace;
-
-
+        String statusMessage = "";
+        if(showStatusMessage) {
+            statusMessage = status.getMessage();
+        }
+        this.message = message == null ? statusMessage : message + "\n " + statusMessage;
     }
 
-    /**
-     * @param parentShell
-     * @param dialogTitle
-     * @param message
-     * @param status
-     * @param stackTrace
-     */
-    public CdmErrorDialog(Shell parentShell,
-            String dialogTitle,
-            String message,
-            IStatus status,
-            String stackTrace,
-            Object[] updatedObjects) {
-        this(parentShell, dialogTitle, message, status, stackTrace);
-        this.message = message == null ? status.getMessage()
-                : message + "\n " + status.getMessage(); //$NON-NLS-1$
-    }
 
     /**
      * @param parentShell
@@ -85,7 +72,7 @@ public        class CdmErrorDialog extends ErrorDialog {
             String dialogTitle,
             String message,
             IStatus status) {
-        this(parentShell, dialogTitle, message, status, "");
+        this(parentShell, dialogTitle, message, status, "", true);
     }
 
        /* (non-Javadoc)
index 36777e8ca31e1e9dbcf5e70aa73468a226b11902..3988724a78b83e8c7e6c6cd51feed0489130dcda 100644 (file)
@@ -31,6 +31,8 @@ public class MessagingUtils {
     public final static String UNEXPECTED_ERROR_MESSAGE = "This is an unexpected error.";
     public final static String CONTACT_MESSAGE = System.getProperty("line.separator") +  "Please contact EDIT Support (EditSupport@bgbm.org) with the error trace below (click on the 'Details' button).";
     public final static String DEFAULT_MESSAGE = "Error thrown but no associated message";
+    public final static String CONNECTION_FAILURE_MESSAGE = "The connection to the remote server has been broken";
+    public final static String REMOTE_ACCESS_FAILURE_MESSAGE = "Problem accessing remote server";
 
     /**
      * Gets the Log4J logger for a given class
@@ -253,14 +255,15 @@ public class MessagingUtils {
             final Throwable t,
             final List<String> contextInfo,
             final String message,
-            final MultiStatus status) {
+            final MultiStatus status,
+            final boolean showReason) {
 
         Display.getDefault().asyncExec(new Runnable() {
 
             @Override
             public void run() {
                 String stackTraceWithContext = getStackTraceAndContextInfo(t, contextInfo);
-                CdmErrorDialog ced = new CdmErrorDialog(AbstractUtility.getShell(), title, message, status, stackTraceWithContext);
+                CdmErrorDialog ced = new CdmErrorDialog(AbstractUtility.getShell(), title, message, status, stackTraceWithContext, showReason);
                 ced.open();
                 Class<? extends Object> clazz = source != null ? source.getClass() : this.getClass();
 
@@ -275,6 +278,15 @@ public class MessagingUtils {
         });
     }
 
+    public static void errorDialog(final String title,
+            final Object source,
+            final String message,
+            final String pluginId,
+            final Throwable t,
+            boolean addContactMesg) {
+        errorDialog(title, source, message, pluginId, t, addContactMesg, true);
+
+    }
     /**
      * Displays a {@link eu.etaxonomy.taxeditor.model.CdmErrorDialog}.
      *
@@ -289,7 +301,8 @@ public class MessagingUtils {
             final String message,
             final String pluginId,
             final Throwable t,
-            boolean addContactMesg) {
+            boolean addContactMesg,
+            boolean showReason) {
 
         Throwable throwable = t;
         StringBuffer sbStackTrace = new StringBuffer();
@@ -356,7 +369,7 @@ public class MessagingUtils {
                 throwable.toString(),
                 throwable);
 
-        errorDialog(title, source, throwable, contextInfo, finalMessage, ms);
+        errorDialog(title, source, throwable, contextInfo, finalMessage, ms, showReason);
     }
 
     /**
index 90a1dc935a1bca6b39b0ea00d3786b1e10ef45ce..bd2588b773c6d2e396a40e2b1144122f46198369 100644 (file)
@@ -62,10 +62,6 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
                 generatedTaxonNodeUuid = taxonNode.getUuid();
 
                 Set<CdmBase> affectedObjects = new HashSet<CdmBase>();
-                //FIXME:Remoting Hack for now - need to generalise this
-                // by making the affected objects a set of ICdmBase
-                // Also, this needs to be moved to the new operations
-                // architecture.
 
                 TaxonNode parentNode = taxonNode.getParent();
                 if(parentNode.getParent() == null) {
index 04f2d13d0f9b815556e2e074fa9e51a2bd27eb79..f56a8293dc6d98e76f4f024b9abc8e668cfe4874 100644 (file)
@@ -46,8 +46,12 @@ public class LoginManager extends Observable implements IConversationEnabled, IC
 
        private ConversationHolder conversation;
 
+       public static final String INCORRECT_CREDENTIALS_MESSAGE = "Login and/or Password incorrect";
+       public static final String ACCOUNT_LOCKED_MESSAGE = "Account is locked";
+       public static final String EMPTY_CREDENTIALS_MESSAGE = "Login and/or Password empty";
+
        public LoginManager(){
-               CdmStore.getContextManager().addContextListener(this);
+           CdmStore.getContextManager().addContextListener(this);
        }
 
        /**
@@ -107,15 +111,16 @@ public class LoginManager extends Observable implements IConversationEnabled, IC
                    this.notifyObservers();
                }
            } catch(BadCredentialsException e){
-               throw new CdmAuthenticationException("Login and/or Password incorrect", e);
+               throw new CdmAuthenticationException(INCORRECT_CREDENTIALS_MESSAGE, e);
            } catch(LockedException e){
-               throw new CdmAuthenticationException("Account is locked", e);
+               throw new CdmAuthenticationException(ACCOUNT_LOCKED_MESSAGE, e);
            } catch(IllegalArgumentException e){
-               throw new CdmAuthenticationException("Login and/or Password empty", e);
+               throw new CdmAuthenticationException(EMPTY_CREDENTIALS_MESSAGE, e);
            }
 
        }
 
+
        private void _logGrantedAuthotities(StringBuilder gaText, String indent,
                        Set<GrantedAuthority> gaSet) {
                for(GrantedAuthority ga : gaSet){
index 2103ba8e8e05f54d66e752037b9223b688bdb754..395550a7bbad3761097df09ae417939bae6dba74 100644 (file)
@@ -37,8 +37,6 @@ import eu.etaxonomy.cdm.model.common.RelationshipBase;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
@@ -162,14 +160,28 @@ public class SearchManager {
         */
        public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> configurator, boolean showFieldUnits){
            List<SpecimenOrObservationBase> records = new ArrayList<SpecimenOrObservationBase>();
-               final List<String> OCCURRENCE_INIT_STRATEGY = Arrays.asList(new String[] {
+               final List<String> BASE_OCCURRENCE_INIT_STRATEGY = Arrays.asList(new String[] {
                        "collection",
                        "descriptions",
                        "identifiers",
                        "derivationEvents.originals",
-                       "derivedFrom.originals"
+                       "derivedFrom.originals",
+                       "gatheringEvent.country.representations",
+                       "gatheringEvent.collector",
+                       "gatheringEvent.locality",
+                       "descriptions.descriptionElements",
+                       "kindOfUnit",
+                       "amplificationResults",
+                       "sequences.singleReadAlignments",
+                       "mediaSpecimen"
                });
-               configurator.setPropertyPaths(OCCURRENCE_INIT_STRATEGY);
+
+               List<String> occurrencePropertyPaths = new ArrayList<String>();
+               occurrencePropertyPaths.addAll(BASE_OCCURRENCE_INIT_STRATEGY);
+               for(String propertyPath:BASE_OCCURRENCE_INIT_STRATEGY) {
+                   occurrencePropertyPaths.add("derivationEvents.derivatives." + propertyPath);
+               }
+               configurator.setPropertyPaths(occurrencePropertyPaths);
 
                if(checkLargeResult(CdmStore.getService(IOccurrenceService.class).countOccurrences(configurator))){
                        records = CdmStore.getService(IOccurrenceService.class).findByTitle(configurator).getRecords();
index b8cca7c84b4af373ecf93ec9a0487200c5d1f176..92824fcd6cdef7f56da83515276177637f22ed44 100644 (file)
@@ -49,8 +49,13 @@ import org.eclipse.ui.progress.IProgressConstants;
 import org.eclipse.wb.swt.SWTResourceManager;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.LockedException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration;
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
@@ -62,6 +67,7 @@ import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo;
 import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo.CdmInstanceInfo;
 import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
 import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.LoginManager;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
 import eu.etaxonomy.taxeditor.webapp.CDMEmbeddedServerException;
 import eu.etaxonomy.taxeditor.webapp.CDMServer;
@@ -233,7 +239,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
             @Override
             public void widgetSelected(SelectionEvent e) {
                 refreshCdmServer();
-                updatePort();
+
             }
         });
         GridData gd_comboCdmServer = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
@@ -487,11 +493,6 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
                         CdmRemoteSource devRemoteSource = CdmServerInfo.getDevServerRemoteSource();
                         if(devRemoteSource != null) {
                             isDevRemoteSource = true;
-                        }
-                        refreshCdmServer();
-                        updatePort();
-
-                        if(devRemoteSource != null) {
                             String username = System.getProperty("cdm.server.dev.username");
                             String password = System.getProperty("cdm.server.dev.password");
                             if(username != null && !username.isEmpty() && password != null && !password.isEmpty()) {
@@ -499,6 +500,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
                                 txtPassword.setText(password);
                                 CdmStore.connect(devRemoteSource, RemotingLoginDialog.this);
                             }
+                        } else {
+                            refreshCdmServer();
                         }
                     }
                 });
@@ -511,8 +514,16 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
 
     private void refreshCdmServer() {
         txtCdmServerStatus.setText(STATUS_CHECKING_AVAILABILITY);
+        clearOnServerChange();
+        emptyCredentials();
         updateSelectedCdmServer();
-        checkSelectedCdmServer();
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                checkSelectedCdmServer();
+            }
+        });
+
     }
 
     private void updateSelectedCdmServer() {
@@ -547,10 +558,6 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
     }
 
     private void checkSelectedCdmServer() {
-
-        clearOnServerChange();
-        emptyCredentials();
-
         if(selectedCsii != null) {
             if(selectedCsii.isLocalhost()) {
                 txtPort.setEditable(true);
@@ -564,8 +571,10 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
             } else {
                 txtCdmServerStatus.setText(STATUS_NOT_AVAILABLE);
                 comboCdmInstance.removeAll();
+                disableCdmInstanceControls("", "");
             }
         }
+        updatePort();
     }
 
 
@@ -620,10 +629,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
                     Display.getDefault().asyncExec(new Runnable() {
                         @Override
                         public void run() {
-                            txtCdmInstanceStatus.setText(STATUS_NOT_AVAILABLE);
-                            txtCdmInstanceStatus.setToolTipText(e.getMessage());
-                            comboCdmInstance.setEnabled(false);
-                            btnConnect.setEnabled(false);
+                            disableCdmInstanceControls(STATUS_NOT_AVAILABLE, e.getMessage());
                         }
                     });
                 }
@@ -635,10 +641,15 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
             // Start the Job
             serverJob.schedule();
         }
+    }
 
+    private void disableCdmInstanceControls(String cdmInstanceStatus, String tooltip) {
+        txtCdmInstanceStatus.setText(cdmInstanceStatus);
+        txtCdmInstanceStatus.setToolTipText(tooltip);
+        comboCdmInstance.setEnabled(false);
+        btnConnect.setEnabled(false);
 
     }
-
     private void refreshCdmInstance() {
         txtCdmInstanceStatus.setText(STATUS_CHECKING_AVAILABILITY);
         clearOnInstanceChange();
@@ -689,14 +700,6 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
                 CdmStore.getManagedServer().getDataSourceName().equals(selectedCdmInstance.getName());
     }
 
-    private boolean isActiveCdmInstanceRunningInManagedServer() {
-        return CdmStore.getManagedServer() != null &&
-                CdmStore.getManagedServer().isAlive() &&
-                CdmStore.isActive() &&
-                CdmServerInfo.NAME_LOCALHOST_MGD.equals(CdmStore.getActiveCdmSource().getName());
-    }
-
-
     private void startManagedServer() {
         if(isManagedServerRunning()) {
             if(CdmStore.getManagedServer().getDataSourceName().equals(selectedCdmInstance.getName())) {
@@ -857,7 +860,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
 
         ICdmRemoteSource source = selectedCsii.getCdmRemoteSource(selectedCdmInstance, getPort());
 
-        if(!validateLogin()) {
+        if(!validateLogin(source)) {
             return;
         }
 
@@ -936,7 +939,7 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
         return selectedCsii.toString(selectedCdmInstance.getName(), getPort()) + PASSWORD_SUFFIX;
     }
 
-    private boolean validateLogin() {
+    private boolean validateLogin(ICdmRemoteSource remoteSource) {
         if(getUsername() == null || getUsername().isEmpty()) {
             setMessage("User login cannot be empty");
             return false;
@@ -945,8 +948,25 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
             setMessage("Password cannot be empty");
             return false;
         }
+
+
+        try {
+            IUserService userService = CdmApplicationRemoteConfiguration.getUserService(remoteSource);
+            UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(getUsername(), getPassword());
+            CdmApplicationRemoteConfiguration.getAuthenticationManager(userService).authenticate(token);
+        } catch(BadCredentialsException e){
+            setMessage(LoginManager.INCORRECT_CREDENTIALS_MESSAGE);
+            return false;
+        } catch(LockedException e){
+            setMessage(LoginManager.ACCOUNT_LOCKED_MESSAGE);
+            return false;
+        } catch(IllegalArgumentException e){
+            setMessage(LoginManager.INCORRECT_CREDENTIALS_MESSAGE);
+            return false;
+        }
         return true;
     }
+
     public String getUsername() {
         return txtLogin.getText();
     }
@@ -1037,6 +1057,8 @@ public class RemotingLoginDialog extends Dialog implements ICDMServerError {
         txtServerVersion.setText("");
         txtServerVersion.setToolTipText("");
         txtServerCDMVersion.setText("");
+        comboCdmInstance.removeAll();
+        txtCdmInstanceStatus.setText("");
         txtPort.setEditable(false);
         txtPort.setEnabled(false);
     }
index 8f3025067dabff93477c171c39023a49be7bf67f..7282445a85499925805aa44799d933674be9d701 100644 (file)
@@ -28,7 +28,7 @@ public class ApplicationUtil extends AbstractUtility {
     /**
      * Prefix to declare the version as beta
      */
-    private static final String BETA_PREFIX = "[REMOTING]";
+    private static final String BETA_PREFIX = "[BETA]";
 
     public static String getTitle() {
         return "EDIT Taxonomic Editor " + ApplicationUtil.getVersion();
index 70b3b40b6fed0bc8f5b149bcd63fe15750ec995d..a0aa796490dcda32e68692e150c642b4e8398cea 100644 (file)
@@ -1,36 +1,58 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="3.12.0.SNAPSHOT">
-  <aboutInfo>
-    <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
-    <text>
+<?pde version="3.5"?>
+
+<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="3.12.0.qualifier" useFeatures="true" includeLaunchers="true">
+
+   <aboutInfo>
+      <image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
+      <text>
          %productBlurb
       </text>
-  </aboutInfo>
-  <configIni use="default"></configIni>
-  <launcherArgs>
-    <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080</programArgs>
-    <vmArgs>-Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow</vmArgs>
-    <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
-  </launcherArgs>
-  <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
-  <splash location="eu.etaxonomy.taxeditor.application" startupForegroundColor="000000" startupMessageRect="7,432,360,20" startupProgressRect="5,447,366,15"/>
-  <launcher name="TaxonomicEditor">
-    <solaris/>
-    <win useIco="false">
-      <bmp/>
-    </win>
-  </launcher>
-  <vm></vm>
-  <plugins></plugins>
-  <features>
-    <feature id="eu.etaxonomy.taxeditor.feature"/>
-  </features>
-  <configurations>
-    <plugin autoStart="true" id="eu.etaxonomy.taxeditor.application" startLevel="5"/>
-    <plugin autoStart="true" id="org.eclipse.core.runtime" startLevel="4"/>
-    <plugin autoStart="true" id="org.eclipse.equinox.common" startLevel="2"/>
-    <plugin autoStart="true" id="org.eclipse.equinox.ds" startLevel="2"/>
-    <plugin autoStart="true" id="org.eclipse.equinox.p2.transport.ecf" startLevel="4"/>
-    <plugin autoStart="true" id="org.eclipse.equinox.simpleconfigurator" startLevel="1"/>
-  </configurations>
+   </aboutInfo>
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080
+      </programArgs>
+      <vmArgs>-Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow
+      </vmArgs>
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
+      </vmArgsMac>
+   </launcherArgs>
+
+   <windowImages i16="/eu.etaxonomy.taxeditor.application/icons/256color_16x16.gif" i32="/eu.etaxonomy.taxeditor.application/icons/256color_32x32.gif" i48="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
+
+   <splash
+      location="eu.etaxonomy.taxeditor.application"
+      startupProgressRect="5,447,366,15"
+      startupMessageRect="7,432,360,20"
+      startupForegroundColor="000000" />
+   <launcher name="TaxonomicEditor">
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+   </vm>
+
+   <plugins>
+   </plugins>
+
+   <features>
+      <feature id="eu.etaxonomy.taxeditor.feature"/>
+   </features>
+
+   <configurations>
+      <plugin id="eu.etaxonomy.taxeditor.application" autoStart="true" startLevel="5" />
+      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
+      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.p2.transport.ecf" autoStart="true" startLevel="4" />
+      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
+   </configurations>
+
 </product>