fix #5759 remove all switches for remoting and standalone root/branches/taxeditor/develop
authorKatja Luther <k.luther@bgbm.org>
Tue, 6 Sep 2016 10:29:19 +0000 (12:29 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 6 Sep 2016 10:29:19 +0000 (12:29 +0200)
57 files changed:
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/MediaEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/UserEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/group/authority/CdmAuthorityEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.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/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateFieldUnitContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/SingleReadHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/editor/AlignmentEditorInput.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/RecentNamesContributionItem.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/input/TermEditorInput.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/EditFeatureTreeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/FeatureTreeEditorWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbcdImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvNameExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvPrintExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/TcsImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewAmplificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewCollectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewDerivedUnitBaseWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFieldUnitWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGrantedAuthorityWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewGroupWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewInstitutionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewNonViralNameWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPersonWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPolytomousKeyWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewPrimerWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTeamWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewUserWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EditFromSelectionWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SaveImportedSpecimenAction.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenImportView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenSearchWizard.java

index 26e1296..31b7498 100644 (file)
@@ -150,12 +150,8 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
 
        @Override
        public TeamOrPersonBase save(TeamOrPersonBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IAgentService.class).saveOrUpdate(entity) ;
-               return entity;
-           }
+          return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
+          
        }
 
        @Override
index b868562..440af45 100644 (file)
@@ -66,12 +66,8 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
         */
        @Override
        public Group save(Group entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IGroupService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IGroupService.class).saveOrUpdate(entity);
-               return entity;
-           }
+           return CdmStore.getService(IGroupService.class).merge(entity, true).getMergedEntity();
+           
        }
 
        /* (non-Javadoc)
index 2af4254..697118e 100644 (file)
@@ -56,12 +56,8 @@ public class MediaEditorInput extends AbstractBulkEditorInput<Media> {
 
     @Override
     public Media save(Media entity) {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            return CdmStore.getService(IMediaService.class).merge(entity, true).getMergedEntity();
-        } else {
-            CdmStore.getService(IMediaService.class).saveOrUpdate(entity) ;
-            return entity;
-        }
+       return CdmStore.getService(IMediaService.class).merge(entity, true).getMergedEntity();
+       
     }
 
     @Override
index 1cc2491..9017638 100644 (file)
@@ -123,12 +123,8 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
        @Override
     public TaxonNameBase save(TaxonNameBase entity) {
                TaxonNameBase mergedName = null;
-               
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                       mergedName =  CdmStore.getService(INameService.class).merge(entity, true).getMergedEntity();
-           } 
-               
-               return mergedName;
+               mergedName =  CdmStore.getService(INameService.class).merge(entity, true).getMergedEntity();
+               return mergedName;
                
        }
 
index 5f20772..b247659 100644 (file)
@@ -139,12 +139,8 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /** {@inheritDoc} */
        @Override
     public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(entity);
-               return entity;
-           }
+           return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
+          
        }
 
 
index 8b8c113..a269df4 100644 (file)
@@ -139,12 +139,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        /** {@inheritDoc} */
        @Override
     public Reference save(Reference entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IReferenceService.class).saveOrUpdate(entity);
-               return entity;
-           }
+          return CdmStore.getService(IReferenceService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)
index aa6dd15..5ea635f 100644 (file)
@@ -71,12 +71,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        }\r
        @Override\r
        public TaxonBase save(TaxonBase entity) {\r
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
-               return CdmStore.getService(ITaxonService.class).merge(entity, true).getMergedEntity();\r
-           } else {\r
-               CdmStore.getService(ITaxonService.class).saveOrUpdate(entity);\r
-               return entity;\r
-           }\r
+           return CdmStore.getService(ITaxonService.class).merge(entity, true).getMergedEntity();\r
        }\r
 \r
 \r
