Merge branch 'develop' into remoting-4.0
authorCherian Mathew <c.mathew@bgbm.org>
Tue, 8 Sep 2015 18:49:12 +0000 (20:49 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Tue, 8 Sep 2015 18:49:12 +0000 (20:49 +0200)
Conflicts:
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/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java

1  2 
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/derivate/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/MoveDerivateOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java

@@@ -111,9 -109,7 +111,10 @@@ public class MoveDerivateOperation exte
          else if(draggedNodeValue instanceof SingleRead && targetNodeValue instanceof Sequence){
              SingleRead singleRead = (SingleRead) draggedNodeValue;
              if(fromParentSpecimen instanceof Sequence){
 -                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead).isOk();
 +                return CdmStore.getService(ISequenceService.class).moveSingleRead(((Sequence)fromParentSpecimen).getUuid(),
 +                        ((Sequence)targetNodeValue).getUuid(),
 +                        singleRead.getUuid()).isOk();
++
              }
          }
  
          else if(draggedNodeValue instanceof Sequence && targetNodeValue instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
              Sequence sequence = (Sequence)draggedNodeValue;
              if(fromParentSpecimen instanceof DnaSample && ((SpecimenOrObservationBase<?>) targetNodeValue).getRecordBasis()==SpecimenOrObservationType.DnaSample){
 -                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence).isOk();
 +                return occurrenceService.moveSequence(((DnaSample)fromParentSpecimen).getUuid(),
 +                        ((DnaSample)targetNodeValue).getUuid(),
 +                        sequence.getUuid()).isOk();
++
              }
          }
          return false;
@@@ -47,12 -39,8 +47,9 @@@ public class DerivateSearchView extend
          CdmStore.getContextManager().addContextListener(this);
      }
  
-     /* (non-Javadoc)
-      * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
-      */
      @Override
      public void createPartControl(Composite parent) {
 +
          derivateSearchCompositeController = new DerivateSearchCompositeController(parent, this);
          getSite().setSelectionProvider(derivateSearchCompositeController.getResultViewer());
          derivateSearchCompositeController.setEnabled(CdmStore.isActive());
          if(getConversationHolder()!=null && !getConversationHolder().isClosed() && !getConversationHolder().isBound()){
              getConversationHolder().bind();
          }
 +        if(getCdmEntitySession() != null) {
 +            getCdmEntitySession().bind();
 +        }
      }
  
-     /* (non-Javadoc)
-      * @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
-      */
      @Override
      public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
      }
          return conversationHolder;
      }
  
 -    /**
 -     * {@inheritDoc}
 -     */
++
      @Override
      public void dispose() {
+         if(conversationHolder!=null){
+             conversationHolder.close();
+         }
++
 +        cdmEntitySession.dispose();
 +        super.dispose();
 +    }
 +
 +
 +    /* (non-Javadoc)
 +     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
 +     */
 +    @Override
 +    public ICdmEntitySession getCdmEntitySession() {
 +        initSession();
 +        return cdmEntitySession;
 +    }
 +
 +    /* (non-Javadoc)
 +     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
 +     */
 +    @Override
 +    public <T extends CdmBase> Collection<T> getRootEntities() {
 +        // TODO Auto-generated method stub
 +        return null;
 +    }
 +
 +    /* (non-Javadoc)
 +     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
 +     */
 +    @Override
 +    public Map<Object, List<String>> getPropertyPathsMap() {
 +        // TODO Auto-generated method stub
 +        return null;
      }
  }