Commits

Anonymous committed 046d26a

resource catalog paths MUST be relative in prearchive

Comments (0)

Files changed (2)

plugin-resources/repository/dcm/jars/dicom-xnat-mx-1.6.2-SNAPSHOT.jar

Binary file modified.

plugin-resources/webapp/xnat/java/org/nrg/xnat/archive/PrearcSessionArchiver.java

 package org.nrg.xnat.archive;
 
 import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Map;
 import org.nrg.xft.event.EventUtils;
 import org.nrg.xft.event.persist.PersistentWorkflowI;
 import org.nrg.xft.event.persist.PersistentWorkflowUtils;
-import org.nrg.xft.event.persist.PersistentWorkflowUtils.ActionNameAbsent;
 import org.nrg.xft.event.persist.PersistentWorkflowUtils.EventRequirementAbsent;
 import org.nrg.xft.event.persist.PersistentWorkflowUtils.JustificationAbsent;
 import org.nrg.xft.exception.ElementNotFoundException;
  *                  Fail
  *
  */
+@SuppressWarnings("deprecation")
 public final class PrearcSessionArchiver extends StatusProducer implements Callable<String>,StatusPublisherI {
 	private static final String TRIGGER_PIPELINES = "triggerPipelines";
 
 		}
 	}
 
-	/**
-	 * Updates the prearchive session XML, if possible. Errors here are logged but not
-	 * otherwise handled; messing up the prearchive session XML is not a disaster.
-	 * @param prearcSessionPath path of session directory in prearchive
-	 */
-	private void updatePrearchiveSessionXML(final String prearcSessionPath, final XnatImagesessiondata newSession) {
-		final File prearcSessionDir = new File(prearcSessionPath);
-		try {
-			final FileWriter prearcXML = new FileWriter(prearcSessionDir.getPath() + ".xml");
-			try {
-				logger.debug("Preparing to update prearchive XML for {}", newSession);
-				newSession.toXML(prearcXML, false);
-			} catch (RuntimeException e) {
-				logger.error("unable to update prearchive session XML", e);
-				warning("updated prearchive session XML could not be written: " + e.getMessage());
-			} catch (SAXException e) {
-				logger.error("attempted to write invalid updated prearchive session XML", e);
-				warning("updated prearchive session XML is invalid: " + e.getMessage());
-			} finally {
-				prearcXML.close();
-			}
-		} catch (FileNotFoundException e) {
-			logger.error("unable to update prearchive session XML", e);
-			warning("prearchive session XML not found, cannot update");
-		} catch (IOException e) {
-			logger.error("error updating prearchive session XML", e);
-			warning("could not update prearchive session XML: " + e.getMessage());
-		}
-	}
-
 
 	/**
 	 * This method will allow users to pass xml path as parameters.  The values supplied will be copied into the loaded session.
 		src=(XnatImagesessiondata)BaseElement.GetGeneratedItem(i);
 	}
 
-	@SuppressWarnings("deprecation")
 	public void checkForConflicts(final XnatImagesessiondata src, final File srcDIR, final XnatImagesessiondata existing, final File destDIR) throws ClientException{
 		if(existing!=null){
 			if(!overwrite){