index 46ce65f..f78e19d 100644 (file)
@@ -64,13 +64,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
         */
        @Override
        public User save(User entity) {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
-           } else {
-               CdmStore.getService(IUserService.class).saveOrUpdate(entity);
-               return entity;
-           }
-
+           return CdmStore.getService(IUserService.class).merge(entity, true).getMergedEntity();
        }
 
        /* (non-Javadoc)
index 81ebab5..c9f0145 100644 (file)
@@ -43,12 +43,8 @@ public class UserCreator  implements IEntityCreator<User>{
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
-                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                            CdmStore.getService(IUserService.class).createUser(user);
-                            user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
-                        } else {
-                            CdmStore.getService(IUserService.class).createUser(user);
-                        }
+                       CdmStore.getService(IUserService.class).createUser(user);
+                       user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
                        return user;
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
index d127c3f..0c22315 100644 (file)
@@ -454,9 +454,8 @@ public class TaxonEditorInput  extends CdmEntitySessionInput implements IEditorI
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
-        }
+       CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
+       
     }
 
     @Override
index fa78b41..f497936 100644 (file)
@@ -157,8 +157,7 @@ public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IE
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
-        }
+        group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
+       
     }
 }
index 7a190f4..e75a126 100644 (file)
@@ -91,9 +91,8 @@ public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
-        }
+       key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
+      
     }
 
     @Override
index e4df386..c5bcfb7 100644 (file)
@@ -356,9 +356,8 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         // commit the conversation and start a new transaction immediately
         conversation.commit(true);
 
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
-        }
+        CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
+        
         monitor.worked(1);
 
         this.setDirty(false);
index daf96f4..cbdd50c 100644 (file)
@@ -141,9 +141,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                             specimenOrObservationBase.addDerivationEvent(DerivationEvent.NewSimpleInstance(specimenOrObservationBase, mediaSpecimen, derivationEventType));
                             mediaSpecimen.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                             mediaSpecimen.getTitleCache(); //update title cache
-                            if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase, true);
-                            }
+                            CdmStore.getService(IOccurrenceService.class).merge(specimenOrObservationBase, true);
+                           
                         }
 
                         //refresh view
@@ -208,17 +207,13 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                     Sequence newInstance = Sequence.NewInstance(dnaSample, "", 0); //$NON-NLS-1$
                     createdElement = newInstance;
                 }
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
-                }
-            }
-            else if(selectedDerivate instanceof Sequence){
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
+            } else if(selectedDerivate instanceof Sequence){
                 SingleRead newInstance = SingleRead.NewInstance();
                 ((Sequence) selectedDerivate).addSingleRead(newInstance);
                 createdElement = newInstance;
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate, true);
-                }
+                CdmApplicationState.getCurrentAppConfig().getSequenceService().merge((Sequence)selectedDerivate, true);
+                
             }
             if(selectedDerivate instanceof SpecimenOrObservationBase && DerivedUnit.class.isAssignableFrom(childClass)){
                 SpecimenOrObservationBase<?> specimenOrObservationBase = (SpecimenOrObservationBase<?>)selectedDerivate;
@@ -244,9 +239,8 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                 derivedUnit.setCacheStrategy(new DerivedUnitFacadeCacheStrategy());
                 derivedUnit.getTitleCache(); //update title cache
                 createdElement = derivedUnit;
-                if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                    CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
-                }
+                CdmStore.getService(IOccurrenceService.class).merge((SpecimenOrObservationBase) selectedDerivate, true);
+                
             }
 
             //refresh view
index 7a7c749..09a52a2 100644 (file)
@@ -70,12 +70,8 @@ public class CreateFieldUnitContextMenu extends CompoundContributionItem {
                                                 description = TaxonDescription.NewInstance(taxon);
                                             }
                                             description.addElement(association);
-                                            if(CdmStore.getCurrentSessionManager().isRemoting()){
-                                                CdmStore.getService(ITaxonService.class).merge(taxon);
-                                            }
-                                            else{
-                                                CdmStore.getService(ITaxonService.class).saveOrUpdate(taxon);
-                                            }
+                                            CdmStore.getService(ITaxonService.class).merge(taxon);
+                                            
 
                                             derivateView.getConversationHolder().commit();
                                             derivateView.addFieldUnit(fieldUnit);
index ba5f2b9..3a02146 100644 (file)
@@ -41,12 +41,8 @@ public class SingleReadHandler extends AbstractHandler {
                     SingleRead singleRead = (SingleRead)clipBoardTreeNode.getValue();
                     Sequence sequence = (Sequence)selectedTreeNode.getValue();
                     sequence.addSingleRead(singleRead);
-                    if(CdmStore.getCurrentSessionManager().isRemoting()){
-                        CdmStore.getService(ISequenceService.class).merge(sequence);
-                    }
-                    else{
-                        CdmStore.getService(ISequenceService.class).saveOrUpdate(sequence);
-                    }
+                    CdmStore.getService(ISequenceService.class).merge(sequence);
+                   
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
@@ -63,12 +59,8 @@ public class SingleReadHandler extends AbstractHandler {
                         selectedTreeNode.getValue() instanceof SingleRead && selectedTreeNode.getParent().getValue() instanceof Sequence) {
                     Sequence sequence = (Sequence) selectedTreeNode.getParent().getValue();
                     sequence.removeSingleRead((SingleRead) selectedTreeNode.getValue());
-                    if(CdmStore.getCurrentSessionManager().isRemoting()){
-                        CdmStore.getService(ISequenceService.class).merge(sequence);
-                    }
-                    else{
-                        CdmStore.getService(ISequenceService.class).saveOrUpdate(sequence);
-                    }
+                    CdmStore.getService(ISequenceService.class).merge(sequence);
+                    
                     if(activeEditor instanceof DerivateView) {
                         derivateView.getConversationHolder().commit();
                         derivateView.refreshTree();
index 53d3b55..b61efaa 100644 (file)
@@ -279,10 +279,9 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                }
                if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                    ((BulkEditor) part).forceDirty();
-                   if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                       IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
-                       ((BulkEditor) part).changed(selection.getFirstElement());
-                   }
+                   IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+                   ((BulkEditor) part).changed(selection.getFirstElement());
+                   
                }
 
 
index 331526d..28beab5 100644 (file)
@@ -135,10 +135,9 @@ public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartCon
            // take a look at ISaveblePart
            if(part instanceof BulkEditor && !(object instanceof SpecimenOrObservationBase<?>)){
                ((BulkEditor) part).forceDirty();
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
-                ((BulkEditor) part).changed(selection.getFirstElement());
-            }
+               IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
+            ((BulkEditor) part).changed(selection.getFirstElement());
+            
            }
            super.changed(object);
        }
index 4bc956e..89bc3cb 100644 (file)
@@ -163,8 +163,7 @@ public class AlignmentEditorInput extends CdmEntitySessionInput implements IEdit
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(ISequenceService.class).merge(sequenceNode, true);
-        }
+        CdmStore.getService(ISequenceService.class).merge(sequenceNode, true);
+        
     }
 }
index 984d7cf..3d190f9 100644 (file)
@@ -73,7 +73,7 @@ public class RecentNamesContributionItem extends ContributionItem {
        /** {@inheritDoc} */
        @Override
        public void fill(Menu parent, int index) {
-               getRecentWindows().fill(parent, index);
+       //      getRecentWindows().fill(parent, index);
        }
 
        /* (non-Javadoc)
index 33c0be7..035397f 100644 (file)
@@ -198,14 +198,9 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                return Status.CANCEL_STATUS;
                        }
 
-                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                           AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
-                           NavigationUtil.executeOperation(operation, null);
-                       } else {
-                           AbstractPostOperation operation = new MoveTaxonOperation
-                                   ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
-                           NavigationUtil.executeOperation(operation);
-            }
+                       AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
+                       NavigationUtil.executeOperation(operation, null);
+                       
 
                        logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                        return Status.OK_STATUS;
@@ -221,14 +216,9 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                        return Status.CANCEL_STATUS;
                                }
 
-                               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                   AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
-                                   NavigationUtil.executeOperation(operation, null);
-                               } else {
-                                   AbstractPostOperation operation = new MoveTaxonOperation
-                                           ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
-                                   NavigationUtil.executeOperation(operation);
-                               }
+                               AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
+                               NavigationUtil.executeOperation(operation, null);
+                               
 
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
@@ -240,14 +230,9 @@ public class TreeNodeDropAdapterAssistant extends CommonDropAdapterAssistant imp
                                }
                                TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
 
-                               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                   AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode, MovingType.BEHIND);
-                                   NavigationUtil.executeOperation(operation, null);
-                               } else {
-                                   AbstractPostOperation operation = new MoveTaxonOperation
-                                           ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.BEHIND);
-                                   NavigationUtil.executeOperation(operation);
-                               }
+                               AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode, MovingType.BEHIND);
+                               NavigationUtil.executeOperation(operation, null);
+                               
                                logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
                                return Status.OK_STATUS;
 //                     }else if (returnCode == 2){
index 518382f..a02e9a7 100644 (file)
@@ -101,10 +101,8 @@ public class TermEditorInput extends AbstractDefinedTermEditorInput<DefinedTerm>
      */
     @Override
     public void merge() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IVocabularyService.class).merge(new ArrayList<TermVocabulary>(getRootEntities()), true);
