Merge branch 'hotfix/3.12.4' into develop
authorjenkins <jenkins-int@bgbm.org>
Mon, 15 Feb 2016 09:31:03 +0000 (10:31 +0100)
committerjenkins <jenkins-int@bgbm.org>
Mon, 15 Feb 2016 09:31:03 +0000 (10:31 +0100)
Conflicts:
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java - resolved
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java - UNRESOLVED!!!!!

1  2 
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java

@@@ -74,9 -75,13 +75,10 @@@ public class CdmServiceCacher extends C
          return load(term);
      }
  
 -    /* (non-Javadoc)
 -     * @see eu.etaxonomy.cdm.model.ICdmCacher#isCachable(eu.etaxonomy.cdm.model.common.CdmBase)
 -     */
      @Override
      public boolean isCachable(CdmBase cdmEntity) {
-         if(cdmEntity != null && cdmEntity instanceof DefinedTermBase) {
+      //   if(cdmEntity != null && cdmEntity instanceof DefinedTermBase) {
+          if(cdmEntity != null && cdmEntity instanceof TermBase) {
              return true;
          }
          return false;
              %wizard.description
           </description>
        </wizard>
-    </extension>
+    </extension-->
     <extension
            point="eu.etaxonomy.taxeditor.store.cdmViewer">
 -       <cdmViewer
 -             class="eu.etaxonomy.taxeditor.editor.EditorCdmViewer">
 -       </cdmViewer>
 +      <viewCommandMapping
 +            commandId="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxonNode"
 +            selection="eu.etaxonomy.cdm.model.taxon.TaxonNode"
 +            viewerName="Taxon Editor">
 +      </viewCommandMapping>
 +      <viewCommandMapping
 +            commandId="eu.etaxonomy.taxeditor.editor.openTaxonEditorForTaxon"
 +            selection="eu.etaxonomy.cdm.model.taxon.TaxonBase"
 +            viewerName="TaxonEditor">
 +      </viewCommandMapping>
      </extension>
  </plugin>
@@@ -56,8 -56,15 +56,20 @@@ public class NewTaxonNodeWizard extend
              Reference sec = taxon.getSec();
              taxon.setSec(null);
              try{
++<<<<<<< HEAD
 +              UpdateResult result = CdmStore.getService(ITaxonNodeService.class).createNewTaxonNode(parent.getUuid(), taxon, parent.getReference(), parent.getMicroReference());
 +                      
++=======
+               UUID parentNodeUuid;
+               if(parent instanceof Classification){
+                   parentNodeUuid = ((Classification) parent).getRootNode().getUuid();
+               }
+               else{
+                   parentNodeUuid = parent.getUuid();
+               }
+                 UpdateResult result = CdmStore.getService(ITaxonNodeService.class).createNewTaxonNode(parentNodeUuid, taxon, parent.getReference(), parent.getMicroReference());
++>>>>>>> hotfix/3.12.4
                  //TaxonNode taxonNode = parent.addChildTaxon(taxon, parent.getReference(), parent.getMicroReference());
  
                /*  if(CdmStore.getCurrentSessionManager().isRemoting()) {
                generatedTaxonNodeUuid = result.getCdmEntity().getUuid();
                TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(generatedTaxonNodeUuid);
                taxonNode.getTaxon().setSec(sec);
++<<<<<<< HEAD
 +              CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
++=======
+               CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
++>>>>>>> hotfix/3.12.4
                  Set<CdmBase> affectedObjects = new HashSet<CdmBase>();
                  if (result.getUpdatedObjects().iterator().hasNext()){
                        TaxonNode parentNode = (TaxonNode)result.getUpdatedObjects().iterator().next();
                          affectedObjects.add(parentNode);
                      }
                  }
++<<<<<<< HEAD
 +                
  
 +                
++=======
++>>>>>>> hotfix/3.12.4
 +
                  if(CdmStore.getCurrentSessionManager().isRemoting()) {
                      CdmApplicationState.getCurrentDataChangeService()
                          .fireChangeEvent(new CdmChangeEvent(Action.Create, affectedObjects, NewTaxonNodeWizard.class), true);