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

index 91d656cb015cbb3bc6a735a13f0711e759e3190a,4b5d0106a9ccb5add07c05655a1f249ba7dccfa3..bd8fca97e7b04a35a3b550d47d8bf3b37fbbf51f
@@@ -1048,4 -1052,6 +1052,5 @@@ public class TransientOccurenceService 
      public UpdateResult moveSequence(UUID arg0, UUID arg1, UUID arg2) {
          return defaultService.moveSequence(arg0, arg1, arg2);
      }
 -
  }
index 11c1af71a20e4ec79c5ba08f7c7430039178e71a,e7bfe694f565d2a18d89b8a5848860145a0a04ba..9e8f30b5c955a056a3a97fe56a0d1a8a5bfdcb08
@@@ -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;
index c7346c245d4439cb1ad321f32f0184750abc02df,93c229adfd2e2cfda5114ab9c7f341b36b3aa86b..6eb54ff1ce7d588055501526c0fb94951b86b5f6
@@@ -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;
      }
  }