-            updateDefaultFeatureTree();
-        }
+        CdmStore.getService(IVocabularyService.class).merge(new ArrayList<TermVocabulary>(getRootEntities()), true);
+        updateDefaultFeatureTree();
     }
 
     public static FeatureTree getDefaultFeatureTree() {
index 78cd5bd..36a9196 100644 (file)
@@ -206,11 +206,8 @@ public class EditFeatureTreeWizardPage extends WizardPage implements
                                                .getAdditionalFeatures();
                                for (Feature feature : additionalFeatures) {
                                        FeatureNode child = FeatureNode.NewInstance(feature);
-                                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                                           CdmStore.getService(IFeatureNodeService.class).merge(child, true);
-                                       } else {
-                                           CdmStore.getService(IFeatureNodeService.class).saveOrUpdate(child);
-                                       }
+                                       CdmStore.getService(IFeatureNodeService.class).merge(child, true);
+                                       
                                        parent.addChild(child);
                                }
                                viewer.refresh();
index d65ad42..c8c58d3 100644 (file)
@@ -70,11 +70,7 @@ public class FeatureTreeEditorWizard extends Wizard implements ICdmEntitySession
        public boolean performFinish() {
                try{
                        if (selectedFeatureTree != null){
-                           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                               CdmStore.getService(IFeatureTreeService.class).merge(selectedFeatureTree, true);
-                           } else {
-                               CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(selectedFeatureTree);
-                           }
+                           CdmStore.getService(IFeatureTreeService.class).merge(selectedFeatureTree, true);
                        }
                        conversation.commit();
                }finally{
index 409dae7..a7abcb3 100644 (file)
@@ -151,11 +151,8 @@ public class SelectFeatureTreeWizardPage extends WizardPage implements ISelectio
                        featureTree.setTitleCache(text_title.getText(), true);
 
                        viewer.add(featureTree);
-                       if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                CdmStore.getService(IFeatureTreeService.class).merge(featureTree, true);
-                       } else {
-                           CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(featureTree);
-                       }
+                       CdmStore.getService(IFeatureTreeService.class).merge(featureTree, true);
+                       
                        text_title.setText("");
                        viewer.setSelection(new StructuredSelection(featureTree));
 
