Index: lams_tool_mindmap/.classpath =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.classpath,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.classpath 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + Index: lams_tool_mindmap/.cvsignore =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.cvsignore,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.cvsignore 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,3 @@ +build +.myeclipse +.mymetadata Index: lams_tool_mindmap/.myumldata =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.myumldata,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.myumldata 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,2 @@ +#Mon Jul 17 14:17:56 EST 2006 +CodeGenContainer=java.util.Vector Index: lams_tool_mindmap/.project =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.project,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.project 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,49 @@ + + + lams_tool_mindmap + + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + com.ibm.etools.validation.validationbuilder + + + + + com.ibm.sse.model.structuredbuilder + + + + + com.genuitec.eclipse.hibernate.HibernateBuilder + + + + + + com.genuitec.eclipse.hibernate.hibernatenature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + + Index: lams_tool_mindmap/build.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/build.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/build.properties 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,20 @@ + +# project-wide properties +signature=lamind10 + +#project version +tool.version=20090202 + +package=org/lamsfoundation/lams/tool/mindmap +package.name=org.lamsfoundation.lams.tool.mindmap +weblib=lib + +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.0 + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.mindmap + Index: lams_tool_mindmap/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/build.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/build.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,583 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploying the Mindmap Tool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/.settings/com.genuitec.eclipse.j2eedt.core.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.settings/Attic/com.genuitec.eclipse.j2eedt.core.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.settings/com.genuitec.eclipse.j2eedt.core.prefs 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,3 @@ +#Fri Jun 02 15:55:47 EST 2006 +defaultTldInfo=http\://java.sun.com/jsp/jstl/core\=c;http\://java.sun.com/jsp/jstl/sql\=sql;html\=http\://struts.apache.org/tags-html;c\=http\://java.sun.com/jsp/jstl/core;fmt\=http\://java.sun.com/jsp/jstl/fmt;h\=http\://java.sun.com/jsf/html;nested\=http\://struts.apache.org/tags-nested;http\://struts.apache.org/tags-html\=html;http\://java.sun.com/jsp/jstl/fmt\=fmt;bean\=http\://struts.apache.org/tags-bean;http\://java.sun.com/jsp/jstl/functions\=fn;fn\=http\://java.sun.com/jsp/jstl/functions;logic\=http\://struts.apache.org/tags-logic;http\://struts.apache.org/tags-nested\=nested;http\://java.sun.com/jsp/jstl/xml\=x;f\=http\://java.sun.com/jsf/core;tiles\=http\://struts.apache.org/tags-tiles;http\://java.sun.com/jsf/html\=h;http\://struts.apache.org/tags-tiles\=tiles;http\://java.sun.com/jsf/core\=f;http\://struts.apache.org/tags-bean\=bean;x\=http\://java.sun.com/jsp/jstl/xml;sql\=http\://java.sun.com/jsp/jstl/sql;http\://struts.apache.org/tags-logic\=logic +eclipse.preferences.version=1 Index: lams_tool_mindmap/.settings/org.eclipse.core.resources.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.settings/Attic/org.eclipse.core.resources.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.settings/org.eclipse.core.resources.prefs 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,5 @@ +#Tue Mar 24 14:05:02 EST 2009 +eclipse.preferences.version=1 +encoding//conf/language/lams/ApplicationResources_ru_RU.properties=UTF-8 +encoding//conf/xdoclet/web-settings.xml=UTF-8 +encoding//web/WEB-INF/web.xml=UTF-8 Index: lams_tool_mindmap/.settings/org.eclipse.jdt.core.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.settings/Attic/org.eclipse.jdt.core.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.settings/org.eclipse.jdt.core.prefs 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,12 @@ +#Thu Jul 20 11:06:01 EST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 Index: lams_tool_mindmap/.settings/org.eclipse.jdt.ui.prefs =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/.settings/Attic/org.eclipse.jdt.ui.prefs,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/.settings/org.eclipse.jdt.ui.prefs 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,3 @@ +#Thu Mar 23 13:45:11 EST 2006 +eclipse.preferences.version=1 +internal.default.compliance=default Index: lams_tool_mindmap/conf/hibernate/mappings/hibernate.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/Attic/hibernate.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/hibernate.properties 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,7 @@ +hibernate.connection.username=lams +hibernate.connection.password=lamsdemo +hibernate.connection.url=jdbc:mysql://localhost/lams +hibernate.connection.driver_class=com.mysql.jdbc.Driver +hibernate.dialect=org.hibernate.dialect.MySQLDialect + + Index: lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Mindmap.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Attic/Mindmap.hbm.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Mindmap.hbm.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapAttachment.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Attic/MindmapAttachment.hbm.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapAttachment.hbm.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapNode.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Attic/MindmapNode.hbm.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapNode.hbm.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapRequest.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Attic/MindmapRequest.hbm.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapRequest.hbm.xml 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapSession.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Attic/MindmapSession.hbm.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapSession.hbm.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapUser.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/Attic/MindmapUser.hbm.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mindmap/model/MindmapUser.hbm.xml 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/jar/META-INF/MANIFEST.MF =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/jar/META-INF/Attic/MANIFEST.MF,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/jar/META-INF/MANIFEST.MF 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,3 @@ +Implementation-Title: LAMS - Notebok Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) Index: lams_tool_mindmap/conf/language/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/language/ApplicationResources.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/language/ApplicationResources.properties 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,83 @@ +appName = notebook +#language code: en +#locale code: AU + +#=================== labels for Mindmap =================# +tool.display.name =Mindmap +tool.description =Mindmap Tool +activity.title =Mindmap +activity.description =Mindmap Tool +activity.helptext =Mindmap for making mindmaps +pageTitle.authoring =Mindmap Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +advanced.multiUserMode =Use multi-user mode +instructions.onlineInstructions =Online Instructions: +instructions.offlineInstructions =Offline Instructions: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details +pageTitle.monitoring =Mindmap Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.contentInUseSet =The modification of content is not allowed since one or more students has attempted the activity. +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Mindmap Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.back =Back +button.finish =Finish +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +label.mindmapEntry =Mindmap +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Mindmap Tool. If reporting this error, please report:
{0} +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.enableJavaScript =Enable Javascript for Mindmap to load! Index: lams_tool_mindmap/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/language/lams/ApplicationResources.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/language/lams/ApplicationResources.properties 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,113 @@ +appName = mindmap +#language code: en +#locale code: AU + +# CVS ID: $Id: ApplicationResources.properties,v 1.1 2009/04/03 00:00:30 ruslan Exp $ Exported from the LAMS Community by Ernie Ghiglione on Wed Nov 19 18:37:12 GMT 2008 + +#=================== labels for Mindmap =================# +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Mindmap for making mindmaps +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Mindmap +tool.description =Mindmap Tool +activity.title =Mindmap +activity.description =Mindmap Tool +pageTitle.authoring =Mindmap Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.reflectOnActivity =Add Notebook at end of Mindmap with the following instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +advanced.multiUserMode =Use multi-user mode +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Mindmap +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Mindmap Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Mindmap Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.back =Back +button.next =Next +button.continue =Continue +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +label.mindmapEntry =Mindmap +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Mindmap Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +button.finish =Next Activity +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Mindmap, you won't be able to continue editing nodes. +message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +label.authoring.up =Up +label.authoring.down =Down +label.authoring.edit =Edit +message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. +message.enableJavaScript =Enable Javascript for Mindmap to load! +# Outputs +output.learner.number.of.nodes =Number of nodes +# Mindmap labels +node.root.defaultName =Root node +node.child1.defaultName =Child node1 +node.child2.defaultName =Child node2 +node.instructor.label =Teacher +node.learner.label =Student +# Lables for Flash +local.title =Text +local.delete_question = Are sure you want to delete? +local.yes =Yes +local.no =No +local.node_creator =Node creator +# Ped Planner +label.planner.editing.advice=Editing advice \ No newline at end of file Index: lams_tool_mindmap/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/language/lams/ApplicationResources_en_AU.properties 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,113 @@ +appName = mindmap +#language code: en +#locale code: AU + +# CVS ID: $Id: ApplicationResources_en_AU.properties,v 1.1 2009/04/03 00:00:31 ruslan Exp $ Exported from the LAMS Community by Ernie Ghiglione on Wed Nov 19 18:37:12 GMT 2008 + +#=================== labels for Mindmap =================# +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Mindmap for making mindmaps +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Mindmap +tool.description =Mindmap Tool +activity.title =Mindmap +activity.description =Mindmap Tool +pageTitle.authoring =Mindmap Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.reflectOnActivity =Add Notebook at end of Mindmap with the following instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +advanced.multiUserMode =Use multi-user mode +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Mindmap +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Mindmap Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Mindmap Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.back =Back +button.next =Next +button.continue =Continue +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +label.mindmapEntry =Mindmap +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Mindmap Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +button.finish =Next Activity +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Mindmap, you won't be able to continue editing nodes. +message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +label.authoring.up =Up +label.authoring.down =Down +label.authoring.edit =Edit +message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. +message.enableJavaScript =Enable Javascript for Mindmap to load! +# Outputs +output.learner.number.of.nodes =Number of nodes +# Mindmap labels +node.root.defaultName =Root node +node.child1.defaultName =Child node1 +node.child2.defaultName =Child node2 +node.instructor.label =Teacher +node.learner.label =Student +# Lables for Flash +local.title =Text +local.delete_question = Are sure you want to delete? +local.yes =Yes +local.no =No +local.node_creator =Node creator +# Ped Planner +label.planner.editing.advice=Editing advice \ No newline at end of file Index: lams_tool_mindmap/conf/language/lams/ApplicationResources_ru_RU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/language/lams/ApplicationResources_ru_RU.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/language/lams/ApplicationResources_ru_RU.properties 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,112 @@ +appName = mindmap +#language code: ru +#locale code: RU + +# CVS ID: $Id: ApplicationResources_ru_RU.properties,v 1.1 2009/04/03 00:00:31 ruslan Exp $ Exported from the LAMS Community by Ernie Ghiglione on Wed Nov 19 18:37:12 GMT 2008 + +#=================== labels for Mindmap =================# +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =?????????? +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Mindmap for making mindmaps +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Mindmap +tool.description =Mindmap Tool +activity.title =Mindmap +activity.description =Mindmap Tool +pageTitle.authoring =Mindmap Authoring +button.basic =???????? +button.advanced =??????????? +button.upload =????????? +label.authoring.basic.title =????????\: +label.authoring.basic.content =Content: +advanced.reflectOnActivity =Add Notebook at end of Noticeboard with the following instructions: +advanced.lockOnFinished =Lock when finished +advanced.multiUserMode =Use multi-user mode +instructions.type.online =?????? +instructions.type.offline =?????????? +label.filename =??? ????? +label.type =??? +label.attachments =?????????? +link.view =??? +link.download =Download +link.delete =??????? +message.updateSuccess =????????? ????????? +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Mindmap +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Mindmap Monitoring +button.summary =Summary +button.editActivity =????????????? ??????? +button.statistics =?????????? +titleHeading.summary =Summary +titleHeading.statistics =?????????? +titleHeading.editActivity =????????????? ??????? +titleHeading.exportPortfolio =??????? ????????? +heading.group =?????? {0}\: +heading.totalLearners =?????????? ????????\: +heading.totalLearnersInGroup =????? ?????????? ???????? ? ??????\: +heading.totalFinishedLearnersInGroup =?????????? ??????????? ????????\: +message.summary =There is no summary available for this tool. +label.view =??????????? +label.notAvailable =?? ???????? +heading.learner =?????? +heading.notebookEntry =Mindmap Entry +button.cancel =?????? +button.ok =OK +button.done =Done +button.save =????????? +button.back =????? +button.next =????? +button.continue =Continue +label.save =????????? +label.cancel =?????? +label.created =Created +label.lastModified =Last modified +label.notebookEntry =?????? ??????? +label.mindmapEntry =Mindmap +error.missingParam =?????????? ??????????. ??????????? ???????? {0}. +error.exceedMaxFileSize =?????? ????? ????????? ?????? +error.exception.NbApplication =An internal error has occured with the Mindmap Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +button.finish =Next Activity +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Mindmap, you won't be able to continue editing nodes. +message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =??????????? ????????? +label.authoring.up =Up +label.authoring.down =Down +label.authoring.edit =????????????? +message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. +message.enableJavaScript =Enable Javascript for Mindmap to load! +# Outputs +output.learner.number.of.nodes =Number of nodes +# Mindmap labels +node.root.defaultName =???????? ???? +node.child1.defaultName =???????? ????1 +node.child2.defaultName =???????? ????2 +node.instructor.label =????????????? +node.learner.label =?????? +# Lables for Flash +local.title =????? +local.delete_question =?? ???????, ??? ?????? ??????? ????? +local.yes =?? +local.no =??? +local.node_creator =????? +# Ped Planner +label.planner.editing.advice=\u0421\u043E\u0432\u0435\u0442 \u043F\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044E \ No newline at end of file Index: lams_tool_mindmap/conf/language/rams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/language/rams/Attic/ApplicationResources.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/language/rams/ApplicationResources.properties 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,83 @@ +appName = notebook +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =mindmap +activity.description =Notebook Tool +activity.helptext =Notebook for notes and reflections +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +advanced.multiUserMode =Use multi-user mode +instructions.onlineInstructions =Online Instructions: +instructions.offlineInstructions =Offline Instructions: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +message.defineLaterSet =Please wait for the researcher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Participants: +heading.totalLearnersInGroup =Total Number of Participants in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Participants: +message.contentInUseSet =The modification of content is not allowed since one or more participants has attempted the activity. +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Participant +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.back =Back +button.finish =Finish +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +label.mindmapEntry =Mindmap +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Notebook Tool. If reporting this error, please report:
{0} +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +error.content.locked =The content has been locked since it is being used by one or more participants. The modification of the content is not allowed. +error.defineLater =Sorry, the activity is not ready yet. Please wait for the researcher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes. +message.activityLocked =This activity has been set up to not allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +message.enableJavaScript =Enable Javascript for Mindmap to load! Index: lams_tool_mindmap/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/language/rams/Attic/ApplicationResources_en_AU.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/language/rams/ApplicationResources_en_AU.properties 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,83 @@ +appName = notebook +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =mindmap +activity.description =Notebook Tool +activity.helptext =Notebook for notes and reflections +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +advanced.multiUserMode =Use multi-user mode +instructions.onlineInstructions =Online Instructions: +instructions.offlineInstructions =Offline Instructions: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +message.defineLaterSet =Please wait for the researcher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Participants: +heading.totalLearnersInGroup =Total Number of Participants in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Participants: +message.contentInUseSet =The modification of content is not allowed since one or more participants has attempted the activity. +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Participant +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.back =Back +button.finish =Finish +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +label.mindmapEntry =Mindmap +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Notebook Tool. If reporting this error, please report:
{0} +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +error.content.locked =The content has been locked since it is being used by one or more participants. The modification of the content is not allowed. +error.defineLater =Sorry, the activity is not ready yet. Please wait for the researcher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes. +message.activityLocked =This activity has been set up to not allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +message.enableJavaScript =Enable Javascript for Mindmap to load! Index: lams_tool_mindmap/conf/middlegen/lams_tool_lamindmap11-prefs.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/middlegen/lams_tool_lamindmap11-prefs.properties,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/middlegen/lams_tool_lamindmap11-prefs.properties 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,128 @@ +# Middlegen Preferences +hibernate.tables.tl_lamind10_attachment.base-class-name=MindmapAttachment +hibernate.tables.tl_lamind10_attachment.columns.create_date.columnspecialty=property +hibernate.tables.tl_lamind10_attachment.columns.create_date.java-name=createDate +hibernate.tables.tl_lamind10_attachment.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lamind10_attachment.columns.mindmap_uid.columnspecialty=foreign key +hibernate.tables.tl_lamind10_attachment.columns.mindmap_uid.java-name=mindmapUid +hibernate.tables.tl_lamind10_attachment.columns.mindmap_uid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_attachment.columns.file_name.inctostring=true +hibernate.tables.tl_lamind10_attachment.columns.file_name.java-name=fileName +hibernate.tables.tl_lamind10_attachment.columns.file_name.java-type=java.lang.String +hibernate.tables.tl_lamind10_attachment.columns.file_type.java-name=fileType +hibernate.tables.tl_lamind10_attachment.columns.file_type.java-type=java.lang.String +hibernate.tables.tl_lamind10_attachment.columns.file_uuid.columnspecialty=property +hibernate.tables.tl_lamind10_attachment.columns.file_uuid.incequals=false +hibernate.tables.tl_lamind10_attachment.columns.file_uuid.inctostring=true +hibernate.tables.tl_lamind10_attachment.columns.file_uuid.java-name=fileUuid +hibernate.tables.tl_lamind10_attachment.columns.file_uuid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_attachment.columns.file_version_id.inctostring=true +hibernate.tables.tl_lamind10_attachment.columns.file_version_id.java-name=fileVersionId +hibernate.tables.tl_lamind10_attachment.columns.file_version_id.java-type=java.lang.Long +hibernate.tables.tl_lamind10_attachment.columns.uid.columnspecialty=key +hibernate.tables.tl_lamind10_attachment.columns.uid.incequals=true +hibernate.tables.tl_lamind10_attachment.columns.uid.inctostring=true +hibernate.tables.tl_lamind10_attachment.columns.uid.java-name=uid +hibernate.tables.tl_lamind10_attachment.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_attachment.equalshashcode=true +hibernate.tables.tl_lamind10_attachment.keygenerator=native +hibernate.tables.tl_lamind10_mindmap.base-class-name=Mindmap +hibernate.tables.tl_lamind10_mindmap.columns.content_in_use.java-name=contentInUse +hibernate.tables.tl_lamind10_mindmap.columns.content_in_use.java-type=java.lang.Boolean +hibernate.tables.tl_lamind10_mindmap.columns.create_by.java-name=createBy +hibernate.tables.tl_lamind10_mindmap.columns.create_by.java-type=java.lang.Long +hibernate.tables.tl_lamind10_mindmap.columns.create_date.java-name=createDate +hibernate.tables.tl_lamind10_mindmap.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lamind10_mindmap.columns.define_later.java-name=defineLater +hibernate.tables.tl_lamind10_mindmap.columns.define_later.java-type=java.lang.Boolean +hibernate.tables.tl_lamind10_mindmap.columns.instructions.inctostring=true +hibernate.tables.tl_lamind10_mindmap.columns.instructions.java-name=instructions +hibernate.tables.tl_lamind10_mindmap.columns.instructions.java-type=java.lang.String +hibernate.tables.tl_lamind10_mindmap.columns.lock_on_finished.java-name=lockOnFinished +hibernate.tables.tl_lamind10_mindmap.columns.lock_on_finished.java-type=java.lang.Boolean +hibernate.tables.tl_lamind10_mindmap.columns.offline_instructions.java-name=offlineInstructions +hibernate.tables.tl_lamind10_mindmap.columns.offline_instructions.java-type=java.lang.String +hibernate.tables.tl_lamind10_mindmap.columns.online_instructions.java-name=onlineInstructions +hibernate.tables.tl_lamind10_mindmap.columns.online_instructions.java-type=java.lang.String +hibernate.tables.tl_lamind10_mindmap.columns.run_offline.java-name=runOffline +hibernate.tables.tl_lamind10_mindmap.columns.run_offline.java-type=java.lang.Boolean +hibernate.tables.tl_lamind10_mindmap.columns.title.inctostring=true +hibernate.tables.tl_lamind10_mindmap.columns.title.java-name=title +hibernate.tables.tl_lamind10_mindmap.columns.title.java-type=java.lang.String +hibernate.tables.tl_lamind10_mindmap.columns.tool_content_id.inctostring=true +hibernate.tables.tl_lamind10_mindmap.columns.tool_content_id.java-name=toolContentId +hibernate.tables.tl_lamind10_mindmap.columns.tool_content_id.java-type=java.lang.Long +hibernate.tables.tl_lamind10_mindmap.columns.uid.columnspecialty=key +hibernate.tables.tl_lamind10_mindmap.columns.uid.incequals=true +hibernate.tables.tl_lamind10_mindmap.columns.uid.inctostring=true +hibernate.tables.tl_lamind10_mindmap.columns.uid.java-name=uid +hibernate.tables.tl_lamind10_mindmap.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_mindmap.columns.update_date.java-name=updateDate +hibernate.tables.tl_lamind10_mindmap.columns.update_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lamind10_mindmap.dynamicInsert=false +hibernate.tables.tl_lamind10_mindmap.equalshashcode=true +hibernate.tables.tl_lamind10_mindmap.keygenerator=native +hibernate.tables.tl_lamind10_session.base-class-name=MindmapSession +hibernate.tables.tl_lamind10_session.columns.mindmap_uid.java-name=mindmapUid +hibernate.tables.tl_lamind10_session.columns.mindmap_uid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_session.columns.session_end_date.inctostring=true +hibernate.tables.tl_lamind10_session.columns.session_end_date.java-name=sessionEndDate +hibernate.tables.tl_lamind10_session.columns.session_end_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lamind10_session.columns.session_id.inctostring=true +hibernate.tables.tl_lamind10_session.columns.session_id.java-name=sessionId +hibernate.tables.tl_lamind10_session.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lamind10_session.columns.session_name.inctostring=true +hibernate.tables.tl_lamind10_session.columns.session_name.java-name=sessionName +hibernate.tables.tl_lamind10_session.columns.session_name.java-type=java.lang.String +hibernate.tables.tl_lamind10_session.columns.session_start_date.inctostring=true +hibernate.tables.tl_lamind10_session.columns.session_start_date.java-name=sessionStartDate +hibernate.tables.tl_lamind10_session.columns.session_start_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lamind10_session.columns.status.inctostring=true +hibernate.tables.tl_lamind10_session.columns.status.java-name=status +hibernate.tables.tl_lamind10_session.columns.status.java-type=java.lang.Integer +hibernate.tables.tl_lamind10_session.columns.uid.columnspecialty=key +hibernate.tables.tl_lamind10_session.columns.uid.incequals=true +hibernate.tables.tl_lamind10_session.columns.uid.inctostring=true +hibernate.tables.tl_lamind10_session.columns.uid.java-name=uid +hibernate.tables.tl_lamind10_session.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_session.equalshashcode=true +hibernate.tables.tl_lamind10_session.keygenerator=native +hibernate.tables.tl_lamind10_user.base-class-name=MindmapUser +hibernate.tables.tl_lamind10_user.columns.first_name.java-name=firstName +hibernate.tables.tl_lamind10_user.columns.first_name.java-type=java.lang.String +hibernate.tables.tl_lamind10_user.columns.last_name.columnspecialty=property +hibernate.tables.tl_lamind10_user.columns.last_name.java-name=lastName +hibernate.tables.tl_lamind10_user.columns.last_name.java-type=java.lang.String +hibernate.tables.tl_lamind10_user.columns.session_id.inctostring=true +hibernate.tables.tl_lamind10_user.columns.session_id.java-name=sessionId +hibernate.tables.tl_lamind10_user.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lamind10_user.columns.uid.columnspecialty=key +hibernate.tables.tl_lamind10_user.columns.uid.incequals=true +hibernate.tables.tl_lamind10_user.columns.uid.inctostring=true +hibernate.tables.tl_lamind10_user.columns.uid.java-name=uid +hibernate.tables.tl_lamind10_user.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lamind10_user.columns.user_id.inctostring=true +hibernate.tables.tl_lamind10_user.columns.user_id.java-name=userId +hibernate.tables.tl_lamind10_user.columns.user_id.java-type=java.lang.Long +hibernate.tables.tl_lamind10_user.equalshashcode=true +hibernate.tables.tl_lamind10_user.keygenerator=sequence +relations.tl_lamind10_mindmap-tl_lamind10_attachment.tl_lamind10_attachment-has-tl_lamind10_mindmap.enabled=true +relations.tl_lamind10_mindmap-tl_lamind10_attachment.tl_lamind10_attachment-has-tl_lamind10_mindmap.target-many=false +relations.tl_lamind10_mindmap-tl_lamind10_attachment.tl_lamind10_mindmap-has-tl_lamind10_attachment.enabled=true +relations.tl_lamind10_mindmap-tl_lamind10_attachment.tl_lamind10_mindmap-has-tl_lamind10_attachment.target-many=true +relations.tl_lamind10_mindmap-tl_lamind10_session.tl_lamind10_mindmap-has-tl_lamind10_session.enabled=true +relations.tl_lamind10_mindmap-tl_lamind10_session.tl_lamind10_mindmap-has-tl_lamind10_session.target-many=true +relations.tl_lamind10_mindmap-tl_lamind10_session.tl_lamind10_session-has-tl_lamind10_mindmap.enabled=true +relations.tl_lamind10_mindmap-tl_lamind10_session.tl_lamind10_session-has-tl_lamind10_mindmap.target-many=false +relations.tl_lamind10_session-tl_lamind10_user.tl_lamind10_session-has-tl_lamind10_user.enabled=true +relations.tl_lamind10_session-tl_lamind10_user.tl_lamind10_session-has-tl_lamind10_user.target-many=true +relations.tl_lamind10_session-tl_lamind10_user.tl_lamind10_user-has-tl_lamind10_session.enabled=true +relations.tl_lamind10_session-tl_lamind10_user.tl_lamind10_user-has-tl_lamind10_session.target-many=false +tables.tl_lamind10_attachment.x=566 +tables.tl_lamind10_attachment.y=173 +tables.tl_lamind10_mindmap.x=308 +tables.tl_lamind10_mindmap.y=176 +tables.tl_lamind10_session.x=70 +tables.tl_lamind10_session.y=70 +tables.tl_lamind10_user.x=460 +tables.tl_lamind10_user.y=28 Index: lams_tool_mindmap/conf/war/META-INF/MANIFEST.MF =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/war/META-INF/Attic/MANIFEST.MF,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/war/META-INF/MANIFEST.MF 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,4 @@ +Implementation-Title: LAMS - Mindmap Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: ./lams.jar ./lams-tool-lamind10.jar ./lams-contentrepository.jar ./lams-learning.jar Index: lams_tool_mindmap/conf/xdoclet/error-pages.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/error-pages.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/error-pages.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,14 @@ + + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + Index: lams_tool_mindmap/conf/xdoclet/filter-mappings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/filter-mappings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/filter-mappings.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,15 @@ + + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + Index: lams_tool_mindmap/conf/xdoclet/filters.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/filters.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/filters.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,25 @@ + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + coreSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + Index: lams_tool_mindmap/conf/xdoclet/global-forwards.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/global-forwards.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/global-forwards.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,3 @@ + + + Index: lams_tool_mindmap/conf/xdoclet/listeners.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/listeners.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/listeners.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,11 @@ + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + Index: lams_tool_mindmap/conf/xdoclet/servlet-mappings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/servlet-mappings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/servlet-mappings.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,20 @@ + + action + *.do + + + + + Connector + /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + Index: lams_tool_mindmap/conf/xdoclet/servlets.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/servlets.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/servlets.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,56 @@ + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + + + Connector + net.fckeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Attachment Download + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + mindmapToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.mindmap.web.servlets.ExportServlet + + Index: lams_tool_mindmap/conf/xdoclet/struts-actions.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/struts-actions.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/struts-actions.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/conf/xdoclet/struts-forms.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/struts-forms.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/struts-forms.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_mindmap/conf/xdoclet/struts-message-resources.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/struts-message-resources.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/struts-message-resources.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,3 @@ + + Index: lams_tool_mindmap/conf/xdoclet/struts-plugins.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/struts-plugins.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/struts-plugins.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,10 @@ + + + + + Index: lams_tool_mindmap/conf/xdoclet/taglibs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/taglibs.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/taglibs.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,78 @@ + + + + + + + + tags-bean + /WEB-INF/struts/tlds/struts-bean.tld + + + + tags-html + /WEB-INF/struts/tlds/struts-html.tld + + + + tags-logic + /WEB-INF/struts/tlds/struts-logic.tld + + + + tags-tiles + /WEB-INF/struts/tlds/struts-tiles.tld + + + + + + + + tags-fmt + /WEB-INF/jstl/tlds/fmt.tld + + + + tags-core + /WEB-INF/jstl/tlds/c.tld + + + + tags-function + /WEB-INF/jstl/tlds/fn.tld + + + + tags-xml + /WEB-INF/jstl/tlds/x.tld + + + + + + + tags-permittedTaglibs + /WEB-INF/jstl/tlds/permittedTaglibs.tld + + + + tags-scriptfree + /WEB-INF/jstl/tlds/scriptfree.tld + + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + + tags-lams + /WEB-INF/lams.tld + + + + Index: lams_tool_mindmap/conf/xdoclet/web-security.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/web-security.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/web-security.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,106 @@ + + + + Secure Content + *.jsp + *.html + *.do + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of + users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of + users for sessions + SYSADMIN + + + + Can create/modify a learning design and edit default + tool content + AUTHOR ADMIN + Index: lams_tool_mindmap/conf/xdoclet/web-settings.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/conf/xdoclet/web-settings.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/conf/xdoclet/web-settings.xml 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,23 @@ + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.mindmap.ApplicationResources + + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/tool/mindmap/dbupdates/autopatchContext.xml + + + + + locatorFactorySelector + classpath*:/org/lamsfoundation/lams/**/beanRefContext.xml + + + + parentContextKey + context.central + \ No newline at end of file Index: lams_tool_mindmap/db/model/mindmap_tool.clay =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/model/mindmap_tool.clay,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/model/mindmap_tool.clay 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/db/sql/activity_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/activity_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/activity_insert.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,80 @@ +-- CVS ID: $Id: activity_insert.sql,v 1.1 2009/04/03 00:00:31 ruslan Exp $ + +INSERT INTO lams_learning_activity +( +activity_ui_id +, description +, title +, help_text +, xcoord +, ycoord +, parent_activity_id +, parent_ui_id +, learning_activity_type_id +, grouping_support_type_id +, apply_grouping_flag +, grouping_id +, grouping_ui_id +, order_id +, define_later_flag +, learning_design_id +, learning_library_id +, create_date_time +, run_offline_flag +, max_number_of_options +, min_number_of_options +, options_instructions +, tool_id +, tool_content_id +, activity_category_id +, gate_activity_level_id +, gate_open_flag +, gate_start_time_offset +, gate_end_time_offset +, gate_start_date_time +, gate_end_date_time +, library_activity_ui_image +, create_grouping_id +, create_grouping_ui_id +, library_activity_id +, language_file +) +VALUES +( +NULL +, 'Mindmap Tool' +, 'Mindmap Tool' +, 'Mindmap Tool for creating mindmaps.' +, NULL +, NULL +, NULL +, NULL +, 1 +, 2 +, 0 +, NULL +, NULL +, NULL +, 0 +, NULL +, ${learning_library_id} +, NOW() +, 0 +, NULL +, NULL +, NULL +, ${tool_id} +, NULL +, 6 +, NULL +, NULL +, NULL +, NULL +, NULL +, NULL +, 'tool/lamind10/images/icon_mindmap.swf' +, NULL +, NULL +, NULL +, 'org.lamsfoundation.lams.tool.mindmap.ApplicationResources' +) Index: lams_tool_mindmap/db/sql/create_lams_tool_mindmap.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/create_lams_tool_mindmap.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/create_lams_tool_mindmap.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,51 @@ +-- CVS ID: $Id: create_lams_tool_mindmap.sql,v 1.1 2009/04/03 00:00:31 ruslan Exp $ + +SET FOREIGN_KEY_CHECKS=0; +drop table if exists tl_lamind10_attachment; +drop table if exists tl_lamind10_mindmap; +drop table if exists tl_lamind10_session; +drop table if exists tl_lamind10_user; +drop table if exists tl_lamind10_node; +drop table if exists tl_lamind10_request; + +create table tl_lamind10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, mindmap_uid bigint, primary key (uid))type=innodb; +create table tl_lamind10_mindmap (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, multiuser_mode bit, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, last_action_id bigint, reflect_on_activity bit, reflect_instructions text, primary key (uid))type=innodb; +create table tl_lamind10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), mindmap_uid bigint, primary key (uid))type=innodb; +create table tl_lamind10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, mindmap_session_uid bigint, entry_uid bigint, primary key (uid))type=innodb; +create table tl_lamind10_node (node_id bigint not null auto_increment, unique_id bigint, parent_id bigint, node_text varchar(100), node_color varchar(6), user_id bigint, mindmap_id bigint, primary key (node_id))TYPE=InnoDB; +CREATE TABLE tl_lamind10_request (`uid` BIGINT(20) NOT NULL AUTO_INCREMENT, `unique_id` BIGINT(20) DEFAULT NULL, `global_id` BIGINT(20) DEFAULT NULL, `request_type` TINYINT(4) DEFAULT NULL, `node_id` BIGINT(20) DEFAULT NULL, `node_child_id` BIGINT(20) DEFAULT NULL, `user_id` BIGINT(20) DEFAULT NULL, `mindmap_id` BIGINT(20) DEFAULT NULL, PRIMARY KEY (`uid`), KEY `mindmap_id` (`mindmap_id`), KEY `user_id` (`user_id`), CONSTRAINT `tl_lamind10_request_fk` FOREIGN KEY (`mindmap_id`) REFERENCES `tl_lamind10_mindmap` (`uid`), CONSTRAINT `tl_lamind10_request_fk1` FOREIGN KEY (`user_id`) REFERENCES `tl_lamind10_user` (`uid`))ENGINE=InnoDB; + +alter table tl_lamind10_attachment add index FK_NEW_972920762_12090F57FC940906 (mindmap_uid), add constraint FK_NEW_972920762_12090F57FC940906 foreign key (mindmap_uid) references tl_lamind10_mindmap (uid); +alter table tl_lamind10_session add index FK_NEW_972920762_B7C198E2FC940906 (mindmap_uid), add constraint FK_NEW_972920762_B7C198E2FC940906 foreign key (mindmap_uid) references tl_lamind10_mindmap (uid); +alter table tl_lamind10_user add index FK_NEW_972920762_CB8A58FFA3B0FADF (mindmap_session_uid), add constraint FK_NEW_972920762_CB8A58FFA3B0FADF foreign key (mindmap_session_uid) references tl_lamind10_session (uid); +alter table tl_lamind10_node add index MindmapNode_Parent_FK (parent_id), add constraint MindmapNode_Parent_FK foreign key (parent_id) references tl_lamind10_node (node_id); +alter table tl_lamind10_node add index MindmapNode_User_FK (user_id), add constraint MindmapNode_User_FK foreign key (user_id) references tl_lamind10_user (uid); +alter table tl_lamind10_node add index MindmapNode_Mindmap_FK (mindmap_id), add constraint MindmapNode_Mindmap_FK foreign key (mindmap_id) references tl_lamind10_mindmap (uid); + +INSERT INTO tl_lamind10_mindmap ( + title, + instructions, + online_instructions, + offline_instructions, + tool_content_id, + run_offline, + lock_on_finished, + content_in_use, + define_later, + multiuser_mode, + reflect_on_activity) +VALUES( + "Mindmap", + "Instructions", + "", + "", + ${default_content_id}, + 0, + 0, + 0, + 0, + 0, + 0 +); + +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_mindmap/db/sql/db_version_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/db_version_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/db_version_insert.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,2 @@ +-- $Id: db_version_insert.sql,v 1.1 2009/04/03 00:00:31 ruslan Exp $ +INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F'); Index: lams_tool_mindmap/db/sql/drop_lams_tool_mindmap.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/drop_lams_tool_mindmap.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/drop_lams_tool_mindmap.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,10 @@ +-- CVS ID: $Id: drop_lams_tool_mindmap.sql,v 1.1 2009/04/03 00:00:31 ruslan Exp $ + +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS tl_lamind10_user; +DROP TABLE IF EXISTS tl_lamind10_attachment; +DROP TABLE IF EXISTS tl_lamind10_session; +DROP TABLE IF EXISTS tl_lamind10_mindmap; +DROP TABLE IF EXISTS tl_lamind10_node; +DROP TABLE IF EXISTS tl_lamind10_request; +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_mindmap/db/sql/library_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/library_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/library_insert.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,16 @@ +-- CVS ID: $Id: library_insert.sql,v 1.1 2009/04/03 00:00:31 ruslan Exp $ + +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'Mindmap Tool', +'Mindmap', +0, +NOW() +) Index: lams_tool_mindmap/db/sql/table-schema.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/table-schema.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/table-schema.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,19 @@ + +alter table tl_lamind10_attachment drop foreign key FK_NEW_972920762_12090F57FC940906; +alter table tl_lamind10_session drop foreign key FK_NEW_972920762_B7C198E2FC940906; +alter table tl_lamind10_user drop foreign key FK_NEW_972920762_CB8A58FFA3B0FADF; + +drop table if exists tl_lamind10_attachment; +drop table if exists tl_lamind10_mindmap; +drop table if exists tl_lamind10_session; +drop table if exists tl_lamind10_user; +drop table if exists tl_lamind10_node; +drop table if exists tl_lamind10_request; + +create table tl_lamind10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, mindmap_uid bigint, primary key (uid)); +create table tl_lamind10_mindmap (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, multiuser_mode bit, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, primary key (uid)); +create table tl_lamind10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), mindmap_uid bigint, primary key (uid)); +create table tl_lamind10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, mindmap_session_uid bigint, entry_uid bigint, primary key (uid)); +alter table tl_lamind10_attachment add index FK_NEW_972920762_12090F57FC940906 (mindmap_uid), add constraint FK_NEW_972920762_12090F57FC940906 foreign key (mindmap_uid) references tl_lamind10_mindmap (uid); +alter table tl_lamind10_session add index FK_NEW_972920762_B7C198E2FC940906 (mindmap_uid), add constraint FK_NEW_972920762_B7C198E2FC940906 foreign key (mindmap_uid) references tl_lamind10_mindmap (uid); +alter table tl_lamind10_user add index FK_NEW_972920762_CB8A58FFA3B0FADF (mindmap_session_uid), add constraint FK_NEW_972920762_CB8A58FFA3B0FADF foreign key (mindmap_session_uid) references tl_lamind10_session (uid); Index: lams_tool_mindmap/db/sql/tool_insert.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/tool_insert.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/tool_insert.sql 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,62 @@ +-- CVS ID: $Id: tool_insert.sql,v 1.1 2009/04/03 00:00:31 ruslan Exp $ + +INSERT INTO lams_tool +( +tool_signature, +service_name, +tool_display_name, +description, +tool_identifier, +tool_version, +learning_library_id, +default_tool_content_id, +valid_flag, +grouping_support_type_id, +supports_run_offline_flag, +learner_url, +learner_preview_url, +learner_progress_url, +author_url, +monitor_url, +define_later_url, +export_pfolio_learner_url, +export_pfolio_class_url, +contribute_url, +moderation_url, +pedagogical_planner_url, +help_url, +language_file, +create_date_time, +modified_date_time, +supports_outputs +) +VALUES +( +'lamind10', +'mindmapService', +'Mindmap', +'Mindmap', +'mindmap', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/lamind10/learning.do?mode=learner', +'tool/lamind10/learning.do?mode=author', +'tool/lamind10/learning.do?mode=teacher', +'tool/lamind10/authoring.do', +'tool/lamind10/monitoring.do', +'tool/lamind10/authoring.do?mode=teacher', +'tool/lamind10/exportPortfolio?mode=learner', +'tool/lamind10/exportPortfolio?mode=teacher', +'tool/lamind10/contribute.do', +'tool/lamind10/moderate.do', +'tool/lamind10/pedagogicalPlanner.do', +'http://wiki.lamsfoundation.org/display/lamsdocs/lamind10', +'org.lamsfoundation.lams.tool.mindmap.ApplicationResources', +NOW(), +NOW(), +1 +) Index: lams_tool_mindmap/db/sql/updatescripts/updateTo20070227.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/updatescripts/Attic/updateTo20070227.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/updatescripts/updateTo20070227.sql 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,4 @@ +-- Update the Mindmap tables to 20070227 +-- This is for the LAMS 2.0.1 release. + +UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lamind10.jar', context_file = '/org/lamsfoundation/lams/tool/mindmap/mindmapApplicationContext.xml' where tool_signature = 'lamind10'; Index: lams_tool_mindmap/db/sql/updatescripts/updateTo20080229.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/db/sql/updatescripts/Attic/updateTo20080229.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/db/sql/updatescripts/updateTo20080229.sql 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,2 @@ +UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = "lamind10"; +UPDATE lams_tool SET tool_version = "20080229" WHERE tool_signature = "lamind10"; Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/mindmapApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/mindmapApplicationContext.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/mindmapApplicationContext.xml 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + org.lamsfoundation.lams.tool.mindmap.ApplicationResources + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapAttachmentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/Attic/IMindmapAttachmentDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapAttachmentDAO.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IMindmapAttachmentDAO.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; + +/** + * DAO for accessing the MindmapAttachment objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IMindmapAttachmentDAO extends IBaseDAO { + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapDAO.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,45 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IMindmapDAO.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; + +/** + * DAO for accessing the Mindmap objects - interface defining methods to be implemented by the Hibernate or other + * implementation. + */ +public interface IMindmapDAO extends IBaseDAO { + + public Mindmap getByContentId(Long toolContentId); + + public Mindmap getMindmapByUid(Long Uid); + + void saveOrUpdate(Mindmap toContent); + + void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type); + + void releaseFromCache(Object o); +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapNodeDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapNodeDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapNodeDAO.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,63 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: IMindmapNodeDAO.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ +package org.lamsfoundation.lams.tool.mindmap.dao; + +import java.util.List; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; + +/** + * IMindmapNodeDao + * @author Ruslan Kazakov + */ +public interface IMindmapNodeDAO extends IBaseDAO { + + public void deleteNodeByUniqueMindmapUser(Long uniqueId, Long mindmapId, Long userId); + + public void deleteNodes(String deletedNodesQuery); + + public void saveOrUpdate(MindmapNode mindmapNode); + + public List getAuthorRootNodeByMindmapId(Long mindmapId); + + public List getAuthorRootNodeByMindmapIdMulti(Long mindmapId); + + public List getRootNodeByMindmapIdAndUserId(Long mindmapId, Long userId); + + public List getUserRootNodeByUserId(Long userId); + + public List getMindmapNodeByParentId(Long parentId, Long mindmapId); + + public List getMindmapNodeByUniqueId(Long uniqueId, Long mindmapId); + + public List getMindmapNodeByUniqueIdMindmapIdUserId(Long uniqueId, Long mindmapId, Long userId); + + public Long getLastUniqueIdByMindmapIdUserId(Long mindmapId, Long userId); + + public Long getLastUniqueIdByMindmapId(Long mindmapId); + + public int getNumNodesByUserAndSession(Long userId, Long sessionId); +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapRequestDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapRequestDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapRequestDAO.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,45 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: IMindmapRequestDAO.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ +package org.lamsfoundation.lams.tool.mindmap.dao; + +import java.util.List; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapRequest; + +/** + * IMindmapRequestDao + * @author Ruslan Kazakov + */ +public interface IMindmapRequestDAO extends IBaseDAO { + + public void saveOrUpdate(MindmapRequest mindmapRequest); + + public List getLastRequestsAfterGlobalId(Long globalId, Long mindmapId, Long userId); + + public MindmapRequest getRequestByUniqueId(Long uniqueId, Long userId, Long mindmapId, Long globalId); + + public Long getLastGlobalIdByMindmapId(Long mindmapId); +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapSessionDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapSessionDAO.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,42 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IMindmapSessionDAO.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; + +/** + * DAO for accessing the MindmapSession objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IMindmapSessionDAO extends IBaseDAO { + + void saveOrUpdate(MindmapSession session); + + MindmapSession getBySessionId(Long toolSessionId); + + void deleteBySessionID(Long toolSessionID); +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapUserDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapUserDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/IMindmapUserDAO.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,60 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IMindmapUserDAO.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; + +/** + * DAO for accessing the MindmapUser objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IMindmapUserDAO extends IBaseDAO { + /** + * + * @param userId + * @param toolSessionId + * @return + */ + MindmapUser getByUserIdAndSessionId(Long userId, Long toolSessionId); + + void saveOrUpdate(MindmapUser mindmapUser); + + /** + * + * @param loginName + * @param sessionID + * @return + */ + MindmapUser getByLoginNameAndSessionId(String loginName, Long toolSessionId); + + + /** + * + * @param uid + * @return + */ + MindmapUser getByUID(Long uid); +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapAttachmentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/Attic/MindmapAttachmentDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapAttachmentDAO.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapAttachmentDAO.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao.hibernate; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapAttachmentDAO; + +/** + * DAO for accessing the MindmapAttachment objects - Hibernate specific code. + */ +public class MindmapAttachmentDAO extends BaseDAO implements IMindmapAttachmentDAO { + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapDAO.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,92 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapDAO.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapDAO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment; +import org.springframework.orm.hibernate3.HibernateTemplate; + +/** + * DAO for accessing the Mindmap objects - Hibernate specific code. + */ +public class MindmapDAO extends BaseDAO implements IMindmapDAO { + + private static final String FIND_MINDMAP_BY_CONTENTID = "from Mindmap mindmap where mindmap.toolContentId = ?"; + + private static final String FIND_INSTRUCTION_FILE = "from " + MindmapAttachment.class.getName() + + " as i where tool_content_id=? and i.file_uuid=? and i.file_version_id=? and i.file_type=?"; + + private static final String FIND_MINDMAP_BY_UID = + "from Mindmap mindmap where mindmap.uid = ?"; + + public Mindmap getByContentId(Long toolContentId) { + List list = getHibernateTemplate().find(MindmapDAO.FIND_MINDMAP_BY_CONTENTID, toolContentId); + if (list != null && list.size() > 0) { + return (Mindmap) list.get(0); + } else { + return null; + } + } + + public Mindmap getMindmapByUid(Long Uid) { + List list = getHibernateTemplate().find(MindmapDAO.FIND_MINDMAP_BY_UID, Uid); + if (list != null && list.size() > 0) { + return (Mindmap) list.get(0); + } else { + return null; + } + } + + public void saveOrUpdate(Mindmap mindmap) { + this.getHibernateTemplate().saveOrUpdate(mindmap); + this.getHibernateTemplate().flush(); + } + + public void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type) { + HibernateTemplate templ = this.getHibernateTemplate(); + if (toolContentId != null && uuid != null && versionId != null) { + List list = getSession().createQuery(MindmapDAO.FIND_INSTRUCTION_FILE).setLong(0, + toolContentId.longValue()).setLong(1, uuid.longValue()).setLong(2, versionId.longValue()) + .setString(3, type).list(); + if (list != null && list.size() > 0) { + MindmapAttachment file = (MindmapAttachment) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + templ.delete(file); + templ.flush(); + } + } + + } + + public void releaseFromCache(Object o) { + getSession().evict(o); + + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapNodeDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapNodeDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapNodeDAO.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,148 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: MindmapNodeDAO.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ +package org.lamsfoundation.lams.tool.mindmap.dao.hibernate; + +import java.util.List; + +import org.hibernate.Query; +import org.hibernate.Session; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapNodeDAO; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; + +/** + * MindmapNodeDao + * + * @author Ruslan Kazakov + */ +public class MindmapNodeDAO extends BaseDAO implements IMindmapNodeDAO { + private static final String SQL_QUERY_FIND_ROOT_NODE_BY_MINDMAP_ID = "from " + MindmapNode.class.getName() + + " mn where mn.parent is null and mn.mindmap.uid = ? and mn.user is null "; + + private static final String SQL_QUERY_FIND_ROOT_NODE_BY_MINDMAP_ID_MULTI = "from " + MindmapNode.class.getName() + + " mn where mn.parent is null and mn.mindmap.uid = ? "; + + private static final String SQL_QUERY_FIND_ROOT_NODE_BY_MINDMAP_ID_USER_ID = "from " + MindmapNode.class.getName() + + " mn where mn.parent is null and mn.mindmap.uid = ? and mn.user.uid = ? "; + + private static final String SQL_QUERY_FIND_ROOT_NODE_BY_USER_ID = "from " + MindmapNode.class.getName() + + " mn where mn.parent is null and mn.user.uid = ? "; + + private static final String SQL_QUERY_FIND_NODE_BY_PARENT_ID_MINDMAP_ID = "from " + MindmapNode.class.getName() + + " mn where mn.parent.nodeId = ? and mn.mindmap.uid = ? "; + + private static final String SQL_QUERY_FIND_NODE_BY_UNIQUE_ID_MINDMAP_ID = "from " + MindmapNode.class.getName() + + " mn where mn.uniqueId = ? and mn.mindmap.uid = ? "; + + private static final String SQL_QUERY_FIND_NODE_BY_UNIQUE_MINDMAP_ID_AND_USER_ID = "from " + + MindmapNode.class.getName() + " mn where mn.uniqueId = ? and mn.mindmap.uid = ? and mn.user.uid = ? "; + + private static final String SQL_QUERY_FIND_UNIQUE_ID_BY_MINDMAP_ID_AND_USER_ID = " select mn.uniqueId from " + + MindmapNode.class.getName() + " mn where mn.mindmap.uid = ? and mn.user.uid = ? " + + " order by mn.uniqueId desc "; + + private static final String SQL_QUERY_FIND_UNIQUE_ID_BY_MINDMAP_ID = " select mn.uniqueId from " + + MindmapNode.class.getName() + " mn where mn.mindmap.uid = ? " + " order by mn.uniqueId desc "; + + private static final String SQL_QUERY_NODES_NUMBER_BY_USER_SESSION = " select count(*) from " + + MindmapNode.class.getName() + " mn where mn.user.uid = ? "; + + public void deleteNodeByUniqueMindmapUser(Long uniqueId, Long mindmapId, Long userId) { + Session session = getSessionFactory().getCurrentSession(); + String hql = "delete from " + MindmapNode.class.getName() + " where unique_id = " + uniqueId + + " and mindmap_id = " + mindmapId + " and user_id = " + userId; + Query query = session.createQuery(hql); + query.executeUpdate(); + } + + public void deleteNodes(String deletedNodesQuery) { + Session session = getSessionFactory().getCurrentSession(); + String hql = "delete from " + MindmapNode.class.getName() + deletedNodesQuery; + Query query = session.createQuery(hql); + query.executeUpdate(); + } + + public void saveOrUpdate(MindmapNode mindmapNode) { + this.getHibernateTemplate().saveOrUpdate(mindmapNode); + } + + public List getAuthorRootNodeByMindmapId(Long mindmapId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_ROOT_NODE_BY_MINDMAP_ID, mindmapId); + } + + public List getAuthorRootNodeByMindmapIdMulti(Long mindmapId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_ROOT_NODE_BY_MINDMAP_ID_MULTI, mindmapId); + } + + public List getRootNodeByMindmapIdAndUserId(Long mindmapId, Long userId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_ROOT_NODE_BY_MINDMAP_ID_USER_ID, + new Object[] { mindmapId, userId }); + } + + public List getUserRootNodeByUserId(Long userId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_ROOT_NODE_BY_USER_ID, userId); + } + + public List getMindmapNodeByParentId(Long parentId, Long mindmapId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_NODE_BY_PARENT_ID_MINDMAP_ID, + new Object[] { parentId, mindmapId }); + } + + public List getMindmapNodeByUniqueId(Long uniqueId, Long mindmapId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_NODE_BY_UNIQUE_ID_MINDMAP_ID, + new Object[] { uniqueId, mindmapId }); + } + + public List getMindmapNodeByUniqueIdMindmapIdUserId(Long uniqueId, Long mindmapId, Long userId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_NODE_BY_UNIQUE_MINDMAP_ID_AND_USER_ID, + new Object[] { uniqueId, mindmapId, userId }); + } + + public Long getLastUniqueIdByMindmapIdUserId(Long mindmapId, Long userId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_UNIQUE_ID_BY_MINDMAP_ID_AND_USER_ID, + new Object[] { mindmapId, userId }); + if (list != null && list.size() > 0) + return ((Number) list.get(0)).longValue(); + else + return null; + } + + public Long getLastUniqueIdByMindmapId(Long mindmapId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_UNIQUE_ID_BY_MINDMAP_ID, mindmapId); + if (list != null && list.size() > 0) + return ((Number) list.get(0)).longValue(); + else + return null; + } + + /** Outputs */ + public int getNumNodesByUserAndSession(Long userId, Long sessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_NODES_NUMBER_BY_USER_SESSION, new Object[] { userId }); + if (list != null && list.size() > 0) + return ((Number) list.get(0)).intValue(); + else + return 0; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapRequestDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapRequestDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapRequestDAO.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,74 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: MindmapRequestDAO.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ +package org.lamsfoundation.lams.tool.mindmap.dao.hibernate; + +import java.util.List; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapRequestDAO; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapRequest; + +/** + * MindmapRequestDAO + * @author Ruslan Kazakov + */ +public class MindmapRequestDAO extends BaseDAO implements IMindmapRequestDAO { + private static final String SQL_QUERY_FIND_REQUESTS_AFTER_GLOBAL_ID = + " from " + MindmapRequest.class.getName() + " mr where mr.globalId > ? and " + + " mr.mindmap.uid = ? and mr.user.uid <> ? order by mr.globalId "; + + private static final String SQL_QUERY_FIND_REQUEST_BY_UNIQUE_ID = + " from " + MindmapRequest.class.getName() + " mr where mr.uniqueId = ? and mr.user.uid = ? and " + + " mr.mindmap.uid = ? and mr.globalId > ? "; + + private static final String SQL_QUERY_FIND_LAST_GLOBAL_ID_BY_MINDMAP = + " select mr.globalId from " + MindmapRequest.class.getName() + " mr where mr.mindmap.uid = ? " + + " order by mr.globalId desc limit 1 "; + + public void saveOrUpdate(MindmapRequest mindmapRequest) { + this.getHibernateTemplate().saveOrUpdate(mindmapRequest); + } + + public List getLastRequestsAfterGlobalId(Long globalId, Long mindmapId, Long userId) { + return this.getHibernateTemplate().find(SQL_QUERY_FIND_REQUESTS_AFTER_GLOBAL_ID, + new Object[]{globalId, mindmapId, userId}); + } + + public MindmapRequest getRequestByUniqueId(Long uniqueId, Long userId, Long mindmapId, Long globalId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_REQUEST_BY_UNIQUE_ID, + new Object[]{uniqueId, userId, mindmapId, globalId}); + if (list != null && list.size() > 0) + return (MindmapRequest) list.get(0); + else + return null; + } + + public Long getLastGlobalIdByMindmapId(Long mindmapId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_LAST_GLOBAL_ID_BY_MINDMAP, mindmapId); + if (list != null && list.size() > 0) + return ((Number) list.get(0)).longValue(); + else + return 0l; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapSessionDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapSessionDAO.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,63 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapSessionDAO.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapSessionDAO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; + +/** + * DAO for accessing the MindmapSession objects - Hibernate specific code. + */ +public class MindmapSessionDAO extends BaseDAO implements IMindmapSessionDAO { + + public static final String SQL_QUERY_FIND_BY_SESSION_ID = "from " + + MindmapSession.class.getName() + " where session_id = ?"; + + public void saveOrUpdate(MindmapSession session) { + this.getHibernateTemplate().saveOrUpdate(session); + this.getHibernateTemplate().flush(); + } + + public MindmapSession getBySessionId(Long toolSessionId) { + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_SESSION_ID, toolSessionId); + if (list == null || list.isEmpty()) + return null; + return (MindmapSession) list.get(0); + } + + public void deleteBySessionID(Long toolSessionID) { + MindmapSession session = getBySessionId(toolSessionID); + if(session != null){ + this.getHibernateTemplate().delete(session); + this.getHibernateTemplate().flush(); + } + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapUserDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapUserDAO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dao/hibernate/MindmapUserDAO.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,81 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapUserDAO.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapUserDAO; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; + +/** + * DAO for accessing the MindmapUser objects - Hibernate specific code. + */ +public class MindmapUserDAO extends BaseDAO implements IMindmapUserDAO { + + public static final String SQL_QUERY_FIND_BY_USER_ID_SESSION_ID = "from " + MindmapUser.class.getName() + " as f" + + " where user_id=? and f.mindmapSession.sessionId=?"; + + public static final String SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID = "from " + MindmapUser.class.getName() + + " as f where login_name=? and f.mindmapSession.sessionId=?"; + + private static final String SQL_QUERY_FIND_BY_UID = "from " + MindmapUser.class.getName() + " where uid=?"; + + public MindmapUser getByUserIdAndSessionId(Long userId, Long toolSessionId) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_USER_ID_SESSION_ID, + new Object[] { userId, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (MindmapUser) list.get(0); + } + + public MindmapUser getByLoginNameAndSessionId(String loginName, Long toolSessionId) { + + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID, + new Object[] { loginName, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (MindmapUser) list.get(0); + + } + + public void saveOrUpdate(MindmapUser mindmapUser) { + this.getHibernateTemplate().saveOrUpdate(mindmapUser); + this.getHibernateTemplate().flush(); + } + + public MindmapUser getByUID(Long uid) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_UID, new Object[] { uid }); + + if (list == null || list.isEmpty()) + return null; + + return (MindmapUser) list.get(0); + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/autopatchContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/autopatchContext.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/autopatchContext.xml 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + + + + + + Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/patch20080929_updateFrom21.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/Attic/patch20080929_updateFrom21.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/patch20080929_updateFrom21.sql 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,24 @@ +-- SQL statements to update from LAMS 2.1/2.1.1 + +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; + +----------------------Put all sql statements below here------------------------- + +CREATE TABLE tl_lamind10_conditions ( + condition_id BIGINT(20) NOT NULL + , content_uid BIGINT(20) + , PRIMARY KEY (condition_id) + , CONSTRAINT MindmapConditionInheritance FOREIGN KEY (condition_id) + REFERENCES lams_branch_condition(condition_id) ON DELETE CASCADE ON UPDATE CASCADE + , CONSTRAINT MindmapConditionToMindmap FOREIGN KEY (content_uid) + REFERENCES tl_lamind10_mindmap(uid) ON DELETE CASCADE ON UPDATE CASCADE +)TYPE=InnoDB; + +UPDATE lams_tool SET supports_outputs=1 WHERE tool_signature='lamind10'; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/patch20081118_updateFrom22.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/Attic/patch20081118_updateFrom22.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dbupdates/patch20081118_updateFrom22.sql 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,14 @@ +-- SQL statements to update from LAMS 2.2 + +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; + +----------------------Put all sql statements below here------------------------- + +UPDATE lams_tool SET pedagogical_planner_url='tool/lamind10/pedagogicalPlanner.do' WHERE tool_signature='lamind10'; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapAttachmentDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/Attic/MindmapAttachmentDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapAttachmentDTO.java 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,102 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MindmapAttachmentDTO.java,v 1.1 2009/04/03 00:00:31 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment; + +public class MindmapAttachmentDTO implements Comparable { + + public MindmapAttachmentDTO(MindmapAttachment att) { + this.fileUuid = att.getFileUuid(); + this.fileName = att.getFileName(); + this.fileVersionId = att.getFileVersionId(); + this.createDate = att.getCreateDate(); + this.uid = att.getUid(); + } + + Long uid; + + Long fileUuid; + + Long fileVersionId; + + String fileName; + + Date createDate; + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public Long getFileUuid() { + return fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + public Long getFileVersionId() { + return fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public int compareTo(Object o) { + MindmapAttachmentDTO toAttachment = (MindmapAttachmentDTO) o; + int returnValue = this.createDate.compareTo(((MindmapAttachmentDTO) o) + .getCreateDate()); + + if (returnValue == 0) { + returnValue = this.uid.compareTo(toAttachment.getUid()); + } + return returnValue; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapDTO.java 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,201 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MindmapDTO.java,v 1.1 2009/04/03 00:00:31 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; + +public class MindmapDTO { + + private static Logger logger = Logger.getLogger(MindmapDTO.class); + + public Long toolContentId; + public String title; + public String instructions; + public String onlineInstructions; + public String offlineInstructions; + public boolean defineLater; + public boolean contentInUse; + public boolean lockOnFinish; + public boolean multiUserMode; + public Set onlineInstructionsFiles; + public Set offlineInstructionsFiles; + public Set sessionDTOs = new TreeSet(); + public Long currentTab; + + public String reflectInstructions; + + /* Constructors */ + public MindmapDTO() { + } + + public MindmapDTO(Mindmap mindmap) { + toolContentId = mindmap.getToolContentId(); + title = mindmap.getTitle(); + instructions = mindmap.getInstructions(); + onlineInstructions = mindmap.getOnlineInstructions(); + offlineInstructions = mindmap.getOfflineInstructions(); + contentInUse = mindmap.isContentInUse(); + lockOnFinish = mindmap.isLockOnFinished(); + multiUserMode = mindmap.isMultiUserMode(); + + onlineInstructionsFiles = new TreeSet(); + offlineInstructionsFiles = new TreeSet(); + + for (Iterator i = mindmap.getMindmapAttachments().iterator(); i.hasNext();) { + MindmapAttachment att = (MindmapAttachment) i.next(); + if (att.getFileType().equals(IToolContentHandler.TYPE_OFFLINE)) { + MindmapAttachmentDTO attDTO = new MindmapAttachmentDTO(att); + offlineInstructionsFiles.add(attDTO); + } else if (att.getFileType().equals(IToolContentHandler.TYPE_ONLINE)) { + MindmapAttachmentDTO attDTO = new MindmapAttachmentDTO(att); + onlineInstructionsFiles.add(attDTO); + } else { + // something is wrong. Ignore file, log error + logger.error("File with uid " + att.getFileUuid() + " contains invalid fileType: " + att.getFileType()); + } + } + + for (Iterator iter = mindmap.getMindmapSessions().iterator(); iter.hasNext();) { + MindmapSession session = (MindmapSession) iter.next(); + MindmapSessionDTO sessionDTO = new MindmapSessionDTO(session); + + sessionDTOs.add(sessionDTO); + } + } + + /* Getters / Setters */ + public Set getSessionDTOs() { + return sessionDTOs; + } + + public void setSessionDTOs(Set sessionDTOs) { + this.sessionDTOs = sessionDTOs; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + public Set getOfflineInstructionsFiles() { + return offlineInstructionsFiles; + } + + public void setOfflineInstructionsFiles(Set offlineInstructionsFiles) { + this.offlineInstructionsFiles = offlineInstructionsFiles; + } + + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + public Set getOnlineInstructionsFiles() { + return onlineInstructionsFiles; + } + + public void setOnlineInstructionsFiles(Set onlineInstructionsFiles) { + this.onlineInstructionsFiles = onlineInstructionsFiles; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentID) { + this.toolContentId = toolContentID; + } + + public Boolean getContentInUse() { + return contentInUse; + } + + public void setContentInUse(Boolean contentInUse) { + this.contentInUse = contentInUse; + } + + public boolean isLockOnFinish() { + return lockOnFinish; + } + + public void setLockOnFinish(boolean lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + public boolean isMultiUserMode() { + return multiUserMode; + } + + public void setMultiUserMode(boolean multiUserMode) { + this.multiUserMode = multiUserMode; + } + + public Long getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(Long currentTab) { + this.currentTab = currentTab; + } + + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapSessionDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapSessionDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapSessionDTO.java 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,112 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MindmapSessionDTO.java,v 1.1 2009/04/03 00:00:31 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; + +public class MindmapSessionDTO implements Comparable { + Long sessionID; + String sessionName; + int numberOfLearners; + int numberOfFinishedLearners; + Set userDTOs = new TreeSet(); + + public MindmapSessionDTO(MindmapSession session) { + this.sessionID = session.getSessionId(); + this.sessionName = session.getSessionName(); + + numberOfFinishedLearners = 0; + for (Iterator iterator = session.getMindmapUsers().iterator(); iterator.hasNext();) { + MindmapUser user = (MindmapUser) iterator.next(); + MindmapUserDTO userDTO = new MindmapUserDTO(user); + if (userDTO.isFinishedActivity()) { + numberOfFinishedLearners++; + } + userDTOs.add(userDTO); + } + + numberOfLearners = userDTOs.size(); + + } + + public MindmapSessionDTO() { + } + + public Long getSessionID() { + return sessionID; + } + + public void setSessionID(Long sessionID) { + this.sessionID = sessionID; + } + + public String getSessionName() { + return sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + public int compareTo(Object o) { + int returnValue; + MindmapSessionDTO toSession = (MindmapSessionDTO) o; + returnValue = this.sessionName.compareTo(toSession.sessionName); + if (returnValue == 0) { + returnValue = this.sessionID.compareTo(toSession.sessionID); + } + return returnValue; + } + + public Set getUserDTOs() { + return userDTOs; + } + + public void setUserDTOs(Set mindmapUsers) { + this.userDTOs = mindmapUsers; + } + + public int getNumberOfLearners() { + return numberOfLearners; + } + + public void setNumberOfLearners(int numberOfLearners) { + this.numberOfLearners = numberOfLearners; + } + + public int getNumberOfFinishedLearners() { + return numberOfFinishedLearners; + } + + public void setNumberOfFinishedLearners(int numberOfFinishedLearners) { + this.numberOfFinishedLearners = numberOfFinishedLearners; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapUserDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapUserDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/MindmapUserDTO.java 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,107 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MindmapUserDTO.java,v 1.1 2009/04/03 00:00:31 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.dto; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; + +public class MindmapUserDTO implements Comparable { + public Long uid; + public String loginName; + public String firstName; + public String lastName; + public boolean finishedActivity; + public NotebookEntryDTO entryDTO; + public Long entryUID; + + public MindmapUserDTO(MindmapUser user, NotebookEntry entry) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + this.entryUID = user.getEntryUID(); + this.entryDTO = new NotebookEntryDTO(entry); + } + + public MindmapUserDTO(MindmapUser user) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + } + + public int compareTo(Object o) { + int returnValue; + MindmapUserDTO toUser = (MindmapUserDTO) o; + returnValue = this.lastName.compareTo(toUser.lastName); + if (returnValue == 0) { + returnValue = this.uid.compareTo(toUser.uid); + } + return returnValue; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/NotebookEntryDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/NotebookEntryDTO.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/dto/NotebookEntryDTO.java 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,56 @@ +package org.lamsfoundation.lams.tool.mindmap.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; + +public class NotebookEntryDTO { + + private Long uid; + + private String entry; + + private Date createDate; + + private Date lastModified; + + public NotebookEntryDTO(NotebookEntry entry) { + this.uid = entry.getUid(); + this.entry = entry.getEntry(); + this.createDate = entry.getCreateDate(); + this.lastModified = entry.getLastModified(); + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getEntry() { + return entry; + } + + public void setEntry(String entry) { + this.entry = entry; + } + + public Date getLastModified() { + return lastModified; + } + + public void setLastModified(Date lastModified) { + this.lastModified = lastModified; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/Mindmap.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/Mindmap.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/Mindmap.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,416 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: Mindmap.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; //import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; //import org.lamsfoundation.lams.learningdesign.TextSearchConditionComparator; +import org.lamsfoundation.lams.tool.mindmap.service.MindmapService; + +/** + * @hibernate.class table="tl_lamind10_mindmap" + */ +public class Mindmap implements java.io.Serializable, Cloneable { + + private static final long serialVersionUID = 579733009969321015L; + static Logger log = Logger.getLogger(MindmapService.class.getName()); + + // Fields + private Long uid; + private Date createDate; + private Date updateDate; + private Long createBy; + private String title; + private String instructions; + private boolean runOffline; + private boolean lockOnFinished; + private boolean multiUserMode; + private String onlineInstructions; + private String offlineInstructions; + private boolean contentInUse; + private boolean defineLater; + private Long toolContentId; + private Long lastActionId; + private Set mindmapAttachments; + private Set mindmapSessions; + + private boolean reflectOnActivity; + private String reflectInstructions; + + // *********** NON Persisit fields + private IToolContentHandler toolContentHandler; + + // Constructors + + /** default constructor */ + public Mindmap() { + } + + /** full constructor */ + public Mindmap(Date createDate, Date updateDate, Long createBy, String title, String instructions, + boolean runOffline, boolean lockOnFinished, boolean filteringEnabled, String filterKeywords, + String onlineInstructions, String offlineInstructions, boolean contentInUse, boolean defineLater, + Long toolContentId, Set mindmapAttachments, Set mindmapSessions) { + this.createDate = createDate; + this.updateDate = updateDate; + this.createBy = createBy; + this.title = title; + this.instructions = instructions; + this.runOffline = runOffline; + this.lockOnFinished = lockOnFinished; + this.onlineInstructions = onlineInstructions; + this.offlineInstructions = offlineInstructions; + this.contentInUse = contentInUse; + this.defineLater = defineLater; + this.toolContentId = toolContentId; + this.mindmapAttachments = mindmapAttachments; + this.mindmapSessions = mindmapSessions; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="create_date" + * + */ + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.property column="update_date" + * + */ + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + /** + * @hibernate.property column="create_by" length="20" + * + */ + public Long getCreateBy() { + return createBy; + } + + public void setCreateBy(Long createBy) { + this.createBy = createBy; + } + + /** + * @hibernate.property column="title" length="255" + * + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="instructions" length="65535" + * + */ + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @hibernate.property column="run_offline" length="1" + * + */ + public boolean isRunOffline() { + return runOffline; + } + + public void setRunOffline(boolean runOffline) { + this.runOffline = runOffline; + } + + /** + * @hibernate.property column="lock_on_finished" length="1" + * + */ + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + /** + * @hibernate.property column="multiuser_mode" length="1" + * @return + */ + public boolean isMultiUserMode() { + return multiUserMode; + } + + public void setMultiUserMode(boolean multiUserMode) { + this.multiUserMode = multiUserMode; + } + + /** + * @hibernate.property column="online_instructions" length="65535" + * + */ + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + /** + * @hibernate.property column="offline_instructions" length="65535" + * + */ + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + /** + * @hibernate.property column="content_in_use" length="1" + * + */ + public boolean isContentInUse() { + return contentInUse; + } + + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @hibernate.property column="define_later" length="1" + * + */ + public boolean isDefineLater() { + return defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + /** + * @hibernate.property column="tool_content_id" length="20" + */ + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentId) { + this.toolContentId = toolContentId; + } + + /** + * @hibernate.property column="last_action_id" length="20" + */ + public Long getLastActionId() { + return lastActionId; + } + + /** + * @param lastActionId + * the lastActionId to set + */ + public void setLastActionId(Long lastActionId) { + this.lastActionId = lastActionId; + } + + /** + * @hibernate.property column="reflect_on_activity" length="1" + */ + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + /** + * @hibernate.property column="reflect_instructions" + */ + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all-delete-orphan" + * @hibernate.collection-key column="mindmap_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment" + * + */ + public Set getMindmapAttachments() { + return mindmapAttachments; + } + + public void setMindmapAttachments(Set mindmapAttachments) { + this.mindmapAttachments = mindmapAttachments; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="mindmap_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.mindmap.model.MindmapSession" + * + */ + public Set getMindmapSessions() { + return mindmapSessions; + } + + public void setMindmapSessions(Set mindmapSessions) { + this.mindmapSessions = mindmapSessions; + } + + /** + * toString + * + * @return String + */ + @Override + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("title").append("='").append(getTitle()).append("' "); + buffer.append("instructions").append("='").append(getInstructions()).append("' "); + buffer.append("toolContentId").append("='").append(getToolContentId()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (other == null) { + return false; + } + if (!(other instanceof Mindmap)) { + return false; + } + Mindmap castOther = (Mindmap) other; + + return this.getUid() == castOther.getUid() || this.getUid() != null && castOther.getUid() != null + && this.getUid().equals(castOther.getUid()); + } + + @Override + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public static Mindmap newInstance(Mindmap fromContent, Long toContentId, + IToolContentHandler mindmapToolContentHandler) { + Mindmap toContent = new Mindmap(); + fromContent.toolContentHandler = mindmapToolContentHandler; + toContent = (Mindmap) fromContent.clone(); + toContent.setToolContentId(toContentId); + toContent.setCreateDate(new Date()); + return toContent; + } + + @Override + protected Object clone() { + + Mindmap mindmap = null; + try { + mindmap = (Mindmap) super.clone(); + mindmap.setUid(null); + + if (mindmapAttachments != null) { + // create a copy of the attachments + Iterator iter = mindmapAttachments.iterator(); + Set set = new HashSet(); + while (iter.hasNext()) { + MindmapAttachment originalFile = (MindmapAttachment) iter.next(); + MindmapAttachment newFile = (MindmapAttachment) originalFile.clone(); + set.add(newFile); + } + mindmap.mindmapAttachments = set; + } + // create an empty set for the mindmapSession + mindmap.mindmapSessions = new HashSet(); + + } catch (CloneNotSupportedException cnse) { + Mindmap.log.error("Error cloning " + Mindmap.class); + } + return mindmap; + } + + public IToolContentHandler getToolContentHandler() { + return toolContentHandler; + } + + public void setToolContentHandler(IToolContentHandler toolContentHandler) { + this.toolContentHandler = toolContentHandler; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapAttachment.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/Attic/MindmapAttachment.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapAttachment.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,233 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapAttachment.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.log4j.Logger; + +/** + * + * The details of files attached to the tool. In most cases this will be the + * online/offline instruction files. + * + * @hibernate.class table="tl_lamind10_attachment" + * + */ + +public class MindmapAttachment implements java.io.Serializable, Cloneable { + + + + /** + * + */ + private static final long serialVersionUID = 47452859888067500L; + + private static final Logger log = Logger.getLogger(MindmapAttachment.class); + + /** + * + */ + private Long uid; + + private Long fileVersionId; + + private String fileType; + + private String fileName; + + private Long fileUuid; + + private Date createDate; + + private Mindmap mindmap; + + // Constructors + + /** default constructor */ + public MindmapAttachment() { + } + + /** Constructor setting up all the properties except for mindmap one*/ + public MindmapAttachment(Long fileVersionId, String fileType, String fileName, Long fileUuid, Date createDate) { + this.fileVersionId = fileVersionId; + this.fileType = fileType; + this.fileName = fileName; + this.fileUuid = fileUuid; + this.createDate = createDate; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="file_version_id" length="20" + * + */ + + public Long getFileVersionId() { + return this.fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + /** + * @hibernate.property column="file_type" length="255" + * + */ + + public String getFileType() { + return this.fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + /** + * @hibernate.property column="file_name" length="255" + * + */ + + public String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /** + * @hibernate.property column="file_uuid" length="20" + * + */ + + public Long getFileUuid() { + return this.fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + /** + * @hibernate.property column="create_date" + * + */ + + public Date getCreateDate() { + return this.createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="mindmap_uid" + * + */ + + public Mindmap getMindmap() { + return this.mindmap; + } + + public void setMindmap(Mindmap mindmap) { + this.mindmap = mindmap; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append( + Integer.toHexString(hashCode())).append(" ["); + buffer.append("fileVersionId").append("='").append(getFileVersionId()) + .append("' "); + buffer.append("fileName").append("='").append(getFileName()).append( + "' "); + buffer.append("fileUuid").append("='").append(getFileUuid()).append( + "' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof MindmapAttachment)) + return false; + + final MindmapAttachment genericEntity = (MindmapAttachment) o; + + return new EqualsBuilder() + .append(this.uid,genericEntity.uid) + .append(this.fileVersionId,genericEntity.fileVersionId) + .append(this.fileName,genericEntity.fileName) + .append(this.fileType,genericEntity.fileType) + .append(this.createDate,genericEntity.createDate) + .isEquals(); + } + + public int hashCode() { + int result = 17; + result = 37 * result + + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone() { + Object obj = null; + try { + obj = super.clone(); + ((MindmapAttachment) obj).setUid(null); + } catch (CloneNotSupportedException e) { + log.error("Failed to clone " + MindmapAttachment.class); + } + + return obj; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapNode.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapNode.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapNode.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,162 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: MindmapNode.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $$ */ +package org.lamsfoundation.lams.tool.mindmap.model; + +import org.apache.log4j.Logger; + +/** + * @author Ruslan Kazakov + * @hibernate.class table="tl_lamind10_node" + */ +public class MindmapNode implements Cloneable { + + //private static Logger log = Logger.getLogger(MindmapNode.class); + + private Long nodeId; + private Long uniqueId; + private MindmapNode parent; + private String text; + private String color; + private MindmapUser user; + private Mindmap mindmap; + + /** default constructor */ + public MindmapNode() { + } + + /** full constructor */ + public MindmapNode(Long nodeId, Long uniqueId, MindmapNode parent, String text, String color, + MindmapUser user, Mindmap mindmap) { + this.nodeId = nodeId; + this.uniqueId = uniqueId; + this.parent = parent; + this.text = text; + this.color = color; + this.user = user; + this.mindmap = mindmap; + } + + // ********************************************************** + // get/set methods + // ********************************************************** + + /** + * @hibernate.id column="node_id" generator-class="native" + */ + public Long getNodeId() { + return nodeId; + } + + public void setNodeId(Long nodeId) { + this.nodeId = nodeId; + } + + /** + * @return Returns the subject of the Message. + * @hibernate.property column="unique_id" + */ + public Long getUniqueId() { + return uniqueId; + } + + /** + * @param subject The subject of the Message to be set. + */ + public void setUniqueId(Long uniqueId) { + this.uniqueId = uniqueId; + } + + /** + * @hibernate.many-to-one column="parent_id" cascade="all" + * @return + */ + public MindmapNode getParent() { + return parent; + } + + /** + * @param parent The parent of this MindmapNode + */ + public void setParent(MindmapNode parent) { + this.parent = parent; + } + + /** + * @return Returns the subject of the Message. + * @hibernate.property column="node_text" + */ + public String getText() { + return text; + } + + /** + * @param subject The subject of the Message to be set. + */ + public void setText(String text) { + this.text = text; + } + + /** + * @return Returns the subject of the Message. + * @hibernate.property column="node_color" + */ + public String getColor() { + return color; + } + + /** + * @param subject The subject of the Message to be set. + */ + public void setColor(String color) { + this.color = color; + } + + /** + * @return Returns the userid of the user who created the Mindmap. + * @hibernate.many-to-one column="user_id" cascade="all" + */ + public MindmapUser getUser() { + return user; + } + + /** + * @param createdBy The userid of the user who created this Mindmap. + */ + public void setUser(MindmapUser user) { + this.user = user; + } + + /** + * @return Returns the userid of the user who created the Mindmap. + * @hibernate.many-to-one column="mindmap_id" cascade="all" + */ + public Mindmap getMindmap() { + return mindmap; + } + + public void setMindmap(Mindmap mindmap) { + this.mindmap = mindmap; + } +} \ No newline at end of file Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapRequest.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapRequest.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapRequest.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,172 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: MindmapRequest.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $$ */ +package org.lamsfoundation.lams.tool.mindmap.model; + +/** + * @author Ruslan Kazakov + * + * @hibernate.class table="tl_lamind10_request" + * + */ +public class MindmapRequest implements Cloneable { + + private Long uid; + private Long uniqueId; + private Long globalId; + private int type; + private Long nodeId; + private Long nodeChildId; + private MindmapUser user; + private Mindmap mindmap; + + /** default constructor */ + public MindmapRequest() { + } + + /** full constructor */ + public MindmapRequest(Long uid, Long uniqueId, int type, Long nodeId, MindmapUser user, + Mindmap mindmap) { + this.uid = uid; + this.uniqueId = uniqueId; + this.type = type; + this.nodeId = nodeId; + this.user = user; + this.mindmap = mindmap; + } + + // ********************************************************** + // get/set methods + // ********************************************************** + + /** + * @hibernate.id column="uid" generator-class="native" + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @return Returns the subject of the Message. + * @hibernate.property column="unique_id" + */ + public Long getUniqueId() { + return uniqueId; + } + + /** + * @param subject The subject of the Message to be set. + */ + public void setUniqueId(Long uniqueId) { + this.uniqueId = uniqueId; + } + + /** + * @return Returns the subject of the Message. + * @hibernate.property column="global_id" + */ + public Long getGlobalId() { + return globalId; + } + + /** + * @param globalId the globalId to set + */ + public void setGlobalId(Long globalId) { + this.globalId = globalId; + } + + /** + * @return Returns the subject of the Message. + * @hibernate.property column="request_type" + */ + public int getType() { + return type; + } + + /** + * @param subject The subject of the Message to be set. + */ + public void setType(int type) { + this.type = type; + } + + /** + * @return Returns the userid of the user who created the Mindmap. + * @hibernate.property column="node_id" + */ + public Long getNodeId() { + return nodeId; + } + + /** + * @param createdBy The userid of the user who created this Mindmap. + */ + public void setNodeId(Long nodeId) { + this.nodeId = nodeId; + } + + /** + * @return Returns the userid of the user who created the Mindmap. + * @hibernate.property column="node_child_id" + */ + public Long getNodeChildId() { + return nodeChildId; + } + + public void setNodeChildId(Long nodeChildId) { + this.nodeChildId = nodeChildId; + } + + /** + * @return Returns the userid of the user who created the Mindmap. + * @hibernate.many-to-one column="user_id" cascade="all" + */ + public MindmapUser getUser() { + return user; + } + + /** + * @param createdBy The userid of the user who created this Mindmap. + */ + public void setUser(MindmapUser user) { + this.user = user; + } + + /** + * @return Returns the userid of the user who created the Mindmap. + * @hibernate.many-to-one column="mindmap_id" cascade="all" + */ + public Mindmap getMindmap() { + return mindmap; + } + + public void setMindmap(Mindmap mindmap) { + this.mindmap = mindmap; + } +} \ No newline at end of file Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapSession.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapSession.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapSession.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,249 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapSession.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; + +/** + * + * Represents the tool session. + * + * @hibernate.class table="tl_lamind10_session" + */ + +public class MindmapSession implements java.io.Serializable { + + private static Logger log = Logger.getLogger(MindmapSession.class); + /** + * + */ + private static final long serialVersionUID = 4407078136514639026L; + + // Fields + private Long uid; + + private Date sessionEndDate; + + private Date sessionStartDate; + + private Integer status; + + private Long sessionId; + + private String sessionName; + + private Mindmap mindmap; + + private Set mindmapUsers; + + // Constructors + + /** default constructor */ + public MindmapSession() { + } + + /** full constructor */ + public MindmapSession(Date sessionEndDate, Date sessionStartDate, + Integer status, Long sessionId, String sessionName, Mindmap mindmap, + Set mindmapUsers) { + this.sessionEndDate = sessionEndDate; + this.sessionStartDate = sessionStartDate; + this.status = status; + this.sessionId = sessionId; + this.sessionName = sessionName; + this.mindmap = mindmap; + this.mindmapUsers = mindmapUsers; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="session_end_date" + * + */ + + public Date getSessionEndDate() { + return this.sessionEndDate; + } + + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + + /** + * @hibernate.property column="session_start_date" + * + */ + + public Date getSessionStartDate() { + return this.sessionStartDate; + } + + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + + /** + * @hibernate.property column="status" length="11" + * + */ + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + /** + * @hibernate.property column="session_id" length="20" + * + */ + + public Long getSessionId() { + return this.sessionId; + } + + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + + /** + * @hibernate.property column="session_name" length="250" + * + */ + + public String getSessionName() { + return this.sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="mindmap_uid" + * + */ + + public Mindmap getMindmap() { + return this.mindmap; + } + + public void setMindmap(Mindmap mindmap) { + this.mindmap = mindmap; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="mindmap_session_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.mindmap.model.MindmapUser" + * + */ + + public Set getMindmapUsers() { + return this.mindmapUsers; + } + + public void setMindmapUsers(Set mindmapUsers) { + this.mindmapUsers = mindmapUsers; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append( + Integer.toHexString(hashCode())).append(" ["); + buffer.append("sessionEndDate").append("='") + .append(getSessionEndDate()).append("' "); + buffer.append("sessionStartDate").append("='").append( + getSessionStartDate()).append("' "); + buffer.append("status").append("='").append(getStatus()).append("' "); + buffer.append("sessionID").append("='").append(getSessionId()).append( + "' "); + buffer.append("sessionName").append("='").append(getSessionName()) + .append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof MindmapSession)) + return false; + MindmapSession castOther = (MindmapSession) other; + + return ((this.getUid() == castOther.getUid()) || (this.getUid() != null + && castOther.getUid() != null && this.getUid().equals( + castOther.getUid()))); + } + + public int hashCode() { + int result = 17; + result = 37 * result + + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone() { + + MindmapSession session = null; + try{ + session = (MindmapSession) super.clone(); + session.mindmapUsers = new HashSet(); + } catch (CloneNotSupportedException e) { + log.error("When clone " + MindmapSession.class + " failed"); + } + return session; + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapUser.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapUser.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/model/MindmapUser.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,201 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapUser.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.model; + +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * Caches the user details. This allows the tool to be more efficient at displaying user names but means that when + * people's names change, they won't change in the "old" tool data. + * + * @hibernate.class table="tl_lamind10_user" + */ +public class MindmapUser implements java.io.Serializable { + + private static final long serialVersionUID = -3701664859818409197L; + + // Fields + private Long uid; + private Long userId; + private String lastName; + private String firstName; + private String loginName; + private MindmapSession mindmapSession; + private boolean finishedActivity; + private Long entryUID; + + // Constructors + + /** default constructor */ + public MindmapUser() { + } + + public MindmapUser(UserDTO user, MindmapSession mindmapSession) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.mindmapSession = mindmapSession; + this.finishedActivity = false; + } + + /** full constructor */ + public MindmapUser(Long userId, String lastName, String firstName, MindmapSession mindmapSession) { + this.userId = userId; + this.lastName = lastName; + this.firstName = firstName; + this.mindmapSession = mindmapSession; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + */ + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="user_id" length="20" + * + */ + public Long getUserId() { + return this.userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + /** + * @hibernate.property column="last_name" length="255" + * + */ + public String getLastName() { + return this.lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * @hibernate.property column="login_name" length="255" + * + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + /** + * @hibernate.property column="first_name" length="255" + * + */ + public String getFirstName() { + return this.firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @hibernate.property column="finishedActivity" + */ + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="mindmap_session_uid" + * + */ + public MindmapSession getMindmapSession() { + return this.mindmapSession; + } + + public void setMindmapSession(MindmapSession mindmapSession) { + this.mindmapSession = mindmapSession; + } + + /** + * @hibernate.property column="entry_uid" + */ + public Long getEntryUID() { + return entryUID; + } + + public void setEntryUID(Long entryUID) { + this.entryUID = entryUID; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("uniqueId").append("='").append(getUserId()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof MindmapUser)) + return false; + MindmapUser castOther = (MindmapUser) other; + + return ((this.getUid() == castOther.getUid()) || (this.getUid() != null && castOther.getUid() != null && this + .getUid().equals(castOther.getUid()))); + } + + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/IMindmapService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/IMindmapService.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/IMindmapService.java 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,227 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: IMindmapService.java,v 1.1 2009/04/03 00:00:33 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.service; + +import java.util.List; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapRequest; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapException; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeModel; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.MessageService; + +/** + * Defines the services available to the web layer from the Mindmap Service + */ +public interface IMindmapService { + /** + * Makes a copy of the default content and assigns it a newContentID + * @param newContentID + * @return + */ + public Mindmap copyDefaultContent(Long newContentID); + + /** + * Returns an instance of the Mindmap tools default content. + * @return + */ + public Mindmap getDefaultContent(); + + /** + * @param toolSignature + * @return + */ + public Long getDefaultContentIdBySignature(String toolSignature); + + /** + * @param toolContentID + * @return + */ + public Mindmap getMindmapByContentId(Long toolContentID); + + /** + * @param Uid + * @return + */ + public Mindmap getMindmapByUid(Long Uid); + + /** + * @param toolContentId + * @param file + * @param type + * @return + */ + public MindmapAttachment uploadFileToContent(Long toolContentId, FormFile file, String type); + + /** + * @param uuid + * @param versionID + */ + public void deleteFromRepository(Long uuid, Long versionID) throws MindmapException; + + /** + * @param contentID + * @param uuid + * @param versionID + * @param type + */ + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type); + + /** + * @param mindmap + */ + public void saveOrUpdateMindmap(Mindmap mindmap); + + /** + * @param toolSessionId + * @return + */ + public MindmapSession getSessionBySessionId(Long toolSessionId); + + /** + * @param mindmapSession + */ + public void saveOrUpdateMindmapSession(MindmapSession mindmapSession); + + /** + * + * @param userId + * @param toolSessionId + * @return + */ + public MindmapUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId); + + /** + * + * @param uid + * @return + */ + public MindmapUser getUserByUID(Long uid); + + /** + * + * @param mindmapUser + */ + public void saveOrUpdateMindmapUser(MindmapUser mindmapUser); + + /** + * + * @param user + * @param mindmapSession + * @return + */ + public MindmapUser createMindmapUser(UserDTO user, MindmapSession mindmapSession); + + /** + * + * @param id + * @param idType + * @param signature + * @param userID + * @param title + * @param entry + * @return + */ + Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); + + /** + * + * @param uid + * @return + */ + NotebookEntry getEntry(Long uid); + + /** + * + * @param uid + * @param title + * @param entry + */ + void updateEntry(Long uid, String entry); + + public void updateEntry(NotebookEntry notebookEntry); + + boolean isGroupedActivity(long toolContentID); + + public void setMindmapMessageService(MessageService mindmapMessageService); + + public MessageService getMindmapMessageService(); + + /* Outputs */ + public int getNumNodes(Long learnerId, Long toolSessionId); + + /* MINDMAP Code */ + public String getLanguageXML(); + + public void deleteNodeByUniqueMindmapUser(Long uniqueId, Long mindmapId, Long userId); + + public void deleteNodes(String nodesToDeleteCondition); + + public String getNodesToDeleteCondition(); + + public void setNodesToDeleteCondition(String nodesToDeleteCondition); + + public void saveOrUpdateMindmapNode(MindmapNode mindmapNode); + + public List getAuthorRootNodeByMindmapId(Long mindmapId); + + public List getAuthorRootNodeByMindmapIdMulti(Long mindmapId); + + public List getRootNodeByMindmapIdAndUserId(Long mindmapId, Long userId); + + public List getUserRootNodeByUserId(Long userId); + + public List getMindmapNodeByParentId(Long parentId, Long mindmapId); + + public List getMindmapNodeByUniqueId(Long uniqueId, Long mindmapId); + + public List getMindmapNodeByUniqueIdMindmapIdUserId(Long uniqueId, Long mindmapId, Long userId); + + public MindmapNode saveMindmapNode(MindmapNode currentMindmapNode, MindmapNode parentMindmapNode, Long uniqueId, + String text, String color, MindmapUser mindmapUser, Mindmap mindmap); + + public NodeModel getMindmapXMLFromDatabase(Long rootNodeId, Long mindmapId, NodeModel rootNodeModel, MindmapUser mindmapUser); + + public void getChildMindmapNodes(List branches, MindmapNode rootMindmapNode, MindmapUser mindmapUser, + Mindmap mindmap); + + public void saveOrUpdateMindmapRequest(MindmapRequest mindmapRequest); + + public Long getLastUniqueIdByMindmapIdUserId(Long mindmapId, Long userId); + + public Long getLastUniqueIdByMindmapId(Long mindmapId); + + public List getLastRequestsAfterGlobalId(Long globalId, Long mindmapId, Long userId); + + public MindmapRequest getRequestByUniqueId(Long uniqueId, Long userId, Long mindmapId, Long globalId); + + public Long getLastGlobalIdByMindmapId(Long mindmapId); +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapOutputFactory.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapOutputFactory.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapOutputFactory.java 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,177 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MindmapOutputFactory.java,v 1.1 2009/04/03 00:00:33 ruslan Exp $ */ +package org.lamsfoundation.lams.tool.mindmap.service; + +import java.util.List; +import java.util.SortedMap; +import java.util.TreeMap; + +import org.lamsfoundation.lams.tool.OutputFactory; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.exception.ToolException; + +/** + * Output factory for Mindmap tool. Currently it provides only one type of output - the entry that user provided. + * @author Marcin Cieslak + */ +public class MindmapOutputFactory extends OutputFactory { + + /** The number of nodes the learner has created in one Mindmap activity. */ + protected final static String OUTPUT_NAME_LEARNER_NUM_NODES = "output.learner.number.of.nodes"; + + @Override + public SortedMap getToolOutputDefinitions(Object toolContentObject) + throws ToolException { + + SortedMap definitionMap = new TreeMap(); + + ToolOutputDefinition definition1 = buildRangeDefinition(OUTPUT_NAME_LEARNER_NUM_NODES, new Long(0), null); + definitionMap.put(OUTPUT_NAME_LEARNER_NUM_NODES, definition1); + + return definitionMap; + } + + public SortedMap getToolOutput(List names, IMindmapService mindmapService, + Long toolSessionId, Long learnerId) { + + TreeMap map = new TreeMap(); + if (names == null || names.contains(OUTPUT_NAME_LEARNER_NUM_NODES)) { + map.put(OUTPUT_NAME_LEARNER_NUM_NODES, getNumNodes(mindmapService, learnerId, toolSessionId)); + } + return map; + } + + public ToolOutput getToolOutput(String name, IMindmapService mindmapService, Long toolSessionId, Long learnerId) { + + if (name != null && name.equals(OUTPUT_NAME_LEARNER_NUM_NODES)) { + return getNumNodes(mindmapService, learnerId, toolSessionId); + } + + return null; + } + + private ToolOutput getNumNodes(IMindmapService mindmapService, Long learnerId, Long toolSessionId) { + int num = mindmapService.getNumNodes(learnerId, toolSessionId); + return new ToolOutput(OUTPUT_NAME_LEARNER_NUM_NODES, getI18NText(OUTPUT_NAME_LEARNER_NUM_NODES, true), + new Long(num)); + } + + + /* + + public SortedMap getToolOutput(List names, IMindmapService mindmapService, + Long toolSessionId, Long learnerId) { + + TreeMap outputs = new TreeMap(); + // cached tool output for all text search conditions + ToolOutput mindmapEntryOutput = null; + if (names == null) { + // output will be set for all the existing conditions + Mindmap mindmap = mindmapService.getSessionBySessionId(toolSessionId).getMindmap(); + + /* + Set conditions = mindmap.getConditions(); + for (MindmapCondition condition : conditions) { + String name = condition.getName(); + if (isTextSearchConditionName(name) && mindmapEntryOutput != null) { + outputs.put(name, mindmapEntryOutput); + } else { + ToolOutput output = getToolOutput(name, mindmapService, toolSessionId, learnerId); + if (output != null) { + outputs.put(name, output); + if (isTextSearchConditionName(name)) { + mindmapEntryOutput = output; + } + } + } + } + } else { + for (String name : names) { + if (isTextSearchConditionName(name) && mindmapEntryOutput != null) { + outputs.put(name, mindmapEntryOutput); + } else { + ToolOutput output = getToolOutput(name, mindmapService, toolSessionId, learnerId); + if (output != null) { + outputs.put(name, output); + if (isTextSearchConditionName(name)) { + mindmapEntryOutput = output; + } + } + } + }*/ + +/* } + + + return outputs; + + } + + public ToolOutput getToolOutput(String name, IMindmapService chatService, Long toolSessionId, Long learnerId) { + if (isTextSearchConditionName(name)) { + + // entry is loaded from DB + Mindmap mindmap = chatService.getSessionBySessionId(toolSessionId).getMindmap(); + + MindmapUser user = chatService.getUserByUserIdAndSessionId(learnerId, toolSessionId); + + // NotebookEntry entry = chatService.getEntry(user.getEntryUID()); + //String value = entry == null ? null : entry.getEntry(); + String value = ""; + + return new ToolOutput(name, getI18NText(MindmapConstants.TEXT_SEARCH_DEFINITION_NAME, true), value); + + } + return null; + } +/* + @Override + protected String[] splitConditionName(String conditionName) { + return super.splitConditionName(conditionName); + } + + protected String buildConditionName(String uniquePart) { + return super.buildConditionName(MindmapConstants.TEXT_SEARCH_DEFINITION_NAME, uniquePart); + } + + private boolean isTextSearchConditionName(String name) { + return name != null && name.startsWith(MindmapConstants.TEXT_SEARCH_DEFINITION_NAME); + } + + /* + * Creates a default condition so teachers know how to use complex conditions for this tool. + * + * @param mindmap + * content of the tool + * @return default mindmap condition + */ +/* protected MindmapCondition createDefaultComplexCondition(Mindmap mindmap) { + String name = buildConditionName(MindmapConstants.TEXT_SEARCH_DEFINITION_NAME, mindmap.getToolContentId() + .toString()); + // Default condition checks if the text contains word "LAMS" + return new MindmapCondition(null, null, 1, name, getI18NText( + MindmapConstants.TEXT_SEARCH_DEFAULT_CONDITION_DISPLAY_NAME_KEY, false), "LAMS", null, null, null); + }*/ +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapService.java 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,921 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapService.java,v 1.1 2009/04/03 00:00:33 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.service; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.SortedMap; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.AccessDeniedException; +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.InvalidParameterException; +import org.lamsfoundation.lams.contentrepository.LoginException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; +import org.lamsfoundation.lams.learning.service.ILearnerService; +import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; +import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; +import org.lamsfoundation.lams.tool.ToolContentImport102Manager; +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.ToolSessionExportOutputData; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapAttachmentDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapNodeDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapRequestDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapSessionDAO; +import org.lamsfoundation.lams.tool.mindmap.dao.IMindmapUserDAO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapRequest; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapConstants; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapException; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapToolContentHandler; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeModel; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.MessageService; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.util.audit.IAuditService; + +/** + * An implementation of the IMindmapService interface. As a requirement, all LAMS tool's service bean must implement + * ToolContentManager and ToolSessionManager. + */ +public class MindmapService implements ToolSessionManager, ToolContentManager, IMindmapService, + ToolContentImport102Manager { + + static Logger logger = Logger.getLogger(MindmapService.class.getName()); + + private IMindmapDAO mindmapDAO = null; + private IMindmapSessionDAO mindmapSessionDAO = null; + private IMindmapUserDAO mindmapUserDAO = null; + private IMindmapAttachmentDAO mindmapAttachmentDAO = null; + private IMindmapNodeDAO mindmapNodeDAO = null; + private IMindmapRequestDAO mindmapRequestDAO = null; + private ILearnerService learnerService; + private ILamsToolService toolService; + private IToolContentHandler mindmapToolContentHandler = null; + private IRepositoryService repositoryService = null; + private IAuditService auditService = null; + private IExportToolContentService exportContentService; + private ICoreNotebookService coreNotebookService; + private MindmapOutputFactory mindmapOutputFactory; + private String nodesToDeleteCondition = null; // string to accumulate nodes to delete + private MessageService mindmapMessageService; + + public MindmapService() { + super(); + } + + /* Methods from ToolSessionManager */ + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { + if (MindmapService.logger.isDebugEnabled()) { + MindmapService.logger.debug("entering method createToolSession:" + " toolSessionId = " + toolSessionId + + " toolSessionName = " + toolSessionName + " toolContentId = " + toolContentId); + } + + MindmapSession session = new MindmapSession(); + session.setSessionId(toolSessionId); + session.setSessionName(toolSessionName); + // learner starts + // TODO need to also set other fields. + Mindmap mindmap = mindmapDAO.getByContentId(toolContentId); + session.setMindmap(mindmap); + mindmapSessionDAO.saveOrUpdate(session); + } + + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + return learnerService.completeToolSession(toolSessionId, learnerId); + } + + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { + // TODO Auto-generated method stub + return null; + } + + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, + ToolException { + // TODO Auto-generated method stub + return null; + } + + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { + mindmapSessionDAO.deleteBySessionID(toolSessionId); + // TODO check if cascade worked + } + + /** + * Get the tool output for the given tool output names. + * + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.util.List, java.lang.Long, + * java.lang.Long) + */ + public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { + return getMindmapOutputFactory().getToolOutput(names, this, toolSessionId, learnerId); + } + + /** + * Get the tool output for the given tool output name. + * + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.lang.String, java.lang.Long, + * java.lang.Long) + */ + public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { + return getMindmapOutputFactory().getToolOutput(name, this, toolSessionId, learnerId); + } + + /** + * Get number of nodes created by particular user + * + * @param learnerId + * @param toolSessionId + * @return + */ + public int getNumNodes(Long learnerId, Long toolSessionId) { + //MindmapUser mindmapUser = getUserByUserIdAndSessionId(learnerId, toolSessionId); + //MindmapSession mindmapSession = getSessionBySessionId(toolSessionId); + + // TODO: Implement Nodes output + return mindmapNodeDAO.getNumNodesByUserAndSession(learnerId, toolSessionId); + } + + + /* Methods from ToolContentManager */ + + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + + if (MindmapService.logger.isDebugEnabled()) { + MindmapService.logger.debug("entering method copyToolContent:" + " fromContentId=" + fromContentId + + " toContentId=" + toContentId); + } + + if (toContentId == null) { + String error = "Failed to copy tool content: toContentID is null"; + throw new ToolException(error); + } + + Mindmap fromContent = null; + if (fromContentId != null) { + fromContent = mindmapDAO.getByContentId(fromContentId); + } + if (fromContent == null) { + // create the fromContent using the default tool content + fromContent = getDefaultContent(); + } + Mindmap toContent = Mindmap.newInstance(fromContent, toContentId, mindmapToolContentHandler); + mindmapDAO.saveOrUpdate(toContent); + + /* MINDMAP Code */ + + MindmapNode fromMindmapNode = (MindmapNode) getAuthorRootNodeByMindmapId(fromContent.getUid()).get(0); + + cloneMindmapNodesForRuntime(fromMindmapNode, null, fromContent, toContent); + + /* MINDMAP Code */ + } + + /** + * Makes a runtime copy of Mindmap Nodes for single-user mode. + * Makes a shared copy of Mindmap Nodes for multi-user mode. + * + * @param fromMindmapNode + * @param toMindmapNode + * @param fromContent + * @param toContent + * @return + */ + public void cloneMindmapNodesForRuntime(MindmapNode fromMindmapNode, MindmapNode toMindmapNode, + Mindmap fromContent, Mindmap toContent) { + toMindmapNode = saveMindmapNode(null, toMindmapNode, fromMindmapNode.getUniqueId(), fromMindmapNode.getText(), + fromMindmapNode.getColor(), fromMindmapNode.getUser(), toContent); + + List childMindmapNodes = getMindmapNodeByParentId(fromMindmapNode.getNodeId(), fromContent.getUid()); + + if (childMindmapNodes != null && childMindmapNodes.size() > 0) { + for (Iterator iterator = childMindmapNodes.iterator(); iterator.hasNext();) { + MindmapNode childMindmapNode = (MindmapNode) iterator.next(); + cloneMindmapNodesForRuntime(childMindmapNode, toMindmapNode, fromContent, toContent); + } + } + } + + /** + * Saves Mindmap Node to database. + * + * @param currentMindmapNode + * @param parentMindmapNode + * @param uniqueId + * @param text + * @param color + * @param mindmapUser + * @param mindmap + * @return null + */ + public MindmapNode saveMindmapNode(MindmapNode currentMindmapNode, MindmapNode parentMindmapNode, Long uniqueId, + String text, String color, MindmapUser mindmapUser, Mindmap mindmap) { + if (currentMindmapNode == null) { + currentMindmapNode = new MindmapNode(); + } + currentMindmapNode.setParent(parentMindmapNode); + currentMindmapNode.setUniqueId(uniqueId); + currentMindmapNode.setText(text); + currentMindmapNode.setColor(color); + currentMindmapNode.setUser(mindmapUser); + currentMindmapNode.setMindmap(mindmap); + saveOrUpdateMindmapNode(currentMindmapNode); + + return currentMindmapNode; + } + + /** + * Makes a runtime copy of Mindmap Nodes for single-user mode. + * + * @param rootNodeId + * @param mindmapId + * @param rootNodeModel + * @param mindmapUser + * @return rootNodeModel + */ + public NodeModel getMindmapXMLFromDatabase(Long rootNodeId, Long mindmapId, NodeModel rootNodeModel, + MindmapUser mindmapUser) { + List mindmapNodes = getMindmapNodeByParentId(rootNodeId, mindmapId); + + if (mindmapNodes != null && mindmapNodes.size() > 0) { + for (Iterator iterator = mindmapNodes.iterator(); iterator.hasNext();) { + MindmapNode mindmapNode = (MindmapNode) iterator.next(); + + String mindmapUserName = null; + if (mindmapNode.getUser() == null) + mindmapUserName = getMindmapMessageService().getMessage("node.instructor.label"); + else + mindmapUserName = mindmapNode.getUser().getFirstName() + " " + mindmapNode.getUser().getLastName(); + + NodeModel nodeModel = null; + if (mindmapUser != null) { + int edit = 1; + if (mindmapNode.getUser() == mindmapUser) + edit = 1; + else + edit = 0; + + nodeModel = new NodeModel(new NodeConceptModel(mindmapNode.getUniqueId(), mindmapNode.getText(), + mindmapNode.getColor(), mindmapUserName, edit)); + } else { + nodeModel = new NodeModel(new NodeConceptModel(mindmapNode.getUniqueId(), mindmapNode.getText(), + mindmapNode.getColor(), mindmapUserName, 1)); + } + + rootNodeModel.addNode(nodeModel); + getMindmapXMLFromDatabase(mindmapNode.getNodeId(), mindmapId, nodeModel, mindmapUser); + } + } + + return rootNodeModel; + } + + public void getChildMindmapNodes(List branches, MindmapNode rootMindmapNode, MindmapUser mindmapUser, + Mindmap mindmap) { + for (Iterator iterator = branches.iterator(); iterator.hasNext();) { + NodeModel nodeModel = (NodeModel) iterator.next(); + NodeConceptModel nodeConceptModel = nodeModel.getConcept(); + // saving branch + List curMindmapNodeList = null; + if (mindmapUser == null) + curMindmapNodeList = getMindmapNodeByUniqueId(nodeConceptModel.getId(), mindmap.getUid()); + else + curMindmapNodeList = getMindmapNodeByUniqueIdMindmapIdUserId(nodeConceptModel.getId(), + mindmap.getUid(), mindmapUser.getUid()); + + MindmapNode currentMindmapNode = null; + if (curMindmapNodeList != null && curMindmapNodeList.size() > 0) { + currentMindmapNode = (MindmapNode) curMindmapNodeList.get(0); + } + this.nodesToDeleteCondition += " and uniqueId <> " + nodeConceptModel.getId(); + currentMindmapNode = saveMindmapNode(currentMindmapNode, rootMindmapNode, nodeConceptModel.getId(), + nodeConceptModel.getText(), nodeConceptModel.getColor(), mindmapUser, mindmap); + // if there are child nodes, redo for every child + if (nodeModel.getBranch() != null) + getChildMindmapNodes(nodeModel.getBranch(), currentMindmapNode, mindmapUser, mindmap); + } + } + + public String getLanguageXML() { + ArrayList languageCollection = new ArrayList(); + languageCollection.add(new String("local.title")); + languageCollection.add(new String("local.delete_question")); + languageCollection.add(new String("local.yes")); + languageCollection.add(new String("local.no")); + languageCollection.add(new String("local.node_creator")); + + String languageOutput = ""; + + for(int i=0; i < languageCollection.size(); i++) { + languageOutput += "" + + mindmapMessageService.getMessage(languageCollection.get(i)) + ""; + } + + languageOutput += ""; + + return languageOutput; + } + + public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Mindmap mindmap = mindmapDAO.getByContentId(toolContentId); + if (mindmap == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + mindmap.setDefineLater(value); + mindmapDAO.saveOrUpdate(mindmap); + } + + public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Mindmap mindmap = mindmapDAO.getByContentId(toolContentId); + if (mindmap == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + mindmap.setRunOffline(value); + mindmapDAO.saveOrUpdate(mindmap); + } + + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, + ToolException { + // TODO Auto-generated method stub + } + + /** + * Export the XML fragment for the tool's content, along with any files needed for the content. + * + * @throws DataMissingException + * if no tool content matches the toolSessionId + * @throws ToolException + * if any other error occurs + */ + + public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { + Mindmap mindmap = mindmapDAO.getByContentId(toolContentId); + if (mindmap == null) { + mindmap = getDefaultContent(); + } + if (mindmap == null) { + throw new DataMissingException("Unable to find default content for the mindmap tool"); + } + + // set ResourceToolContentHandler as null to avoid copy file node in + // repository again. + mindmap = Mindmap.newInstance(mindmap, toolContentId, null); + mindmap.setToolContentHandler(null); + mindmap.setMindmapSessions(null); + Set atts = mindmap.getMindmapAttachments(); + for (MindmapAttachment att : atts) { + att.setMindmap(null); + } + try { + exportContentService.registerFileClassForExport(MindmapAttachment.class.getName(), "fileUuid", + "fileVersionId"); + exportContentService.exportToolContent(toolContentId, mindmap, mindmapToolContentHandler, rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } + } + + /** + * Import the XML fragment for the tool's content, along with any files needed for the content. + * + * @throws ToolException + * if any other error occurs + */ + public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion, + String toVersion) throws ToolException { + try { + exportContentService.registerFileClassForImport(MindmapAttachment.class.getName(), "fileUuid", + "fileVersionId", "fileName", "fileType", null, null); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath, mindmapToolContentHandler, + fromVersion, toVersion); + if (!(toolPOJO instanceof Mindmap)) { + throw new ImportToolContentException("Import Mindmap tool content failed. Deserialized object is " + + toolPOJO); + } + Mindmap mindmap = (Mindmap) toolPOJO; + + // reset it to new toolContentId + mindmap.setToolContentId(toolContentId); + mindmap.setCreateBy(new Long(newUserUid.longValue())); + + mindmapDAO.saveOrUpdate(mindmap); + } catch (ImportToolContentException e) { + throw new ToolException(e); + } + } + + /** + * Get the definitions for possible output for an activity, based on the toolContentId. These may be definitions + * that are always available for the tool (e.g. number of marks for Multiple Choice) or a custom definition created + * for a particular activity such as the answer to the third question contains the word Koala and hence the need for + * the toolContentId + * + * @return SortedMap of ToolOutputDefinitions with the key being the name of each definition + */ + public SortedMap getToolOutputDefinitions(Long toolContentId) throws ToolException { + Mindmap mindmap = getMindmapDAO().getByContentId(toolContentId); + if (mindmap == null) { + mindmap = getDefaultContent(); + } + return getMindmapOutputFactory().getToolOutputDefinitions(mindmap); + } + + /* IMindmapService Methods */ + + public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry) { + return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry); + } + + public NotebookEntry getEntry(Long uid) { + return coreNotebookService.getEntry(uid); + } + + public void updateEntry(Long uid, String entry) { + coreNotebookService.updateEntry(uid, "", entry); + } + + public void updateEntry(NotebookEntry notebookEntry) { + coreNotebookService.updateEntry(notebookEntry); + } + + public Long getDefaultContentIdBySignature(String toolSignature) { + Long toolContentId = null; + toolContentId = new Long(toolService.getToolDefaultContentIdBySignature(toolSignature)); + if (toolContentId == null) { + String error = "Could not retrieve default content id for this tool"; + MindmapService.logger.error(error); + throw new MindmapException(error); + } + return toolContentId; + } + + public Mindmap getDefaultContent() { + Long defaultContentID = getDefaultContentIdBySignature(MindmapConstants.TOOL_SIGNATURE); + Mindmap defaultContent = getMindmapByContentId(defaultContentID); + if (defaultContent == null) { + String error = "Could not retrieve default content record for this tool"; + MindmapService.logger.error(error); + throw new MindmapException(error); + } + + return defaultContent; + } + + public Mindmap copyDefaultContent(Long newContentID) { + + if (newContentID == null) { + String error = "Cannot copy the Mindmap tools default content: + " + "newContentID is null"; + MindmapService.logger.error(error); + throw new MindmapException(error); + } + + Mindmap defaultContent = getDefaultContent(); + // create new mindmap using the newContentID + Mindmap newContent = new Mindmap(); + newContent = Mindmap.newInstance(defaultContent, newContentID, mindmapToolContentHandler); + mindmapDAO.saveOrUpdate(newContent); + return newContent; + } + + public Mindmap getMindmapByContentId(Long toolContentID) { + Mindmap mindmap = mindmapDAO.getByContentId(toolContentID); + if (mindmap == null) { + MindmapService.logger.debug("Could not find the content with toolContentID:" + toolContentID); + } + return mindmap; + } + + public Mindmap getMindmapByUid(Long Uid) { + Mindmap mindmap = mindmapDAO.getMindmapByUid(Uid); + if (mindmap == null) { + MindmapService.logger.debug("Could not find the content with Uid:" + Uid); + } + return mindmap; + } + + public MindmapSession getSessionBySessionId(Long toolSessionId) { + MindmapSession mindmapSession = mindmapSessionDAO.getBySessionId(toolSessionId); + if (mindmapSession == null) { + MindmapService.logger.debug("Could not find the mindmap session with toolSessionID:" + toolSessionId); + } + return mindmapSession; + } + + public MindmapUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId) { + return mindmapUserDAO.getByUserIdAndSessionId(userId, toolSessionId); + } + + public MindmapUser getUserByLoginNameAndSessionId(String loginName, Long toolSessionId) { + return mindmapUserDAO.getByLoginNameAndSessionId(loginName, toolSessionId); + } + + public MindmapUser getUserByUID(Long uid) { + return mindmapUserDAO.getByUID(uid); + } + + public MindmapAttachment uploadFileToContent(Long toolContentId, FormFile file, String type) { + if (file == null || StringUtils.isEmpty(file.getFileName())) { + throw new MindmapException("Could not find upload file: " + file); + } + + NodeKey nodeKey = processFile(file, type); + MindmapAttachment attachment = new MindmapAttachment(nodeKey.getVersion(), type, file.getFileName(), + nodeKey.getUuid(), new Date()); + return attachment; + } + + public void deleteFromRepository(Long uuid, Long versionID) throws MindmapException { + ITicket ticket = getRepositoryLoginTicket(); + try { + repositoryService.deleteVersion(ticket, uuid, versionID); + } catch (Exception e) { + throw new MindmapException("Exception occured while deleting files from" + " the repository " + e.getMessage()); + } + } + + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type) { + mindmapDAO.deleteInstructionFile(contentID, uuid, versionID, type); + + } + + public void saveOrUpdateMindmap(Mindmap mindmap) { + mindmapDAO.saveOrUpdate(mindmap); + } + + public void saveOrUpdateMindmapRequest(MindmapRequest mindmapRequest) { + mindmapRequestDAO.saveOrUpdate(mindmapRequest); + } + + public void saveOrUpdateMindmapSession(MindmapSession mindmapSession) { + mindmapSessionDAO.saveOrUpdate(mindmapSession); + } + + public void saveOrUpdateMindmapUser(MindmapUser mindmapUser) { + mindmapUserDAO.saveOrUpdate(mindmapUser); + } + + public MindmapUser createMindmapUser(UserDTO user, MindmapSession mindmapSession) { + MindmapUser mindmapUser = new MindmapUser(user, mindmapSession); + saveOrUpdateMindmapUser(mindmapUser); + return mindmapUser; + } + + public IAuditService getAuditService() { + return auditService; + } + + public void setAuditService(IAuditService auditService) { + this.auditService = auditService; + } + + private NodeKey processFile(FormFile file, String type) { + NodeKey node = null; + if (file != null && !StringUtils.isEmpty(file.getFileName())) { + String fileName = file.getFileName(); + try { + node = getMindmapToolContentHandler().uploadFile(file.getInputStream(), fileName, + file.getContentType(), type); + } catch (InvalidParameterException e) { + throw new MindmapException("InvalidParameterException occured while trying to upload File" + + e.getMessage()); + } catch (FileNotFoundException e) { + throw new MindmapException("FileNotFoundException occured while trying to upload File" + e.getMessage()); + } catch (RepositoryCheckedException e) { + throw new MindmapException("RepositoryCheckedException occured while trying to upload File" + + e.getMessage()); + } catch (IOException e) { + throw new MindmapException("IOException occured while trying to upload File" + e.getMessage()); + } + } + return node; + } + + /** + * This method verifies the credentials of the SubmitFiles Tool and gives it the Ticket to login and + * access the Content Repository. + * + * A valid ticket is needed in order to access the content from the repository. This method would be called evertime + * the tool needs to upload/download files from the content repository. + * + * @return ITicket The ticket for repostory access + * @throws SubmitFilesException + */ + private ITicket getRepositoryLoginTicket() throws MindmapException { + ICredentials credentials = new SimpleCredentials(MindmapToolContentHandler.repositoryUser, + MindmapToolContentHandler.repositoryId); + try { + ITicket ticket = repositoryService.login(credentials, MindmapToolContentHandler.repositoryWorkspaceName); + return ticket; + } catch (AccessDeniedException ae) { + throw new MindmapException("Access Denied to repository." + ae.getMessage()); + } catch (WorkspaceNotFoundException we) { + throw new MindmapException("Workspace not found." + we.getMessage()); + } catch (LoginException e) { + throw new MindmapException("Login failed." + e.getMessage()); + } + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + /** + * Import the data for a 1.0.2 Mindmap + */ + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) { + Date now = new Date(); + Mindmap mindmap = new Mindmap(); + mindmap.setContentInUse(Boolean.FALSE); + mindmap.setCreateBy(new Long(user.getUserID().longValue())); + mindmap.setCreateDate(now); + mindmap.setDefineLater(Boolean.FALSE); + mindmap.setInstructions(WebUtil.convertNewlines((String) importValues.get(ToolContentImport102Manager.CONTENT_BODY))); + mindmap.setLockOnFinished(Boolean.TRUE); + mindmap.setOfflineInstructions(null); + mindmap.setOnlineInstructions(null); + mindmap.setRunOffline(Boolean.FALSE); + mindmap.setTitle((String) importValues.get(ToolContentImport102Manager.CONTENT_TITLE)); + mindmap.setToolContentId(toolContentId); + mindmap.setUpdateDate(now); + //mindmap.setAllowRichEditor(Boolean.FALSE); + // leave as empty, no need to set them to anything. + // setMindmapAttachments(Set mindmapAttachments); + // setMindmapSessions(Set mindmapSessions); + mindmapDAO.saveOrUpdate(mindmap); + } + + /** Set the description, throws away the title value as this is not supported in 2.0 */ + public void setReflectiveData(Long toolContentId, String title, String description) throws ToolException, + DataMissingException { + + MindmapService.logger + .warn("Setting the reflective field on a mindmap. This doesn't make sense as the mindmap is for reflection and we don't reflect on reflection!"); + Mindmap mindmap = getMindmapByContentId(toolContentId); + if (mindmap == null) { + throw new DataMissingException("Unable to set reflective data titled " + title + + " on activity toolContentId " + toolContentId + " as the tool content does not exist."); + } + + mindmap.setInstructions(description); + } + + // ========================================================================================= + /* Used by Spring to "inject" the linked objects */ + + public IRepositoryService getRepositoryService() { + return repositoryService; + } + + public void setRepositoryService(IRepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + public IMindmapAttachmentDAO getMindmapAttachmentDAO() { + return mindmapAttachmentDAO; + } + + public void setMindmapAttachmentDAO(IMindmapAttachmentDAO attachmentDAO) { + mindmapAttachmentDAO = attachmentDAO; + } + + public IMindmapDAO getMindmapDAO() { + return mindmapDAO; + } + + public void setMindmapDAO(IMindmapDAO mindmapDAO) { + this.mindmapDAO = mindmapDAO; + } + + public IToolContentHandler getMindmapToolContentHandler() { + return mindmapToolContentHandler; + } + + public void setMindmapToolContentHandler(IToolContentHandler mindmapToolContentHandler) { + this.mindmapToolContentHandler = mindmapToolContentHandler; + } + + public IMindmapSessionDAO getMindmapSessionDAO() { + return mindmapSessionDAO; + } + + public void setMindmapSessionDAO(IMindmapSessionDAO sessionDAO) { + mindmapSessionDAO = sessionDAO; + } + + public ILamsToolService getToolService() { + return toolService; + } + + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + + public IMindmapUserDAO getMindmapUserDAO() { + return mindmapUserDAO; + } + + public void setMindmapUserDAO(IMindmapUserDAO userDAO) { + mindmapUserDAO = userDAO; + } + + public ILearnerService getLearnerService() { + return learnerService; + } + + public void setLearnerService(ILearnerService learnerService) { + this.learnerService = learnerService; + } + + public IExportToolContentService getExportContentService() { + return exportContentService; + } + + public void setExportContentService(IExportToolContentService exportContentService) { + this.exportContentService = exportContentService; + } + + public ICoreNotebookService getCoreNotebookService() { + return coreNotebookService; + } + + public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { + this.coreNotebookService = coreNotebookService; + } + + public MindmapOutputFactory getMindmapOutputFactory() { + return mindmapOutputFactory; + } + + public void setMindmapOutputFactory(MindmapOutputFactory mindmapOutputFactory) { + this.mindmapOutputFactory = mindmapOutputFactory; + } + + public boolean isGroupedActivity(long toolContentID) { + return toolService.isGroupedActivity(toolContentID); + } + + public void setMindmapNodeDAO(IMindmapNodeDAO mindmapNodeDAO) { + this.mindmapNodeDAO = mindmapNodeDAO; + } + + public IMindmapNodeDAO getMindmapNodeDAO() { + return mindmapNodeDAO; + } + + public void saveOrUpdateMindmapNode(MindmapNode mindmapNode) { + mindmapNodeDAO.saveOrUpdate(mindmapNode); + } + + public List getAuthorRootNodeByMindmapId(Long mindmapId) { + return mindmapNodeDAO.getAuthorRootNodeByMindmapId(mindmapId); + } + + public List getAuthorRootNodeByMindmapIdMulti(Long mindmapId) { + return mindmapNodeDAO.getAuthorRootNodeByMindmapIdMulti(mindmapId); + } + + public List getRootNodeByMindmapIdAndUserId(Long mindmapId, Long userId) { + return mindmapNodeDAO.getRootNodeByMindmapIdAndUserId(mindmapId, userId); + } + + public List getUserRootNodeByUserId(Long userId) { + return mindmapNodeDAO.getUserRootNodeByUserId(userId); + } + + public List getMindmapNodeByParentId(Long parentId, Long mindmapId) { + return mindmapNodeDAO.getMindmapNodeByParentId(parentId, mindmapId); + } + + public List getMindmapNodeByUniqueId(Long uniqueId, Long mindmapId) { + return mindmapNodeDAO.getMindmapNodeByUniqueId(uniqueId, mindmapId); + } + + public List getMindmapNodeByUniqueIdMindmapIdUserId(Long uniqueId, Long mindmapId, Long userId) { + return mindmapNodeDAO.getMindmapNodeByUniqueIdMindmapIdUserId(uniqueId, mindmapId, userId); + } + + public void deleteNodeByUniqueMindmapUser(Long uniqueId, Long mindmapId, Long userId) { + mindmapNodeDAO.deleteNodeByUniqueMindmapUser(uniqueId, mindmapId, userId); + } + + public void deleteNodes(String nodesToDeleteCondition) { + mindmapNodeDAO.deleteNodes(nodesToDeleteCondition); + } + + public String getNodesToDeleteCondition() { + return this.nodesToDeleteCondition; + } + + public void setNodesToDeleteCondition(String nodesToDeleteCondition) { + this.nodesToDeleteCondition = nodesToDeleteCondition; + } + + public Long getLastUniqueIdByMindmapIdUserId(Long mindmapId, Long userId) { + return this.mindmapNodeDAO.getLastUniqueIdByMindmapIdUserId(mindmapId, userId); + } + + /** + * @param mindmapRequestDAO + * the mindmapRequestDAO to set + */ + public void setMindmapRequestDAO(IMindmapRequestDAO mindmapRequestDAO) { + this.mindmapRequestDAO = mindmapRequestDAO; + } + + /** + * @return mindmapRequestDAO + */ + public IMindmapRequestDAO getMindmapRequestDAO() { + return mindmapRequestDAO; + } + + public List getLastRequestsAfterGlobalId(Long globalId, Long mindmapId, Long userId) { + return mindmapRequestDAO.getLastRequestsAfterGlobalId(globalId, mindmapId, userId); + } + + public MindmapRequest getRequestByUniqueId(Long uniqueId, Long userId, Long mindmapId, Long globalId) { + return mindmapRequestDAO.getRequestByUniqueId(uniqueId, userId, mindmapId, globalId); + } + + /** + * @param mindmapMessageService + * @return mindmapRequestDAO.getLastGlobalIdByMindmapId(mindmapId) + */ + public Long getLastGlobalIdByMindmapId(Long mindmapId) { + return mindmapRequestDAO.getLastGlobalIdByMindmapId(mindmapId); + } + + /** + * @param mindmapMessageService + * @return mindmapNodeDAO.getLastUniqueIdByMindmapId(mindmapId) + */ + public Long getLastUniqueIdByMindmapId(Long mindmapId) { + return mindmapNodeDAO.getLastUniqueIdByMindmapId(mindmapId); + } + + /** + * @param mindmapMessageService + * @return + */ + public void setMindmapMessageService(MessageService mindmapMessageService) { + this.mindmapMessageService = mindmapMessageService; + } + + /** + * @return mindmapMessageService + */ + public MessageService getMindmapMessageService() { + return mindmapMessageService; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapServiceProxy.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapServiceProxy.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/service/MindmapServiceProxy.java 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,79 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapServiceProxy.java,v 1.1 2009/04/03 00:00:33 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + + +/** + *

