Index: lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java,v diff -u -r1.2 -r1.3 --- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java 25 Jul 2006 07:15:34 -0000 1.2 +++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java 16 Aug 2006 06:19:37 -0000 1.3 @@ -218,18 +218,18 @@ public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { - Notebook toolContentObj = notebookDAO.getByContentId(toolContentId); - if (toolContentObj == null) + Notebook notebook = notebookDAO.getByContentId(toolContentId); + if (notebook == null) throw new DataMissingException( "Unable to find tool content by given id :" + toolContentId); // set ResourceToolContentHandler as null to avoid copy file node in // repository again. - toolContentObj = Notebook.newInstance(toolContentObj, toolContentId, + notebook = Notebook.newInstance(notebook, toolContentId, null); - toolContentObj.setToolContentHandler(null); - toolContentObj.setNotebookSessions(null); - Set atts = toolContentObj.getNotebookAttachments(); + notebook.setToolContentHandler(null); + notebook.setNotebookSessions(null); + Set atts = notebook.getNotebookAttachments(); for (NotebookAttachment att : atts) { att.setNotebook(null); } @@ -238,7 +238,7 @@ NotebookAttachment.class.getName(), "fileUuid", "fileVersionId"); exportContentService.exportToolContent(toolContentId, - toolContentObj, notebookToolContentHandler, rootPath); + notebook, notebookToolContentHandler, rootPath); } catch (ExportToolContentException e) { throw new ToolException(e); }