index d6f3236..d75d589 100644 (file)
@@ -56,20 +56,8 @@ public class AbcdImportWizard extends AbstractImportWizard<Abcd206ImportConfigur
                configurator.setClassificationUuid(classificationChooserWizardPage.getClassification().getUuid());
            }
 
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
-               //CdmStore.getImportManager().run(job);
-               CdmStore.getImportManager().runMoniteredOperation(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
-           } else {
-               try {
-                   configurator.setSource(new FileInputStream(new File(source)));
-               } catch (FileNotFoundException e) {
-                   MessagingUtils.errorDialog("File not found.", this, "Import file was not found.", TaxeditorStorePlugin.PLUGIN_ID, e, false);
-                   logger.error("File not found!", e);
-                   return false;
-               }
-               CdmStore.getImportManager().run(configurator);
-           }
+           CdmStore.getImportManager().runMoniteredOperation(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
+           
            return true;
 
        }
index e703c2d..5996202 100644 (file)
@@ -93,19 +93,15 @@ public class CsvExportWizard extends AbstractExportWizard<CsvDemoExportConfigura
                        configurator.setLastChange(true);
                    }
                }
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   // create job
-                   Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));
-                   // configure the job
-                   job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
-                   job.setUser(true);
-                   // schedule job
-                   job.schedule();
-               } else {
-
-                   configurator.setDestination(new File(urlString));
-                   CdmStore.getExportManager().run(configurator);
-               }
+               
+           // create job
+           Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));
+           // configure the job
+           job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+           job.setUser(true);
+           // schedule job
+           job.schedule();
+               
                return true;
        }
 
index 3e13950..8ca8ef6 100644 (file)
@@ -67,18 +67,15 @@ public class CsvNameExportWizard extends AbstractExportWizard<CsvNameExportConfi
 \r
            final Combo combo = page.getCombo();\r
            configurator.setClassificationUUID(page.getSelectedClassificationUUID());\r
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
-               // create job\r
-               Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));\r
-               // configure the job\r
-               job.setProperty(IProgressConstants.KEEP_PROPERTY, true);\r
-               job.setUser(true);\r
-               // schedule job\r
-               job.schedule();\r
-           } else {\r
-               configurator.setDestination(new File(urlString));\r
-               CdmStore.getExportManager().run(configurator);\r
-           }\r
+           \r
+        // create job\r
+        Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));\r
+        // configure the job\r
+        job.setProperty(IProgressConstants.KEEP_PROPERTY, true);\r
+        job.setUser(true);\r
+        // schedule job\r
+        job.schedule();\r
+          \r
                return true;\r
        }\r
 \r
index 870082e..dbda860 100644 (file)
@@ -63,20 +63,14 @@ public class CsvPrintExportWizard extends CsvNameExportWizard{
 \r
           \r
            configurator.setClassificationUUID(page.getSelectedClassificationUUID());\r
+               // create job\r
+           Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));\r
+           // configure the job\r
+           job.setProperty(IProgressConstants.KEEP_PROPERTY, true);\r
+           job.setUser(true);\r
+           // schedule job\r
+           job.schedule();\r
                \r
-\r
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
-                   // create job\r
-                   Job job = CdmStore.getExportManager().createIOServiceJob(configurator, new File(urlString));\r
-                   // configure the job\r
-                   job.setProperty(IProgressConstants.KEEP_PROPERTY, true);\r
-                   job.setUser(true);\r
-                   // schedule job\r
-                   job.schedule();\r
-               } else {\r
-                   configurator.setDestination(new File(urlString));\r
-                   CdmStore.getExportManager().run(configurator);\r
-               }\r
                return true;\r
        }\r
 \r