This class act as the proxy between web layer and service layer. It is + * designed to decouple the presentation logic and business logic completely. + * In this way, the presentation tier will no longer be aware of the changes in + * service layer. Therefore we can feel free to switch the business logic + * implementation.

+ */ + +public class MindmapServiceProxy { + + public static final IMindmapService getMindmapService(ServletContext servletContext) + { + return (IMindmapService)getMindmapDomainService(servletContext); + } + + private static Object getMindmapDomainService(ServletContext servletContext) + { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean("mindmapService"); + } + + /* + * Return the mindmap tool version of tool session manager implementation. + * It will delegate to the Spring helper method to retrieve the proper + * bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return noticeboard service object.*/ + public static final ToolSessionManager getMindmapSessionManager(ServletContext servletContext) + { + return (ToolSessionManager)getMindmapDomainService(servletContext); + } + + + /* + * Return the mindmap tool version of tool content manager implementation. + * It will delegate to the Spring helper method to retrieve the proper + * bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return noticeboard service object. */ + public static final ToolContentManager getMindmapContentManager(ServletContext servletContext) + { + return (ToolContentManager)getMindmapDomainService(servletContext); + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapConstants.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapConstants.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,63 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapConstants.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util; + +public interface MindmapConstants { + public static final String TOOL_SIGNATURE = "lamind10"; + + // Mindmap session status + public static final Integer SESSION_NOT_STARTED = new Integer(0); + public static final Integer SESSION_IN_PROGRESS = new Integer(1); + public static final Integer SESSION_COMPLETED = new Integer(2); + + public static final String AUTHORING_DEFAULT_TAB = "1"; + public static final String ATTACHMENT_LIST = "attachmentList"; + public static final String DELETED_ATTACHMENT_LIST = "deletedAttachmentList"; + public static final String AUTH_SESSION_ID_COUNTER = "authoringSessionIdCounter"; + public static final String AUTH_SESSION_ID = "authoringSessionId"; + + public static final int MONITORING_SUMMARY_MAX_MESSAGES = 5; + + // Attribute names + public static final String ATTR_MESSAGE = "message"; + public static final String ATTR_SESSION_MAP = "sessionMap"; + + // Parameter names + public static final String PARAM_PARENT_PAGE = "parentPage"; + + static final String FILTER_REPLACE_TEXT = "***"; + + public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; + //public static final String ATTR_CONDITION_SET = "conditionList"; + + public static final String PARAM_ORDER_ID = "orderId"; + //public static final String ATTR_DELETED_CONDITION_LIST = "deletedConditionList"; + //public static final String TEXT_SEARCH_DEFINITION_NAME = "text.search.output.definition.mindmap"; + //public static final String TEXT_SEARCH_DEFAULT_CONDITION_DISPLAY_NAME_KEY = "text.search.output.definition.mindmap.default.condition"; + public static final String SUCCESS = "success"; + //public static final String ERROR_MSG_CONDITION = "error.condition"; + //public static final String ERROR_MSG_NAME_BLANK = "error.condition.name.blank"; + //public static final String ERROR_MSG_NAME_DUPLICATED = "error.condition.duplicated.name"; +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapException.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapException.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapException.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,57 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapException.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util; + +/** + * + * @author Anthony Sukkar + * + */ +public class MindmapException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = -5518806968051758859L; + + public MindmapException(String message) { + super(message); + } + + public MindmapException(String message, Throwable cause) { + super(message, cause); + } + + public MindmapException() { + super(); + + } + + public MindmapException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapToolContentHandler.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapToolContentHandler.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/MindmapToolContentHandler.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,76 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MindmapToolContentHandler.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + */ +public class MindmapToolContentHandler extends ToolContentHandler { + + // TODO these three fields were changed to public, since accessor methods + // cannot be made static. Check if we can do this a better way. + public static String repositoryWorkspaceName = "mindmapworkspace"; + + public static String repositoryUser = "mindmap"; + + public static char[] repositoryId = { 'l', 'a', 'm', 's', '-', 'e', 'x' }; + + /** + * + */ + public MindmapToolContentHandler() { + super(); + } + + /* + * (non-Javadoc) + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryWorkspaceName() + */ + public String getRepositoryWorkspaceName() { + return repositoryWorkspaceName; + } + + /* + * (non-Javadoc) + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryUser() + */ + public String getRepositoryUser() { + return repositoryUser; + } + + /* + * (non-Javadoc) + * + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryId() + */ + public char[] getRepositoryId() { + return repositoryId; + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NodeConceptModel.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NodeConceptModel.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NodeConceptModel.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,139 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +package org.lamsfoundation.lams.tool.mindmap.util.xmlmodel; + +/** + * XML Model Class for Mindmap Node Concept. Class includes data: + * Node ID, Text, Color, Creator(author of the node), and Edit(permitions to edit). + * + * @author Ruslan Kazakov + */ +public class NodeConceptModel { + private Long id; // Node ID + private String text; // Node Text + private String color; // Node color in Hex Format (i.e. ffffff) + private String creator; // Author of the Node + private int edit; // Permitions to edit node. Can be either 1 (editable) or 0 (not editable) + + /** Default Constructor */ + public NodeConceptModel() { + } + + /** Constructor without edit tag (for single-user mode) */ + public NodeConceptModel(Long id, String text, String color, String creator) { + this.setId(id); + this.setText(text); + this.setColor(color); + this.setCreator(creator); + } + + /** Full Constructor */ + public NodeConceptModel(Long id, String text, String color, String creator, int edit) { + this.setId(id); + this.setText(text); + this.setColor(color); + this.setCreator(creator); + this.setEdit(edit); + } + + /** + * Sets the id of the Node + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * Returns the id of the Node + * @return id + */ + public Long getId() { + return id; + } + + /** + * Sets the text of the Node + * @param text + */ + public void setText(String text) { + this.text = text; + } + + /** + * Returns the text of the Node + * @return text + */ + public String getText() { + return text; + } + + /** + * Sets the color of the Node + * @param color + */ + public void setColor(String color) { + this.color = color; + } + + /** + * Returns the color of the Node + * @return color + */ + public String getColor() { + return color; + } + + /** + * Sets the author of the Node + * @param creator + */ + public void setCreator(String creator) { + this.creator = creator; + } + + /** + * Returns the author of the Node + * @return creator + */ + public String getCreator() { + return creator; + } + + /** + * Sets the state for the Node + * @param edit + */ + public void setEdit(int edit) { + this.edit = edit; + } + + /** + * Returns the state of the Node + * @return edit + */ + public int isEdit() { + return edit; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NodeModel.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NodeModel.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NodeModel.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,77 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: NodeModel.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util.xmlmodel; + +import java.util.ArrayList; +import java.util.List; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; + +/** + * XML Model Class for Mindmap Node + * + * @author Ruslan Kazakov + */ +public class NodeModel { + private NodeConceptModel concept; // Concept data + private List nodes = new ArrayList(); // list of self-linked nodes + + /** Constructor */ + public NodeModel(NodeConceptModel nodeConceptModel) { + this.setConcept(nodeConceptModel); + } + + /** + * Sets Concept for Mindmap Node + * @param concept + */ + public void setConcept(NodeConceptModel concept) { + this.concept = concept; + } + + /** + * Returns Mindmap Concept + * @return concept + */ + public NodeConceptModel getConcept() { + return concept; + } + + /** + * Returns all children of the Node + * @return nodes + */ + public List getBranch() { + return nodes; + } + + /** + * Adds Node as a Child + * @param nodeModel + */ + public void addNode(NodeModel nodeModel) { + nodes.add(nodeModel); + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NotifyRequestModel.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NotifyRequestModel.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NotifyRequestModel.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,151 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: NotifyRequestModel.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util.xmlmodel; + +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; + +/** + * XML Model Class for Notify Request (Actions sent by Flash) in Mindmap. + * + * @author Ruslan Kazakov + */ +public class NotifyRequestModel { + private Long ID; // Request ID + private Long nodeID; // Node ID + private int type; // 0 - delete; 1 - create node; 2 - change color; 3 - change text + private String text; // Text (if type is 3) + private String color; // Color (if type is 2) + private NodeConceptModel concept; // (if type is 1) + + /** Full Constructor */ + public NotifyRequestModel(Long ID, Long nodeID, int type, String text, String color, + NodeConceptModel concept) { + this.setID(ID); + this.setNodeID(nodeID); + this.setType(type); + if (text != null) + this.text = text; + if (color != null) + this.color = color; + this.setConcept(concept); + } + + /** + * Sets the id of the Request + * @param ID + */ + public void setID(Long ID) { + this.ID = ID; + } + + /** + * Returns the if of the Request + * @return the ID + */ + public Long getID() { + return ID; + } + + /** + * Sets the type of Request + * @param type + */ + public void setType(int type) { + this.type = type; + } + + /** + * Returns the type of the Request + * @return type + */ + public int getType() { + return type; + } + + /** + * Sets the id of the Node + * @param nodeID + */ + public void setNodeID(Long nodeID) { + this.nodeID = nodeID; + } + + /** + * Returns the id of the Node + * @return nodeID + */ + public Long getNodeID() { + return nodeID; + } + + /** + * Sets the text of the Node + * @param text the text to set + */ + public void setText(String text) { + this.text = text; + } + + /** + * Returns text of the Node + * @return text + */ + public String getText() { + return text; + } + + /** + * Sets Color of the Node + * @param color + */ + public void setColor(String color) { + this.color = color; + } + + /** + * Returns Color of the Node + * @return color + */ + public String getColor() { + return color; + } + + /** + * Sets Node Concept + * @param concept + */ + public void setConcept(NodeConceptModel concept) { + this.concept = concept; + } + + /** + * Returns the Node Concept + * @return the nodeConceptModel + */ + public NodeConceptModel getConcept() { + return concept; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NotifyResponseModel.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NotifyResponseModel.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/NotifyResponseModel.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,96 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: NotifyResponseModel.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util.xmlmodel; + +/** + * XML Model Class for Notify Response (responses from Server to Flash) in Mindmap + * + * @author Ruslan Kazakov + */ +public class NotifyResponseModel { + private int ok; // 0 - false, 1 - true + private Long id; // Request ID (Action ID) + private Long data; // Node ID + + /** Default Constructor */ + public NotifyResponseModel() { + } + + /** Full Constructor */ + public NotifyResponseModel(int ok, Long id, Long data) { + setOk(ok); + setId(id); + setData(data); + } + + /** + * Sets the status of the Response + * @param ok + */ + public void setOk(int ok) { + this.ok = ok; + } + + /** + * Returns status of the Response + * @return ok + */ + public int getOk() { + return ok; + } + + /** + * Sets the id of the Request + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * Returns the id of the Request + * @return id + */ + public Long getId() { + return id; + } + + /** + * Sets the id of the node + * @param data the data to set + */ + public void setData(Long data) { + this.data = data; + } + + /** + * Returns the id of the Node + * @return data + */ + public Long getData() { + return data; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/PollResponseModel.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/PollResponseModel.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/util/xmlmodel/PollResponseModel.java 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,51 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id: PollResponseModel.java,v 1.1 2009/04/03 00:00:30 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.util.xmlmodel; + +import java.util.ArrayList; + +/** + * XML Model Class for Poll Response in Mindmap. + * Sends to Flash the list of Requests done by other users. + * + * @author Ruslan Kazakov + */ +public class PollResponseModel { + // list of Requests (Actions) + ArrayList actions = new ArrayList(); + + /** Default Constructor */ + public PollResponseModel() { + } + + /** + * Adds NotifyRequest to PollResponse + * @param concept + */ + public void addNotifyRequest(NotifyRequestModel notifyRequestModel) { + actions.add(notifyRequestModel); + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/AuthoringAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/AuthoringAction.java 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,592 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: AuthoringAction.java,v 1.1 2009/04/03 00:00:29 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.web.actions; + +import java.io.IOException; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.authoring.web.AuthoringConstants; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapAttachment; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; +import org.lamsfoundation.lams.tool.mindmap.service.IMindmapService; +import org.lamsfoundation.lams.tool.mindmap.service.MindmapServiceProxy; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapConstants; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeModel; +import org.lamsfoundation.lams.tool.mindmap.web.forms.AuthoringForm; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.FileValidatorUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; + +import com.thoughtworks.xstream.XStream; + +/** + * @author Ruslan Kazakov + * @version 1.0.1 + * + * @struts.action path="/authoring" name="authoringForm" parameter="dispatch" scope="request" validate="false" + * @struts.action-forward name="success" path="tiles:/authoring/main" + * @struts.action-forward name="message_page" path="tiles:/generic/message" + */ +public class AuthoringAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(AuthoringAction.class); + + public IMindmapService mindmapService; + + // Authoring SessionMap key names + private static final String KEY_TOOL_CONTENT_ID = "toolContentID"; + private static final String KEY_CONTENT_FOLDER_ID = "contentFolderID"; + private static final String KEY_MODE = "mode"; + private static final String KEY_ONLINE_FILES = "onlineFiles"; + private static final String KEY_OFFLINE_FILES = "offlineFiles"; + private static final String KEY_UNSAVED_ONLINE_FILES = "unsavedOnlineFiles"; + private static final String KEY_UNSAVED_OFFLINE_FILES = "unsavedOfflineFiles"; + private static final String KEY_DELETED_FILES = "deletedFiles"; + + /** + * Default method when no dispatch parameter is specified. It is expected that the parameter + * toolContentID will be passed in. This will be used to retrieve content for this tool. + */ + @Override + protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // Extract toolContentID from parameters. + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, "mode", true); + + // set up mindmapService + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(this.getServlet().getServletContext()); + } + + // retrieving Mindmap with given toolContentID + Mindmap mindmap = mindmapService.getMindmapByContentId(toolContentID); + if (mindmap == null) { + mindmap = mindmapService.copyDefaultContent(toolContentID); + mindmap.setCreateDate(new Date()); + mindmapService.saveOrUpdateMindmap(mindmap); + // TODO NOTE: this causes DB orphans when LD not saved. + + // creating default nodes for current mindmap + String rootNodeName = mindmapService.getMindmapMessageService().getMessage("node.root.defaultName"); + String childNodeName1 = mindmapService.getMindmapMessageService().getMessage("node.child1.defaultName"); + String childNodeName2 = mindmapService.getMindmapMessageService().getMessage("node.child2.defaultName"); + + MindmapNode rootMindmapNode = mindmapService.saveMindmapNode(null, null, 1l, rootNodeName, "ffffff", null, mindmap); + mindmapService.saveOrUpdateMindmapNode(rootMindmapNode); + mindmapService.saveMindmapNode(null, rootMindmapNode, 2l, childNodeName1, "ffffff", null, mindmap); + mindmapService.saveMindmapNode(null, rootMindmapNode, 3l, childNodeName2, "ffffff", null, mindmap); + } + + if (mode != null && mode.isTeacher()) { + // Set the defineLater flag so that learners cannot use content + // while we + // are editing. This flag is released when updateContent is called. + mindmap.setDefineLater(true); + mindmapService.saveOrUpdateMindmap(mindmap); + } + + /* MINDMAP Code */ + + String mindmapContentPath = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/authoring.do?dispatch=setMindmapContent%26mindmapId=" + mindmap.getUid(); + request.setAttribute("mindmapContentPath", mindmapContentPath); + + String localizationPath = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/authoring.do?dispatch=setLocale"; + request.setAttribute("localizationPath", localizationPath); + + String currentMindmapUser = mindmapService.getMindmapMessageService().getMessage("node.instructor.label"); + request.setAttribute("currentMindmapUser", currentMindmapUser); + + String mindmapType = "images/mindmap_singleuser.swf"; + request.setAttribute("mindmapType", mindmapType); + + /* MINDMAP Code */ + + // Set up the authForm. + AuthoringForm authForm = (AuthoringForm) form; + updateAuthForm(authForm, mindmap); + + // Set up sessionMap + SessionMap map = createSessionMap(mindmap, getAccessMode(request), contentFolderID, + toolContentID); + authForm.setSessionMapID(map.getSessionID()); + + // add the sessionMap to HTTPSession. + request.getSession().setAttribute(map.getSessionID(), map); + request.setAttribute(MindmapConstants.ATTR_SESSION_MAP, map); + + return mapping.findForward("success"); + } + + /** + * Returns the serialized XML of the Mindmap Nodes from Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward setMindmapContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long mindmapId = WebUtil.readLongParam(request, "mindmapId", false); + + List mindmapNodeList = mindmapService.getAuthorRootNodeByMindmapId(mindmapId); + + if (mindmapNodeList != null && mindmapNodeList.size() > 0) { + MindmapNode rootMindmapNode = (MindmapNode) mindmapNodeList.get(0); + + String rootMindmapUser = mindmapService.getMindmapMessageService().getMessage("node.instructor.label"); + + NodeModel rootNodeModel = new NodeModel(new NodeConceptModel(rootMindmapNode.getUniqueId(), rootMindmapNode + .getText(), rootMindmapNode.getColor(), rootMindmapUser, 1)); + NodeModel currentNodeModel = mindmapService.getMindmapXMLFromDatabase(rootMindmapNode.getNodeId(), + mindmapId, rootNodeModel, null); + + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + String mindmapContent = xstream.toXML(currentNodeModel); + + try { + response.setContentType("text/xml"); + //response.setCharacterEncoding("utf-8"); + response.getWriter().write(mindmapContent); + } catch (IOException e) { + e.printStackTrace(); + } + } + + return null; + } + + /** + * Returns the serialized XML of the Mindmap Nodes from Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward setLocale(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + try { + response.setContentType("text/xml"); + //response.setCharacterEncoding("utf-8"); + response.getWriter().write(mindmapService.getLanguageXML()); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + + /** + * Saves Mindmap Nodes to Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + // TODO need error checking. + + // get authForm and session map. + AuthoringForm authForm = (AuthoringForm) form; + SessionMap map = getSessionMap(request, authForm); + + // get mindmap content. + Mindmap mindmap = mindmapService.getMindmapByContentId((Long) map.get(AuthoringAction.KEY_TOOL_CONTENT_ID)); + + // update mindmap content using form inputs. + ToolAccessMode mode = (ToolAccessMode) map.get(AuthoringAction.KEY_MODE); + updateMindmap(mindmap, authForm, mode); + + // remove attachments marked for deletion. + Set attachments = mindmap.getMindmapAttachments(); + if (attachments == null) { + attachments = new HashSet(); + } + + for (MindmapAttachment att : getAttList(AuthoringAction.KEY_DELETED_FILES, map)) { + // remove from db, leave in repository + attachments.remove(att); + } + + // add unsaved attachments + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map)); + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map)); + + // set attachments in case it didn't exist + mindmap.setMindmapAttachments(attachments); + + // set the update date + mindmap.setUpdateDate(new Date()); + + // releasing defineLater flag so that learner can start using the tool. + mindmap.setDefineLater(false); + + mindmapService.saveOrUpdateMindmap(mindmap); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); + + // add the sessionMapID to form + authForm.setSessionMapID(map.getSessionID()); + + request.setAttribute(MindmapConstants.ATTR_SESSION_MAP, map); + + /* MINDMAP Code */ + + // getting xml data from SWF + String mindmapContent = authForm.getMindmapContent(); + MindmapUser mindmapUser = mindmapService.getUserByUID(mindmap.getCreateBy()); + + // Saving Mindmap data to XML + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + NodeModel rootNodeModel = (NodeModel) xstream.fromXML(mindmapContent); + NodeConceptModel nodeConceptModel = rootNodeModel.getConcept(); + List branches = rootNodeModel.getBranch(); + + // saving root Node into database + MindmapNode rootMindmapNode = (MindmapNode) mindmapService.getAuthorRootNodeByMindmapId(mindmap.getUid()) + .get(0); + rootMindmapNode = mindmapService.saveMindmapNode(rootMindmapNode, null, nodeConceptModel.getId(), + nodeConceptModel.getText(), nodeConceptModel.getColor(), mindmapUser, mindmap); + + // string to accumulate deleted nodes for query + String nodesToDeleteCondition = " where uniqueId <> " + rootMindmapNode.getUniqueId(); + + // saving child Nodes into database + if (branches != null) { + mindmapService.setNodesToDeleteCondition(""); + mindmapService.getChildMindmapNodes(branches, rootMindmapNode, mindmapUser, mindmap); + } + + nodesToDeleteCondition += mindmapService.getNodesToDeleteCondition() + " and mindmap_id = " + mindmap.getUid(); + mindmapService.deleteNodes(nodesToDeleteCondition); + + /* MINDMAP Code */ + + return mapping.findForward("success"); + } + + public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward deleteOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward deleteOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward removeUnsavedOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward removeUnsavedOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + /** Private Methods */ + + private ActionForward uploadFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + FormFile file; + List unsavedFiles; + List savedFiles; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + file = authForm.getOfflineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + file = authForm.getOnlineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + // validate file max size + ActionMessages errors = new ActionMessages(); + FileValidatorUtil.validateFileSize(file, true, errors); + if (!errors.isEmpty()) { + request.setAttribute(MindmapConstants.ATTR_SESSION_MAP, map); + this.saveErrors(request, errors); + return mapping.findForward("success"); + } + + if (file.getFileName().length() != 0) { + + // upload file to repository + MindmapAttachment newAtt = mindmapService.uploadFileToContent((Long) map + .get(AuthoringAction.KEY_TOOL_CONTENT_ID), file, type); + + // Add attachment to unsavedFiles + // check to see if file with same name exists + MindmapAttachment currAtt; + Iterator iter = savedFiles.iterator(); + while (iter.hasNext()) { + currAtt = (MindmapAttachment) iter.next(); + if (StringUtils.equals(currAtt.getFileName(), newAtt.getFileName()) + && StringUtils.equals(currAtt.getFileType(), newAtt.getFileType())) { + // move from this this list to deleted list. + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(currAtt); + iter.remove(); + break; + } + } + unsavedFiles.add(newAtt); + + request.setAttribute(MindmapConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + } + return mapping.findForward("success"); + } + + private ActionForward deleteFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List fileList; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + fileList = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + fileList = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + Iterator iter = fileList.iterator(); + + while (iter.hasNext()) { + MindmapAttachment att = (MindmapAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // move to delete file list, deleted at next updateContent + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(att); + + // remove from this list + iter.remove(); + break; + } + } + + request.setAttribute(MindmapConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + private ActionForward removeUnsaved(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List unsavedFiles; + + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + } else { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + } + + Iterator iter = unsavedFiles.iterator(); + while (iter.hasNext()) { + MindmapAttachment att = (MindmapAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // delete from repository and list + mindmapService.deleteFromRepository(att.getFileUuid(), att.getFileVersionId()); + iter.remove(); + break; + } + } + + request.setAttribute(MindmapConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + /** + * Updates Mindmap content using AuthoringForm inputs. + * + * @param mindmap + * @param authForm + * @param mode + */ + private void updateMindmap(Mindmap mindmap, AuthoringForm authForm, ToolAccessMode mode) { + mindmap.setTitle(authForm.getTitle()); + mindmap.setInstructions(authForm.getInstructions()); + if (mode.isAuthor()) { // Teacher cannot modify following + mindmap.setOfflineInstructions(authForm.getOfflineInstruction()); + mindmap.setOnlineInstructions(authForm.getOnlineInstruction()); + mindmap.setLockOnFinished(authForm.isLockOnFinished()); + mindmap.setMultiUserMode(authForm.isMultiUserMode()); + // reflection + mindmap.setReflectOnActivity(authForm.isReflectOnActivity()); + mindmap.setReflectInstructions(authForm.getReflectInstructions()); + } + } + + /** + * Updates AuthoringForm using Mindmap content. + * + * @param authForm + * @param mindmap + */ + private void updateAuthForm(AuthoringForm authForm, Mindmap mindmap) { + authForm.setTitle(mindmap.getTitle()); + authForm.setInstructions(mindmap.getInstructions()); + authForm.setOnlineInstruction(mindmap.getOnlineInstructions()); + authForm.setOfflineInstruction(mindmap.getOfflineInstructions()); + authForm.setLockOnFinished(mindmap.isLockOnFinished()); + authForm.setMultiUserMode(mindmap.isMultiUserMode()); + // reflection + authForm.setReflectOnActivity(mindmap.isReflectOnActivity()); + authForm.setReflectInstructions(mindmap.getReflectInstructions()); + } + + /** + * Updates SessionMap using Mindmap content. + * + * @param mindmap + * @param mode + * @return map + */ + private SessionMap createSessionMap(Mindmap mindmap, ToolAccessMode mode, String contentFolderID, + Long toolContentID) { + + SessionMap map = new SessionMap(); + + map.put(AuthoringAction.KEY_MODE, mode); + map.put(AuthoringAction.KEY_CONTENT_FOLDER_ID, contentFolderID); + map.put(AuthoringAction.KEY_TOOL_CONTENT_ID, toolContentID); + map.put(AuthoringAction.KEY_ONLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_OFFLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_DELETED_FILES, new LinkedList()); + + Iterator iter = mindmap.getMindmapAttachments().iterator(); + while (iter.hasNext()) { + MindmapAttachment attachment = (MindmapAttachment) iter.next(); + String type = attachment.getFileType(); + if (type.equals(IToolContentHandler.TYPE_OFFLINE)) { + getAttList(AuthoringAction.KEY_OFFLINE_FILES, map).add(attachment); + } + if (type.equals(IToolContentHandler.TYPE_ONLINE)) { + getAttList(AuthoringAction.KEY_ONLINE_FILES, map).add(attachment); + } + } + + return map; + } + + /** + * Gets ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode. + * + * @param request + */ + private ToolAccessMode getAccessMode(HttpServletRequest request) { + ToolAccessMode mode; + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if (StringUtils.equalsIgnoreCase(modeStr, ToolAccessMode.TEACHER.toString())) { + mode = ToolAccessMode.TEACHER; + } else { + mode = ToolAccessMode.AUTHOR; + } + return mode; + } + + /** + * Retrieves a List of attachments from the map using the key. + * + * @param key + * @param map + */ + private List getAttList(String key, SessionMap map) { + List list = (List) map.get(key); + return list; + } + + /** + * Retrieve the SessionMap from the HttpSession. + * + * @param request + * @param authForm + */ + private SessionMap getSessionMap(HttpServletRequest request, AuthoringForm authForm) { + return (SessionMap) request.getSession().getAttribute(authForm.getSessionMapID()); + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/ClearSessionAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/ClearSessionAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/ClearSessionAction.java 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,51 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: ClearSessionAction.java,v 1.1 2009/04/03 00:00:29 ruslan Exp $ */ +package org.lamsfoundation.lams.tool.mindmap.web.actions; + +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction; +import org.lamsfoundation.lams.tool.ToolAccessMode; + +/** + * This class give a chance to clear HttpSession when user save/close authoring page. + * @author Steve.Ni + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/clearsession" validate="false" + * + * @version $Revision: 1.1 $ + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(String customiseSessionID,HttpSession session, ToolAccessMode mode) { + if(mode.isAuthor()){ + session.removeAttribute(customiseSessionID); + } + } + + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/LearningAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/LearningAction.java 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,762 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +package org.lamsfoundation.lams.tool.mindmap.web.actions; + +import java.io.IOException; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.mindmap.dto.MindmapDTO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapRequest; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; +import org.lamsfoundation.lams.tool.mindmap.service.IMindmapService; +import org.lamsfoundation.lams.tool.mindmap.service.MindmapServiceProxy; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapConstants; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapException; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NotifyRequestModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NotifyResponseModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.PollResponseModel; +import org.lamsfoundation.lams.tool.mindmap.web.forms.LearningForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + +import com.thoughtworks.xstream.XStream; + +/** + * @author Ruslan Kazakov + * @version 1.0.1 + * + * @struts.action path="/learning" parameter="dispatch" scope="request" name="learningForm" + * @struts.action-forward name="mindmap" path="tiles:/learning/main" + * @struts.action-forward name="runOffline" path="tiles:/learning/runOffline" + * @struts.action-forward name="defineLater" path="tiles:/learning/defineLater" + * @struts.action-forward name="reflect" path="tiles:/learning/reflect" + */ +public class LearningAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(LearningAction.class); + private static final boolean MODE_OPTIONAL = false; + private IMindmapService mindmapService; + + /** + * Default action on page load. Clones Mindmap Nodes for each Learner in single-user mode. Uses shared (runtime + * created in CopyToolContent method) Mindmap Nodes in multi-user mode. + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + LearningForm learningForm = (LearningForm) form; + + // 'toolSessionID' and 'mode' parameters are expected to be present. + // TODO need to catch exceptions and handle errors. + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, MODE_OPTIONAL); + + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + + // set up mindmapService + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(this.getServlet().getServletContext()); + } + + // Retrieve the session and content. + MindmapSession mindmapSession = mindmapService.getSessionBySessionId(toolSessionID); + if (mindmapSession == null) { + throw new MindmapException("Cannot retreive session with toolSessionID" + toolSessionID); + } + + Mindmap mindmap = mindmapSession.getMindmap(); + + // check defineLater + if (mindmap.isDefineLater()) { + return mapping.findForward("defineLater"); + } + + // set mode, toolSessionID and MindmapDTO + request.setAttribute("mode", mode.toString()); + learningForm.setToolSessionID(toolSessionID); + + MindmapDTO mindmapDTO = new MindmapDTO(); + mindmapDTO.title = mindmap.getTitle(); + mindmapDTO.instructions = mindmap.getInstructions(); + mindmapDTO.lockOnFinish = mindmap.isLockOnFinished(); + mindmapDTO.multiUserMode = mindmap.isMultiUserMode(); + mindmapDTO.reflectInstructions = mindmap.getReflectInstructions(); + + request.setAttribute("mindmapDTO", mindmapDTO); + + // Set the content in use flag. + if (!mindmap.isContentInUse()) { + mindmap.setContentInUse(new Boolean(true)); + mindmapService.saveOrUpdateMindmap(mindmap); + } + + // check runOffline + if (mindmap.isRunOffline()) { + return mapping.findForward("runOffline"); + } + + MindmapUser mindmapUser; + if (mode.equals(ToolAccessMode.TEACHER)) { + Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + mindmapUser = mindmapService.getUserByUserIdAndSessionId(userID, toolSessionID); + } else { + mindmapUser = getCurrentUser(toolSessionID); + } + + // set readOnly flag. + if (mode.equals(ToolAccessMode.TEACHER) || (mindmap.isLockOnFinished() && mindmapUser.isFinishedActivity())) { + request.setAttribute("contentEditable", false); + } else { + request.setAttribute("contentEditable", true); + } + request.setAttribute("finishedActivity", mindmapUser.isFinishedActivity()); + + /* MINDMAP Code */ + + // mindmapContentPath Parameter + String mindmapContentPath = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/learning.do?dispatch=setMindmapContent%26mindmapId=" + mindmap.getUid() + "%26userId=" + + mindmapUser.getUid(); + request.setAttribute("mindmapContentPath", mindmapContentPath); + + // currentMindmapUser Parameter + String currentMindmapUser = mindmapUser.getFirstName() + " " + mindmapUser.getLastName(); + request.setAttribute("currentMindmapUser", currentMindmapUser); + + // mindmapType Parameter + String mindmapType = null; + if (mindmap.isLockOnFinished() && mindmapUser.isFinishedActivity()) + mindmapType = "images/mindmap_locked.swf"; + else { + if (mindmap.isMultiUserMode() == true) + mindmapType = "images/mindmap_multiuser.swf"; + else + mindmapType = "images/mindmap_singleuser.swf"; + } + request.setAttribute("mindmapType", mindmapType); + + // Saving lastActionID + Long lastActionId = mindmapService.getLastGlobalIdByMindmapId(mindmap.getUid()); + mindmap.setLastActionId(lastActionId); + + // pollServer Parameter + String pollServerParam = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/learning.do?dispatch=pollServerAction%26mindmapId=" + mindmap.getUid() + "%26userId=" + + mindmapUser.getUid(); + request.setAttribute("pollServerParam", pollServerParam); + + // notifyServer Parameter + String notifyServerParam = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/learning.do?dispatch=notifyServerAction%26mindmapId=" + mindmap.getUid() + + "%26userId=" + mindmapUser.getUid(); + request.setAttribute("notifyServerParam", notifyServerParam); + + String localizationPath = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/learning.do?dispatch=setLocale"; + request.setAttribute("localizationPath", localizationPath); + + // setting userId for reflection + request.setAttribute("userIdParam", mindmapUser.getUid()); + request.setAttribute("toolContentIdParam", mindmap.getUid()); + request.setAttribute("reflectOnActivity", mindmap.isReflectOnActivity()); + + // in multi-user mode + if (!mindmap.isMultiUserMode()) { + // clonning Mindmap Nodes for current user + List rootNodeList = mindmapService.getRootNodeByMindmapIdAndUserId(mindmap.getUid(), mindmapUser.getUid()); + + if (rootNodeList == null || rootNodeList.size() == 0) { + MindmapNode fromMindmapNode = (MindmapNode) mindmapService.getAuthorRootNodeByMindmapId( + mindmap.getUid()).get(0); + cloneMindmapNodesForRuntime(fromMindmapNode, null, mindmap, mindmap, mindmapUser); + } + } + + /* MINDMAP Code */ + + return mapping.findForward("mindmap"); + } + + /** + * Clones Mindmap Nodes for each Learner (used in single-user mode only). + * + * @param fromMindmapNode + * @param toMindmapNode + * @param fromContent + * @param toContent + * @param user + */ + public void cloneMindmapNodesForRuntime(MindmapNode fromMindmapNode, MindmapNode toMindmapNode, + Mindmap fromContent, Mindmap toContent, MindmapUser user) { + toMindmapNode = mindmapService.saveMindmapNode(null, toMindmapNode, fromMindmapNode.getUniqueId(), + fromMindmapNode.getText(), fromMindmapNode.getColor(), user, toContent); + + List childMindmapNodes = mindmapService.getMindmapNodeByParentId(fromMindmapNode.getNodeId(), fromContent + .getUid()); + + if (childMindmapNodes != null && childMindmapNodes.size() > 0) { + for (Iterator iterator = childMindmapNodes.iterator(); iterator.hasNext();) { + MindmapNode childMindmapNode = (MindmapNode) iterator.next(); + cloneMindmapNodesForRuntime(childMindmapNode, toMindmapNode, fromContent, toContent, user); + } + } + } + + /** + * Gets the Notify Requests (Actions) from Flash and returns proper Notify Responses + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward notifyServerAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long userId = WebUtil.readLongParam(request, "userId", false); + Long mindmapId = WebUtil.readLongParam(request, "mindmapId", false); + String requestAction = WebUtil.readStrParam(request, "actionXML", false); + + XStream xstream = new XStream(); + xstream.alias("action", NotifyRequestModel.class); + NotifyRequestModel notifyRequestModel = (NotifyRequestModel) xstream.fromXML(requestAction); + int requestType = notifyRequestModel.getType(); + + // TODO: if request was previously created + Long lastActionId = mindmapService.getMindmapByUid(mindmapId).getLastActionId(); + MindmapRequest mindmapRequest = mindmapService.getRequestByUniqueId(notifyRequestModel.getID(), userId, + mindmapId, lastActionId); + + String notifyResponse = null; + + // if request wasn't created before, create it + if (mindmapRequest == null) { + // getting node to which changes will be applied + MindmapNode mindmapNode = null; + List mindmapNodeList = mindmapService.getMindmapNodeByUniqueId(notifyRequestModel.getNodeID(), mindmapId); + if (mindmapNodeList != null && mindmapNodeList.size() > 0) { + mindmapNode = (MindmapNode) mindmapNodeList.get(0); + } else { + log.error("notifyServerAction(): Error finding node!"); + return null; + } + + // delete node + if (requestType == 0) { + // if node is created not by author or by other user... cannot delete + if (mindmapNode.getUser() == mindmapService.getUserByUID(userId)) { + List childNodes = mindmapService + .getMindmapNodeByParentId(notifyRequestModel.getNodeID(), mindmapId); + if (childNodes == null || childNodes.size() == 0) // check for Father + { + mindmapService.deleteNodeByUniqueMindmapUser(notifyRequestModel.getNodeID(), mindmapId, userId); + mindmapRequest = saveMindmapRequest(mindmapRequest, requestType, notifyRequestModel, userId, + mindmapId, null); + notifyResponse = generateNotifyResponse(1, mindmapRequest.getUniqueId(), null); + } else + notifyResponse = generateNotifyResponse(0, null, null); + } else { + notifyResponse = generateNotifyResponse(0, null, null); + } + } + // create node + else if (requestType == 1) { + // no checking... users can create nodes everywhere + NodeConceptModel nodeConceptModel = notifyRequestModel.getConcept(); + + Long uniqueId = mindmapService.getLastUniqueIdByMindmapId(mindmapId) + 1; // node unique ID + + mindmapService.saveMindmapNode(null, mindmapNode, uniqueId, nodeConceptModel.getText(), + nodeConceptModel.getColor(), mindmapService.getUserByUID(userId), mindmapService + .getMindmapByUid(mindmapId)); + mindmapRequest = saveMindmapRequest(mindmapRequest, requestType, notifyRequestModel, userId, mindmapId, + uniqueId); + notifyResponse = generateNotifyResponse(1, mindmapRequest.getUniqueId(), uniqueId); + } + // change color + else if (requestType == 2) { + if (mindmapNode.getUser() == mindmapService.getUserByUID(userId)) { + mindmapNode.setColor(notifyRequestModel.getColor()); + mindmapNode.setUser(mindmapService.getUserByUID(userId)); + mindmapService.saveOrUpdateMindmapNode(mindmapNode); + mindmapRequest = saveMindmapRequest(mindmapRequest, requestType, notifyRequestModel, userId, + mindmapId, null); + notifyResponse = generateNotifyResponse(1, mindmapRequest.getUniqueId(), null); + } else { + notifyResponse = generateNotifyResponse(0, null, null); + } + } + // change text + else if (requestType == 3) { + if (mindmapNode.getUser() == mindmapService.getUserByUID(userId)) { + mindmapNode.setText(notifyRequestModel.getText()); + mindmapNode.setUser(mindmapService.getUserByUID(userId)); + mindmapService.saveOrUpdateMindmapNode(mindmapNode); + mindmapRequest = saveMindmapRequest(mindmapRequest, requestType, notifyRequestModel, userId, + mindmapId, null); + notifyResponse = generateNotifyResponse(1, mindmapRequest.getUniqueId(), null); + } else { + notifyResponse = generateNotifyResponse(0, null, null); + } + } + } else { + notifyResponse = generateNotifyResponse(0, null, null); + } + + try { + response.setContentType("text/xml"); + response.setCharacterEncoding("utf-8"); + response.getWriter().write(notifyResponse); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + + /** + * Saves Notify Requests to database + * + * @param mindmapRequest + * @param requestType + * @param notifyRequestModel + * @param userId + * @param mindmapId + * @param nodeChildId + */ + private MindmapRequest saveMindmapRequest(MindmapRequest mindmapRequest, int requestType, + NotifyRequestModel notifyRequestModel, Long userId, Long mindmapId, Long nodeChildId) { + mindmapRequest = new MindmapRequest(); + mindmapRequest.setType(requestType); + mindmapRequest.setUniqueId(notifyRequestModel.getID()); + // incrementing lastRequestId + mindmapRequest.setGlobalId(mindmapService.getLastGlobalIdByMindmapId(mindmapId) + 1); + mindmapRequest.setUser(mindmapService.getUserByUID(userId)); + mindmapRequest.setMindmap(mindmapService.getMindmapByUid(mindmapId)); + mindmapRequest.setNodeId(notifyRequestModel.getNodeID()); + mindmapRequest.setNodeChildId(nodeChildId); // nodeChildId + mindmapService.saveOrUpdateMindmapRequest(mindmapRequest); + return mindmapRequest; + } + + /** + * Generated Notify Responses + * + * @param ok + * @param id + * @param data + */ + private String generateNotifyResponse(int ok, Long id, Long data) { + NotifyResponseModel nodeResponseModel = new NotifyResponseModel(); + nodeResponseModel.setOk(ok); + nodeResponseModel.setId(id); + if (data != null) + nodeResponseModel.setData(data); + + XStream xstream = new XStream(); + xstream.alias("response", NotifyResponseModel.class); + + return xstream.toXML(nodeResponseModel); + } + + /** + * Returns lists of Poll Requests (Actions) on Mindmap Nodes made by other learners + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward pollServerAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long mindmapId = WebUtil.readLongParam(request, "mindmapId", false); + Long userId = WebUtil.readLongParam(request, "userId", false); + Long lastActionId = WebUtil.readLongParam(request, "lastActionID", false); + + PollResponseModel pollResponseModel = new PollResponseModel(); + + List requestsList = mindmapService.getLastRequestsAfterGlobalId(lastActionId, mindmapId, userId); + for (Iterator iterator = requestsList.iterator(); iterator.hasNext();) { + MindmapRequest mindmapRequest = (MindmapRequest) iterator.next(); + int requestType = mindmapRequest.getType(); + + NotifyRequestModel notifyRequestModel = null; + NodeConceptModel nodeConceptModel = null; + + MindmapNode rootMindmapNode = null; + if (requestType != 0 && requestType != 1) { + List nodesList = mindmapService.getMindmapNodeByUniqueId(mindmapRequest.getNodeId(), mindmapId); + if (nodesList != null && nodesList.size() > 0) + rootMindmapNode = (MindmapNode) nodesList.get(0); + else + log.error("notifyServerAction(): Error finding node while changing text or color!"); + } + + MindmapNode mindmapNode = null; + if (requestType == 1) { + List nodesList = mindmapService.getMindmapNodeByUniqueId(mindmapRequest.getNodeChildId(), mindmapId); + if (nodesList != null && nodesList.size() > 0) + mindmapNode = (MindmapNode) nodesList.get(0); + else + log.error("notifyServerAction(): Error finding node while creating a node!"); + } + // delete node + if (requestType == 0) { + notifyRequestModel = new NotifyRequestModel(mindmapRequest.getGlobalId(), mindmapRequest.getNodeId(), + mindmapRequest.getType(), null, null, null); + } + // create node + else if (requestType == 1) { + nodeConceptModel = new NodeConceptModel(); + nodeConceptModel.setId(mindmapNode.getUniqueId()); + nodeConceptModel.setText(mindmapNode.getText()); + nodeConceptModel.setColor(mindmapNode.getColor()); + + MindmapUser mindmapUser = mindmapNode.getUser(); + if (mindmapUser != null) + nodeConceptModel.setCreator(mindmapUser.getFirstName() + " " + mindmapUser.getLastName()); + else + nodeConceptModel.setCreator("Student"); + + notifyRequestModel = new NotifyRequestModel(mindmapRequest.getGlobalId(), mindmapRequest.getNodeId(), + mindmapRequest.getType(), null, null, nodeConceptModel); + } + // change color + else if (requestType == 2) { + notifyRequestModel = new NotifyRequestModel(mindmapRequest.getGlobalId(), mindmapRequest.getNodeId(), + mindmapRequest.getType(), null, rootMindmapNode.getColor(), null); + } + // change text + else if (requestType == 3) { + notifyRequestModel = new NotifyRequestModel(mindmapRequest.getGlobalId(), mindmapRequest.getNodeId(), + mindmapRequest.getType(), rootMindmapNode.getText(), null, null); + } + + pollResponseModel.addNotifyRequest(notifyRequestModel); + } + + XStream xstream = new XStream(); + xstream.alias("action", NotifyRequestModel.class); + xstream.alias("pollResponse", PollResponseModel.class); + String pollResponse = xstream.toXML(pollResponseModel); + + try { + response.setContentType("text/xml"); + response.setCharacterEncoding("utf-8"); + response.getWriter().write(pollResponse); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + + /** + * Returns the serialized XML of the Mindmap Nodes from Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward setMindmapContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long mindmapId = WebUtil.readLongParam(request, "mindmapId", false); + Long userId = WebUtil.readLongParam(request, "userId", false); + Mindmap mindmap = mindmapService.getMindmapByUid(mindmapId); + MindmapUser mindmapUser = mindmapService.getUserByUID(userId); + + List mindmapNodeList = null; + if (mindmap.isMultiUserMode()) // is multi-user + mindmapNodeList = mindmapService.getAuthorRootNodeByMindmapIdMulti(mindmapId); + else + mindmapNodeList = mindmapService.getRootNodeByMindmapIdAndUserId(mindmapId, userId); + + if (mindmapNodeList != null && mindmapNodeList.size() > 0) { + MindmapNode rootMindmapNode = (MindmapNode) mindmapNodeList.get(0); + + String mindmapUserName = null; + if (rootMindmapNode.getUser() == null) + mindmapUserName = mindmapService.getMindmapMessageService().getMessage("node.instructor.label"); + else + mindmapUserName = rootMindmapNode.getUser().getFirstName() + " " + + rootMindmapNode.getUser().getLastName(); + + int edit = 1; + if (rootMindmapNode.getUser() == mindmapUser) + edit = 1; + else + edit = 0; + + NodeModel rootNodeModel = new NodeModel(new NodeConceptModel(rootMindmapNode.getUniqueId(), rootMindmapNode + .getText(), rootMindmapNode.getColor(), mindmapUserName, edit)); + + NodeModel currentNodeModel = mindmapService.getMindmapXMLFromDatabase(rootMindmapNode.getNodeId(), + mindmapId, rootNodeModel, mindmapUser); + + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + String mindmapContent = xstream.toXML(currentNodeModel); + + // adding lastActionId + if (mindmap.isMultiUserMode()) + if (mindmap.isLockOnFinished() && !mindmapUser.isFinishedActivity()) + mindmapContent = "\n" + mindmapContent + "\n" + mindmap.getLastActionId() + + "\n"; + else if (!mindmap.isLockOnFinished()) + mindmapContent = "\n" + mindmapContent + "\n" + mindmap.getLastActionId() + + "\n"; + + try { + response.setContentType("text/xml"); + response.setCharacterEncoding("utf-8"); + response.getWriter().write(mindmapContent); + } catch (IOException e) { + e.printStackTrace(); + } + + } + return null; + } + + /** + * Returns the serialized XML of the Mindmap Nodes from Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward setLocale(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + try { + response.setContentType("text/xml"); + // response.setCharacterEncoding("utf-8"); + response.getWriter().write(mindmapService.getLanguageXML()); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + + /** + * Returns current learner + * + * @param toolSessionId + * @return mindmapUser + */ + private MindmapUser getCurrentUser(Long toolSessionId) { + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + // attempt to retrieve user using userId and toolSessionId + MindmapUser mindmapUser = mindmapService.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), + toolSessionId); + + if (mindmapUser == null) { + MindmapSession mindmapSession = mindmapService.getSessionBySessionId(toolSessionId); + mindmapUser = mindmapService.createMindmapUser(user, mindmapSession); + } + + return mindmapUser; + } + + /** + * Indicates that the user has finished viewing the noticeboard, and will + * be passed onto the Notebook reflection screen. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward reflect(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long userId = WebUtil.readLongParam(request, "userId", false); + Long toolContentId = WebUtil.readLongParam(request, "toolContentId", false); + MindmapUser mindmapUser = mindmapService.getUserByUID(userId); + + //LearningForm learningForm = (LearningForm) form; + //Long toolSessionID = learningForm.getToolSessionID(); + //Mindmap mindmap = mindmapService.getMindmapByContentId(toolSessionID); + Mindmap mindmap = mindmapService.getMindmapByUid(toolContentId); + + request.setAttribute("reflectTitle", mindmap.getTitle()); + request.setAttribute("reflectInstructions", mindmap.getReflectInstructions()); + + if (mindmap.isLockOnFinished() && mindmapUser.isFinishedActivity()) { + request.setAttribute("contentEditable", false); + } else { + request.setAttribute("contentEditable", true); + } + + NotebookEntry entry = mindmapService.getEntry(mindmapUser.getEntryUID()); + + if (entry != null) { + request.setAttribute("reflectEntry", entry.getEntry()); + } + + return mapping.findForward("reflect"); + } + + /** + * Saves Mindmap Nodes to Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward finishActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long toolSessionID = WebUtil.readLongParam(request, "toolSessionID"); + MindmapUser mindmapUser = getCurrentUser(toolSessionID); + + if (mindmapUser != null) { + LearningForm learningForm = (LearningForm) form; + + mindmapUser.setFinishedActivity(true); + mindmapService.saveOrUpdateMindmapUser(mindmapUser); + + // Retrieve the session and content + MindmapSession mindmapSession = mindmapService.getSessionBySessionId(toolSessionID); + if (mindmapSession == null) + throw new MindmapException("Cannot retreive session with toolSessionID" + toolSessionID); + + Mindmap mindmap = mindmapSession.getMindmap(); + + if (!mindmap.isMultiUserMode()) { + // getting xml data from SWF + String mindmapContent = learningForm.getMindmapContent(); + + // Saving Mindmap data to XML + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + NodeModel rootNodeModel = (NodeModel) xstream.fromXML(mindmapContent); + NodeConceptModel nodeConceptModel = rootNodeModel.getConcept(); + List branches = rootNodeModel.getBranch(); + + // saving root Node into database + MindmapNode rootMindmapNode = (MindmapNode) mindmapService.getRootNodeByMindmapIdAndUserId( + mindmap.getUid(), mindmapUser.getUid()).get(0); + rootMindmapNode = mindmapService.saveMindmapNode(rootMindmapNode, null, nodeConceptModel.getId(), + nodeConceptModel.getText(), nodeConceptModel.getColor(), mindmapUser, mindmap); + + // string to accumulate deleted nodes for query + String nodesToDeleteCondition = " where uniqueId <> " + rootMindmapNode.getUniqueId(); + + // saving child Nodes into database + if (branches != null) { + mindmapService.setNodesToDeleteCondition(""); + mindmapService.getChildMindmapNodes(branches, rootMindmapNode, mindmapUser, mindmap); + } + + nodesToDeleteCondition += mindmapService.getNodesToDeleteCondition() + " and mindmap_id = " + + mindmap.getUid() + " and user_id = " + mindmapUser.getUid(); + mindmapService.deleteNodes(nodesToDeleteCondition); + } + + // save the reflection entry and call the notebook. + if (mindmap.isReflectOnActivity()) { + // check for existing notebook entry + NotebookEntry entry = mindmapService.getEntry(mindmapUser.getEntryUID()); + if (entry == null) { + // create new entry + Long entryUID = mindmapService.createNotebookEntry(toolSessionID, + CoreNotebookConstants.NOTEBOOK_TOOL, MindmapConstants.TOOL_SIGNATURE, + mindmapUser.getUserId().intValue(), learningForm.getEntryText()); + mindmapUser.setEntryUID(entryUID); + mindmapService.saveOrUpdateMindmapUser(mindmapUser); + } else { + // update existing entry + entry.setEntry(learningForm.getEntryText()); + entry.setLastModified(new Date()); + mindmapService.updateEntry(entry); + } + } + + } else { + log.error("finishActivity(): couldn't find MindmapUser is null " + " and toolSessionID: " + toolSessionID); + } + + ToolSessionManager sessionMgrService = MindmapServiceProxy.getMindmapSessionManager(getServlet().getServletContext()); + + String nextActivityUrl; + try { + nextActivityUrl = sessionMgrService.leaveToolSession(toolSessionID, mindmapUser.getUserId()); + response.sendRedirect(nextActivityUrl); + } catch (DataMissingException e) { + throw new MindmapException(e); + } catch (ToolException e) { + throw new MindmapException(e); + } catch (IOException e) { + throw new MindmapException(e); + } + + return null; + // TODO: need to return proper page. + // return finishActivity(mapping, form, request, response); + } + +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/MonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/MonitoringAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/MonitoringAction.java 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,282 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: MonitoringAction.java,v 1.1 2009/04/03 00:00:29 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.web.actions; + +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.tool.mindmap.dto.MindmapDTO; +import org.lamsfoundation.lams.tool.mindmap.dto.MindmapUserDTO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; +import org.lamsfoundation.lams.tool.mindmap.service.IMindmapService; +import org.lamsfoundation.lams.tool.mindmap.service.MindmapServiceProxy; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeModel; +import org.lamsfoundation.lams.tool.mindmap.web.forms.MonitoringForm; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.AttributeNames; +import com.thoughtworks.xstream.XStream; + +/** + * @author Ruslan Kazakov + * @version 1.0.1 + * + * @struts.action path="/monitoring" parameter="dispatch" scope="request" name="monitoringForm" validate="false" + * @struts.action-forward name="success" path="tiles:/monitoring/main" + * @struts.action-forward name="mindmap_display" path="tiles:/monitoring/mindmap_display" + */ +public class MonitoringAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(MonitoringAction.class); + public IMindmapService mindmapService; + + /** + * Default action on page load + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + Mindmap mindmap = mindmapService.getMindmapByContentId(toolContentID); + + if (mindmap == null) { + // TODO: error page. + } + + boolean isGroupedActivity = mindmapService.isGroupedActivity(toolContentID); + + MindmapDTO mindmapDT0 = new MindmapDTO(mindmap); + + Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true); + mindmapDT0.setCurrentTab(currentTab); + + request.setAttribute("mindmapDTO", mindmapDT0); + request.setAttribute("contentFolderID", contentFolderID); + request.setAttribute("isGroupedActivity", isGroupedActivity); + + return mapping.findForward("success"); + } + + /** + * Returns the serialized XML of the Mindmap Nodes from Database + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward setMindmapContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long mindmapId = WebUtil.readLongParam(request, "mindmapId", false); + Long userId = WebUtil.readLongParam(request, "userId", false); + Mindmap mindmap = mindmapService.getMindmapByUid(mindmapId); + + List mindmapNodeList = null; + if (mindmap.isMultiUserMode()) // is multi-user + mindmapNodeList = mindmapService.getAuthorRootNodeByMindmapIdMulti(mindmapId); + else + mindmapNodeList = mindmapService.getRootNodeByMindmapIdAndUserId(mindmapId, userId); + + if (mindmapNodeList != null && mindmapNodeList.size() > 0) { + MindmapNode rootMindmapNode = (MindmapNode) mindmapNodeList.get(0); + + String mindmapUserName = null; + if (rootMindmapNode.getUser() == null) + mindmapUserName = mindmapService.getMindmapMessageService().getMessage("node.learner.label"); + else + mindmapUserName = rootMindmapNode.getUser().getFirstName() + " " + + rootMindmapNode.getUser().getLastName(); + + NodeModel rootNodeModel = new NodeModel(new NodeConceptModel(rootMindmapNode.getUniqueId(), + rootMindmapNode.getText(), rootMindmapNode.getColor(), mindmapUserName)); + NodeModel currentNodeModel = mindmapService.getMindmapXMLFromDatabase(rootMindmapNode.getNodeId(), + mindmapId, rootNodeModel, null); + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + String mindmapContent = xstream.toXML(currentNodeModel); + + try { + response.setContentType("text/xml"); + response.setCharacterEncoding("utf-8"); + response.getWriter().write(mindmapContent); + } catch (IOException e) { + e.printStackTrace(); + } + } + return null; + } + + /** + * Returns the serialized XML of the Mindmap Nodes from Database + * + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward setLocale(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + try { + response.setContentType("text/xml"); + //response.setCharacterEncoding("utf-8"); + response.getWriter().write(mindmapService.getLanguageXML()); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + + /** + * Shows Mindmap Nodes for each learner + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward showMindmap(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long userId = new Long(WebUtil.readLongParam(request, "userUID")); + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + + MindmapUser mindmapUser = mindmapService.getUserByUID(userId); + + //NotebookEntry entry = mindmapService.getEntry(mindmapUser.getEntryUID()); + MindmapUserDTO userDTO = new MindmapUserDTO(mindmapUser/*, entry*/); + request.setAttribute("userDTO", userDTO); + + /* MINDMAP Code */ + + // mindmapType Parameter + String mindmapType = "images/mindmap_singleuser.swf"; + request.setAttribute("mindmapType", mindmapType); + + // Mindmap path Parameter + String mindmapContentPath = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/monitoring.do?dispatch=setMindmapContent%26mindmapId=" + toolContentID + "%26userId=" + + userId; + request.setAttribute("mindmapContentPath", mindmapContentPath); + + // Current user Parameter + String currentMindmapUser = mindmapService.getMindmapMessageService().getMessage("node.instructor.label"); + request.setAttribute("currentMindmapUser", currentMindmapUser); + + String localizationPath = Configuration.get(ConfigurationKeys.SERVER_URL) + + "tool/lamind10/monitoring.do?dispatch=setLocale"; + request.setAttribute("localizationPath", localizationPath); + + request.setAttribute("toolContentID", toolContentID); + + /* MINDMAP Code */ + + return mapping.findForward("mindmap_display"); + } + + /** + * Saves Mindmap Nodes to Database + * @param mapping + * @param form + * @param request + * @param response + * @return null + */ + public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + MonitoringForm monitorForm = (MonitoringForm) form; + + Mindmap mindmap = mindmapService.getMindmapByContentId(monitorForm.getToolContentID()); + + if (!mindmap.isMultiUserMode()) { + // getting xml data from SWF + String mindmapContent = monitorForm.getMindmapContent(); + Long userId = monitorForm.getUserId(); + MindmapUser mindmapUser = mindmapService.getUserByUID(userId); + + // Saving Mindmap data to XML + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + NodeModel rootNodeModel = (NodeModel) xstream.fromXML(mindmapContent); + NodeConceptModel nodeConceptModel = rootNodeModel.getConcept(); + List branches = rootNodeModel.getBranch(); + + // saving root Node into database + MindmapNode rootMindmapNode = (MindmapNode) mindmapService.getRootNodeByMindmapIdAndUserId( + mindmap.getUid(), userId).get(0); + rootMindmapNode = mindmapService.saveMindmapNode(rootMindmapNode, null, nodeConceptModel.getId(), + nodeConceptModel.getText(), nodeConceptModel.getColor(), mindmapUser, mindmap); + + // string to accumulate deleted nodes for query + String nodesToDeleteCondition = " where uniqueId <> " + rootMindmapNode.getUniqueId(); + + // saving child Nodes into database + if (branches != null) { + mindmapService.setNodesToDeleteCondition(""); + mindmapService.getChildMindmapNodes(branches, rootMindmapNode, mindmapUser, mindmap); + } + + nodesToDeleteCondition += mindmapService.getNodesToDeleteCondition() + " and mindmap_id = " + + mindmap.getUid() + " and user_id = " + mindmapUser.getUid(); + mindmapService.deleteNodes(nodesToDeleteCondition); + } + + return mapping.findForward("success"); + } + + /** + * Sets mindmapService + */ + private void setupService() { + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(this.getServlet().getServletContext()); + } + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/PedagogicalPlannerAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/PedagogicalPlannerAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/actions/PedagogicalPlannerAction.java 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,127 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id: PedagogicalPlannerAction.java,v 1.1 2009/04/03 00:00:29 ruslan Exp $$ */ + +package org.lamsfoundation.lams.tool.mindmap.web.actions; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.service.IMindmapService; +import org.lamsfoundation.lams.tool.mindmap.service.MindmapServiceProxy; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapConstants; +import org.lamsfoundation.lams.tool.mindmap.web.forms.MindmapPedagogicalPlannerForm; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** + * @author + * @version + * + * @struts.action path="/pedagogicalPlanner" name="pedagogicalPlannerForm" parameter="dispatch" scope="request" + * validate="false" + * + * @struts.action-forward name="success" path="/pages/authoring/pedagogicalPlannerForm.jsp" + */ +public class PedagogicalPlannerAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(PedagogicalPlannerAction.class); + + public IMindmapService mindmapService; + + @Override + protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(this.getServlet().getServletContext()); + } + return initPedagogicalPlannerForm(mapping, form, request, response); + } + + public ActionForward initPedagogicalPlannerForm(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + MindmapPedagogicalPlannerForm plannerForm = (MindmapPedagogicalPlannerForm) form; + Long toolContentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + Mindmap mindmap = getMindmapService().getMindmapByContentId(toolContentID); + String command = WebUtil.readStrParam(request, AttributeNames.PARAM_COMMAND, true); + if (command == null) { + plannerForm.fillForm(mindmap); + String contentFolderId = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + plannerForm.setContentFolderID(contentFolderId); + return mapping.findForward(MindmapConstants.SUCCESS); + } else { + try { + String onlineInstructions = mindmap.getOnlineInstructions(); + response.setContentType("text/html;charset=utf-8"); + PrintWriter writer = response.getWriter(); + + if (AttributeNames.COMMAND_CHECK_EDITING_ADVICE.equals(command)) { + Integer activityIndex = WebUtil.readIntParam(request, AttributeNames.PARAM_ACTIVITY_INDEX); + String responseText = (StringUtils.isEmpty(mindmap.getOnlineInstructions()) ? "NO" : "OK") + '&' + + activityIndex; + writer.print(responseText); + + } else if (AttributeNames.COMMAND_GET_EDITING_ADVICE.equals(command)) { + writer.print(onlineInstructions); + } + } catch (IOException e) { + PedagogicalPlannerAction.logger.error(e); + } + return null; + } + } + + public ActionForward saveOrUpdatePedagogicalPlannerForm(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws IOException { + MindmapPedagogicalPlannerForm plannerForm = (MindmapPedagogicalPlannerForm) form; + ActionMessages errors = plannerForm.validate(); + if (errors.isEmpty()) { + String instructions = plannerForm.getInstructions(); + Long toolContentID = plannerForm.getToolContentID(); + Mindmap mindmap = getMindmapService().getMindmapByContentId(toolContentID); + mindmap.setInstructions(instructions); + getMindmapService().saveOrUpdateMindmap(mindmap); + } else { + saveErrors(request, errors); + } + return mapping.findForward(MindmapConstants.SUCCESS); + } + + private IMindmapService getMindmapService() { + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(this.getServlet().getServletContext()); + } + return mindmapService; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/AuthoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/AuthoringForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/AuthoringForm.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,198 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: AuthoringForm.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.web.forms; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @struts.form name="authoringForm" + */ +public class AuthoringForm extends ActionForm { + + private static final long serialVersionUID = 3950453134542135495L; + + String title; + String instructions; + String offlineInstruction; + String onlineInstruction; + boolean lockOnFinished; + boolean multiUserMode; + FormFile onlineFile; + FormFile offlineFile; + String currentTab; + String dispatch; + String sessionMapID; + Long deleteFileUuid; + SessionMap sessionMap; + String mindmapContent; + // reflection + private boolean reflectOnActivity; + private String reflectInstructions; + + @Override + public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) { + ActionErrors ac = new ActionErrors(); + ac.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("this is an error")); + + return ac; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + + public String getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + public FormFile getOfflineFile() { + return offlineFile; + } + + public void setOfflineFile(FormFile offlineFile) { + this.offlineFile = offlineFile; + } + + public String getOfflineInstruction() { + return offlineInstruction; + } + + public void setOfflineInstruction(String offlineInstruction) { + this.offlineInstruction = offlineInstruction; + } + + public FormFile getOnlineFile() { + return onlineFile; + } + + public void setOnlineFile(FormFile onlineFile) { + this.onlineFile = onlineFile; + } + + public String getOnlineInstruction() { + return onlineInstruction; + } + + public void setOnlineInstruction(String onlineInstruction) { + this.onlineInstruction = onlineInstruction; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setSessionMap(SessionMap sessionMap) { + this.sessionMap = sessionMap; + } + + public SessionMap getSessionMap() { + return sessionMap; + } + + public Long getDeleteFileUuid() { + return deleteFileUuid; + } + + public void setDeleteFileUuid(Long deleteFile) { + this.deleteFileUuid = deleteFile; + } + + public boolean isMultiUserMode() { + return multiUserMode; + } + + public void setMultiUserMode(boolean multiUserMode) { + this.multiUserMode = multiUserMode; + } + + public String getMindmapContent() { + return mindmapContent; + } + + public void setMindmapContent(String mindmapContent) { + this.mindmapContent = mindmapContent; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + public String getReflectInstructions() { + return reflectInstructions; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/LearningForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/LearningForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/LearningForm.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,105 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: LearningForm.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.web.forms; + +import org.apache.struts.action.ActionForm; + +/** + * @author Anthony Sukkar + * + * @struts.form name="learningForm" + */ +public class LearningForm extends ActionForm { + + private static final long serialVersionUID = -4728946254882237144L; + + String title; + String instructions; + + String dispatch; + Long toolSessionID; + String mode; + + String entryText; + + String mindmapContent; + + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public Long getToolSessionID() { + return toolSessionID; + } + + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getEntryText() { + return entryText; + } + + public void setEntryText(String entryText) { + this.entryText = entryText; + } + + public String getMindmapContent() { + return mindmapContent; + } + + public void setMindmapContent(String mindmapContent) { + this.mindmapContent = mindmapContent; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/MindmapPedagogicalPlannerForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/MindmapPedagogicalPlannerForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/MindmapPedagogicalPlannerForm.java 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,58 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MindmapPedagogicalPlannerForm.java,v 1.1 2009/04/03 00:00:37 ruslan Exp $ */ +package org.lamsfoundation.lams.tool.mindmap.web.forms; + +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.web.planner.PedagogicalPlannerActivityForm; + +/** + * @struts.form name="pedagogicalPlannerForm" + */ +public class MindmapPedagogicalPlannerForm extends PedagogicalPlannerActivityForm { + String instructions; + String contentFolderID; + + public String getContentFolderID() { + return contentFolderID; + } + + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public void fillForm(Mindmap mindmap) { + if (mindmap != null) { + setInstructions(mindmap.getInstructions()); + setToolContentID(mindmap.getToolContentId()); + } + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/MonitoringForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/MonitoringForm.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/forms/MonitoringForm.java 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,121 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: MonitoringForm.java,v 1.1 2009/04/03 00:00:36 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.web.forms; + +import org.apache.struts.action.ActionForm; + +/** + * @struts.form name="monitoringForm" + */ +public class MonitoringForm extends ActionForm { + + private static final long serialVersionUID = 9096908688391850595L; + + String dispatch; + boolean teacherVisible; + Long toolSessionID; + + // editing message page. + Long messageUID; + String messageBody; + boolean messageHidden; + + String mindmapContent; + Long userId; + Long toolContentID; + + public String getMessageBody() { + return messageBody; + } + + public void setMessageBody(String messageBody) { + this.messageBody = messageBody; + } + + public Long getMessageUID() { + return messageUID; + } + + public void setMessageUID(Long messageUID) { + this.messageUID = messageUID; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public Long getToolSessionID() { + return toolSessionID; + } + + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + + public boolean isTeacherVisible() { + return teacherVisible; + } + + public void setTeacherVisible(boolean visible) { + this.teacherVisible = visible; + } + + public boolean isMessageHidden() { + return messageHidden; + } + + public void setMessageHidden(boolean messageHidden) { + this.messageHidden = messageHidden; + } + + public String getMindmapContent() { + return mindmapContent; + } + + public void setMindmapContent(String mindmapContent) { + this.mindmapContent = mindmapContent; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getToolContentID() { + return toolContentID; + } + + public void setToolContentID(Long toolContentID) { + this.toolContentID = toolContentID; + } +} Index: lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/servlets/ExportServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/servlets/ExportServlet.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/src/java/org/lamsfoundation/lams/tool/mindmap/web/servlets/ExportServlet.java 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,222 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id: ExportServlet.java,v 1.1 2009/04/03 00:00:38 ruslan Exp $ */ + +package org.lamsfoundation.lams.tool.mindmap.web.servlets; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.mindmap.dto.MindmapDTO; +import org.lamsfoundation.lams.tool.mindmap.dto.MindmapSessionDTO; +import org.lamsfoundation.lams.tool.mindmap.dto.MindmapUserDTO; +import org.lamsfoundation.lams.tool.mindmap.model.Mindmap; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapNode; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapSession; +import org.lamsfoundation.lams.tool.mindmap.model.MindmapUser; +import org.lamsfoundation.lams.tool.mindmap.service.IMindmapService; +import org.lamsfoundation.lams.tool.mindmap.service.MindmapServiceProxy; +import org.lamsfoundation.lams.tool.mindmap.util.MindmapException; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeConceptModel; +import org.lamsfoundation.lams.tool.mindmap.util.xmlmodel.NodeModel; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; +import org.lamsfoundation.lams.web.util.AttributeNames; + +import com.thoughtworks.xstream.XStream; + +public class ExportServlet extends AbstractExportPortfolioServlet { + + private static final long serialVersionUID = -2829707715037631881L; + private static Logger logger = Logger.getLogger(ExportServlet.class); + private final String FILENAME = "mindmap_main.html"; + private IMindmapService mindmapService; + + protected String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(getServletContext()); + } + + try { + if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.LEARNER); + doLearnerExport(request, response, directoryName, cookies); + } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER); + doTeacherExport(request, response, directoryName, cookies); + } + } catch (MindmapException e) { + logger.error("Cannot perform export for Mindmap tool!"); + } + + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + request.getContextPath(); + + writeResponseToFile(basePath + "/pages/export/exportPortfolio.jsp", directoryName, FILENAME, cookies); + + return FILENAME; + } + + protected String doOfflineExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + if (toolContentID == null && toolSessionID == null) { + logger.error("Tool content Id or and session Id are null. Unable to activity title"); + } else { + if (mindmapService == null) { + mindmapService = MindmapServiceProxy.getMindmapService(getServletContext()); + } + + Mindmap content = null; + if (toolContentID != null) { + content = mindmapService.getMindmapByContentId(toolContentID); + } else { + MindmapSession session = mindmapService.getSessionBySessionId(toolSessionID); + if (session != null) + content = session.getMindmap(); + } + if (content != null) { + activityTitle = content.getTitle(); + } + } + return super.doOfflineExport(request, response, directoryName, cookies); + } + + private void doLearnerExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) throws MindmapException { + + logger.debug("doExportLearner: toolContentID:" + toolSessionID); + + // check if toolContentID available + if (toolSessionID == null) { + String error = "Tool Session ID is missing. Unable to continue"; + logger.error(error); + throw new MindmapException(error); + } + + MindmapSession mindmapSession = mindmapService.getSessionBySessionId(toolSessionID); + Mindmap mindmap = mindmapSession.getMindmap(); + Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID); + MindmapUser mindmapUser = mindmapService.getUserByUserIdAndSessionId(userID, toolSessionID); + + // construct dto's + MindmapDTO mindmapDTO = new MindmapDTO(); + mindmapDTO.setTitle(mindmap.getTitle()); + mindmapDTO.setInstructions(mindmap.getInstructions()); + + MindmapSessionDTO sessionDTO = new MindmapSessionDTO(); + sessionDTO.setSessionName(mindmapSession.getSessionName()); + sessionDTO.setSessionID(mindmapSession.getSessionId()); + + MindmapUserDTO userDTO = new MindmapUserDTO(mindmapUser); + + sessionDTO.getUserDTOs().add(userDTO); + mindmapDTO.getSessionDTOs().add(sessionDTO); + + // adding Mindmap files to archive + request.getSession().setAttribute("mindmapContentPath", "mindmap.xml"); + + String currentMindmapUser = mindmapUser.getFirstName() + " " + mindmapUser.getLastName(); + request.getSession().setAttribute("currentMindmapUser", currentMindmapUser); + + request.getSession().setAttribute("localizationPath", "locale.xml"); + + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + request.getContextPath(); + writeResponseToFile(basePath + "/images/mindmap_locked.swf", directoryName, "mindmap.swf", cookies); + writeResponseToFile(basePath + "/includes/javascript/swfobject.js", directoryName, "swfobject.js", cookies); + + List mindmapNodeList = null; + if (mindmap.isMultiUserMode()) // is multi-user + mindmapNodeList = mindmapService.getAuthorRootNodeByMindmapIdMulti(mindmap.getUid()); + else + mindmapNodeList = mindmapService.getRootNodeByMindmapIdAndUserId(mindmap.getUid(), mindmapUser.getUid()); + + if (mindmapNodeList != null && mindmapNodeList.size() > 0) { + MindmapNode rootMindmapNode = (MindmapNode) mindmapNodeList.get(0); + + String mindmapUserName = null; + if (rootMindmapNode.getUser() == null) + mindmapUserName = mindmapService.getMindmapMessageService().getMessage("node.instructor.label"); + else + mindmapUserName = rootMindmapNode.getUser().getFirstName() + " " + + rootMindmapNode.getUser().getLastName(); + + NodeModel rootNodeModel = new NodeModel(new NodeConceptModel(rootMindmapNode.getUniqueId(), rootMindmapNode + .getText(), rootMindmapNode.getColor(), mindmapUserName)); + + NodeModel currentNodeModel = mindmapService.getMindmapXMLFromDatabase(rootMindmapNode.getNodeId(), + mindmap.getUid(), rootNodeModel, mindmapUser); + + XStream xstream = new XStream(); + xstream.alias("branch", NodeModel.class); + String mindmapContent = xstream.toXML(currentNodeModel); + + try { + File mindmapFile = new File(directoryName + "/mindmap.xml"); + FileOutputStream fop = new FileOutputStream(mindmapFile); + fop.write(mindmapContent.getBytes()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + try { + File localeFile = new File(directoryName + "/locale.xml"); + FileOutputStream fop = new FileOutputStream(localeFile); + fop.write(mindmapService.getLanguageXML().getBytes()); + } catch (IOException e) { + e.printStackTrace(); + } + + request.getSession().setAttribute("mindmapDTO", mindmapDTO); + } + + private void doTeacherExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) throws MindmapException { + + logger.debug("doExportTeacher: toolContentID:" + toolContentID); + + // check if toolContentID available + if (toolContentID == null) { + String error = "Tool Content ID is missing. Unable to continue"; + logger.error(error); + throw new MindmapException(error); + } + + Mindmap mindmap = mindmapService.getMindmapByContentId(toolContentID); + MindmapDTO mindmapDTO = new MindmapDTO(mindmap); + request.getSession().setAttribute("mindmapDTO", mindmapDTO); + } +} Index: lams_tool_mindmap/web/403.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/403.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/403.jsp 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,25 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + Index: lams_tool_mindmap/web/404.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/404.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/404.jsp 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,27 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + Index: lams_tool_mindmap/web/error.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/error.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/error.jsp 3 Apr 2009 00:00:38 -0000 1.1 @@ -0,0 +1,91 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> + + + +<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + +<%-- Catch JSP Servlet Exception --%> +<% +if (exception != null) { +%> + + <%=exception.getMessage()%> + + + <%=exception.getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + exception.printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { +%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() + .getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} +%> + +
+ + + +
+ + + +
Index: lams_tool_mindmap/web/META-INF/MANIFEST.MF =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/META-INF/Attic/MANIFEST.MF,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/META-INF/MANIFEST.MF 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,5 @@ +Implementation-Title: LAMS - Mindmap Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: + Index: lams_tool_mindmap/web/WEB-INF/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/Attic/lams.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/lams.tld 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,512 @@ + + + + + 1.0 + lams + + LAMSTags + + + + + Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ + Base URL for the current web app + + + WebAppURL + org.lamsfoundation.lams.web.tag.WebAppURLTag + empty + + + + + Output a random number for the learner and passon flash movies to communicate directly. + generate unique ID + + + generateID + org.lamsfoundation.lams.web.tag.GenerateIDTag + empty + + + Output a random number for the learner and passon flash movies to communicate directly. + id + false + + true + + + + + + + Get the configuration value for the specified key + Configuration value + + + Configuration + org.lamsfoundation.lams.web.tag.ConfigurationTag + empty + + + Get the configuration value for the specified key + key + false + + true + + + + + + + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL + + + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag + empty + + + + + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + + Converts text from \n or \r\n to <BR> before rendering + Converts text from \n or \r\n to <BR> before rendering + + + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + empty + + + Converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + Converts text from \n or \r\n to <BR> before rendering + escapeHtml + false + + true + + + + + + + Converts role name into form usable as message resources key + Converts role name into form usable as message resources key + + + role + org.lamsfoundation.lams.web.tag.RoleTag + empty + + + Converts role name into form usable as message resources key + role + true + + true + + + + + + + Help tag + Help tag + + + help + org.lamsfoundation.lams.web.tag.HelpTag + empty + + + Help tag + module + false + + true + + + + Help tag + toolSignature + false + + true + + + + Help tag + page + false + + true + + + + Help tag + style + false + + true + + + + + + + Output stylesheet based on the user preferences. + User's chosen stylesheet + + + css + org.lamsfoundation.lams.web.tag.CssTag + empty + + + Output stylesheet based on the user preferences. + localLinkPath + false + + true + + + + Output stylesheet based on the user preferences. + style + false + + true + + + + + + + Output details from the shared session UserDTO object + user details + + + user + org.lamsfoundation.lams.web.tag.UserTag + empty + + + Output details from the shared session UserDTO object + property + true + + true + + + + + + + STRUTS-textarea + org.lamsfoundation.lams.web.tag.MultiLinesTextareaTag + empty + + accesskey + false + true + + + alt + false + true + + + altKey + false + true + + + bundle + false + true + + + cols + false + true + + + disabled + false + true + + + errorKey + false + true + + + errorStyle + false + true + + + errorStyleClass + false + true + + + errorStyleId + false + true + + + indexed + false + true + + + name + false + true + + + onblur + false + true + + + onchange + false + true + + + onclick + false + true + + + ondblclick + false + true + + + onfocus + false + true + + + onkeydown + false + true + + + onkeypress + false + true + + + onkeyup + false + true + + + onmousedown + false + true + + + onmousemove + false + true + + + onmouseout + false + true + + + onmouseover + false + true + + + onmouseup + false + true + + + property + true + true + + + readonly + false + true + + + rows + false + true + + + style + false + true + + + styleClass + false + true + + + styleId + false + true + + + tabindex + false + true + + + title + false + true + + + titleKey + false + true + + + value + false + true + + + + Tab + /WEB-INF/tags/Tab.tag + + + Tabs + /WEB-INF/tags/Tabs.tag + + + TabBody + /WEB-INF/tags/TabBody.tag + + + TabName + /WEB-INF/tags/TabName.tag + + + FCKEditor + /WEB-INF/tags/FCKEditor.tag + + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + + + headItems + /WEB-INF/tags/headItems.tag + + + Passon + /WEB-INF/tags/Passon.tag + + + ExportPortOutput + /WEB-INF/tags/ExportPortOutput.tag + + + Date + /WEB-INF/tags/Date.tag + + + DefineLater + /WEB-INF/tags/DefineLater.tag + + + ImgButtonWrapper + /WEB-INF/tags/ImgButtonWrapper.tag + + + TextSearch + /WEB-INF/tags/TextSearch.tag + + + textarea + org.lamsfoundation.lams.web.tag.LAMSMultiLinesTextareaTag + JSP + true + + Render text exactly same as original input, which even won't escape the input HTML tag. + + + + + name + true + true + + + + + id + false + true + + + + + onchange + false + true + + + + head + /WEB-INF/tags/Head.tag + + + ProgressOutput + /WEB-INF/tags/ProgressOutput.tag + + + LearnerFlashEnabled + /WEB-INF/tags/LearnerFlashEnabled.tag + + + Index: lams_tool_mindmap/web/WEB-INF/web.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/Attic/web.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/web.xml 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,363 @@ + + + + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.mindmap.ApplicationResources + + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/tool/mindmap/dbupdates/autopatchContext.xml + + + + + locatorFactorySelector + classpath*:/org/lamsfoundation/lams/**/beanRefContext.xml + + + + parentContextKey + context.central + + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + coreSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + + + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + + + Connector + net.fckeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Attachment Download + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + mindmapToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.mindmap.web.servlets.ExportServlet + + + + action + *.do + + + + + Connector + /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + + + + 120 + + + + + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + + + + + + + + tags-bean + /WEB-INF/struts/tlds/struts-bean.tld + + + + tags-html + /WEB-INF/struts/tlds/struts-html.tld + + + + tags-logic + /WEB-INF/struts/tlds/struts-logic.tld + + + + tags-tiles + /WEB-INF/struts/tlds/struts-tiles.tld + + + + + + + tags-fmt + /WEB-INF/jstl/tlds/fmt.tld + + + + tags-core + /WEB-INF/jstl/tlds/c.tld + + + + tags-function + /WEB-INF/jstl/tlds/fn.tld + + + + tags-xml + /WEB-INF/jstl/tlds/x.tld + + + + + + + tags-permittedTaglibs + /WEB-INF/jstl/tlds/permittedTaglibs.tld + + + + tags-scriptfree + /WEB-INF/jstl/tlds/scriptfree.tld + + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + + tags-lams + /WEB-INF/lams.tld + + + + + + + + Secure Content + *.jsp + *.html + *.do + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of + users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of + users for sessions + SYSADMIN + + + + Can create/modify a learning design and edit default + tool content + AUTHOR ADMIN + + + Index: lams_tool_mindmap/web/WEB-INF/fckeditor/tlds/FCKeditor.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/fckeditor/tlds/Attic/FCKeditor.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/fckeditor/tlds/FCKeditor.tld 3 Apr 2009 00:00:39 -0000 1.1 @@ -0,0 +1,129 @@ + + + + The FCKeditor Tag Library offers a very convenient way to create + several FCKeditor instances with different configurations. + Additionally, you can check for user-based capabilities. + + FCKeditor Tag Library + 2.4 + FCK + http://java.fckeditor.net + + + Creates a FCKeditor instance with the given parameters. Any + parameter except instanceName which is empty or contains + whitespaces only will be ignored. + + editor + editor + net.fckeditor.tags.EditorTag + JSP + + + The unique instance name under which the editor can be + retrieved through the API. + + instanceName + true + true + java.lang.String + + + + Width of the FCKeditor instance in the browser window. + + width + true + java.lang.String + + + + Height of the FCKeditor instance in the browser window. + + height + true + java.lang.String + + + + The toolbar set which shall be displayed to the user. + + toolbarSet + true + java.lang.String + + + + The path/folder in which the editor is deployed under + the given context. The context path will be attached + automatically. (e.g. '/fckeditor') + + basePath + true + java.lang.String + + + + Passes any content to the FCKeditor document. Use the + jsp:attribute tag for large inline content. \r, \n, and + \t will be truncated. + + value + true + java.lang.String + + ]]> + + + + + Sets a config property of the editor to the supplied value. + You may provide any attribute you want for the editor. Set + at least one attribute per tag or several attributes with + one tag. This tag can only be nested within an editor tag. + For all configuration options click + here]]>. + + config + config + net.fckeditor.tags.ConfigTag + empty + true + + ]]> + + + + + Displays session-dependent and compatibility-related + information. This tag is intended for developers only. + Response messages cannot be localized, they are English + only. + + check + check + net.fckeditor.tags.CheckTag + empty + + + Provide the feature name you want to check. Valid + features are [FileUpload, FileBrowsing, + CompatibleBrowser] + + command + true + java.lang.String + + +]]> + + + Index: lams_tool_mindmap/web/WEB-INF/jstl/tlds/c.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/jstl/tlds/Attic/c.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/jstl/tlds/c.tld 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,563 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the resource to import. + + url + true + true + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL resource that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +resource. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the resource to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + Index: lams_tool_mindmap/web/WEB-INF/jstl/tlds/fmt.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/jstl/tlds/Attic/fmt.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/jstl/tlds/fmt.tld 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,671 @@ + + + + + JSTL 1.1 i18n-capable formatting library + JSTL fmt + 1.1 + fmt + http://java.sun.com/jsp/jstl/fmt + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + + + + Sets the request character encoding + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + +Name of character encoding to be applied when +decoding request parameters. + + value + false + true + + + + + + Stores the given locale in the locale configuration variable + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + +A String value is interpreted as the +printable representation of a locale, which +must contain a two-letter (lower-case) +language code (as defined by ISO-639), +and may contain a two-letter (upper-case) +country code (as defined by ISO-3166). +Language and country codes must be +separated by hyphen (-) or underscore +(_). + + value + true + true + + + +Vendor- or browser-specific variant. +See the java.util.Locale javadocs for +more information on variants. + + variant + false + true + + + +Scope of the locale configuration variable. + + scope + false + false + + + + + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See +java.util.TimeZone for more information on +supported time zone formats. + + value + true + true + + + + + + Stores the given time zone in the time zone configuration variable + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See java.util.TimeZone for +more information on supported time zone +formats. + + value + true + true + + + +Name of the exported scoped variable which +stores the time zone of type +java.util.TimeZone. + + var + false + false + + + +Scope of var or the time zone configuration +variable. + + scope + false + false + + + + + + Loads a resource bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Prefix to be prepended to the value of the message +key of any nested <fmt:message> action. + + prefix + false + true + + + + + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Name of the exported scoped variable which stores +the i18n localization context of type +javax.servlet.jsp.jstl.fmt.LocalizationC +ontext. + + var + false + false + + + +Scope of var or the localization context +configuration variable. + + scope + false + false + + + + + + Maps key to localized message and performs parametric replacement + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + +Message key to be looked up. + + key + false + true + + + +Localization context in whose resource +bundle the message key is looked up. + + bundle + false + true + + + +Name of the exported scoped variable +which stores the localized message. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Supplies an argument for parametric replacement to a containing + <message> tag + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + +Argument used for parametric replacement. + + value + false + true + + + + + + Formats a numeric value as a number, currency, or percentage + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + +Numeric value to be formatted. + + value + false + true + + + +Specifies whether the value is to be +formatted as number, currency, or +percentage. + + type + false + true + + + +Custom formatting pattern. + + pattern + false + true + + + +ISO 4217 currency code. Applied only +when formatting currencies (i.e. if type is +equal to "currency"); ignored otherwise. + + currencyCode + false + true + + + +Currency symbol. Applied only when +formatting currencies (i.e. if type is equal +to "currency"); ignored otherwise. + + currencySymbol + false + true + + + +Specifies whether the formatted output +will contain any grouping separators. + + groupingUsed + false + true + + + +Maximum number of digits in the integer +portion of the formatted output. + + maxIntegerDigits + false + true + + + +Minimum number of digits in the integer +portion of the formatted output. + + minIntegerDigits + false + true + + + +Maximum number of digits in the +fractional portion of the formatted output. + + maxFractionDigits + false + true + + + +Minimum number of digits in the +fractional portion of the formatted output. + + minFractionDigits + false + true + + + +Name of the exported scoped variable +which stores the formatted result as a +String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a number, currency, or percentage + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + +String to be parsed. + + value + false + true + + + +Specifies whether the string in the value +attribute should be parsed as a number, +currency, or percentage. + + type + false + true + + + +Custom formatting pattern that determines +how the string in the value attribute is to be +parsed. + + pattern + false + true + + + +Locale whose default formatting pattern (for +numbers, currencies, or percentages, +respectively) is to be used during the parse +operation, or to which the pattern specified +via the pattern attribute (if present) is +applied. + + parseLocale + false + true + + + +Specifies whether just the integer portion of +the given value should be parsed. + + integerOnly + false + true + + + +Name of the exported scoped variable which +stores the parsed result (of type +java.lang.Number). + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Formats a date and/or time using the supplied styles and pattern + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + +Date and/or time to be formatted. + + value + true + true + + + +Specifies whether the time, the date, or both +the time and date components of the given +date are to be formatted. + + type + false + true + + + +Predefined formatting style for dates. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a date or both a date and +time (i.e. if type is missing or is equal to +"date" or "both"); ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting style for times. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a time or both a date and +time (i.e. if type is equal to "time" or "both"); +ignored otherwise. + + timeStyle + false + true + + + +Custom formatting style for dates and times. + + pattern + false + true + + + +Time zone in which to represent the formatted +time. + + timeZone + false + true + + + +Name of the exported scoped variable which +stores the formatted result as a String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a date and/or time + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + +Date string to be parsed. + + value + false + true + + + +Specifies whether the date string in the +value attribute is supposed to contain a +time, a date, or both. + + type + false + true + + + +Predefined formatting style for days +which determines how the date +component of the date string is to be +parsed. Applied only when formatting a +date or both a date and time (i.e. if type +is missing or is equal to "date" or "both"); +ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting styles for times +which determines how the time +component in the date string is to be +parsed. Applied only when formatting a +time or both a date and time (i.e. if type +is equal to "time" or "both"); ignored +otherwise. + + timeStyle + false + true + + + +Custom formatting pattern which +determines how the date string is to be +parsed. + + pattern + false + true + + + +Time zone in which to interpret any time +information in the date string. + + timeZone + false + true + + + +Locale whose predefined formatting styles +for dates and times are to be used during +the parse operation, or to which the +pattern specified via the pattern +attribute (if present) is applied. + + parseLocale + false + true + + + +Name of the exported scoped variable in +which the parsing result (of type +java.util.Date) is stored. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + Index: lams_tool_mindmap/web/WEB-INF/jstl/tlds/fn.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/jstl/tlds/Attic/fn.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/jstl/tlds/fn.tld 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,207 @@ + + + + + JSTL 1.1 functions library + JSTL functions + 1.1 + fn + http://java.sun.com/jsp/jstl/functions + + + + Tests if an input string contains the specified substring. + + contains + org.apache.taglibs.standard.functions.Functions + boolean contains(java.lang.String, java.lang.String) + + <c:if test="${fn:contains(name, searchString)}"> + + + + + + Tests if an input string contains the specified substring in a case insensitive way. + + containsIgnoreCase + org.apache.taglibs.standard.functions.Functions + boolean containsIgnoreCase(java.lang.String, java.lang.String) + + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> + + + + + + Tests if an input string ends with the specified suffix. + + endsWith + org.apache.taglibs.standard.functions.Functions + boolean endsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:endsWith(filename, ".txt")}"> + + + + + + Escapes characters that could be interpreted as XML markup. + + escapeXml + org.apache.taglibs.standard.functions.Functions + java.lang.String escapeXml(java.lang.String) + + ${fn:escapeXml(param:info)} + + + + + + Returns the index withing a string of the first occurrence of a specified substring. + + indexOf + org.apache.taglibs.standard.functions.Functions + int indexOf(java.lang.String, java.lang.String) + + ${fn:indexOf(name, "-")} + + + + + + Joins all elements of an array into a string. + + join + org.apache.taglibs.standard.functions.Functions + java.lang.String join(java.lang.String[], java.lang.String) + + ${fn:join(array, ";")} + + + + + + Returns the number of items in a collection, or the number of characters in a string. + + length + org.apache.taglibs.standard.functions.Functions + int length(java.lang.Object) + + You have ${fn:length(shoppingCart.products)} in your shopping cart. + + + + + + Returns a string resulting from replacing in an input string all occurrences + of a "before" string into an "after" substring. + + replace + org.apache.taglibs.standard.functions.Functions + java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) + + ${fn:replace(text, "-", "•")} + + + + + + Splits a string into an array of substrings. + + split + org.apache.taglibs.standard.functions.Functions + java.lang.String[] split(java.lang.String, java.lang.String) + + ${fn:split(customerNames, ";")} + + + + + + Tests if an input string starts with the specified prefix. + + startsWith + org.apache.taglibs.standard.functions.Functions + boolean startsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:startsWith(product.id, "100-")}"> + + + + + + Returns a subset of a string. + + substring + org.apache.taglibs.standard.functions.Functions + java.lang.String substring(java.lang.String, int, int) + + P.O. Box: ${fn:substring(zip, 6, -1)} + + + + + + Returns a subset of a string following a specific substring. + + substringAfter + org.apache.taglibs.standard.functions.Functions + java.lang.String substringAfter(java.lang.String, java.lang.String) + + P.O. Box: ${fn:substringAfter(zip, "-")} + + + + + + Returns a subset of a string before a specific substring. + + substringBefore + org.apache.taglibs.standard.functions.Functions + java.lang.String substringBefore(java.lang.String, java.lang.String) + + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} + + + + + + Converts all of the characters of a string to lower case. + + toLowerCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toLowerCase(java.lang.String) + + Product name: ${fn.toLowerCase(product.name)} + + + + + + Converts all of the characters of a string to upper case. + + toUpperCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toUpperCase(java.lang.String) + + Product name: ${fn.UpperCase(product.name)} + + + + + + Removes white spaces from both ends of a string. + + trim + org.apache.taglibs.standard.functions.Functions + java.lang.String trim(java.lang.String) + + Name: ${fn.trim(name)} + + + + Index: lams_tool_mindmap/web/WEB-INF/jstl/tlds/permittedTaglibs.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/jstl/tlds/Attic/permittedTaglibs.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/jstl/tlds/permittedTaglibs.tld 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,34 @@ + + + + + Restricts JSP pages to the JSTL tag libraries + + permittedTaglibs + 1.1 + permittedTaglibs + http://jakarta.apache.org/taglibs/standard/permittedTaglibs + + + + javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV + + + + Whitespace-separated list of taglib URIs to permit. This example + TLD for the Standard Taglib allows only JSTL 'el' taglibs to be + imported. + + permittedTaglibs + + http://java.sun.com/jsp/jstl/core + http://java.sun.com/jsp/jstl/fmt + http://java.sun.com/jsp/jstl/sql + http://java.sun.com/jsp/jstl/xml + + + + Index: lams_tool_mindmap/web/WEB-INF/jstl/tlds/scriptfree.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/jstl/tlds/Attic/scriptfree.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/jstl/tlds/scriptfree.tld 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,51 @@ + + + + + Validates JSP pages to prohibit use of scripting elements. + + 1.1 + scriptfree + http://jakarta.apache.org/taglibs/standard/scriptfree + + + + Validates prohibitions against scripting elements. + + + javax.servlet.jsp.jstl.tlv.ScriptFreeTLV + + + + Controls whether or not declarations are considered valid. + + allowDeclarations + false + + + + Controls whether or not scriptlets are considered valid. + + allowScriptlets + false + + + + Controls whether or not top-level expressions are considered valid. + + allowExpressions + false + + + + Controls whether or not expressions used to supply request-time + attribute values are considered valid. + + allowRTExpressions + false + + + Index: lams_tool_mindmap/web/WEB-INF/jstl/tlds/x.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/jstl/tlds/Attic/x.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/jstl/tlds/x.tld 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,448 @@ + + + + + JSTL 1.1 XML library + JSTL XML + 1.1 + x + http://java.sun.com/jsp/jstl/xml + + + + Provides validation features for JSTL XML tags. + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Like <%= ... >, but for XPath expressions. + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + +XPath expression to be evaluated. + + select + true + false + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default +value is true. + + escapeXml + false + true + + + + + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + +The test condition that tells whether or not the +body content should be processed. + + select + true + false + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + XML iteration tag. + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + +Name of the exported scoped variable for the +current item of the iteration. This scoped variable +has nested visibility. Its type depends on the +result of the XPath expression in the select +attribute. + + var + false + false + + + +XPath expression to be evaluated. + + select + true + false + + + +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. + + begin + false + true + int + + + +Iteration ends at the item located at the specified +index (inclusive). + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility. + + varStatus + false + false + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'transform' tag's Transformer + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + +Name of the transformation parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Parses XML content from 'source' attribute or 'body' + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is implementation +dependent. + + var + false + false + + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is +org.w3c.dom.Document. + + varDom + false + false + + + +Scope for var. + + scope + false + false + + + +Scope for varDom. + + scopeDom + false + false + + + +Deprecated. Use attribute 'doc' instead. + + xml + false + true + + + +Source XML document to be parsed. + + doc + false + true + + + +The system identifier (URI) for parsing the +XML document. + + systemId + false + true + + + +Filter to be applied to the source +document. + + filter + false + true + + + + + + Saves the result of an XPath expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + +Name of the exported scoped variable to hold +the value specified in the action. The type of the +scoped variable is whatever type the select +expression evaluates to. + + var + true + false + + + +XPath expression to be evaluated. + + select + false + false + + + +Scope for var. + + scope + false + false + + + + + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + +Name of the exported +scoped variable for the +transformed XML +document. The type of the +scoped variable is +org.w3c.dom.Document. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Result +Object that captures or +processes the transformation +result. + + result + false + true + + + +Deprecated. Use attribute +'doc' instead. + + xml + false + true + + + +Source XML document to be +transformed. (If exported by +<x:set>, it must correspond +to a well-formed XML +document, not a partial +document.) + + doc + false + true + + + +Deprecated. Use attribute +'docSystemId' instead. + + xmlSystemId + false + true + + + +The system identifier (URI) +for parsing the XML +document. + + docSystemId + false + true + + + +javax.xml.transform.Source +Transformation stylesheet as +a String, Reader, or +Source object. + + xslt + false + true + + + +The system identifier (URI) +for parsing the XSLT +stylesheet. + + xsltSystemId + false + true + + + + + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + +The test condition that tells whether or +not the body content should be +processed + + select + true + false + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/.struts-config.xml.strutsdia =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/Attic/.struts-config.xml.strutsdia,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/.struts-config.xml.strutsdia 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/Attic/struts-config.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/struts-config.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/tiles-defs.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/Attic/tiles-defs.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/tiles-defs.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/validator-rules.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/Attic/validator-rules.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/validator-rules.xml 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-bean.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/tlds/Attic/struts-bean.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-bean.tld 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-html.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/tlds/Attic/struts-html.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-html.tld 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-logic.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/tlds/Attic/struts-logic.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-logic.tld 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-nested.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/tlds/Attic/struts-nested.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-nested.tld 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-tiles.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/struts/tlds/Attic/struts-tiles.tld,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/struts/tlds/struts-tiles.tld 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/AuthoringButton.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/AuthoringButton.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/AuthoringButton.tag 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,94 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * AuthoringButton.tag + * Author: Dapeng Ni + * Description: Creates the save/cancel button for authoring page + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> + +<%@ attribute name="formID" required="true" rtexprvalue="true" %> +<%@ attribute name="toolSignature" required="true" rtexprvalue="true" %> +<%@ attribute name="toolContentID" required="true" rtexprvalue="true" %> +<%@ attribute name="contentFolderID" required="true" rtexprvalue="true" %> +<%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %> + +<%-- Optional attribute --%> +<%@ attribute name="accessMode" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %> +<%@ attribute name="defineLater" required="false" rtexprvalue="true" %> +<%@ attribute name="customiseSessionID" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + +

+ + + + + + +

+ Index: lams_tool_mindmap/web/WEB-INF/tags/Date.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Date.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/Date.tag 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,52 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Author: Fiona Malikoff + * Description: Format a date, using the locale, based on standard parameters. + * Need to use long for the date otherwise the AU locale comes out as 1/2/06 and + * full is needed to include the timezone. + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="value" required="true" rtexprvalue="true" type="java.util.Date" %> +<%@ attribute name="style" required="false" rtexprvalue="true"%> +<%@ attribute name="type" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/DefineLater.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/DefineLater.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/DefineLater.tag 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,58 @@ + +<% + /**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * DefineLater.tag + * Author: Fiona Malikoff + * Description: Layout for "Define Later" screens - to be used in learning. + * A suggested layout - unless the tool has special requirements, this layout should be used. + * Expects to be used inside
+ */ +%> + +<%@ tag body-content="scriptless"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-core" prefix="c"%> + +<%@ attribute name="defineLaterMessageKey" required="false" + rtexprvalue="true"%> +<%@ attribute name="buttonTryAgainKey" required="false" + rtexprvalue="true"%> + +<%-- Default value for I18N keys --%> + + + + + + + +

+ +

+
+ +
Index: lams_tool_mindmap/web/WEB-INF/tags/ExportPortOutput.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/ExportPortOutput.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/ExportPortOutput.tag 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,59 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Passon + * Author: Fiona Malikoff + * Description: Outputs the Activity details on the main page in export portfolio. Recursive tag. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="actport" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.learning.export.ActivityPortfolio" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +
  • + + + " target="_blank"/> + + + + + + + + +
      + + + +
    +
    +
    + +
  • + Index: lams_tool_mindmap/web/WEB-INF/tags/FCKEditor.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/FCKEditor.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/FCKEditor.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,76 @@ +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="fck-editor" prefix="fck"%> + +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="true" rtexprvalue="true"%> +<%@ attribute name="toolbarSet" required="false" rtexprvalue="true"%> +<%@ attribute name="height" required="false" rtexprvalue="true"%> +<%@ attribute name="width" required="false" rtexprvalue="true"%> +<%@ attribute name="contentFolderID" required="false" rtexprvalue="true"%> +<%@ attribute name="displayExpanded" required="false" rtexprvalue="true"%> + + + + + + + + + + + + + + + + + +/fckeditor/ + + + + +${value} + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/Head.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Head.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/Head.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,41 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Head.tag + * Author: Fiona Malikoff + * Description: Sets up the non-cache pragma statements and the UTF-8 + * encoding. Use in place of the normal head tag. + */ +%> + +<%@ tag body-content="scriptless"%> + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/ImgButtonWrapper.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/ImgButtonWrapper.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,37 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * ImgButtonWrapper.tag + * Author: Mitchell Seaton + * Description: Simple wrapper that will display buttons correctly when RTL page rendering is used. + */ + + %> +<%@ tag body-content="scriptless" %> +
    +
    + +
    +
    Index: lams_tool_mindmap/web/WEB-INF/tags/LearnerFlashEnabled.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/LearnerFlashEnabled.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/LearnerFlashEnabled.tag 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,45 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Learner Flash Enabled + * Author: Fiona Malikoff + * Description: Is Flash enabled for learner? + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + true + false + + + Index: lams_tool_mindmap/web/WEB-INF/tags/Passon.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/Passon.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/Passon.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,86 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Passon + * Author: Mitchell Seaton + * Description: Passes on progress data to the Flash Learner to update the progress bar. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="progress" required="true" rtexprvalue="true" type="java.lang.String" %> +<%@ attribute name="version" required="false" rtexprvalue="true" %> +<%@ attribute name="id" required="true" rtexprvalue="true" %> +<%@ attribute name="redirect" required="false" rtexprvalue="true" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/ProgressOutput.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/ProgressOutput.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/ProgressOutput.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,79 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Progress Output + * Author: Fiona Malikoff + * Description: Outputs the Activity details on the jsp progress page. Recursive tag + * + */ + + /** Need to add current ! */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="activity" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.learning.web.bean.ActivityURL" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +
  • + + + + + + + + + + + + + + + + + + + + + + + + ${activity.title} + + + + + +
      + + + +
    +
    +
    + +
  • + Index: lams_tool_mindmap/web/WEB-INF/tags/Tab.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Tab.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/Tab.tag 3 Apr 2009 00:00:29 -0000 1.1 @@ -0,0 +1,85 @@ +<% + /**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Tab.tag + * Author: Mitchell Seaton + * Description: Creates a tab element. + * Wiki: + */ +%> +<%@ tag body-content="empty"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="false" rtexprvalue="true"%> +<%@ attribute name="key" required="false" rtexprvalue="true"%> +<%@ attribute name="inactive" required="false" rtexprvalue="true"%> +<%@ attribute name="methodCall" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%-- Check if bundle is set --%> + + + + + + + + + + +<%-- + Usually methodCall is selectTab, but the calling code can override methodCall if desired. + this is handy if the page needs different logic on initialisation and user switching tabs +--%> + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/TabBody.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/TabBody.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/TabBody.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,52 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * TabBody.tag + * Author: Mitchell Seaton + * Description: Creates the body container for a tab element + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="tabTitle" required="false" rtexprvalue="true"%> +<%@ attribute name="titleKey" required="false" rtexprvalue="true"%> +<%@ attribute name="page" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-bean" prefix="bean"%> + + +
    + + + + + + + + + +
    + Index: lams_tool_mindmap/web/WEB-INF/tags/TabName.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/TabName.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/TabName.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,60 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * TabName Tag + * Author: Mitchell Seaton + * Description: Shortens name that are too long to fit inside a tab + */ + + %> +<%@ tag body-content="scriptless" %> + +<%@ attribute name="url" required="true" rtexprvalue="true"%> +<%@ attribute name="highlight" required="false" rtexprvalue="true" %> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-function" prefix="fn"%> + +12 + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/Tabs.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Tabs.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/Tabs.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,69 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Tabs.tag + * Author: Mitchell Seaton + * Description: Create a tab list from a input collection or nested Tab tags. + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="collection" type="java.util.Collection" required="false" rtexprvalue="true"%> +<%@ attribute name="control" required="false" rtexprvalue="true"%> +<%@ attribute name="useKey" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + + + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/TextSearch.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/TextSearch.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/TextSearch.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,136 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * TextSearch.tag + * Author: Marcin Cieslak + * Description: Displays form for creating text search conditions. + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +<%-- Required attributes --%> +<%@ attribute name="sessionMapID" required="true" rtexprvalue="true" %> +<%@ attribute name="wrapInFormTag" required="true" rtexprvalue="true" %> + +<%-- Optional attributes --%> +<%@ attribute name="action" required="false" rtexprvalue="true" %> +<%@ attribute name="formID" required="false" rtexprvalue="true" %> +<%@ attribute name="headingLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="allWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="phraseLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="anyWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="excludedWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelAction" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + + + + + + + + Index: lams_tool_mindmap/web/WEB-INF/tags/headItems.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/headItems.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/WEB-INF/tags/headItems.tag 3 Apr 2009 00:00:30 -0000 1.1 @@ -0,0 +1,52 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Standard Head Items + * Author: Fiona Malikoff + * Description: Includes all the standard head items e.g. the + * lams css files, sets the content type, standard javascript files. + */ + + %> +<%@ tag body-content="empty"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + + + + + + + + + + + Index: lams_tool_mindmap/web/common/empty.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/empty.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/empty.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_mindmap/web/common/footer.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/footer.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/footer.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1 @@ +

    Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org

    Index: lams_tool_mindmap/web/common/header.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/header.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/header.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,17 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + Index: lams_tool_mindmap/web/common/learnerheader.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/learnerheader.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/learnerheader.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,22 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + + + + + + Index: lams_tool_mindmap/web/common/message.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/message.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/message.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,5 @@ +<%@ include file="/common/taglibs.jsp"%> + +

    + ${requestScope.message}; +

    Index: lams_tool_mindmap/web/common/messages.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/messages.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/messages.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,8 @@ +<%-- Error Messages --%> + +

    + +
    +
    +

    +
    Index: lams_tool_mindmap/web/common/taglibs.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/common/taglibs.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/common/taglibs.jsp 3 Apr 2009 00:00:33 -0000 1.1 @@ -0,0 +1,11 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> + +<%@ taglib uri="tags-bean" prefix="bean"%> +<%@ taglib uri="tags-logic" prefix="logic"%> +<%@ taglib uri="tags-tiles" prefix="tiles"%> +<%@ taglib uri="tags-html" prefix="html"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="fck-editor" prefix="fck"%> + Index: lams_tool_mindmap/web/images/cross.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/cross.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/down.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/down.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/down_disabled.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/down_disabled.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/edit.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/edit.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/icon_mindmap.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/icon_mindmap.swf,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/mindmap_locked.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/mindmap_locked.swf,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/mindmap_multiuser.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/mindmap_multiuser.swf,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/mindmap_singleuser.swf =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/mindmap_singleuser.swf,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/success.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/success.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/up.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/up.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/images/up_disabled.gif =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/images/up_disabled.gif,v diff -u Binary files differ Index: lams_tool_mindmap/web/includes/javascript/authoring.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/includes/javascript/authoring.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/includes/javascript/authoring.js 3 Apr 2009 00:00:35 -0000 1.1 @@ -0,0 +1,40 @@ + +function init() { + // open the current tab + var tag = document.getElementById("currentTab"); + if (tag.value != "") { + selectTab(tag.value); + } else { + selectTab(1); + } +} + +function doSelectTab(tabId) { + var tag = document.getElementById("currentTab"); + + var mindmapContent = document.getElementById("mindmapContent"); + + if (tag.value == "" || tag.value == 1) { + mindmapContent.value = getFlashMovie('flashContent').getMindmap(); + } + + tag.value = tabId; + + if (tag.value == "" || tag.value == 1) { + flashvars["xml"] = ""; + embedFlashObject(); + } + + selectTab(tabId); +} + +function doSubmit(method) { + document.authoringForm.dispatch.value = method; + document.authoringForm.submit(); +} + +function deleteAttachment(dispatch, uuid) { + document.authoringForm.dispatch.value = dispatch; + document.authoringForm.deleteFileUuid.value = uuid; + document.authoringForm.submit(); +} Index: lams_tool_mindmap/web/includes/javascript/monitoring.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/includes/javascript/monitoring.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/includes/javascript/monitoring.js 3 Apr 2009 00:00:35 -0000 1.1 @@ -0,0 +1,16 @@ + +function init() { + if (initialTabId) { + selectTab(initialTabId); + } else { + selectTab(1); + } +} +function doSelectTab(tabId) { + selectTab(tabId); +} +function doSubmit(method, tabId) { + document.monitoringForm.method.value = method; + document.monitoringForm.submit(); +} + Index: lams_tool_mindmap/web/includes/javascript/swfobject.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/includes/javascript/Attic/swfobject.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/includes/javascript/swfobject.js 3 Apr 2009 00:00:35 -0000 1.1 @@ -0,0 +1,731 @@ +/*! SWFObject v2.1 + Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis + This software is released under the MIT License +*/ + +var swfobject = function() { + + var UNDEF = "undefined", + OBJECT = "object", + SHOCKWAVE_FLASH = "Shockwave Flash", + SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", + FLASH_MIME_TYPE = "application/x-shockwave-flash", + EXPRESS_INSTALL_ID = "SWFObjectExprInst", + + win = window, + doc = document, + nav = navigator, + + domLoadFnArr = [], + regObjArr = [], + objIdArr = [], + listenersArr = [], + script, + timer = null, + storedAltContent = null, + storedAltContentId = null, + isDomLoaded = false, + isExpressInstallActive = false; + + /* Centralized function for browser feature detection + - Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features + - User agent string detection is only used when no alternative is possible + - Is executed directly for optimal performance + */ + var ua = function() { + var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, + playerVersion = [0,0,0], + d = null; + if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { + d = nav.plugins[SHOCKWAVE_FLASH].description; + if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+ + d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); + playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); + playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); + playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0; + } + } + else if (typeof win.ActiveXObject != UNDEF) { + var a = null, fp6Crash = false; + try { + a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7"); + } + catch(e) { + try { + a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6"); + playerVersion = [6,0,21]; + a.AllowScriptAccess = "always"; // Introduced in fp6.0.47 + } + catch(e) { + if (playerVersion[0] == 6) { + fp6Crash = true; + } + } + if (!fp6Crash) { + try { + a = new ActiveXObject(SHOCKWAVE_FLASH_AX); + } + catch(e) {} + } + } + if (!fp6Crash && a) { // a will return null when ActiveX is disabled + try { + d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29 + if (d) { + d = d.split(" ")[1].split(","); + playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + catch(e) {} + } + } + var u = nav.userAgent.toLowerCase(), + p = nav.platform.toLowerCase(), + webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit + ie = false, + windows = p ? /win/.test(p) : /win/.test(u), + mac = p ? /mac/.test(p) : /mac/.test(u); + /*@cc_on + ie = true; + @if (@_win32) + windows = true; + @elif (@_mac) + mac = true; + @end + @*/ + return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac }; + }(); + + /* Cross-browser onDomLoad + - Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/ + - Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari) + */ + var onDomLoad = function() { + if (!ua.w3cdom) { + return; + } + addDomLoadEvent(main); + if (ua.ie && ua.win) { + try { // Avoid a possible Operation Aborted error + doc.write(""); // String is split into pieces to avoid Norton AV to add code that can cause errors + script = getElementById("__ie_ondomload"); + if (script) { + addListener(script, "onreadystatechange", checkReadyState); + } + } + catch(e) {} + } + if (ua.webkit && typeof doc.readyState != UNDEF) { + timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10); + } + if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null); + } + addLoadEvent(callDomLoadFunctions); + }(); + + function checkReadyState() { + if (script.readyState == "complete") { + script.parentNode.removeChild(script); + callDomLoadFunctions(); + } + } + + function callDomLoadFunctions() { + if (isDomLoaded) { + return; + } + if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early + var s = createElement("span"); + try { // Avoid a possible Operation Aborted error + var t = doc.getElementsByTagName("body")[0].appendChild(s); + t.parentNode.removeChild(t); + } + catch (e) { + return; + } + } + isDomLoaded = true; + if (timer) { + clearInterval(timer); + timer = null; + } + var dl = domLoadFnArr.length; + for (var i = 0; i < dl; i++) { + domLoadFnArr[i](); + } + } + + function addDomLoadEvent(fn) { + if (isDomLoaded) { + fn(); + } + else { + domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+ + } + } + + /* Cross-browser onload + - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/ + - Will fire an event as soon as a web page including all of its assets are loaded + */ + function addLoadEvent(fn) { + if (typeof win.addEventListener != UNDEF) { + win.addEventListener("load", fn, false); + } + else if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("load", fn, false); + } + else if (typeof win.attachEvent != UNDEF) { + addListener(win, "onload", fn); + } + else if (typeof win.onload == "function") { + var fnOld = win.onload; + win.onload = function() { + fnOld(); + fn(); + }; + } + else { + win.onload = fn; + } + } + + /* Main function + - Will preferably execute onDomLoad, otherwise onload (as a fallback) + */ + function main() { // Static publishing only + var rl = regObjArr.length; + for (var i = 0; i < rl; i++) { // For each registered object element + var id = regObjArr[i].id; + if (ua.pv[0] > 0) { + var obj = getElementById(id); + if (obj) { + regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0"; + regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0"; + if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match! + if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements + fixParams(obj); + } + setVisibility(id, true); + } + else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only) + showExpressInstall(regObjArr[i]); + } + else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content + displayAltContent(obj); + } + } + } + else { // If no fp is installed, we let the object element do its job (show alternative content) + setVisibility(id, true); + } + } + } + + /* Fix nested param elements, which are ignored by older webkit engines + - This includes Safari up to and including version 1.2.2 on Mac OS 10.3 + - Fall back to the proprietary embed element + */ + function fixParams(obj) { + var nestedObj = obj.getElementsByTagName(OBJECT)[0]; + if (nestedObj) { + var e = createElement("embed"), a = nestedObj.attributes; + if (a) { + var al = a.length; + for (var i = 0; i < al; i++) { + if (a[i].nodeName == "DATA") { + e.setAttribute("src", a[i].nodeValue); + } + else { + e.setAttribute(a[i].nodeName, a[i].nodeValue); + } + } + } + var c = nestedObj.childNodes; + if (c) { + var cl = c.length; + for (var j = 0; j < cl; j++) { + if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") { + e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value")); + } + } + } + obj.parentNode.replaceChild(e, obj); + } + } + + /* Show the Adobe Express Install dialog + - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 + */ + function showExpressInstall(regObj) { + isExpressInstallActive = true; + var obj = getElementById(regObj.id); + if (obj) { + if (regObj.altContentId) { + var ac = getElementById(regObj.altContentId); + if (ac) { + storedAltContent = ac; + storedAltContentId = regObj.altContentId; + } + } + else { + storedAltContent = abstractAltContent(obj); + } + if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) { + regObj.width = "310"; + } + if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) { + regObj.height = "137"; + } + doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; + var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", + dt = doc.title, + fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt, + replaceId = regObj.id; + // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element + // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work + if (ua.ie && ua.win && obj.readyState != 4) { + var newObj = createElement("div"); + replaceId += "SWFObjectNew"; + newObj.setAttribute("id", replaceId); + obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf + obj.style.display = "none"; + var fn = function() { + obj.parentNode.removeChild(obj); + }; + addListener(win, "onload", fn); + } + createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId); + } + } + + /* Functions to abstract and display alternative content + */ + function displayAltContent(obj) { + if (ua.ie && ua.win && obj.readyState != 4) { + // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element + // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work + var el = createElement("div"); + obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content + el.parentNode.replaceChild(abstractAltContent(obj), el); + obj.style.display = "none"; + var fn = function() { + obj.parentNode.removeChild(obj); + }; + addListener(win, "onload", fn); + } + else { + obj.parentNode.replaceChild(abstractAltContent(obj), obj); + } + } + + function abstractAltContent(obj) { + var ac = createElement("div"); + if (ua.win && ua.ie) { + ac.innerHTML = obj.innerHTML; + } + else { + var nestedObj = obj.getElementsByTagName(OBJECT)[0]; + if (nestedObj) { + var c = nestedObj.childNodes; + if (c) { + var cl = c.length; + for (var i = 0; i < cl; i++) { + if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { + ac.appendChild(c[i].cloneNode(true)); + } + } + } + } + } + return ac; + } + + /* Cross-browser dynamic SWF creation + */ + function createSWF(attObj, parObj, id) { + var r, el = getElementById(id); + if (el) { + if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content + attObj.id = id; + } + if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML + var att = ""; + for (var i in attObj) { + if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {} + if (i.toLowerCase() == "data") { + parObj.movie = attObj[i]; + } + else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + att += ' class="' + attObj[i] + '"'; + } + else if (i.toLowerCase() != "classid") { + att += ' ' + i + '="' + attObj[i] + '"'; + } + } + } + var par = ""; + for (var j in parObj) { + if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries + par += ''; + } + } + el.outerHTML = '' + par + ''; + objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on unload (dynamic publishing only) + r = getElementById(attObj.id); + } + else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element + var e = createElement("embed"); + e.setAttribute("type", FLASH_MIME_TYPE); + for (var k in attObj) { + if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries + if (k.toLowerCase() == "data") { + e.setAttribute("src", attObj[k]); + } + else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + e.setAttribute("class", attObj[k]); + } + else if (k.toLowerCase() != "classid") { // Filter out IE specific attribute + e.setAttribute(k, attObj[k]); + } + } + } + for (var l in parObj) { + if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries + if (l.toLowerCase() != "movie") { // Filter out IE specific param element + e.setAttribute(l, parObj[l]); + } + } + } + el.parentNode.replaceChild(e, el); + r = e; + } + else { // Well-behaving browsers + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + for (var m in attObj) { + if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries + if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + o.setAttribute("class", attObj[m]); + } + else if (m.toLowerCase() != "classid") { // Filter out IE specific attribute + o.setAttribute(m, attObj[m]); + } + } + } + for (var n in parObj) { + if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element + createObjParam(o, n, parObj[n]); + } + } + el.parentNode.replaceChild(o, el); + r = o; + } + } + return r; + } + + function createObjParam(el, pName, pValue) { + var p = createElement("param"); + p.setAttribute("name", pName); + p.setAttribute("value", pValue); + el.appendChild(p); + } + + /* Cross-browser SWF removal + - Especially needed to safely and completely remove a SWF in Internet Explorer + */ + function removeSWF(id) { + var obj = getElementById(id); + if (obj && (obj.nodeName == "OBJECT" || obj.nodeName == "EMBED")) { + if (ua.ie && ua.win) { + if (obj.readyState == 4) { + removeObjectInIE(id); + } + else { + win.attachEvent("onload", function() { + removeObjectInIE(id); + }); + } + } + else { + obj.parentNode.removeChild(obj); + } + } + } + + function removeObjectInIE(id) { + var obj = getElementById(id); + if (obj) { + for (var i in obj) { + if (typeof obj[i] == "function") { + obj[i] = null; + } + } + obj.parentNode.removeChild(obj); + } + } + + /* Functions to optimize JavaScript compression + */ + function getElementById(id) { + var el = null; + try { + el = doc.getElementById(id); + } + catch (e) {} + return el; + } + + function createElement(el) { + return doc.createElement(el); + } + + /* Updated attachEvent function for Internet Explorer + - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks + */ + function addListener(target, eventType, fn) { + target.attachEvent(eventType, fn); + listenersArr[listenersArr.length] = [target, eventType, fn]; + } + + /* Flash Player and SWF content version matching + */ + function hasPlayerVersion(rv) { + var pv = ua.pv, v = rv.split("."); + v[0] = parseInt(v[0], 10); + v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0" + v[2] = parseInt(v[2], 10) || 0; + return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; + } + + /* Cross-browser dynamic CSS creation + - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php + */ + function createCSS(sel, decl) { + if (ua.ie && ua.mac) { + return; + } + var h = doc.getElementsByTagName("head")[0], s = createElement("style"); + s.setAttribute("type", "text/css"); + s.setAttribute("media", "screen"); + if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) { + s.appendChild(doc.createTextNode(sel + " {" + decl + "}")); + } + h.appendChild(s); + if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { + var ls = doc.styleSheets[doc.styleSheets.length - 1]; + if (typeof ls.addRule == OBJECT) { + ls.addRule(sel, decl); + } + } + } + + function setVisibility(id, isVisible) { + var v = isVisible ? "visible" : "hidden"; + if (isDomLoaded && getElementById(id)) { + getElementById(id).style.visibility = v; + } + else { + createCSS("#" + id, "visibility:" + v); + } + } + + /* Filter to avoid XSS attacks + */ + function urlEncodeIfNecessary(s) { + var regex = /[\\\"<>\.;]/; + var hasBadChars = regex.exec(s) != null; + return hasBadChars ? encodeURIComponent(s) : s; + } + + /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) + */ + var cleanup = function() { + if (ua.ie && ua.win) { + window.attachEvent("onunload", function() { + // remove listeners to avoid memory leaks + var ll = listenersArr.length; + for (var i = 0; i < ll; i++) { + listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); + } + // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect + var il = objIdArr.length; + for (var j = 0; j < il; j++) { + removeSWF(objIdArr[j]); + } + // cleanup library's main closures to avoid memory leaks + for (var k in ua) { + ua[k] = null; + } + ua = null; + for (var l in swfobject) { + swfobject[l] = null; + } + swfobject = null; + }); + } + }(); + + + return { + /* Public API + - Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation + */ + registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) { + if (!ua.w3cdom || !objectIdStr || !swfVersionStr) { + return; + } + var regObj = {}; + regObj.id = objectIdStr; + regObj.swfVersion = swfVersionStr; + regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false; + regObjArr[regObjArr.length] = regObj; + setVisibility(objectIdStr, false); + }, + + getObjectById: function(objectIdStr) { + var r = null; + if (ua.w3cdom) { + var o = getElementById(objectIdStr); + if (o) { + var n = o.getElementsByTagName(OBJECT)[0]; + if (!n || (n && typeof o.SetVariable != UNDEF)) { + r = o; + } + else if (typeof n.SetVariable != UNDEF) { + r = n; + } + } + } + return r; + }, + + embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) { + if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) { + return; + } + widthStr += ""; // Auto-convert to string + heightStr += ""; + if (hasPlayerVersion(swfVersionStr)) { + setVisibility(replaceElemIdStr, false); + var att = {}; + if (attObj && typeof attObj === OBJECT) { + for (var i in attObj) { + if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries + att[i] = attObj[i]; + } + } + } + att.data = swfUrlStr; + att.width = widthStr; + att.height = heightStr; + var par = {}; + if (parObj && typeof parObj === OBJECT) { + for (var j in parObj) { + if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries + par[j] = parObj[j]; + } + } + } + if (flashvarsObj && typeof flashvarsObj === OBJECT) { + for (var k in flashvarsObj) { + if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + k + "=" + flashvarsObj[k]; + } + else { + par.flashvars = k + "=" + flashvarsObj[k]; + } + } + } + } + addDomLoadEvent(function() { + createSWF(att, par, replaceElemIdStr); + if (att.id == replaceElemIdStr) { + setVisibility(replaceElemIdStr, true); + } + }); + } + else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { + isExpressInstallActive = true; // deferred execution + setVisibility(replaceElemIdStr, false); + addDomLoadEvent(function() { + var regObj = {}; + regObj.id = regObj.altContentId = replaceElemIdStr; + regObj.width = widthStr; + regObj.height = heightStr; + regObj.expressInstall = xiSwfUrlStr; + showExpressInstall(regObj); + }); + } + }, + + getFlashPlayerVersion: function() { + return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; + }, + + hasFlashPlayerVersion: hasPlayerVersion, + + createSWF: function(attObj, parObj, replaceElemIdStr) { + if (ua.w3cdom) { + return createSWF(attObj, parObj, replaceElemIdStr); + } + else { + return undefined; + } + }, + + removeSWF: function(objElemIdStr) { + if (ua.w3cdom) { + removeSWF(objElemIdStr); + } + }, + + createCSS: function(sel, decl) { + if (ua.w3cdom) { + createCSS(sel, decl); + } + }, + + addDomLoadEvent: addDomLoadEvent, + + addLoadEvent: addLoadEvent, + + getQueryParamValue: function(param) { + var q = doc.location.search || doc.location.hash; + if (param == null) { + return urlEncodeIfNecessary(q); + } + if (q) { + var pairs = q.substring(1).split("&"); + for (var i = 0; i < pairs.length; i++) { + if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { + return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); + } + } + } + return ""; + }, + + // For internal usage only + expressInstallCallback: function() { + if (isExpressInstallActive && storedAltContent) { + var obj = getElementById(EXPRESS_INSTALL_ID); + if (obj) { + obj.parentNode.replaceChild(storedAltContent, obj); + if (storedAltContentId) { + setVisibility(storedAltContentId, true); + if (ua.ie && ua.win) { + storedAltContent.style.display = "block"; + } + } + storedAltContent = null; + storedAltContentId = null; + isExpressInstallActive = false; + } + } + } + }; +}(); Index: lams_tool_mindmap/web/layouts/defaultLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/layouts/defaultLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/layouts/defaultLayout.jsp 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,22 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
    + + +

    + +

    + +
    + +
    + +
    + +
    Index: lams_tool_mindmap/web/layouts/learningLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/layouts/learningLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/layouts/learningLayout.jsp 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,13 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + Index: lams_tool_mindmap/web/layouts/tabLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/layouts/tabLayout.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/layouts/tabLayout.jsp 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1,18 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
    + + +

    + +

    + +
    + +
    Index: lams_tool_mindmap/web/pages/authoring/advanced.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/authoring/advanced.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/authoring/advanced.jsp 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,51 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +

    + + +

    + +

    + + +

    + + + +

    + + +

    + +

    + +

    + + \ No newline at end of file Index: lams_tool_mindmap/web/pages/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/authoring/authoring.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/authoring/authoring.jsp 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,106 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page import="org.lamsfoundation.lams.tool.mindmap.util.MindmapConstants"%> + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    + + + + +

    + +
    +
    +

    +
    +
    + + + + <%-- Page tabs --%> + + + + + + + +
    +
    + + + Index: lams_tool_mindmap/web/pages/authoring/basic.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/authoring/basic.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/authoring/basic.jsp 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,34 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + message.enableJavaScript +
    +
    Index: lams_tool_mindmap/web/pages/authoring/headItems.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/authoring/headItems.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/authoring/headItems.jsp 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,10 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + Index: lams_tool_mindmap/web/pages/authoring/instructions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/authoring/Attic/instructions.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/authoring/instructions.jsp 3 Apr 2009 00:00:34 -0000 1.1 @@ -0,0 +1,207 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + <%-- Online Instructions --%> + + + + + <%-- Online Attachments --%> + + + + + + + <%-- Online Attachments Upload --%> + + + + + + + + + <%-- Offline Instructions --%> + + + + + + + <%-- Offline Attachments --%> + + + + + + + <%--Offline Attachments Upload --%> + + + + +
    +
    + +
    + +
    +
    +
      + + <%-- Online Saved Files --%> + +
    • + + + + + +   + + + + + +   + + + + +
    • +
      + + <%-- Online Unsaved Files --%> + +
    • + + * + + + + +   + + + + + +   + + + + +
    • +
      + +
    +
    +
    +
    + +
    + + + + + + + +
    +
    +
    +
    + +
    + +
    +
    +
      + + <%-- Offline Saved Attachments --%> + +
    • + + + + + +   + + + + + +   + + + + +
    • +
      + + <%-- Offline Unsaved Attachments --%> + +
    • + + * + + + + +   + + + + + +   + + + + +
    • +
      + +
    +
    +
    +
    + +
    + + + + + + + +
    Index: lams_tool_mindmap/web/pages/authoring/pedagogicalPlannerForm.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/authoring/pedagogicalPlannerForm.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/authoring/pedagogicalPlannerForm.jsp 3 Apr 2009 00:00:35 -0000 1.1 @@ -0,0 +1,36 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + <%@ include file="/common/messages.jsp"%> +

    + + + + + +
    + + + + +
    + +
    Index: lams_tool_mindmap/web/pages/export/exportPortfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/export/Attic/exportPortfolio.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/export/exportPortfolio.jsp 3 Apr 2009 00:00:36 -0000 1.1 @@ -0,0 +1,94 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + <c:out value="${mindmapDTO.title}" escapeXml="false" /> + + + + + + +
    + +

    + +

    + +

    + +

    + + +
    + +
    +
    + + +
    +

    + ${session.sessionName} +

    +

    +   +

    + + + + + + + + + + + +
    + ${user.firstName} ${user.lastName } +
    + + +
    +
    + message.enableJavaScript +
    +
    +
    +
    +
    +
    +
    + + + + + + + + Index: lams_tool_mindmap/web/pages/learning/defineLater.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/learning/defineLater.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/learning/defineLater.jsp 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,11 @@ +<%@ include file="/common/taglibs.jsp"%> + +
    +

    + +

    + +
    + + + Index: lams_tool_mindmap/web/pages/learning/headItems.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/learning/headItems.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/learning/headItems.jsp 3 Apr 2009 00:00:32 -0000 1.1 @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_mindmap/web/pages/learning/mindmap.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/learning/mindmap.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/learning/mindmap.jsp 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,112 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + +
    +

    + ${mindmapDTO.title} +

    + +

    + ${mindmapDTO.instructions} +

    + + +
    + + + + + + + + +
    +
    + +   + + + + + + + + + + + + + + + + + + +
    +
    + message.enableJavaScript +
    +
    + + + +
    + + button.continue + +
    +
    + + +
    + + button.next + +
    +
    +
    + +
    +
    Index: lams_tool_mindmap/web/pages/learning/reflect.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/learning/reflect.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/learning/reflect.jsp 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,43 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +
    +

    + +

    + +

    + +

    + + + + + + + + +

    + +

    +
    +
    + +
    + + + + + + + +
    + +
    +
    + Index: lams_tool_mindmap/web/pages/learning/runOffline.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/learning/Attic/runOffline.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/learning/runOffline.jsp 3 Apr 2009 00:00:31 -0000 1.1 @@ -0,0 +1,31 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +
    +

    + ${mindmapDTO.title} +

    + +

    + +

    + + + + + + +
    + + button.finish + +
    +
    +
    +
    + Index: lams_tool_mindmap/web/pages/monitoring/editActivity.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/editActivity.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/editActivity.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,43 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +

    + +

    +
    + + + + + + + + + + + + +
    + + + +
    + + + +
    + +

    + + + + + + + + +

    + + Index: lams_tool_mindmap/web/pages/monitoring/headItems.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/headItems.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/headItems.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,9 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + Index: lams_tool_mindmap/web/pages/monitoring/instructions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/Attic/instructions.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/instructions.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,95 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    Index: lams_tool_mindmap/web/pages/monitoring/mindmapDisplay.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/mindmapDisplay.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/mindmapDisplay.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,82 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + +
    +

    + ${userDTO.firstName} ${userDTO.lastName} +

    +
    + + +
    + message.enableJavaScript +
    +
    + +
    + + button.back + + + + button.save + +
    + +
    Index: lams_tool_mindmap/web/pages/monitoring/monitoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/monitoring.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/monitoring.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,25 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.mindmap.util.MindmapConstants"%> + + + +
    + + + + + + +
    + + Index: lams_tool_mindmap/web/pages/monitoring/statistics.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/statistics.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/statistics.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,34 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + +
    +

    + ${session.sessionName} +

    +
    + + + + + + + + + + +
    + heading.totalLearnersInGroup + + ${session.numberOfLearners} +
    + heading.totalFinishedLearnersInGroup + + ${session.numberOfFinishedLearners} +
    +
    Index: lams_tool_mindmap/web/pages/monitoring/summary.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/pages/monitoring/summary.jsp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_mindmap/web/pages/monitoring/summary.jsp 3 Apr 2009 00:00:37 -0000 1.1 @@ -0,0 +1,117 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + +

    + + + + + +

    +
    + + + + + + +

    + ${session.sessionName} +

    +
    + + + + + + +
    + + + ${session.numberOfLearners} +
    + + + + + + + + + + + + + + +
    + + + +
    + ${user.firstName} ${user.lastName} + + + + + + + + + + + + +
    +