Index: lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java =================================================================== diff -u -r58cfe8c94ee9878fc43820e4f0ae4d1f8a1df35a -r2dfc4f4d7ec60d18b3edf74161c7a0b08f8cf2ed --- lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java (.../NotebookService.java) (revision 58cfe8c94ee9878fc43820e4f0ae4d1f8a1df35a) +++ lams_tool_notebook/src/java/org/lamsfoundation/lams/tool/notebook/service/NotebookService.java (.../NotebookService.java) (revision 2dfc4f4d7ec60d18b3edf74161c7a0b08f8cf2ed) @@ -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); }