index cd6b680..519345e 100644 (file)
@@ -57,14 +57,9 @@ public class ExcelNormalExplicitTaxaImportWizard extends AbstractImportWizard<No
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
 
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
-                   CdmStore.getImportManager().run(job);
-               } else {
-                   CdmStore.getImportManager().run(configurator);
-               }
-
-
+           Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+           CdmStore.getImportManager().run(job);
+               
                return true;
        }
 
index 00a9c1b..146fff3 100644 (file)
@@ -55,17 +55,15 @@ public class JaxbExportWizard extends AbstractExportWizard<JaxbExportConfigurato
                File exportFile = new File(page.getFolderText() + File.separator + page.getExportFileName());
                URI urlString = exportFile.toURI();
                configurator.setDestination(urlString);
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   // create job
-                   Job job = CdmStore.getExportManager().createIOServiceJob(configurator, exportFile);
-                   // configure the job
-                   job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
-                   job.setUser(true);
-                   // schedule job
-                   job.schedule();
-               } else {
-               CdmStore.getExportManager().run(configurator);
-               }
+               
+           // create job
+           Job job = CdmStore.getExportManager().createIOServiceJob(configurator, exportFile);
+           // configure the job
+           job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+           job.setUser(true);
+           // schedule job
+           job.schedule();
+               
                performFinish = true;
                return performFinish;
        }
index 379a59f..5efedee 100644 (file)
@@ -49,19 +49,14 @@ public class SddExportWizard extends AbstractExportWizard<SDDExportConfigurator>
        @Override
        public boolean performFinish() {
            File file = new File(page.getFolderText() + File.separator + page.getExportFileName());
-
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               // create job
-               Job job = CdmStore.getExportManager().createIOServiceJob(configurator, file);
-               // configure the job
-               job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
-               job.setUser(true);
-               // schedule job
-               job.schedule();
-           } else {
-               configurator.setDestination(file);
-               CdmStore.getExportManager().run(configurator);
-           }
+        // create job
+        Job job = CdmStore.getExportManager().createIOServiceJob(configurator, file);
+        // configure the job
+        job.setProperty(IProgressConstants.KEEP_PROPERTY, true);
+        job.setUser(true);
+        // schedule job
+        job.schedule();
+           
            return true;
        }
 
index 8f4d382..d701f6f 100644 (file)
@@ -67,14 +67,9 @@ public class SddImportWizard extends AbstractImportWizard<SDDImportConfigurator>
                URI source = dataSourcePage.getUri();
                configurator.setSource(source);
                configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
-
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
-                   CdmStore.getImportManager().run(job);
-               } else {
-                   CdmStore.getImportManager().run(configurator);
-               }
-
+               Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+               CdmStore.getImportManager().run(job);
+               
                return true;
        }
 
index 13113c2..bc41736 100644 (file)
@@ -45,13 +45,9 @@ public class TcsImportWizard extends AbstractImportWizard<TcsXmlImportConfigurat
            configurator.setSource(source);
            configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
 
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
-               CdmStore.getImportManager().run(job);
-           } else {
-               CdmStore.getImportManager().run(configurator);
-           }
-
+           Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.URI);
+           CdmStore.getImportManager().run(job);
+          
            return true;
        }
 
index 69fc04e..8d91b6f 100644 (file)
@@ -38,11 +38,8 @@ public class NewAmplificationWizard  extends AbstractNewEntityWizard<Amplificati
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IAmplificationService.class).merge(getEntity(), true);
-        } else {
-            CdmStore.getService(IAmplificationService.class).save(getEntity());
-        }
+        CdmStore.getService(IAmplificationService.class).merge(getEntity(), true);
+        
     }
 
     /** {@inheritDoc} */
index 4586b92..b9d99c6 100644 (file)
@@ -50,13 +50,10 @@ public class NewClassificationWizard extends AbstractNewEntityWizard<Classificat
        protected void saveEntity() {
                //CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity());
            Classification classification = getEntity();
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IClassificationService.class).merge(getEntity(), true);
-               CdmApplicationState.getCurrentDataChangeService()
+          CdmStore.getService(IClassificationService.class).merge(getEntity(), true);
+          CdmApplicationState.getCurrentDataChangeService()
                .fireChangeEvent(new CdmChangeEvent(Action.Create, classification, NewTaxonNodeWizard.class), true);
-           } else {
-               CdmStore.getService(IClassificationService.class).save(getEntity());
-           }
+          
 
        }
 
index 8efc02f..e3da352 100644 (file)
@@ -36,11 +36,8 @@ public class NewCollectionWizard extends AbstractNewEntityWizard<Collection> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(ICollectionService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(ICollectionService.class).save(getEntity());
-           }
+           CdmStore.getService(ICollectionService.class).merge(getEntity(), true);
+           
        }
 
        /* (non-Javadoc)
index a09a1a8..664a54c 100644 (file)
@@ -93,11 +93,8 @@ public class NewDerivedUnitBaseWizard extends AbstractNewEntityWizard<SpecimenOr
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               setEntity(CdmStore.getService(IOccurrenceService.class).merge(getEntity()));
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(getEntity());
-           }
+           setEntity(CdmStore.getService(IOccurrenceService.class).merge(getEntity()));
+           
        }
 
 
index 5908643..90f9ee0 100644 (file)
@@ -38,11 +38,8 @@ public class NewFieldUnitWizard extends AbstractNewEntityWizard<FieldUnit> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IOccurrenceService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IOccurrenceService.class).save(getEntity());
-           }
+           CdmStore.getService(IOccurrenceService.class).merge(getEntity(), true);
+           
        }
 
        @Override
index c334279..1a51c72 100644 (file)
@@ -38,11 +38,8 @@ public class NewGrantedAuthorityWizard extends AbstractNewEntityWizard<GrantedAu
         */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IGrantedAuthorityService.class).save(getEntity());
-           }
+           CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
+          
        }
 
        /* (non-Javadoc)
index 6f6b522..51bd2f9 100644 (file)
@@ -38,11 +38,8 @@ public class NewGroupWizard extends AbstractNewEntityWizard<Group> {
         */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IGroupService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IGroupService.class).save(getEntity());
-           }
+           CdmStore.getService(IGroupService.class).merge(getEntity(), true);
+          
        }
 
        /* (non-Javadoc)
index 6ac2d44..a03cafa 100644 (file)
@@ -35,11 +35,7 @@ public class NewInstitutionWizard extends AbstractNewEntityWizard<Institution> {
         */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IAgentService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IAgentService.class).save(getEntity());
-           }
+           CdmStore.getService(IAgentService.class).merge(getEntity(), true);
        }
 
        /* (non-Javadoc)
index cfdd27d..8427ac1 100644 (file)
@@ -49,11 +49,7 @@ public class NewNonViralNameWizard extends AbstractNewEntityWizard<NonViralName>
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(INameService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(INameService.class).save(getEntity());
-           }
+          CdmStore.getService(INameService.class).merge(getEntity(), true);
        }
 
        @Override
index ab5f703..ad71568 100644 (file)
@@ -39,11 +39,7 @@ public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IAgentService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IAgentService.class).save(getEntity());
-           }
+           CdmStore.getService(IAgentService.class).merge(getEntity(), true);
        }
 
        @Override
index daade68..aaa3fe3 100644 (file)
@@ -31,11 +31,7 @@ public class NewPolytomousKeyWizard extends AbstractNewEntityWizard<PolytomousKe
        @Override
        protected void saveEntity() {
            if(!polytomousKeyPage.getPolytomousKeyName().equals("")) {
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   CdmStore.getService(IPolytomousKeyService.class).merge(getEntity(), true);
-               } else {
-                   CdmStore.getService(IPolytomousKeyService.class).save(getEntity());
-               }
+               CdmStore.getService(IPolytomousKeyService.class).merge(getEntity(), true);
            }
        }
 
index de52e18..8fc7f08 100644 (file)
@@ -38,11 +38,8 @@ public class NewPrimerWizard  extends AbstractNewEntityWizard<Primer> {
     /** {@inheritDoc} */
     @Override
     protected void saveEntity() {
-        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-            CdmStore.getService(IPrimerService.class).merge(getEntity(),true);
-        } else {
-            CdmStore.getService(IPrimerService.class).save(getEntity());
-        }
+       CdmStore.getService(IPrimerService.class).merge(getEntity(),true);
+       
     }
 
     /** {@inheritDoc} */
index 63ce08f..5198055 100644 (file)
@@ -89,10 +89,9 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
                             }
                                affectedObjects.add(parentNode);
                         }
-                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                            CdmApplicationState.getCurrentDataChangeService()
+                        CdmApplicationState.getCurrentDataChangeService()
                                 .fireChangeEvent(new CdmChangeEvent(Action.Create, affectedObjects, NewTaxonNodeWizard.class), true);
-                        }
+                        
                     }else{
                         if (!result.isOk()){
                             if (!result.getExceptions().isEmpty()){
index 1d6e0ae..a6b3afa 100644 (file)
@@ -50,11 +50,8 @@ public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
        /** {@inheritDoc} */
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IAgentService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IAgentService.class).save(getEntity());
-           }
+           CdmStore.getService(IAgentService.class).merge(getEntity(), true);
+           
        }
 
        @Override
index d14363c..6318727 100644 (file)
@@ -24,11 +24,8 @@ public class NewUserWizard extends AbstractNewEntityWizard<User> {
 
        @Override
        protected void saveEntity() {
-           if(CdmStore.getCurrentSessionManager().isRemoting()) {
-               CdmStore.getService(IUserService.class).merge(getEntity(), true);
-           } else {
-               CdmStore.getService(IUserService.class).save(getEntity());
-           }
+           CdmStore.getService(IUserService.class).merge(getEntity(), true);
+           
        }
 
        @Override
index e5cad68..2ed42b8 100644 (file)
@@ -265,9 +265,8 @@ public class CdmStore {
     static void setInstance(ICdmApplicationConfiguration applicationController,
             ICdmSource cdmSource) {
         instance = new CdmStore(applicationController, cdmSource);
-        if(getCurrentSessionManager().isRemoting()) {
-            CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
-        }
+        CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
+        
     }
 
     private CdmStore(ICdmApplicationConfiguration applicationController,
index 38ae719..c0486d0 100644 (file)
@@ -69,11 +69,10 @@ public class AuthenticatedUserBar extends WorkbenchWindowControlContribution imp
         if(authenticatedUser == null) {
             text = "Not logged in              " ;
         } else {
-            if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                CdmRemoteSource source = (CdmRemoteSource) CdmStore.getActiveCdmSource();
-                String loginInfo = authenticatedUser.getUsername() + "@" + source.getName() + ":" + source.getContextPath();
-                PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setText(ApplicationUtil.getTitle() + " " + loginInfo);
-            }
+            CdmRemoteSource source = (CdmRemoteSource) CdmStore.getActiveCdmSource();
+            String loginInfo = authenticatedUser.getUsername() + "@" + source.getName() + ":" + source.getContextPath();
+            PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setText(ApplicationUtil.getTitle() + " " + loginInfo);
+            
             text = "Logged in as: " + authenticatedUser.getUsername() + "         ";
         }
 
index 07a3d89..e70f4a8 100644 (file)
@@ -116,13 +116,8 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                int width = image.calculateWidth();
                 IEditGeoService editGeoService;
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
-               if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                   editGeoService = ((CdmApplicationRemoteController)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
-               }else{
-                   editGeoService =(IEditGeoService) CdmStore.getCurrentApplicationConfiguration().getBean(
-                       "editGeoService");
-               }
-
+               editGeoService = ((CdmApplicationRemoteController)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
+               
                String parameter = editGeoService.getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
                 false,
index 0bea2ae..19bd989 100644 (file)
@@ -49,7 +49,7 @@ public class NameRelationshipWizard extends Wizard implements IConversationEnabl
        public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
                NameRelationshipWizard.callingSection = callingSection;
                rootElement = callingSection.getEntity();
-               if (CdmStore.isActive() && CdmStore.getCurrentSessionManager().isRemoting()) {
+               if (CdmStore.isActive()) {
             previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
             cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
             cdmEntitySession.bind();
index 5e10262..279f2fa 100644 (file)
@@ -75,7 +75,7 @@ public class EditFromSelectionWizard extends Wizard implements
        private CdmBase rootElement;
 
        public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
-        if (CdmStore.isActive() && CdmStore.getCurrentSessionManager().isRemoting()) {
+        if (CdmStore.isActive()) {
             previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
             cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
             cdmEntitySession.bind();
index a222311..b3ca3f4 100644 (file)
@@ -86,6 +86,7 @@ public class SaveImportedSpecimenAction extends Action {
                 Collections.sort(biocaseResponses, getComparator()); 
                 URI dataSetUri = null;
                 Abcd206ImportConfigurator configuratorAbcd;
+                
                 List<Abcd206ImportConfigurator> abcdConfigurators = new ArrayList<Abcd206ImportConfigurator>();
                 DataSetResponse dataSetResponse;
                 OccurenceQuery bioCaseOccurrenceQuery = null;
@@ -102,6 +103,7 @@ public class SaveImportedSpecimenAction extends Action {
                                        }
                        if (!response.getDataSetUri().equals(dataSetUri)){
                                configuratorAbcd = Abcd206ImportConfigurator.NewInstance(dataSetUri, null, false);
+                               configuratorAbcd.addMediaAsMediaSpecimen(true);
                                if (configuratorAbcd != null){
                                        abcdConfigurators.add(configuratorAbcd);
                                }
index 1c16a6f..eb01cbb 100644 (file)
@@ -71,15 +71,9 @@ public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase
 //                    new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
             //configurator.setCdmAppController(repo);
             configurator.setAddMediaAsMediaSpecimen(true);
-            if(CdmStore.getCurrentSessionManager().isRemoting()) {
-                Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
-                CdmStore.getImportManager().run(job);
-            } else {
-                configurator.setSource(resultStream);
-                CdmDefaultImport<Abcd206ImportConfigurator> importer = new CdmDefaultImport<Abcd206ImportConfigurator>();
-                importer.invoke(configurator);
-            }
-           // results = repo.getUnits();
+            Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
+            CdmStore.getImportManager().run(job);
+            
             setResults(results);
         } catch (ClientProtocolException e) {
             logger.error(errorMessage, e);
index 9ba5389..a33c03d 100644 (file)
@@ -78,62 +78,63 @@ public class SpecimenSearchWizard extends Wizard implements IImportWizard {
         Abcd206ImportConfigurator configurator =  CdmStore.getImportManager().AbcdConfigurator();
         configurator.setOccurenceQuery(query);
         configurator.setSourceUri(providerSelectionPage.getEndPoint());
+        configurator.setAddMediaAsMediaSpecimen(true);
         configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
-        if(CdmStore.getCurrentSessionManager().isRemoting() ) {
-            //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
-            //CdmStore.getImportManager().run(job);
-            try {
-                serviceWrapper = providerSelectionPage.getQueryServiceWrapper();
-                InputStream stream = null;
-
-                final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-                IWorkbenchPage activePart = window.getActivePage();
-                if (providerSelectionPage.getQueryType().equals(QueryType.BIOCASE)){
-                    stream =((BioCaseQueryServiceWrapper) serviceWrapper).query(query, configurator.getSourceUri());
-                    SpecimenImportReport report = new SpecimenImportReport();
-                    UnitAssociationWrapper unitNodesList = AbcdParseUtility.parseUnitsNodeList(stream, report);
-                    NodeList nodeList = unitNodesList.getAssociatedUnits();
-                    String prefix = unitNodesList.getPrefix();
-                    String associationType = unitNodesList.getAssociationType();
-                    URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
-                    String content = AbcdParseUtility.parseFirstTextContent(nodeList);
-                    System.out.println(content);
-
-
-                    SpecimenImportView specimenImportView = new SpecimenImportView();
-                    try {
-                        specimenImportView = (SpecimenImportView) activePart.showView(SpecimenImportView.ID);
-                        specimenImportView.setEndpoint(providerSelectionPage.getEndPoint());
-                        specimenImportView.setQuery(query);
-                        dataImportView = specimenImportView;
-                    } catch (PartInitException e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-
-                    }
-
-                } else{
-                    try {
-                       
-                        dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE);
-                        dataImportView.setQuery(query);                
-                               //      (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage()
-                             // .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE);
-
-                    } catch (PartInitException e) {
-                        // TODO Auto-generated catch block
-                        e.printStackTrace();
-                    }
+      
+        //Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
+        //CdmStore.getImportManager().run(job);
+        try {
+            serviceWrapper = providerSelectionPage.getQueryServiceWrapper();
+            InputStream stream = null;
+
+            final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+            IWorkbenchPage activePart = window.getActivePage();
+            if (providerSelectionPage.getQueryType().equals(QueryType.BIOCASE)){
+                stream =((BioCaseQueryServiceWrapper) serviceWrapper).query(query, configurator.getSourceUri());
+                SpecimenImportReport report = new SpecimenImportReport();
+                UnitAssociationWrapper unitNodesList = AbcdParseUtility.parseUnitsNodeList(stream, report);
+                NodeList nodeList = unitNodesList.getAssociatedUnits();
+                String prefix = unitNodesList.getPrefix();
+                String associationType = unitNodesList.getAssociationType();
+                URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
+                String content = AbcdParseUtility.parseFirstTextContent(nodeList);
+                System.out.println(content);
+
+
+                SpecimenImportView specimenImportView = new SpecimenImportView();
+                try {
+                    specimenImportView = (SpecimenImportView) activePart.showView(SpecimenImportView.ID);
+                    specimenImportView.setEndpoint(providerSelectionPage.getEndPoint());
+                    specimenImportView.setQuery(query);
+                    dataImportView = specimenImportView;
+                } catch (PartInitException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
 
                 }
 
+            } else{
+                try {
+                       
+                    dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE);
+                    dataImportView.setQuery(query);            
+                       //      (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                         // .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE);
+
+                } catch (PartInitException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
 
-            } catch (IOException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
             }
-           // CdmStore.getImportManager().run(configurator);
+
+
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
         }
+       // CdmStore.getImportManager().run(configurator);
+    
 //        try {
 //            switch (providerSelectionPage.getQueryType()) {
 //            case BIOCASE: