Index: lams_tool_images/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/.classpath,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/.classpath 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/.cvsignore
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/.cvsignore,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/.cvsignore 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,3 @@
+.myeclipse
+.mymetadata
+build
Index: lams_tool_images/.project
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/.project,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/.project 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,56 @@
+
+
+ lams_tool_images
+
+
+
+
+
+ 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.ast.deploy.core.DeploymentBuilder
+
+
+
+
+ org.springframework.ide.eclipse.beans.core.beansvalidator
+
+
+
+
+
+ org.springframework.ide.eclipse.beans.core.beansnature
+ com.genuitec.eclipse.ast.deploy.core.deploymentnature
+ com.genuitec.eclipse.j2eedt.core.webnature
+ org.eclipse.jdt.core.javanature
+ com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature
+
+
\ No newline at end of file
Index: lams_tool_images/build.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/build.properties,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/build.properties 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,25 @@
+########################################################################################################################
+### BUILD PROPERTIES ###
+### 1) Do *NOT* use backslashes in paths unless you are sure the ANT task treats them properly. ###
+### 2) Use only ant variables (${foo}) that You declared above or make *SURE* You derive them from the right place. ###
+### 3) Comment out boolean style build settings instead of setting false. Set to false may fail. ###
+### 4) Uncommenting the forceClean attribute *WILL* delete your sourcecode to make place for vcs controlled builds. ###
+###
+########################################################################################################################
+
+### project properties ###
+signature=laimag10
+project.displayname = lams imageGallery tool
+weblib=lib
+
+#project version
+tool.version=20081007
+
+# hide tool option
+hideTool=false
+
+# Minimum compatible version
+min.server.version.number=2.0
+
+# Language files package
+language.files.package=org.lamsfoundation.lams.tool.imageGallery
Index: lams_tool_images/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/build.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/build.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,514 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +------------------------------------------+
+ | creating directory structure |
+ +------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+ MINE
+
+
+
+
+ +------------------------------------------+
+ | clean |
+ +------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +------------------------------------------+
+ | generating hibernate metadata |
+ +------------------------------------------+
+
+
+
+ Building hbm.xml files using XDoclet to ${conf.hibernate.mapping.dir} from ${src.java.dir}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +------------------------------------------+
+ | create jar file |
+ +------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +------------------------------------------+
+ | build jar file |
+ +------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +------------------------------------------+
+ | Generate the deployment package. |
+ +------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Deploying the ImageGallery tool
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +------------------------------------------+
+ | built war file |
+ +------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/conf/hibernate/mappings/.cvsignore
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/hibernate/mappings/Attic/.cvsignore,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/hibernate/mappings/.cvsignore 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1 @@
+org
Index: lams_tool_images/conf/hibernate/mappings/hibernate.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/hibernate/mappings/Attic/hibernate.properties,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/hibernate/mappings/hibernate.properties 11 Oct 2008 12:04:14 -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_images/conf/jar/META-INF/MANIFEST.MF
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/jar/META-INF/Attic/MANIFEST.MF,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/jar/META-INF/MANIFEST.MF 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,3 @@
+Implementation-Title: LAMS - ImageGallery Tool
+Implementation-Version: 2.1
+Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org)
Index: lams_tool_images/conf/language/lams/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/language/lams/ApplicationResources.properties,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/language/lams/ApplicationResources.properties 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,180 @@
+appName = shareresources
+#language code: en
+#locale code: AU
+
+ # CVS ID: $Id: ApplicationResources.properties,v 1.1 2008/10/11 12:04:14 andreyb Exp $ Exported from the LAMS Community by Ernie Ghiglione on Wed Aug 27 01:14:27 BST 2008
+
+#=================== labels for ShareResources =================#
+
+activity.description =Sharing resources with others.
+label.authoring.basic.resource.instructions =Instructions
+label.authoring.heading.instructions =Instructions
+label.authoring.heading.instructions.desc =Please input online and offline instructions
+label.authoring.basic.instruction =Instruction
+label.authoring.basic.resource.add.instruction =Add Instruction
+label.authoring.online.instruction =Online Instructions
+label.authoring.offline.instruction =Offline Instructions
+error.resource.item.desc.blank =Comment/Instruction can not be blank
+activity.helptext =Uploading your resources to share with others.
+tool.display.name =Share Resources Tool
+tool.description =Tool for sharing resources.
+appName =Share Resources
+errorPage.title =Error page
+errorPage.heading =Some error occurs when handling your request
+label.authoring.heading =Share Resources
+label.author.title =Share Resources Authoring
+label.authoring.heading.basic =Basic
+label.next.instruction =Next Instruction
+label.authoring.heading.basic.desc =Basic input information for shared resources
+msg.no.instruction =No instruction available.
+label.authoring.heading.advance.desc =Please input advance options for shared resources
+label.authoring.basic.title =Title
+label.learning.comment.or.instruction =Comment/Instruction
+label.authoring.basic.add.url =Add URL
+label.authoring.basic.add.file =Add Single File
+label.authoring.basic.resource.list.title =Resource List
+label.authoring.basic.resource.url =URL
+label.authoring.basic.resource.file =File
+label.authoring.basic.resource.website =Website
+label.authoring.basic.resource.verify.url =Verify URL
+label.authoring.basic.resource.preview =Preview
+label.authoring.basic.resource.edit =Edit
+label.authoring.basic.resource.delete =Delete
+monitoring.tab.instructions =Instruction
+label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions:
+label.authoring.basic.resource.title.input =Title
+label.authoring.basic.resource.url.input =URL
+label.authoring.basic.resource.file.input =File
+label.authoring.basic.resource.description.input =Description
+label.authoring.basic.resource.zip.file.input =Zip file:
+label.authoring.online.file =Upload online file
+label.authoring.offline.file =Upload offline file
+label.authoring.choosefile.button =Choose file
+label.authoring.upload.online.button =Upload Online
+label.authoring.upload.offline.button =Upload Offline
+label.authoring.online.filelist =Online file list
+label.authoring.offline.filelist =Offline file list
+label.authoring.online.delete =Delete
+label.authoring.offline.delete =Delete
+label.authoring.advance.mini.number.resources.view =Minimum number of resources to view
+label.authoring.advance.allow.learner.add.urls =Allow learners to add URLs
+label.authoring.advance.allow.learner.add.files =Allow learners to add Files
+label.authoring.cancel.button =Cancel
+label.description =Description:
+authoring.exception =There is a problem in shared resources authoring page, the reason is {0}
+error.resource.item.title.blank =Title can not be blank.
+error.resource.item.url.blank =URL can not be blank.
+error.resource.item.file.blank =File can not be blank.
+error.resource.item.invalid.url =Invalid URL format.
+error.upload.failed =Upload file failed: {0}
+error.msg.upload.file.not.found =Could not find upload file {0}.
+error.msg.zip.file.exception =Could not handle zip file when uploading file.
+error.msg.file.not.found =File not found exception occurs when uploading file.
+error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file.
+error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html).
+error.msg.io.exception =IOException occurs when uploading file.
+error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File.
+error.msg.default.content.not.find =Could not retrieve default content record for this tool.
+authoring.msg.cancel.save =Do you want to close this window without saving?
+label.learning.title =Share Resource Learning
+label.learning.heading =Share Resources
+label.resoruce.to.review =Resources to view
+label.learning.minimum.review =You must view at least {0} of the resources.
+label.check.for.new =Check for new
+label.suggest.new =Suggest a new
+label.learning.new.file =New file details:
+label.learning.new.url =New URL details:
+monitoring.tab.summary =Summary
+monitoring.tab.statistics =Statistic
+monitoring.tab.edit.activity =Edit Activity
+monitoring.label.group =Group
+monitoring.summary.note =Note: number of learners is the number of learners who have viewed the resource.
+monitoring.label.type =Type
+monitoring.label.title =Title
+monitoring.label.suggest =Suggested By
+monitoring.label.number.learners =Number of Learners
+monitoring.label.hide =Hide
+monitoring.label.show =Show
+monitoring.label.user.loginname =Login name
+monitoring.label.user.name =Name
+monitoring.label.hidden =Hidden
+label.monitoring.edit.activity.cancel =Cancel
+label.monitoring.edit.activity.update =Update
+label.monitoring.edit.activity.edit =Edit
+message.monitoring.edit.activity.not.editable =This Activity is no longer editable
+export.label.resource =Resource
+export.label.no.learning.object =No offline package available
+export.title =Export portfolio of Share Resource
+export.init.resource =Initial Resources
+errors.header =
+errors.footer =
+error.valueReqd =Value Required
+error.inputFileTooLarge =Input File size is too large!
+error.uploading =error uploading
+error.title.empty =Title can not be blank
+message.msg.maxFileSize =Max 250K
+label.open =Open
+label.delete =Delete
+label.download =Download
+label.view =View
+label.edit =Edit
+label.completed =Completed
+button.upload =Upload
+button.add =Add
+button.cancel =Cancel
+message.monitoring.summary.no.session =No Session Available
+label.show =Show
+label.hide =Hide
+label.save =Save
+label.cancel =Cancel
+define.later.message =Please wait for the teacher to complete the contents of this activity.
+run.offline.message =This activity is not being done on the computer. Please see your instructor for details.
+message.monitoring.summary.no.resource.for.group =No resource available for this group.
+button.try.again =Try again
+open.in.new.window =Open URL in pop-up
+page.title.monitoring.view.reflection =View Notebook Entries
+button.edit =Edit
+message.no.reflection.available =No notebook available
+error.reflection.emtpy =Please input Notebook Entry
+title.reflection =Notebook Entry
+monitoring.user.reflection =Notebook Entry
+activity.title =Image Gallery
+label.authoring.save.button =Save
+monitoring.label.access.time =Access time
+label.authoring.advance.lock.on.finished =Lock when finished
+label.authoring.heading.advance =Advanced
+label.authoring.basic.add.learning.object =Add IMS Content Package
+label.authoring.basic.add.website =Add Zipped Website
+label.authoring.basic.resource.learning.object =IMS CP
+error.msg.ims.package =Invalid IMS CP format.
+message.step.of =Step {0} of {1}
+label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource)
+label.up =Move Up
+label.down =Move down
+label.continue =Continue
+monitoring.user.fullname =Name
+button.close =Close
+label.monitoring.heading.access =Learners list
+errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes
+error.attachment.executable =The uploaded file is executable, please zip it before uploading.
+lable.learning.minimum.view.number.less =You must view at least another {0} of the resources.
+label.finished =Next Activity
+label.finish =Finished
+error.msg.repository =A repository error occurred while trying to upload the file.
+message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information.
+monitoring.label.attachments =Attachments
+message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it.
+label.export.reflection =Notebook Entries
+message.warnLockOnFinish =Note: After you click on \u201cNext Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources.
+monitoring.label.instructions =Instructions
+label.on =On
+label.off =Off
+monitor.summary.th.advancedSettings =Advanced Settings
+monitor.summary.td.addNotebook =Add Notebook at end of Shared Resources
+monitor.summary.td.notebookInstructions =Notebook instructions
+
+label.authoring.advanced.notify.onassigmentsubmit=Notify monitoring teachers when a learner submits an assigment
+event.assigment.submit.subject=LAMS: A learner submitted an assigment in a Shared Resources tool
+event.assigment.submit.body=The learner {0} submitted an assigment in a Shared Resources tool.\n\nThis message was send automatically, following tool's advanced settings.
+
+#======= End labels: Exported 166 labels for en AU =====
Index: lams_tool_images/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/language/lams/ApplicationResources_en_AU.properties,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/language/lams/ApplicationResources_en_AU.properties 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,183 @@
+appName = shareresources
+#language code: en
+#locale code: AU
+
+ # CVS ID: $Id: ApplicationResources_en_AU.properties,v 1.1 2008/10/11 12:04:14 andreyb Exp $ Exported from the LAMS Community by Ernie Ghiglione on Wed Aug 27 01:14:27 BST 2008
+
+#=================== labels for ShareResources =================#
+
+activity.description =Sharing resources with others.
+label.authoring.basic.resource.instructions =Instructions
+label.authoring.heading.instructions =Instructions
+label.authoring.heading.instructions.desc =Please input online and offline instructions
+label.authoring.basic.instruction =Instruction
+label.authoring.basic.resource.add.instruction =Add Instruction
+label.authoring.online.instruction =Online Instructions
+label.authoring.offline.instruction =Offline Instructions
+error.resource.item.desc.blank =Comment/Instruction can not be blank
+activity.helptext =Uploading your resources to share with others.
+tool.display.name =Share Resources Tool
+tool.description =Tool for sharing resources.
+appName =Share Resources
+errorPage.title =Error page
+errorPage.heading =Some error occurs when handling your request
+label.authoring.heading =Share Resources
+label.author.title =Share Resources Authoring
+label.authoring.heading.basic =Basic
+label.next.instruction =Next Instruction
+label.authoring.heading.basic.desc =Basic input information for shared resources
+msg.no.instruction =No instruction available.
+label.authoring.heading.advance.desc =Please input advance options for shared resources
+label.authoring.basic.title =Title
+label.learning.comment.or.instruction =Comment/Instruction
+label.authoring.basic.add.url =Add URL
+label.authoring.basic.add.image =Add Image
+label.authoring.basic.image.list =Image List
+label.authoring.basic.resource.url =URL
+label.authoring.basic.resource.image =Image
+label.authoring.basic.resource.website =Website
+label.authoring.basic.resource.verify.url =Verify URL
+label.authoring.basic.resource.preview =Preview
+label.authoring.basic.resource.edit =Edit
+label.authoring.basic.resource.delete =Delete
+monitoring.tab.instructions =Instruction
+label.authoring.advanced.reflectOnActivity =Add Notebook at end of Image Gallery with the following instructions:
+label.authoring.basic.resource.title.input =Title
+label.authoring.basic.resource.url.input =URL
+label.authoring.basic.resource.file.input =File
+label.authoring.basic.resource.description.input =Description
+label.authoring.basic.resource.zip.file.input =Zip file:
+label.authoring.online.file =Upload online file
+label.authoring.offline.file =Upload offline file
+label.authoring.choosefile.button =Choose file
+label.authoring.upload.online.button =Upload Online
+label.authoring.upload.offline.button =Upload Offline
+label.authoring.online.filelist =Online file list
+label.authoring.offline.filelist =Offline file list
+label.authoring.online.delete =Delete
+label.authoring.offline.delete =Delete
+label.authoring.advance.number.columns =Columns to display images
+label.authoring.advance.allow.learner.share.images =Allow learners to share their images
+label.authoring.advance.allow.learner.comment.images =Allow learners to comment on images
+label.authoring.advance.allow.learner.vote =Allow learners to vote for their favorite images
+label.authoring.advance.allow.learner.rank =Allow learners to rank the images
+label.authoring.cancel.button =Cancel
+label.authoring.up =Move Up
+label.authoring.down =Move down
+label.authoring.image =Image
+label.description =Description:
+authoring.exception =There is a problem in shared resources authoring page, the reason is {0}
+error.resource.item.title.blank =Title can not be blank.
+error.resource.image.not.alowed.format =Allowed file formats: gif, png, jpg
+error.resource.item.url.blank =URL can not be blank.
+error.resource.item.file.blank =File can not be blank.
+error.resource.item.invalid.url =Invalid URL format.
+error.upload.failed =Upload file failed: {0}
+error.msg.upload.file.not.found =Could not find upload file {0}.
+error.msg.zip.file.exception =Could not handle zip file when uploading file.
+error.msg.file.not.found =File not found exception occurs when uploading file.
+error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file.
+error.msg.io.exception =IOException occurs when uploading file.
+error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File.
+error.msg.default.content.not.find =Could not retrieve default content record for this tool.
+authoring.msg.cancel.save =Do you want to close this window without saving?
+label.learning.title =Share Resource Learning
+label.learning.heading =Share Resources
+label.resoruce.to.review =Resources to view
+label.learning.minimum.review =You must view at least {0} of the resources.
+label.check.for.new =Check for new
+label.suggest.new =Suggest a new
+label.learning.new.file =New file details:
+label.learning.new.url =New URL details:
+monitoring.tab.summary =Summary
+monitoring.tab.statistics =Statistic
+monitoring.tab.edit.activity =Edit Activity
+monitoring.label.group =Group
+monitoring.summary.note =Note: number of learners is the number of learners who have viewed the resource.
+monitoring.label.type =Type
+monitoring.label.title =Title
+monitoring.label.suggest =Suggested By
+monitoring.label.number.learners =Number of Learners
+monitoring.label.hide =Hide
+monitoring.label.show =Show
+monitoring.label.user.loginname =Login name
+monitoring.label.user.name =Name
+monitoring.label.hidden =Hidden
+label.monitoring.edit.activity.cancel =Cancel
+label.monitoring.edit.activity.update =Update
+label.monitoring.edit.activity.edit =Edit
+message.monitoring.edit.activity.not.editable =This Activity is no longer editable
+export.label.resource =Resource
+export.label.no.learning.object =No offline package available
+export.title =Export portfolio of Share Resource
+export.init.resource =Initial Resources
+errors.header =
+errors.footer =
+error.valueReqd =Value Required
+error.inputFileTooLarge =Input File size is too large!
+error.uploading =error uploading
+error.title.empty =Title can not be blank
+message.msg.maxFileSize =Max 250K
+label.open =Open
+label.delete =Delete
+label.download =Download
+label.view =View
+label.edit =Edit
+label.completed =Completed
+button.upload =Upload
+button.add =Add
+button.cancel =Cancel
+message.monitoring.summary.no.session =No Session Available
+label.show =Show
+label.hide =Hide
+label.save =Save
+label.cancel =Cancel
+define.later.message =Please wait for the teacher to complete the contents of this activity.
+run.offline.message =This activity is not being done on the computer. Please see your instructor for details.
+message.monitoring.summary.no.resource.for.group =No resource available for this group.
+button.try.again =Try again
+open.in.new.window =Open URL in pop-up
+page.title.monitoring.view.reflection =View Notebook Entries
+button.edit =Edit
+message.no.reflection.available =No notebook available
+error.reflection.emtpy =Please input Notebook Entry
+title.reflection =Notebook Entry
+monitoring.user.reflection =Notebook Entry
+activity.title =Image Gallery
+label.authoring.save.button =Save
+monitoring.label.access.time =Access time
+label.authoring.advance.lock.on.finished =Lock when finished
+label.authoring.heading.advance =Advanced
+label.authoring.basic.add.learning.object =Add IMS Content Package
+label.authoring.basic.add.website =Add Zipped Website
+label.authoring.basic.resource.learning.object =IMS CP
+error.msg.ims.package =Invalid IMS CP format.
+message.step.of =Step {0} of {1}
+label.up =Move Up
+label.down =Move down
+label.continue =Continue
+monitoring.user.fullname =Name
+button.close =Close
+label.monitoring.heading.access =Learners list
+errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes
+error.attachment.executable =The uploaded file is executable, please zip it before uploading.
+lable.learning.minimum.view.number.less =You must view at least another {0} of the resources.
+label.finished =Next Activity
+label.finish =Finished
+error.msg.repository =A repository error occurred while trying to upload the file.
+message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information.
+monitoring.label.attachments =Attachments
+message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it.
+label.export.reflection =Notebook Entries
+message.warnLockOnFinish =Note: After you click on \u201cNext Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources.
+monitoring.label.instructions =Instructions
+label.on =On
+label.off =Off
+monitor.summary.th.advancedSettings =Advanced Settings
+monitor.summary.td.addNotebook =Add Notebook at end of Image Gallery
+monitor.summary.td.notebookInstructions =Notebook instructions
+
+event.assigment.submit.subject=LAMS: A learner submitted an assigment in a Shared Resources tool
+event.assigment.submit.body=The learner {0} submitted an assigment in a Shared Resources tool.\n\nThis message was send automatically, following tool's advanced settings.
+
+#======= End labels: Exported 166 labels for en AU =====
Index: lams_tool_images/conf/language/rams/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/language/rams/Attic/ApplicationResources.properties,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/language/rams/ApplicationResources.properties 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,171 @@
+appName = shareresources
+#language code: en
+#locale code: AU
+
+ # CVS ID: $Id: ApplicationResources.properties,v 1.1 2008/10/11 12:04:14 andreyb Exp $ Exported from the RAMS Community by Ernie Ghiglione on Tue Aug 12 12:00:29 EST 2008
+
+#=================== labels for ShareResources =================#
+
+appName =Share Resources
+activity.title =Image Gallery
+activity.description =Sharing resource with others.
+activity.helptext =Uploading your resources to share with others.
+tool.display.name =Share Resources Tool
+tool.description =Tool for sharing resources.
+errorPage.title =Error page
+errorPage.heading =Some error occurs when handling your request
+label.authoring.heading =Share Resources
+label.author.title =Share Resources Authoring
+label.authoring.heading.basic =Basic
+label.authoring.heading.advance =Advanced
+label.authoring.heading.instructions =Instructions
+label.authoring.heading.basic.desc =Basic input information for shared resources
+label.authoring.heading.instructions.desc =Please input online and offline instructions
+label.authoring.heading.advance.desc =Please input advance options for shared resources
+label.authoring.basic.title =Title
+label.authoring.basic.instruction =Instruction
+label.authoring.basic.add.url =Add URL
+label.authoring.basic.add.file =Add Single File
+label.authoring.basic.add.website =Add Zipped Website
+label.authoring.basic.add.learning.object =Add IMS Content Package
+label.authoring.basic.resource.list.title =Resource List
+label.authoring.basic.resource.url =URL
+label.authoring.basic.resource.file =File
+label.authoring.basic.resource.website =Website
+label.authoring.basic.resource.learning.object =IMS CP
+label.authoring.basic.resource.verify.url =Verify URL
+label.authoring.basic.resource.preview =Preview
+label.authoring.basic.resource.edit =Edit
+label.authoring.basic.resource.delete =Delete
+label.authoring.basic.resource.add.instruction =Add Instruction
+label.authoring.basic.resource.instructions =Instructions
+label.authoring.basic.resource.title.input =Title
+label.authoring.basic.resource.url.input =URL
+label.authoring.basic.resource.file.input =File
+label.authoring.basic.resource.description.input =Description
+label.authoring.basic.resource.zip.file.input =Zip file:
+label.authoring.online.instruction =Online Instructions
+label.authoring.offline.instruction =Offline Instructions
+label.authoring.online.file =Upload online file
+label.authoring.offline.file =Upload offline file
+label.authoring.choosefile.button =Choose file
+label.authoring.upload.online.button =Upload Online
+label.authoring.upload.offline.button =Upload Offline
+label.authoring.online.filelist =Online file list
+label.authoring.offline.filelist =Offline file list
+label.authoring.online.delete =Delete
+label.authoring.offline.delete =Delete
+label.authoring.advance.lock.on.finished =Lock when finished
+label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource)
+label.authoring.advance.mini.number.resources.view =Minimum number of resources to view
+label.authoring.advance.allow.learner.add.urls =Allow participants to add URLs
+label.authoring.advance.allow.learner.add.files =Allow participants to add Files
+label.next.instruction =Next Instruction
+label.authoring.save.button =Save
+label.authoring.cancel.button =Cancel
+label.description =Description:
+authoring.exception =There is a problem in shared resources authoring page, the reason is {0}
+error.resource.item.title.blank =Title can not be blank.
+error.resource.item.url.blank =URL can not be blank.
+error.resource.item.file.blank =File can not be blank.
+error.resource.item.desc.blank =Comment/Instruction can not be blank
+error.resource.item.invalid.url =Invalid URL format.
+error.upload.failed =Upload file failed: {0}
+error.msg.upload.file.not.found =Could not find upload file {0}.
+error.msg.zip.file.exception =Could not handle zip file when uploading file.
+error.msg.file.not.found =File not found exception occurs when uploading file.
+error.msg.ims.package =Invalid IMS CP format.
+error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file.
+error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html).
+error.msg.io.exception =IOException occurs when uploading file.
+error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File.
+error.msg.repository =Repository occurs exception while trying to upload file.
+error.msg.default.content.not.find =Could not retrieve default content record for this tool.
+msg.no.instruction =No instruction available.
+authoring.msg.cancel.save =Do you want to close this window without saving?
+label.learning.title =Share Resource
+label.learning.heading =Share Resources
+label.resoruce.to.review =Resources to view
+label.learning.minimum.review =You must view at least {0} of the resources.
+lable.learning.minimum.view.number.less =You at least view another {0} of the resources.
+label.check.for.new =Check for new
+label.suggest.new =Suggest a new
+label.learning.new.file =New file details:
+label.learning.new.url =New URL details:
+label.learning.comment.or.instruction =Comment/Instruction
+monitoring.tab.summary =Summary
+monitoring.tab.statistics =Statistic
+monitoring.tab.instructions =Instruction
+monitoring.tab.edit.activity =Edit Activity
+monitoring.label.group =Group
+monitoring.summary.note =Note: number of participants is the number of participants who have viewed the resource.
+monitoring.label.type =Type
+monitoring.label.title =Title
+monitoring.label.suggest =Suggested By
+monitoring.label.number.learners =Number of Participants
+monitoring.label.hide =Hide
+monitoring.label.show =Show
+monitoring.label.user.loginname =Login name
+monitoring.label.user.name =Name
+monitoring.label.hidden =Hidden
+label.monitoring.edit.activity.cancel =Cancel
+label.monitoring.edit.activity.update =Update
+label.monitoring.edit.activity.edit =Edit
+message.monitoring.edit.activity.not.editable =This Activity is no longer editable
+export.label.resource =Resource
+export.label.no.learning.object =No offline package available
+export.title =Export portfolio of Share Resource
+export.init.resource =Initial Resources
+errors.header =
+errors.footer =
+error.valueReqd =Value Required
+error.inputFileTooLarge =Input File size is too large!
+error.uploading =error uploading
+error.title.empty =Title can not be blank
+message.msg.maxFileSize =Max 250K
+label.open =Open
+label.delete =Delete
+label.download =Download
+label.view =View
+label.edit =Edit
+label.finished =Finished
+label.completed =Completed
+label.finish =Finish
+button.upload =Upload
+button.add =Add
+button.cancel =Cancel
+message.monitoring.summary.no.session =No Session Available
+label.show =Show
+label.hide =Hide
+label.save =Save
+label.cancel =Cancel
+monitoring.label.access.time =Access time
+define.later.message =Please wait for the researcher to complete the contents of this activity.
+run.offline.message =This activity is not being done on the computer. Please see your instructor for details.
+message.monitoring.summary.no.resource.for.group =No resource available for this group.
+button.try.again =Try again
+open.in.new.window =Open URL in pop-up
+label.up =Move Up
+label.down =Move down
+label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions:
+error.reflection.emtpy =Please input reflection
+title.reflection =Reflection
+label.continue =Continue
+monitoring.user.fullname =Name
+monitoring.user.reflection =Reflection
+page.title.monitoring.view.reflection =View Reflection
+button.close =Close
+message.step.of =Step {0} of {1}
+message.no.reflection.available =No notebook available
+button.edit =Edit
+errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes
+error.attachment.executable =The uploaded file is executable, please zip it before uploading.
+label.monitoring.heading.access =Participants list
+message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information.
+label.export.reflection =Notebook Entries
+monitoring.label.attachments =Attachments
+message.activityLocked =Note: After you click on "Next Activity" and you come back to this Share Resources, you won't be able to continue.
+message.warnLockOnFinish =This activitiy has been setup not to allow sharing and viewing of resources after it has been finished.
+
+
+#======= End labels: Exported 160 labels for en AU =====
Index: lams_tool_images/conf/language/rams/ApplicationResources_en_AU.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/language/rams/Attic/ApplicationResources_en_AU.properties,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/language/rams/ApplicationResources_en_AU.properties 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,171 @@
+appName = shareresources
+#language code: en
+#locale code: AU
+
+ # CVS ID: $Id: ApplicationResources_en_AU.properties,v 1.1 2008/10/11 12:04:14 andreyb Exp $ Exported from the RAMS Community by Ernie Ghiglione on Tue Aug 12 12:00:29 EST 2008
+
+#=================== labels for ShareResources =================#
+
+appName =Share Resources
+activity.title =Image Gallery
+activity.description =Sharing resource with others.
+activity.helptext =Uploading your resources to share with others.
+tool.display.name =Share Resources Tool
+tool.description =Tool for sharing resources.
+errorPage.title =Error page
+errorPage.heading =Some error occurs when handling your request
+label.authoring.heading =Share Resources
+label.author.title =Share Resources Authoring
+label.authoring.heading.basic =Basic
+label.authoring.heading.advance =Advanced
+label.authoring.heading.instructions =Instructions
+label.authoring.heading.basic.desc =Basic input information for shared resources
+label.authoring.heading.instructions.desc =Please input online and offline instructions
+label.authoring.heading.advance.desc =Please input advance options for shared resources
+label.authoring.basic.title =Title
+label.authoring.basic.instruction =Instruction
+label.authoring.basic.add.url =Add URL
+label.authoring.basic.add.file =Add Single File
+label.authoring.basic.add.website =Add Zipped Website
+label.authoring.basic.add.learning.object =Add IMS Content Package
+label.authoring.basic.resource.list.title =Resource List
+label.authoring.basic.resource.url =URL
+label.authoring.basic.resource.file =File
+label.authoring.basic.resource.website =Website
+label.authoring.basic.resource.learning.object =IMS CP
+label.authoring.basic.resource.verify.url =Verify URL
+label.authoring.basic.resource.preview =Preview
+label.authoring.basic.resource.edit =Edit
+label.authoring.basic.resource.delete =Delete
+label.authoring.basic.resource.add.instruction =Add Instruction
+label.authoring.basic.resource.instructions =Instructions
+label.authoring.basic.resource.title.input =Title
+label.authoring.basic.resource.url.input =URL
+label.authoring.basic.resource.file.input =File
+label.authoring.basic.resource.description.input =Description
+label.authoring.basic.resource.zip.file.input =Zip file:
+label.authoring.online.instruction =Online Instructions
+label.authoring.offline.instruction =Offline Instructions
+label.authoring.online.file =Upload online file
+label.authoring.offline.file =Upload offline file
+label.authoring.choosefile.button =Choose file
+label.authoring.upload.online.button =Upload Online
+label.authoring.upload.offline.button =Upload Offline
+label.authoring.online.filelist =Online file list
+label.authoring.offline.filelist =Offline file list
+label.authoring.online.delete =Delete
+label.authoring.offline.delete =Delete
+label.authoring.advance.lock.on.finished =Lock when finished
+label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource)
+label.authoring.advance.mini.number.resources.view =Minimum number of resources to view
+label.authoring.advance.allow.learner.add.urls =Allow participants to add URLs
+label.authoring.advance.allow.learner.add.files =Allow participants to add Files
+label.next.instruction =Next Instruction
+label.authoring.save.button =Save
+label.authoring.cancel.button =Cancel
+label.description =Description:
+authoring.exception =There is a problem in shared resources authoring page, the reason is {0}
+error.resource.item.title.blank =Title can not be blank.
+error.resource.item.url.blank =URL can not be blank.
+error.resource.item.file.blank =File can not be blank.
+error.resource.item.desc.blank =Comment/Instruction can not be blank
+error.resource.item.invalid.url =Invalid URL format.
+error.upload.failed =Upload file failed: {0}
+error.msg.upload.file.not.found =Could not find upload file {0}.
+error.msg.zip.file.exception =Could not handle zip file when uploading file.
+error.msg.file.not.found =File not found exception occurs when uploading file.
+error.msg.ims.package =Invalid IMS CP format.
+error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file.
+error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html).
+error.msg.io.exception =IOException occurs when uploading file.
+error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File.
+error.msg.repository =Repository occurs exception while trying to upload file.
+error.msg.default.content.not.find =Could not retrieve default content record for this tool.
+msg.no.instruction =No instruction available.
+authoring.msg.cancel.save =Do you want to close this window without saving?
+label.learning.title =Share Resource
+label.learning.heading =Share Resources
+label.resoruce.to.review =Resources to view
+label.learning.minimum.review =You must view at least {0} of the resources.
+lable.learning.minimum.view.number.less =You at least view another {0} of the resources.
+label.check.for.new =Check for new
+label.suggest.new =Suggest a new
+label.learning.new.file =New file details:
+label.learning.new.url =New URL details:
+label.learning.comment.or.instruction =Comment/Instruction
+monitoring.tab.summary =Summary
+monitoring.tab.statistics =Statistic
+monitoring.tab.instructions =Instruction
+monitoring.tab.edit.activity =Edit Activity
+monitoring.label.group =Group
+monitoring.summary.note =Note: number of participants is the number of participants who have viewed the resource.
+monitoring.label.type =Type
+monitoring.label.title =Title
+monitoring.label.suggest =Suggested By
+monitoring.label.number.learners =Number of Participants
+monitoring.label.hide =Hide
+monitoring.label.show =Show
+monitoring.label.user.loginname =Login name
+monitoring.label.user.name =Name
+monitoring.label.hidden =Hidden
+label.monitoring.edit.activity.cancel =Cancel
+label.monitoring.edit.activity.update =Update
+label.monitoring.edit.activity.edit =Edit
+message.monitoring.edit.activity.not.editable =This Activity is no longer editable
+export.label.resource =Resource
+export.label.no.learning.object =No offline package available
+export.title =Export portfolio of Share Resource
+export.init.resource =Initial Resources
+errors.header =
+errors.footer =
+error.valueReqd =Value Required
+error.inputFileTooLarge =Input File size is too large!
+error.uploading =error uploading
+error.title.empty =Title can not be blank
+message.msg.maxFileSize =Max 250K
+label.open =Open
+label.delete =Delete
+label.download =Download
+label.view =View
+label.edit =Edit
+label.finished =Finished
+label.completed =Completed
+label.finish =Finish
+button.upload =Upload
+button.add =Add
+button.cancel =Cancel
+message.monitoring.summary.no.session =No Session Available
+label.show =Show
+label.hide =Hide
+label.save =Save
+label.cancel =Cancel
+monitoring.label.access.time =Access time
+define.later.message =Please wait for the researcher to complete the contents of this activity.
+run.offline.message =This activity is not being done on the computer. Please see your instructor for details.
+message.monitoring.summary.no.resource.for.group =No resource available for this group.
+button.try.again =Try again
+open.in.new.window =Open URL in pop-up
+label.up =Move Up
+label.down =Move down
+label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions:
+error.reflection.emtpy =Please input reflection
+title.reflection =Reflection
+label.continue =Continue
+monitoring.user.fullname =Name
+monitoring.user.reflection =Reflection
+page.title.monitoring.view.reflection =View Reflection
+button.close =Close
+message.step.of =Step {0} of {1}
+message.no.reflection.available =No notebook available
+button.edit =Edit
+errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes
+error.attachment.executable =The uploaded file is executable, please zip it before uploading.
+label.monitoring.heading.access =Participants list
+message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information.
+label.export.reflection =Notebook Entries
+monitoring.label.attachments =Attachments
+message.activityLocked =Note: After you click on "Next Activity" and you come back to this Share Resources, you won't be able to continue.
+message.warnLockOnFinish =This activitiy has been setup not to allow sharing and viewing of resources after it has been finished.
+
+
+#======= End labels: Exported 160 labels for en AU =====
Index: lams_tool_images/conf/war/META-INF/MANIFEST.MF
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/war/META-INF/Attic/MANIFEST.MF,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/war/META-INF/MANIFEST.MF 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,4 @@
+Implementation-Title: LAMS - ImageGallery Tool
+Implementation-Version: 2.1
+Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org)
+Class-Path: ./lams.jar ./lams-tool-laimag10.jar ./lams-contentrepository.jar
Index: lams_tool_images/conf/xdoclet/global-exceptions.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/global-exceptions.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/global-exceptions.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,8 @@
+
+
+
Index: lams_tool_images/conf/xdoclet/global-forwards.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/global-forwards.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/global-forwards.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,6 @@
+
+
+
+
+
+
Index: lams_tool_images/conf/xdoclet/struts-actions.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/struts-actions.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/struts-actions.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,240 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/conf/xdoclet/struts-forms.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/struts-forms.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/struts-forms.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1 @@
+
Index: lams_tool_images/conf/xdoclet/struts-message-resources.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/struts-message-resources.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/struts-message-resources.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1 @@
+
Index: lams_tool_images/conf/xdoclet/struts-plugins.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/struts-plugins.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/struts-plugins.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
Index: lams_tool_images/conf/xdoclet/validation-forms.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/validation-forms.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/validation-forms.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,29 @@
+
Index: lams_tool_images/conf/xdoclet/validation-global.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/conf/xdoclet/validation-global.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/conf/xdoclet/validation-global.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,6 @@
+
+
+ datePattern
+ yyyy-MM-dd
+
+
Index: lams_tool_images/db/model/imageGallery.clay
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/model/imageGallery.clay,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/model/imageGallery.clay 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,873 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/db/sql/activity_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/activity_insert.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/activity_insert.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,82 @@
+# Connection: ROOT LOCAL
+# Host: localhost
+# Saved: 2005-04-07 11:08:32
+#
+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
+, 'ImageGallery'
+, 'ImageGallery'
+, 'Put some help text here.'
+, NULL
+, NULL
+, NULL
+, NULL
+, 1
+, 2
+, 0
+, NULL
+, NULL
+, NULL
+, 0
+, NULL
+, ${learning_library_id}
+, NOW()
+, 0
+, NULL
+, NULL
+, NULL
+, ${tool_id}
+, NULL
+, 4
+, NULL
+, NULL
+, NULL
+, NULL
+, NULL
+, NULL
+, 'tool/laimag10/images/icon_imageGallery.swf'
+, NULL
+, NULL
+, NULL
+, 'org.lamsfoundation.lams.tool.imageGallery.ApplicationResources'
+)
Index: lams_tool_images/db/sql/create_lams_tool_imageGallery.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/create_lams_tool_imageGallery.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/create_lams_tool_imageGallery.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,112 @@
+SET FOREIGN_KEY_CHECKS=0;
+drop table if exists tl_laimag10_attachment;
+drop table if exists tl_laimag10_imageGallery;
+drop table if exists tl_laimag10_imageGallery_item;
+drop table if exists tl_laimag10_imageGallery_item_visit_log;
+drop table if exists tl_laimag10_session;
+drop table if exists tl_laimag10_user;
+create table tl_laimag10_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,
+ imageGallery_uid bigint,
+ primary key (uid)
+)type=innodb;
+create table tl_laimag10_imageGallery (
+ uid bigint not null auto_increment,
+ create_date datetime,
+ update_date datetime,
+ create_by bigint,
+ title varchar(255),
+ run_offline tinyint,
+ lock_on_finished tinyint,
+ instructions text,
+ next_image_title bigint,
+ online_instructions text,
+ offline_instructions text,
+ content_in_use tinyint,
+ define_later tinyint,
+ content_id bigint unique,
+ allow_comment_images tinyint,
+ allow_share_images tinyint,
+ number_columns integer DEFAULT 3,
+ allow_vote tinyint,
+ reflect_instructions varchar(255),
+ reflect_on_activity smallint,
+ allow_rank tinyint,
+ primary key (uid)
+)type=innodb;
+create table tl_laimag10_imageGallery_item (
+ uid bigint not null auto_increment,
+ file_uuid bigint,
+ file_version_id bigint,
+ description varchar(255),
+ title varchar(255),
+ url text,
+ create_by bigint,
+ create_date datetime,
+ create_by_author tinyint,
+ sequence_id integer,
+ is_hide tinyint,
+ file_type varchar(255),
+ file_name varchar(255),
+ open_url_new_window tinyint,
+ imageGallery_uid bigint,
+ session_uid bigint,
+ primary key (uid)
+)type=innodb;
+create table tl_laimag10_item_log (
+ uid bigint not null auto_increment,
+ access_date datetime,
+ imageGallery_item_uid bigint,
+ user_uid bigint,
+ complete tinyint,
+ session_id bigint,
+ primary key (uid)
+)type=innodb;
+create table tl_laimag10_session (
+ uid bigint not null auto_increment,
+ session_end_date datetime,
+ session_start_date datetime,
+ status integer,
+ imageGallery_uid bigint,
+ session_id bigint,
+ session_name varchar(250),
+ primary key (uid)
+)type=innodb;
+create table tl_laimag10_user (
+ uid bigint not null auto_increment,
+ user_id bigint,
+ last_name varchar(255),
+ first_name varchar(255),
+ login_name varchar(255),
+ session_finished smallint,
+ session_uid bigint,
+ imageGallery_uid bigint,
+ primary key (uid)
+)type=innodb;
+alter table tl_laimag10_attachment add index FK_NEW_1821149711_1E7009430E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_1E7009430E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_imageGallery add index FK_NEW_1821149711_89093BF758092FB (create_by), add constraint FK_NEW_1821149711_89093BF758092FB foreign key (create_by) references tl_laimag10_user (uid);
+alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F93758092FB (create_by), add constraint FK_NEW_1821149711_F52D1F93758092FB foreign key (create_by) references tl_laimag10_user (uid);
+alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F9330E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_F52D1F9330E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F93EC0D3147 (session_uid), add constraint FK_NEW_1821149711_F52D1F93EC0D3147 foreign key (session_uid) references tl_laimag10_session (uid);
+alter table tl_laimag10_item_log add index FK_NEW_1821149711_693580A438BF8DFE (imageGallery_item_uid), add constraint FK_NEW_1821149711_693580A438BF8DFE foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid);
+alter table tl_laimag10_item_log add index FK_NEW_1821149711_693580A441F9365D (user_uid), add constraint FK_NEW_1821149711_693580A441F9365D foreign key (user_uid) references tl_laimag10_user (uid);
+alter table tl_laimag10_session add index FK_NEW_1821149711_24AA78C530E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_24AA78C530E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1821149711_30113BFCEC0D3147 foreign key (session_uid) references tl_laimag10_session (uid);
+alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFC309ED320 (imageGallery_uid), add constraint FK_NEW_1821149711_30113BFC309ED320 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+
+
+
+INSERT INTO `tl_laimag10_imageGallery` (`uid`, `create_date`, `update_date`, `create_by`, `title`, `run_offline`, `lock_on_finished`,
+ `instructions`, `next_image_title`, `online_instructions`, `offline_instructions`, `content_in_use`, `define_later`, `content_id`, `allow_comment_images`,
+ `allow_share_images`, `allow_vote`, `allow_rank`, `reflect_on_activity`) VALUES
+ (1,NULL,NULL,NULL,'ImageGallery','0','0','Instructions ',1,null,null,0,0,${default_content_id},0,0,0,0,0);
+
+INSERT INTO `tl_laimag10_imageGallery_item` (`uid`, `file_uuid`, `file_version_id`, `description`, `title`, `url`, `create_by`, `create_date`, `create_by_author`, `sequence_id`, `is_hide`, `file_type`, `file_name`, `open_url_new_window`, `imageGallery_uid`, `session_uid`) VALUES
+ (1,NULL,NULL,NULL,'Web Search','http://www.google.com ',null,NOW(),1,1,0,NULL,NULL,0,1,NULL);
+
+SET FOREIGN_KEY_CHECKS=1;
Index: lams_tool_images/db/sql/db_version_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/db_version_insert.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/db_version_insert.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,2 @@
+-- $Id: db_version_insert.sql,v 1.1 2008/10/11 12:04:14 andreyb Exp $
+INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F');
Index: lams_tool_images/db/sql/drop_lams_tool_imageGallery.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/drop_lams_tool_imageGallery.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/drop_lams_tool_imageGallery.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,14 @@
+SET FOREIGN_KEY_CHECKS=0;
+drop table if exists tl_laimag10_attachment;
+drop table if exists tl_laimag10_item_instruction;
+drop table if exists tl_laimag10_imageGallery;
+drop table if exists tl_laimag10_imageGallery_item;
+drop table if exists tl_laimag10_item_log;
+drop table if exists tl_laimag10_session;
+drop table if exists tl_laimag10_user;
+SET FOREIGN_KEY_CHECKS=1;
+
+
+
+
+
Index: lams_tool_images/db/sql/library_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/library_insert.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/library_insert.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,18 @@
+# Connection: ROOT LOCAL
+# Host: localhost
+# Saved: 2005-04-07 10:50:55
+#
+INSERT INTO lams_learning_library
+(
+description,
+title,
+valid_flag,
+create_date_time
+)
+VALUES
+(
+'Share imageGallery',
+'Share imageGallery',
+0,
+NOW()
+)
Index: lams_tool_images/db/sql/table-schema.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/table-schema.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/table-schema.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,32 @@
+alter table tl_laimag10_attachment drop foreign key FK_NEW_1821149711_1E7009430E79035;
+alter table tl_laimag10_item_log drop foreign key FK_NEW_1821149711_63195BC938BF8DFE;
+alter table tl_laimag10_item_log drop foreign key FK_NEW_1821149711_63195BC941F9365D;
+alter table tl_laimag10_imageGallery drop foreign key FK_NEW_1821149711_89093BF758092FB;
+alter table tl_laimag10_imageGallery_item drop foreign key FK_NEW_1821149711_F52D1F9330E79035;
+alter table tl_laimag10_imageGallery_item drop foreign key FK_NEW_1821149711_F52D1F93EC0D3147;
+alter table tl_laimag10_imageGallery_item drop foreign key FK_NEW_1821149711_F52D1F93758092FB;
+alter table tl_laimag10_session drop foreign key FK_NEW_1821149711_24AA78C530E79035;
+alter table tl_laimag10_user drop foreign key FK_NEW_1821149711_30113BFC30E79035;
+alter table tl_laimag10_user drop foreign key FK_NEW_1821149711_30113BFCEC0D3147;
+drop table if exists tl_laimag10_attachment;
+drop table if exists tl_laimag10_item_log;
+drop table if exists tl_laimag10_imageGallery;
+drop table if exists tl_laimag10_imageGallery_item;
+drop table if exists tl_laimag10_session;
+drop table if exists tl_laimag10_user;
+create table tl_laimag10_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, imageGallery_uid bigint, primary key (uid));
+create table tl_laimag10_item_log (uid bigint not null auto_increment, access_date datetime, imageGallery_item_uid bigint, user_uid bigint, complete bit, session_id bigint, primary key (uid));
+create table tl_laimag10_imageGallery (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), run_offline bit, lock_on_finished bit, instructions text, next_image_title bigint, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, allow_comment_images bit, allow_share_images bit, number_columns integer DEFAULT 3, allow_vote bit, reflect_instructions varchar(255), reflect_on_activity bit,allow_rank tinyint DEFAULT 0, primary key (uid));
+create table tl_laimag10_imageGallery_item (uid bigint not null auto_increment, file_uuid bigint, file_version_id bigint, description varchar(255), title varchar(255), url text, create_by bigint, create_date datetime, create_by_author bit, sequence_id integer, is_hide bit, file_type varchar(255), file_name varchar(255), open_url_new_window bit, imageGallery_uid bigint, session_uid bigint, primary key (uid));
+create table tl_laimag10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, imageGallery_uid bigint, session_id bigint, session_name varchar(250), primary key (uid));
+create table tl_laimag10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), first_name varchar(255), login_name varchar(255), session_uid bigint, imageGallery_uid bigint, session_finished bit, primary key (uid));
+alter table tl_laimag10_attachment add index FK_NEW_1821149711_1E7009430E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_1E7009430E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_item_log add index FK_NEW_1821149711_63195BC938BF8DFE (imageGallery_item_uid), add constraint FK_NEW_1821149711_63195BC938BF8DFE foreign key (imageGallery_item_uid) references tl_laimag10_imageGallery_item (uid);
+alter table tl_laimag10_item_log add index FK_NEW_1821149711_63195BC941F9365D (user_uid), add constraint FK_NEW_1821149711_63195BC941F9365D foreign key (user_uid) references tl_laimag10_user (uid);
+alter table tl_laimag10_imageGallery add index FK_NEW_1821149711_89093BF758092FB (create_by), add constraint FK_NEW_1821149711_89093BF758092FB foreign key (create_by) references tl_laimag10_user (uid);
+alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F9330E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_F52D1F9330E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F93EC0D3147 (session_uid), add constraint FK_NEW_1821149711_F52D1F93EC0D3147 foreign key (session_uid) references tl_laimag10_session (uid);
+alter table tl_laimag10_imageGallery_item add index FK_NEW_1821149711_F52D1F93758092FB (create_by), add constraint FK_NEW_1821149711_F52D1F93758092FB foreign key (create_by) references tl_laimag10_user (uid);
+alter table tl_laimag10_session add index FK_NEW_1821149711_24AA78C530E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_24AA78C530E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFC30E79035 (imageGallery_uid), add constraint FK_NEW_1821149711_30113BFC30E79035 foreign key (imageGallery_uid) references tl_laimag10_imageGallery (uid);
+alter table tl_laimag10_user add index FK_NEW_1821149711_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1821149711_30113BFCEC0D3147 foreign key (session_uid) references tl_laimag10_session (uid);
Index: lams_tool_images/db/sql/tool_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/tool_insert.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/tool_insert.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,64 @@
+# Connection: ROOT LOCAL
+# Host: localhost
+# Saved: 2005-04-07 10:42:43
+#
+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,
+help_url,
+language_file,
+classpath_addition,
+context_file,
+create_date_time,
+modified_date_time
+)
+VALUES
+(
+'laimag10',
+'imageGalleryService',
+'Shared ImageGallery',
+'Shared ImageGallery',
+'sharedimageGallery',
+'@tool_version@',
+NULL,
+NULL,
+0,
+2,
+1,
+'tool/laimag10/learning/start.do?mode=learner',
+'tool/laimag10/learning/start.do?mode=author',
+'tool/laimag10/learning/start.do?mode=teacher',
+'tool/laimag10/authoring/start.do',
+'tool/laimag10/monitoring/summary.do',
+'tool/laimag10/definelater.do',
+'tool/laimag10/exportPortfolio?mode=learner',
+'tool/laimag10/exportPortfolio?mode=teacher',
+'tool/laimag10/contribute.do',
+'tool/laimag10/moderate.do',
+'http://wiki.lamsfoundation.org/display/lamsdocs/laimag10',
+'org.lamsfoundation.lams.tool.imageGallery.ApplicationResources',
+'lams-tool-laimag10.jar',
+'/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml',
+NOW(),
+NOW()
+)
Index: lams_tool_images/db/sql/updatescripts/updateTo20070227.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/updatescripts/Attic/updateTo20070227.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/updatescripts/updateTo20070227.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,4 @@
+-- Update the ImageGallery tables to 20070227
+-- This is for the LAMS 2.0.1 release.
+
+UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-laimag10.jar', context_file = '/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml' where tool_signature = 'laimag10';
Index: lams_tool_images/db/sql/updatescripts/updateTo20080229.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/db/sql/updatescripts/Attic/updateTo20080229.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/db/sql/updatescripts/updateTo20080229.sql 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,2 @@
+UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = "laimag10";
+UPDATE lams_tool SET tool_version = "20080229" WHERE tool_signature = "laimag10";
Index: lams_tool_images/licenses/Jaxen LICENSE.txt
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/licenses/Attic/Jaxen LICENSE.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/licenses/Jaxen LICENSE.txt 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,33 @@
+/*
+ $Id: Jaxen\040LICENSE.txt,v 1.1 2008/10/11 12:04:14 andreyb Exp $
+
+ Copyright 2003-2006 The Werken Company. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the Jaxen Project nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ */
Index: lams_tool_images/licenses/castor license.txt
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/licenses/Attic/castor license.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/licenses/castor license.txt 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,38 @@
+Copyright 2000-2002 (C) Intalio Inc. All Rights Reserved.
+
+Redistribution and use of this software and associated documentation
+("Software"), with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain copyright statements
+ and notices. Redistributions must also contain a copy of this
+ document.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+3. The name "ExoLab" must not be used to endorse or promote products
+ derived from this Software without prior written permission of
+ Intalio Inc. For written permission, please contact info@exolab.org.
+
+4. Products derived from this Software may not be called "Castor"
+ nor may "Castor" appear in their names without prior written
+ permission of Intalio Inc. Exolab, Castor and Intalio are
+ trademarks of Intalio Inc.
+
+5. Due credit should be given to the ExoLab Project
+ (http://www.exolab.org/).
+
+THIS SOFTWARE IS PROVIDED BY INTALIO AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO OR ITS
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
Index: lams_tool_images/licenses/jdom licence.txt
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/licenses/Attic/jdom licence.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/licenses/jdom licence.txt 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,54 @@
+/*--
+
+ Copyright (C) 2000-2002 Brett McLaughlin & Jason Hunter.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the disclaimer that follows
+ these conditions in the documentation and/or other materials
+ provided with the distribution.
+
+ 3. The name "JDOM" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact license@jdom.org.
+
+ 4. Products derived from this software may not be called "JDOM", nor
+ may "JDOM" appear in their name, without prior written permission
+ from the JDOM Project Management (pm@jdom.org).
+
+ In addition, we request (but do not require) that you include in the
+ end-user documentation provided with the redistribution and/or in the
+ software itself an acknowledgement equivalent to the following:
+ "This product includes software developed by the
+ JDOM Project (http://www.jdom.org/)."
+ Alternatively, the acknowledgment may be graphical using the logos
+ available at http://www.jdom.org/images/logos.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the JDOM Project and was originally
+ created by Brett McLaughlin and
+ Jason Hunter . For more information on the
+ JDOM Project, please see .
+
+ */
+
Index: lams_tool_images/licenses/library_licenses.txt
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/licenses/Attic/library_licenses.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/licenses/library_licenses.txt 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,28 @@
+Tigra Tree Javascript license description:
+There is no license fee or royalty fee to be paid at any time for using the Tigra Tree Menu v1.x
+You may include the source code or modified source code within your own projects for either personal or commercial use but excluding the restrictions outlined below. The following restrictions apply to all parts of the component, including all source code, samples and documentation.
+
+ * Header block of script file (tree.js) CAN NOT be modified or removed.
+ * The above items CAN NOT be sold as are, either individually or together.
+ * The above items CAN NOT be modified and then sold as a library component, either individually or together.
+
+
+For more detail, http://www.softcomplex.com/products/tigra_tree_menu/docs/
+
+Library/Package License
+
+Used for the IMSCP functionality (Reload Project)
+castor-0.9.5.3-xml.jar Castor License
+jdom.jar Jdom Jar License
+moonunitsrc.jar Reload License
+reload-diva.jar Reload License
+reload-editor.jar Reload License
+reload-jdom.jar Reload License
+reload-moonunit.jar Reload License
+xercesImpl.jar Apache Software License 1.1
+xml-apis.jar Apache Software License 1.1
+
+Other libraries
+jaxen-full.jar Jaxen Jar License (The Werken Company)
+sax.jar Public Domain
+saxpath.jar Jaxen Jar License (The Werken Company)
Index: lams_tool_images/licenses/reload licence.txt
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/licenses/Attic/reload licence.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/licenses/reload licence.txt 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,45 @@
+RELOAD Tools and Libraries
+
+Copyright (c) 2002-2004 Oleg Liber, Bill Olivier, Phillip Beauvoir
+
+This licence covers:
+
+The Reload "jdom" library
+The Reload "diva" library
+The Reload "dweezil" library
+The Reload "jdom" library
+The Reload "moonunit" library
+The Reload "xindice" library
+The Reload Editor
+The Reload SCORM Player
+The Reload Schema Viewer Eclipse Plugin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Project Management Contact:
+
+Oleg Liber
+Bolton Institute of Higher Education
+Deane Road
+Bolton BL3 5AB
+UK
+
+e-mail: o.liber@bolton.ac.uk
+
+
+Technical Contact:
+
+Phillip Beauvoir
+Bolton Institute of Higher Education
+Deane Road
+Bolton BL3 5AB
+UK
+
+e-mail: p.beauvoir@bolton.ac.uk
+
+
+Web: http://www.reload.ac.uk
Index: lams_tool_images/licenses/xerces licence.txt
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/licenses/Attic/xerces licence.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/licenses/xerces licence.txt 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,56 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Xerces" and "Apache Software Foundation" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation and was
+ * originally based on software copyright (c) 1999, International
+ * Business Machines, Inc., http://www.ibm.com. For more
+ * information on the Apache Software Foundation, please see
+ * .
+ */
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/ImageGalleryConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/ImageGalleryConstants.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/ImageGalleryConstants.java 11 Oct 2008 12:04:14 -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 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: ImageGalleryConstants.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery;
+
+public class ImageGalleryConstants {
+ public static final String TOOL_SIGNATURE = "laimag10";
+
+ public static final String RESOURCE_SERVICE = "imageGalleryService";
+
+ public static final String TOOL_CONTENT_HANDLER_NAME = "imageGalleryToolContentHandler";
+
+ public static final int COMPLETED = 1;
+
+ // for action forward name
+ public static final String SUCCESS = "success";
+
+ public static final String ERROR = "error";
+
+ public static final String DEFINE_LATER = "definelater";
+
+ // for parameters' name
+ public static final String PARAM_TOOL_CONTENT_ID = "toolContentID";
+
+ public static final String PARAM_TOOL_SESSION_ID = "toolSessionID";
+
+ public static final String PARAM_FILE_VERSION_ID = "fileVersionId";
+
+ public static final String PARAM_FILE_UUID = "fileUuid";
+
+ public static final String PARAM_IMAGE_INDEX = "imageIndex";
+
+ public static final String PARAM_RESOURCE_ITEM_UID = "itemUid";
+
+ public static final String PARAM_CURRENT_INSTRUCTION_INDEX = "insIdx";
+
+ public static final String PARAM_RUN_OFFLINE = "runOffline";
+
+ public static final String PARAM_OPEN_URL_POPUP = "popupUrl";
+
+ public static final String PARAM_TITLE = "title";
+
+ // for request attribute name
+ public static final String ATTR_TOOL_CONTENT_ID = "toolContentID";
+
+ public static final String ATTR_TOOL_SESSION_ID = "toolSessionID";
+
+ public static final String ATTR_RESOURCE_ITEM_LIST = "imageGalleryList";
+
+ public static final String ATT_ATTACHMENT_LIST = "instructionAttachmentList";
+
+ public static final String ATTR_DELETED_RESOURCE_ITEM_LIST = "deleteImageGalleryList";
+
+ public static final String ATTR_DELETED_ATTACHMENT_LIST = "deletedAttachmmentList";
+
+ public static final String ATTR_DELETED_RESOURCE_ITEM_ATTACHMENT_LIST = "deletedItemAttachmmentList";;
+
+ public static final String ATT_LEARNING_OBJECT = "cpPackage";
+
+ public static final String ATTR_RESOURCE_REVIEW_URL = "imageGalleryItemReviewUrl";
+
+ public static final String ATTR_RESOURCE = "imageGallery";
+
+ public static final String ATTR_RUN_AUTO = "runAuto";
+
+ public static final String ATTR_RESOURCE_ITEM_UID = "itemUid";
+
+ public static final String ATTR_NEXT_ACTIVITY_URL = "nextActivityUrl";
+
+ public static final String ATTR_SUMMARY_LIST = "summaryList";
+
+ public static final String ATTR_USER_LIST = "userList";
+
+ public static final String ATTR_RESOURCE_INSTRUCTION = "instructions";
+
+ public static final String ATTR_FINISH_LOCK = "finishedLock";
+
+ public static final String ATTR_LOCK_ON_FINISH = "lockOnFinish";
+
+ public static final String ATTR_SESSION_MAP_ID = "sessionMapID";
+
+ public static final String ATTR_RESOURCE_FORM = "imageGalleryForm";
+
+ public static final String ATTR_NEXT_IMAGE_TITLE = "nextImageTitle";
+
+ public static final String ATTR_FILE_TYPE_FLAG = "fileTypeFlag";
+
+ public static final String ATTR_TITLE = "title";
+
+ public static final String ATTR_INSTRUCTIONS = "instructions";
+
+ public static final String ATTR_USER_FINISHED = "userFinished";
+
+ // error message keys
+ public static final String ERROR_MSG_TITLE_BLANK = "error.resource.item.title.blank";
+
+ public static final String ERROR_MSG_NOT_ALLOWED_FORMAT = "error.resource.image.not.alowed.format";
+
+ public static final String ERROR_MSG_URL_BLANK = "error.resource.item.url.blank";
+
+ public static final String ERROR_MSG_DESC_BLANK = "error.resource.item.desc.blank";
+
+ public static final String ERROR_MSG_FILE_BLANK = "error.resource.item.file.blank";
+
+ public static final String ERROR_MSG_INVALID_URL = "error.resource.item.invalid.url";
+
+ public static final String ERROR_MSG_UPLOAD_FAILED = "error.upload.failed";
+
+ public static final String PAGE_EDITABLE = "isPageEditable";
+
+ public static final String MODE_AUTHOR_SESSION = "author_session";
+
+ public static final String ATTR_REFLECTION_ON = "reflectOn";
+
+ public static final String ATTR_REFLECTION_INSTRUCTION = "reflectInstructions";
+
+ public static final String ATTR_REFLECTION_ENTRY = "reflectEntry";
+
+ public static final String ATTR_REFLECT_LIST = "reflectList";
+
+ public static final String ATTR_USER_UID = "userUid";
+
+ public static final String DEFUALT_PROTOCOL_REFIX = "http://";
+
+ public static final String ALLOW_PROTOCOL_REFIX = new String("[http://|https://|ftp://|nntp://]");
+
+ public static final String EVENT_NAME_NOTIFY_TEACHERS_ON_ASSIGMENT_SUBMIT = "notify_teachers_on_assigment_submit";
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+ org.lamsfoundation.lams.tool.imageGallery.ApplicationResources
+
+
+
+
+
+
+
+
+
+
+
+ org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.hbm.xml
+ org/lamsfoundation/lams/tool/imageGallery/model/ImageGallery.hbm.xml
+ org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.hbm.xml
+ org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.hbm.xml
+ org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.hbm.xml
+ org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.hbm.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,+java.lang.Exception
+ PROPAGATION_REQUIRED,+java.lang.Exception
+ PROPAGATION_REQUIRED,+java.lang.Exception
+ PROPAGATION_REQUIRED,+java.lang.Exception
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/DAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/DAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/DAO.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,70 @@
+/****************************************************************
+ * 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: DAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * Data Access Object (DAO) interface. This is an interface
+ * used to tag our DAO classes and to provide common methods to all DAOs.
+ *
+ * @author Dapeng.Ni
+ */
+public interface DAO {
+
+ /**
+ * Generic method used to get all objects of a particular type. This
+ * is the same as lookup up all rows in a table.
+ * @param clazz the type of objects (a.k.a. while table) to get data from
+ * @return List of populated objects
+ */
+ public List getObjects(Class clazz);
+
+ /**
+ * Generic method to get an object based on class and identifier. An
+ * ObjectRetrievalFailureException Runtime Exception is thrown if
+ * nothing is found.
+ *
+ * @param clazz model class to lookup
+ * @param id the identifier (primary key) of the class
+ * @return a populated object
+ * @see org.springframework.orm.ObjectRetrievalFailureException
+ */
+ public Object getObject(Class clazz, Serializable id);
+
+ /**
+ * Generic method to save an object - handles both update and insert.
+ * @param o the object to save
+ */
+ public void saveObject(Object o);
+
+ /**
+ * Generic method to delete an object based on class and id
+ * @param clazz model class to lookup
+ * @param id the identifier (primary key) of the class
+ */
+ public void removeObject(Class clazz, Serializable id);
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryAttachmentDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/Attic/ImageGalleryAttachmentDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryAttachmentDAO.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,28 @@
+/****************************************************************
+ * 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: ImageGalleryAttachmentDAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+public interface ImageGalleryAttachmentDAO extends DAO {
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryDAO.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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: ImageGalleryDAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+
+public interface ImageGalleryDAO extends DAO {
+
+ ImageGallery getByContentId(Long contentId);
+
+ ImageGallery getByUid(Long imageGalleryUid);
+
+ void delete(ImageGallery imageGallery);
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryItemDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryItemDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryItemDAO.java 11 Oct 2008 12:04:14 -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 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: ImageGalleryItemDAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+
+public interface ImageGalleryItemDAO extends DAO {
+
+ /**
+ * Return all imageGallery items which is uploaded by author in given imageGalleryUid.
+ * @param imageGalleryUid
+ * @return
+ */
+ List getAuthoringItems(Long imageGalleryUid);
+
+ ImageGalleryItem getByUid(Long imageGalleryItemUid);
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryItemVisitDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryItemVisitDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryItemVisitDAO.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,48 @@
+/****************************************************************
+ * 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: ImageGalleryItemVisitDAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.lamsfoundation.lams.tool.imageGallery.dto.Summary;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItemVisitLog;
+
+public interface ImageGalleryItemVisitDAO extends DAO {
+
+
+ public ImageGalleryItemVisitLog getImageGalleryItemLog(Long itemUid,Long userId);
+
+ public int getUserViewLogCount(Long sessionId, Long userUid);
+ /**
+ * Return list which contains key pair which key is imageGallery item uid, value is number view.
+ *
+ * @param contentId
+ * @return
+ */
+ public Map getSummary(Long contentId);
+
+ public List getImageGalleryItemLogBySession(Long sessionId,Long itemUid);
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGallerySessionDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGallerySessionDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGallerySessionDAO.java 11 Oct 2008 12:04:14 -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 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: ImageGallerySessionDAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+
+public interface ImageGallerySessionDAO extends DAO {
+
+ ImageGallerySession getSessionBySessionId(Long sessionId);
+
+ List getByContentId(Long toolContentId);
+
+ void delete(ImageGallerySession session);
+
+ void deleteBySessionId(Long toolSessionId);
+
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryUserDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryUserDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/ImageGalleryUserDAO.java 11 Oct 2008 12:04:14 -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 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: ImageGalleryUserDAO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+
+public interface ImageGalleryUserDAO extends DAO {
+
+ ImageGalleryUser getUserByUserIDAndSessionID(Long userID, Long sessionId);
+
+ ImageGalleryUser getUserByUserIDAndContentID(Long userId, Long contentId);
+
+ List getBySessionID(Long sessionId);
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/BaseDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/BaseDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/BaseDAOHibernate.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,72 @@
+/****************************************************************
+ * 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: BaseDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.lamsfoundation.lams.tool.imageGallery.dao.DAO;
+import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
+
+/**
+ * This class serves as the Base class for all other DAOs - namely to hold
+ * common methods that they might all use. Can be used for standard CRUD
+ * operations.
+ *
+ * @author Dapeng.Ni
+ */
+public class BaseDAOHibernate extends HibernateDaoSupport implements DAO {
+ protected final Log log = LogFactory.getLog(getClass());
+
+ /**
+ * @see com.edgenius.paradise.dao.DAO#saveObject(java.lang.Object)
+ */
+ public void saveObject(Object o) {
+ getHibernateTemplate().saveOrUpdate(o);
+ }
+
+ /**
+ * @see com.edgenius.paradise.dao.DAO#getObject(java.lang.Class, java.io.Serializable)
+ */
+ public Object getObject(Class clazz, Serializable id) {
+ Object o = getHibernateTemplate().get(clazz, id);
+ return o;
+ }
+
+ /**
+ * @see com.edgenius.paradise.dao.DAO#getObjects(java.lang.Class)
+ */
+ public List getObjects(Class clazz) {
+ return getHibernateTemplate().loadAll(clazz);
+ }
+
+ /**
+ * @see com.edgenius.paradise.dao.DAO#removeObject(java.lang.Class, java.io.Serializable)
+ */
+ public void removeObject(Class clazz, Serializable id) {
+ getHibernateTemplate().delete(getObject(clazz, id));
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryAttachmentDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/Attic/ImageGalleryAttachmentDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryAttachmentDAOHibernate.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,30 @@
+/****************************************************************
+ * 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: ImageGalleryAttachmentDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryAttachmentDAO;
+
+public class ImageGalleryAttachmentDAOHibernate extends BaseDAOHibernate implements ImageGalleryAttachmentDAO{
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryDAOHibernate.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,56 @@
+/****************************************************************
+ * 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: ImageGalleryDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryDAO;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+
+/**
+ *
+ * @author Steve.Ni
+ *
+ * @version $Revision: 1.1 $
+ */
+public class ImageGalleryDAOHibernate extends BaseDAOHibernate implements ImageGalleryDAO{
+ private static final String GET_RESOURCE_BY_CONTENTID = "from "+ImageGallery.class.getName()+" as r where r.contentId=?";
+
+ public ImageGallery getByContentId(Long contentId) {
+ List list = getHibernateTemplate().find(GET_RESOURCE_BY_CONTENTID,contentId);
+ if(list.size() > 0)
+ return (ImageGallery) list.get(0);
+ else
+ return null;
+ }
+
+ public ImageGallery getByUid(Long imageGalleryUid) {
+ return (ImageGallery) getObject(ImageGallery.class,imageGalleryUid);
+ }
+
+ public void delete(ImageGallery imageGallery) {
+ this.getHibernateTemplate().delete(imageGallery);
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryItemDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryItemDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryItemDAOHibernate.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,44 @@
+/****************************************************************
+ * 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: ImageGalleryItemDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryItemDAO;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+
+public class ImageGalleryItemDAOHibernate extends BaseDAOHibernate implements ImageGalleryItemDAO{
+
+ private static final String FIND_AUTHORING_ITEMS = "from " + ImageGalleryItem.class.getName() + " where imageGallery_uid = ? order by create_date asc";
+
+ public List getAuthoringItems(Long imageGalleryUid) {
+
+ return this.getHibernateTemplate().find(FIND_AUTHORING_ITEMS,imageGalleryUid);
+ }
+
+ public ImageGalleryItem getByUid(Long imageGalleryItemUid) {
+ return (ImageGalleryItem) this.getObject(ImageGalleryItem.class,imageGalleryItemUid);
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryItemVisitDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryItemVisitDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryItemVisitDAOHibernate.java 11 Oct 2008 12:04:14 -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: ImageGalleryItemVisitDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryItemVisitDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dto.Summary;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItemVisitLog;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+
+public class ImageGalleryItemVisitDAOHibernate extends BaseDAOHibernate implements ImageGalleryItemVisitDAO{
+
+ private static final String FIND_BY_ITEM_AND_USER = "from " + ImageGalleryItemVisitLog.class.getName()
+ + " as r where r.user.userId = ? and r.imageGalleryItem.uid=?";
+
+ private static final String FIND_BY_ITEM_BYSESSION = "from " + ImageGalleryItemVisitLog.class.getName()
+ + " as r where r.sessionId = ? and r.imageGalleryItem.uid=?";
+
+ private static final String FIND_VIEW_COUNT_BY_USER = "select count(*) from " + ImageGalleryItemVisitLog.class.getName()
+ + " as r where r.sessionId=? and r.user.userId =?";
+
+ private static final String FIND_SUMMARY = "select v.imageGalleryItem.uid, count(v.imageGalleryItem) from "
+ + ImageGalleryItemVisitLog.class.getName() + " as v , "
+ + ImageGallerySession.class.getName() + " as s, "
+ + ImageGallery.class.getName() + " as r "
+ +" where v.sessionId = s.sessionId "
+ +" and s.imageGallery.uid = r.uid "
+ +" and r.contentId =? "
+ +" group by v.sessionId, v.imageGalleryItem.uid ";
+
+ public ImageGalleryItemVisitLog getImageGalleryItemLog(Long itemUid,Long userId){
+ List list = getHibernateTemplate().find(FIND_BY_ITEM_AND_USER,new Object[]{userId,itemUid});
+ if(list == null || list.size() ==0)
+ return null;
+ return (ImageGalleryItemVisitLog) list.get(0);
+ }
+
+ public int getUserViewLogCount(Long toolSessionId ,Long userUid) {
+ List list = getHibernateTemplate().find(FIND_VIEW_COUNT_BY_USER,new Object[]{toolSessionId, userUid});
+ if(list == null || list.size() ==0)
+ return 0;
+ return ((Number) list.get(0)).intValue();
+ }
+
+ public Map getSummary(Long contentId) {
+
+ // Note: Hibernate 3.1 query.uniqueResult() returns Integer, Hibernate 3.2 query.uniqueResult() returns Long
+ List result = getHibernateTemplate().find(FIND_SUMMARY,contentId);
+ Map summaryList = new HashMap (result.size());
+ for(Object[] list : result){
+ if ( list[1] != null ) {
+ summaryList.put((Long)list[0],new Integer(((Number)list[1]).intValue()));
+ }
+ }
+ return summaryList;
+
+ }
+
+ public List getImageGalleryItemLogBySession(Long sessionId, Long itemUid) {
+
+ return getHibernateTemplate().find(FIND_BY_ITEM_BYSESSION,new Object[]{sessionId,itemUid});
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGallerySessionDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGallerySessionDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGallerySessionDAOHibernate.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,54 @@
+/****************************************************************
+ * 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: ImageGallerySessionDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGallerySessionDAO;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+
+
+public class ImageGallerySessionDAOHibernate extends BaseDAOHibernate implements ImageGallerySessionDAO{
+
+ private static final String FIND_BY_SESSION_ID = "from " + ImageGallerySession.class.getName() + " as p where p.sessionId=?";
+ private static final String FIND_BY_CONTENT_ID = "from " + ImageGallerySession.class.getName() + " as p where p.imageGallery.contentId=?";
+
+ public ImageGallerySession getSessionBySessionId(Long sessionId) {
+ List list = getHibernateTemplate().find(FIND_BY_SESSION_ID,sessionId);
+ if(list == null || list.size() == 0)
+ return null;
+ return (ImageGallerySession) list.get(0);
+ }
+ public List getByContentId(Long toolContentId) {
+ return getHibernateTemplate().find(FIND_BY_CONTENT_ID,toolContentId);
+ }
+
+ public void delete(ImageGallerySession session) {
+ this.getHibernateTemplate().delete(session);
+ }
+ public void deleteBySessionId(Long toolSessionId) {
+ this.removeObject(ImageGallerySession.class,toolSessionId);
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryUserDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryUserDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dao/hibernate/ImageGalleryUserDAOHibernate.java 11 Oct 2008 12:04:14 -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: ImageGalleryUserDAOHibernate.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.dao.hibernate;
+
+import java.util.List;
+
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryUserDAO;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+
+
+public class ImageGalleryUserDAOHibernate extends BaseDAOHibernate implements ImageGalleryUserDAO{
+
+ private static final String FIND_BY_USER_ID_CONTENT_ID = "from " + ImageGalleryUser.class.getName() + " as u where u.userId =? and u.imageGallery.contentId=?";
+ private static final String FIND_BY_USER_ID_SESSION_ID = "from " + ImageGalleryUser.class.getName() + " as u where u.userId =? and u.session.sessionId=?";
+ private static final String FIND_BY_SESSION_ID = "from " + ImageGalleryUser.class.getName() + " as u where u.session.sessionId=?";
+
+ public ImageGalleryUser getUserByUserIDAndSessionID(Long userID, Long sessionId) {
+ List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_SESSION_ID,new Object[]{userID,sessionId});
+ if(list == null || list.size() == 0)
+ return null;
+ return (ImageGalleryUser) list.get(0);
+ }
+
+ public ImageGalleryUser getUserByUserIDAndContentID(Long userId, Long contentId) {
+ List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_CONTENT_ID,new Object[]{userId,contentId});
+ if(list == null || list.size() == 0)
+ return null;
+ return (ImageGalleryUser) list.get(0);
+ }
+
+ public List getBySessionID(Long sessionId) {
+ return this.getHibernateTemplate().find(FIND_BY_SESSION_ID,sessionId);
+ }
+
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dbupdates/autopatchContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dbupdates/autopatchContext.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dbupdates/autopatchContext.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/InstructionNavDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/Attic/InstructionNavDTO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/InstructionNavDTO.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,82 @@
+/****************************************************************
+ * 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: InstructionNavDTO.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.dto;
+
+import java.util.List;
+
+/**
+ *
+ * @author Steve.Ni
+ * @version $Revision: 1.1 $
+ */
+public class InstructionNavDTO {
+
+ private String title;
+ private int total;
+ private int current;
+ private List allInstructions;
+ private short type;
+
+ public int getCurrent() {
+ return current;
+ }
+
+ public void setCurrent(int current) {
+ this.current = current;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public int getTotal() {
+ return total;
+ }
+
+ public void setTotal(int total) {
+ this.total = total;
+ }
+
+ public void setType(short type) {
+ this.type = type;
+ }
+
+ public short getType() {
+ return type;
+ }
+
+ public List getAllInstructions() {
+ return allInstructions;
+ }
+
+ public void setAllInstructions(List allInstructions) {
+ this.allInstructions = allInstructions;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/ReflectDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/ReflectDTO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/ReflectDTO.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,80 @@
+package org.lamsfoundation.lams.tool.imageGallery.dto;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+
+/**
+ *
+ * @author Dapeng Ni
+ *
+ */
+public class ReflectDTO {
+ private Long userUid;
+ private String fullName;
+ private String loginName;
+ private boolean hasRefection;
+ private String reflectInstrctions;
+ private boolean finishReflection;
+ private String reflect;
+
+ public ReflectDTO(ImageGalleryUser user) {
+ this.setLoginName(user.getLoginName());
+ this.setFullName(user.getFirstName() + " " + user.getLastName());
+ this.setUserUid(user.getUid());
+ }
+
+ public boolean isFinishReflection() {
+ return finishReflection;
+ }
+
+ public void setFinishReflection(boolean finishReflection) {
+ this.finishReflection = finishReflection;
+ }
+
+ public String getFullName() {
+ return fullName;
+ }
+
+ public void setFullName(String fullName) {
+ this.fullName = fullName;
+ }
+
+ public boolean isHasRefection() {
+ return hasRefection;
+ }
+
+ public void setHasRefection(boolean hasRefection) {
+ this.hasRefection = hasRefection;
+ }
+
+ public String getLoginName() {
+ return loginName;
+ }
+
+ public void setLoginName(String loginName) {
+ this.loginName = loginName;
+ }
+
+ public String getReflect() {
+ return reflect;
+ }
+
+ public void setReflect(String reflect) {
+ this.reflect = reflect;
+ }
+
+ public String getReflectInstrctions() {
+ return reflectInstrctions;
+ }
+
+ public void setReflectInstrctions(String reflectInstrctions) {
+ this.reflectInstrctions = reflectInstrctions;
+ }
+
+ public Long getUserUid() {
+ return userUid;
+ }
+
+ public void setUserUid(Long userUid) {
+ this.userUid = userUid;
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/Summary.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/Summary.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/dto/Summary.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,243 @@
+/****************************************************************
+ * 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: Summary.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.dto;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryWebUtils;
+
+/**
+ * List contains following element:
+ *
+ * session_id
+ * session_name
+ * ImageGalleryItem.uid
+ * ImageGalleryItem.item_type
+ * ImageGalleryItem.create_by_author
+ * ImageGalleryItem.is_hide
+ * ImageGalleryItem.title
+ * User.login_name
+ * count(imageGallery_item_uid)
+ *
+ * @author Steve.Ni
+ *
+ * @version $Revision: 1.1 $
+ */
+public class Summary {
+
+ private Long sessionId;
+ private String sessionName;
+ private Long itemUid;
+ private boolean itemCreateByAuthor;
+ private boolean itemHide;
+ private String itemTitle;
+ private String username;
+ private int viewNumber;
+
+ // following is used for export portfolio programs:
+ private String url;
+ private Long fileUuid;
+ private Long fileVersionId;
+ private String fileName;
+ private String attachmentLocalUrl;
+
+ // true: initial group item, false, belong to some group.
+ private boolean isInitGroup;
+
+ public Summary() {
+ }
+
+ /**
+ * Contruction method for monitoring summary function.
+ *
+ * Don't not set isInitGroup and viewNumber fields
+ *
+ * @param sessionName
+ * @param item
+ * @param isInitGroup
+ */
+ public Summary(Long sessionId, String sessionName, ImageGalleryItem item) {
+ this.sessionId = sessionId;
+ this.sessionName = sessionName;
+ if (item != null) {
+ this.itemUid = item.getUid();
+ this.itemCreateByAuthor = item.isCreateByAuthor();
+ this.itemHide = item.isHide();
+ this.itemTitle = item.getTitle();
+ this.username = item.getCreateBy() == null ? "" : item.getCreateBy().getLoginName();
+ this.url = ImageGalleryWebUtils.protocol(item.getUrl());
+ this.fileName = item.getFileName();
+ this.fileUuid = item.getFileUuid();
+ this.fileVersionId = item.getFileVersionId();
+ } else {
+ this.itemUid = new Long(-1);
+ }
+ }
+
+ /**
+ * Contruction method for export profolio function.
+ *
+ * Don't not set sessionId and viewNumber fields
+ *
+ * @param sessionName
+ * @param item
+ * @param isInitGroup
+ */
+ public Summary(Long sessionId, String sessionName, ImageGalleryItem item, boolean isInitGroup) {
+ this.sessionId = sessionId;
+ this.sessionName = sessionName;
+ if (item != null) {
+ this.itemUid = item.getUid();
+ this.itemCreateByAuthor = item.isCreateByAuthor();
+ this.itemHide = item.isHide();
+ this.itemTitle = item.getTitle();
+ this.username = item.getCreateBy() == null ? "" : item.getCreateBy().getLoginName();
+ this.url = ImageGalleryWebUtils.protocol(item.getUrl());
+ this.fileName = item.getFileName();
+ this.fileUuid = item.getFileUuid();
+ this.fileVersionId = item.getFileVersionId();
+
+ } else {
+ this.itemUid = new Long(-1);
+ }
+ this.isInitGroup = isInitGroup;
+ }
+
+ public boolean isItemCreateByAuthor() {
+ return itemCreateByAuthor;
+ }
+
+ public void setItemCreateByAuthor(boolean itemCreateByAuthor) {
+ this.itemCreateByAuthor = itemCreateByAuthor;
+ }
+
+ public boolean isItemHide() {
+ return itemHide;
+ }
+
+ public void setItemHide(boolean itemHide) {
+ this.itemHide = itemHide;
+ }
+
+ public String getItemTitle() {
+ return itemTitle;
+ }
+
+ public void setItemTitle(String itemTitle) {
+ this.itemTitle = itemTitle;
+ }
+
+ public Long getItemUid() {
+ return itemUid;
+ }
+
+ public void setItemUid(Long itemUid) {
+ this.itemUid = itemUid;
+ }
+
+ 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 String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public int getViewNumber() {
+ return viewNumber;
+ }
+
+ public void setViewNumber(int viewNumber) {
+ this.viewNumber = viewNumber;
+ }
+
+ 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 String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public boolean isInitGroup() {
+ return isInitGroup;
+ }
+
+ public void setInitGroup(boolean isInitGroup) {
+ this.isInitGroup = isInitGroup;
+ }
+
+ public String getAttachmentLocalUrl() {
+ return attachmentLocalUrl;
+ }
+
+ public void setAttachmentLocalUrl(String attachmentLocalUrl) {
+ this.attachmentLocalUrl = attachmentLocalUrl;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallery.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGallery.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallery.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallery.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallery.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallery.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,602 @@
+/****************************************************************
+ * 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: ImageGallery.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryToolContentHandler;
+
+/**
+ * ImageGallery
+ *
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_laimag10_imageGallery"
+ *
+ */
+public class ImageGallery implements Cloneable {
+
+ private static final Logger log = Logger.getLogger(ImageGallery.class);
+
+ // key
+ private Long uid;
+
+ // tool contentID
+ private Long contentId;
+
+ private String title;
+
+ private String instructions;
+
+ private Long nextImageTitle;
+
+ // advance
+ private boolean runOffline;
+
+ private boolean allowVote;
+
+ private int numberColumns;
+
+ private boolean allowCommentImages;
+
+ private boolean allowShareImages;
+
+ private boolean lockWhenFinished;
+
+ private boolean defineLater;
+
+ private boolean contentInUse;
+
+ private boolean allowRank;
+
+ // instructions
+ private String onlineInstructions;
+
+ private String offlineInstructions;
+
+ private Set attachments;
+
+ // general infomation
+ private Date created;
+
+ private Date updated;
+
+ private ImageGalleryUser createdBy;
+
+ // imageGallery Items
+ private Set imageGalleryItems;
+
+ private boolean reflectOnActivity;
+
+ private String reflectInstructions;
+
+ // *************** NON Persist Fields ********************
+ private IToolContentHandler toolContentHandler;
+
+ private String miniViewNumberStr;
+
+ private List onlineFileList;
+
+ private List offlineFileList;
+
+ /**
+ * Default contruction method.
+ *
+ */
+ public ImageGallery() {
+ nextImageTitle = new Long(1);
+ attachments = new HashSet();
+ imageGalleryItems = new HashSet();
+ }
+
+ // **********************************************************
+ // Function method for ImageGallery
+ // **********************************************************
+ public static ImageGallery newInstance(ImageGallery defaultContent, Long contentId,
+ ImageGalleryToolContentHandler imageGalleryToolContentHandler) {
+ ImageGallery toContent = new ImageGallery();
+ defaultContent.toolContentHandler = imageGalleryToolContentHandler;
+ toContent = (ImageGallery) defaultContent.clone();
+ toContent.setContentId(contentId);
+
+ // reset user info as well
+ if (toContent.getCreatedBy() != null) {
+ toContent.getCreatedBy().setImageGallery(toContent);
+ Set items = toContent.getImageGalleryItems();
+ for (ImageGalleryItem item : items) {
+ item.setCreateBy(toContent.getCreatedBy());
+ }
+ }
+ return toContent;
+ }
+
+ @Override
+ public Object clone() {
+
+ ImageGallery imageGallery = null;
+ try {
+ imageGallery = (ImageGallery) super.clone();
+ imageGallery.setUid(null);
+ if (imageGalleryItems != null) {
+ Iterator iter = imageGalleryItems.iterator();
+ Set set = new HashSet();
+ while (iter.hasNext()) {
+ ImageGalleryItem item = (ImageGalleryItem) iter.next();
+ ImageGalleryItem newItem = (ImageGalleryItem) item.clone();
+ // just clone old file without duplicate it in repository
+ set.add(newItem);
+ }
+ imageGallery.imageGalleryItems = set;
+ }
+ // clone attachment
+ if (attachments != null) {
+ Iterator iter = attachments.iterator();
+ Set set = new HashSet();
+ while (iter.hasNext()) {
+ ImageGalleryAttachment file = (ImageGalleryAttachment) iter.next();
+ ImageGalleryAttachment newFile = (ImageGalleryAttachment) file.clone();
+ // just clone old file without duplicate it in repository
+
+ set.add(newFile);
+ }
+ imageGallery.attachments = set;
+ }
+ // clone ReourceUser as well
+ if (createdBy != null) {
+ imageGallery.setCreatedBy((ImageGalleryUser) createdBy.clone());
+ }
+ } catch (CloneNotSupportedException e) {
+ ImageGallery.log.error("When clone " + ImageGallery.class + " failed");
+ }
+
+ return imageGallery;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof ImageGallery)) {
+ return false;
+ }
+
+ final ImageGallery genericEntity = (ImageGallery) o;
+
+ return new EqualsBuilder().append(uid, genericEntity.uid).append(title, genericEntity.title).append(
+ instructions, genericEntity.instructions).append(onlineInstructions, genericEntity.onlineInstructions)
+ .append(offlineInstructions, genericEntity.offlineInstructions).append(created, genericEntity.created)
+ .append(updated, genericEntity.updated).append(createdBy, genericEntity.createdBy).isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(uid).append(title).append(instructions).append(onlineInstructions).append(
+ offlineInstructions).append(created).append(updated).append(createdBy).toHashCode();
+ }
+
+ /**
+ * Updates the modification data for this entity.
+ */
+ public void updateModificationData() {
+
+ long now = System.currentTimeMillis();
+ if (created == null) {
+ this.setCreated(new Date(now));
+ }
+ this.setUpdated(new Date(now));
+ }
+
+ public void toDTO() {
+ onlineFileList = new ArrayList();
+ offlineFileList = new ArrayList();
+ Set fileSet = this.getAttachments();
+ if (fileSet != null) {
+ for (ImageGalleryAttachment file : fileSet) {
+ if (StringUtils.equalsIgnoreCase(file.getFileType(), IToolContentHandler.TYPE_OFFLINE)) {
+ offlineFileList.add(file);
+ } else {
+ onlineFileList.add(file);
+ }
+ }
+ }
+ }
+
+ // **********************************************************
+ // get/set methods
+ // **********************************************************
+ /**
+ * Returns the object's creation date
+ *
+ * @return date
+ * @hibernate.property column="create_date"
+ */
+ public Date getCreated() {
+ return created;
+ }
+
+ /**
+ * Sets the object's creation date
+ *
+ * @param created
+ */
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ /**
+ * Returns the object's date of last update
+ *
+ * @return date updated
+ * @hibernate.property column="update_date"
+ */
+ public Date getUpdated() {
+ return updated;
+ }
+
+ /**
+ * Sets the object's date of last update
+ *
+ * @param updated
+ */
+ public void setUpdated(Date updated) {
+ this.updated = updated;
+ }
+
+ /**
+ * @return Returns the userid of the user who created the Share imageGallery.
+ *
+ * @hibernate.many-to-one cascade="save-update" column="create_by"
+ *
+ */
+ public ImageGalleryUser getCreatedBy() {
+ return createdBy;
+ }
+
+ /**
+ * @param createdBy
+ * The userid of the user who created this Share imageGallery.
+ */
+ public void setCreatedBy(ImageGalleryUser createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ /**
+ * @hibernate.id column="uid" generator-class="native"
+ */
+ public Long getUid() {
+ return uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ /**
+ * @return Returns the title.
+ *
+ * @hibernate.property column="title"
+ *
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * @param title
+ * The title to set.
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * @return Returns the runOffline.
+ *
+ * @hibernate.property column="run_offline"
+ *
+ */
+ public boolean getRunOffline() {
+ return runOffline;
+ }
+
+ /**
+ * @param runOffline
+ * The forceOffLine to set.
+ *
+ *
+ */
+ public void setRunOffline(boolean forceOffline) {
+ runOffline = forceOffline;
+ }
+
+ /**
+ * @return Returns the lockWhenFinish.
+ *
+ * @hibernate.property column="lock_on_finished"
+ *
+ */
+ public boolean getLockWhenFinished() {
+ return lockWhenFinished;
+ }
+
+ /**
+ * @param lockWhenFinished
+ * Set to true to lock the imageGallery for finished users.
+ */
+ public void setLockWhenFinished(boolean lockWhenFinished) {
+ this.lockWhenFinished = lockWhenFinished;
+ }
+
+ /**
+ * @return Returns the instructions set by the teacher.
+ *
+ * @hibernate.property column="instructions" type="text"
+ */
+ public String getInstructions() {
+ return instructions;
+ }
+
+ public void setInstructions(String instructions) {
+ this.instructions = instructions;
+ }
+
+ /**
+ * @return Returns the next condecutive integer for constructing image title.
+ *
+ * @hibernate.property column="next_image_title"
+ */
+ public Long getNextImageTitle() {
+ return nextImageTitle;
+ }
+
+ public void setNextImageTitle(Long nextImageTitle) {
+ this.nextImageTitle = nextImageTitle;
+ }
+
+ /**
+ * @return Returns the onlineInstructions set by the teacher.
+ *
+ * @hibernate.property column="online_instructions" type="text"
+ */
+ public String getOnlineInstructions() {
+ return onlineInstructions;
+ }
+
+ public void setOnlineInstructions(String onlineInstructions) {
+ this.onlineInstructions = onlineInstructions;
+ }
+
+ /**
+ * @return Returns the onlineInstructions set by the teacher.
+ *
+ * @hibernate.property column="offline_instructions" type="text"
+ */
+ public String getOfflineInstructions() {
+ return offlineInstructions;
+ }
+
+ public void setOfflineInstructions(String offlineInstructions) {
+ this.offlineInstructions = offlineInstructions;
+ }
+
+ /**
+ *
+ * @hibernate.set lazy="true" cascade="all" inverse="false" order-by="create_date desc"
+ * @hibernate.collection-key column="imageGallery_uid"
+ * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryAttachment"
+ *
+ * @return a set of Attachments to this Message.
+ */
+ public Set getAttachments() {
+ return attachments;
+ }
+
+ /*
+ * @param attachments The attachments to set.
+ */
+ public void setAttachments(Set attachments) {
+ this.attachments = attachments;
+ }
+
+ /**
+ *
+ *
+ * @hibernate.set lazy="true" inverse="false" cascade="all" order-by="create_date desc"
+ * @hibernate.collection-key column="imageGallery_uid"
+ * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem"
+ *
+ * @return
+ */
+ public Set getImageGalleryItems() {
+ return imageGalleryItems;
+ }
+
+ public void setImageGalleryItems(Set imageGalleryItems) {
+ this.imageGalleryItems = imageGalleryItems;
+ }
+
+ /**
+ * @hibernate.property column="content_in_use"
+ * @return
+ */
+ public boolean isContentInUse() {
+ return contentInUse;
+ }
+
+ public void setContentInUse(boolean contentInUse) {
+ this.contentInUse = contentInUse;
+ }
+
+ /**
+ * @hibernate.property column="define_later"
+ * @return
+ */
+ public boolean isDefineLater() {
+ return defineLater;
+ }
+
+ public void setDefineLater(boolean defineLater) {
+ this.defineLater = defineLater;
+ }
+
+ /**
+ * @hibernate.property column="content_id" unique="true"
+ * @return
+ */
+ public Long getContentId() {
+ return contentId;
+ }
+
+ public void setContentId(Long contentId) {
+ this.contentId = contentId;
+ }
+
+ /**
+ * @hibernate.property column="allow_comment_images"
+ * @return
+ */
+ public boolean isAllowCommentImages() {
+ return allowCommentImages;
+ }
+
+ public void setAllowCommentImages(boolean allowCommentImages) {
+ this.allowCommentImages = allowCommentImages;
+ }
+
+ /**
+ * @hibernate.property column="allow_share_images"
+ * @return
+ */
+ public boolean isAllowShareImages() {
+ return allowShareImages;
+ }
+
+ public void setAllowShareImages(boolean allowShareImages) {
+ this.allowShareImages = allowShareImages;
+ }
+
+ /**
+ * @hibernate.property column="number_columns"
+ * @return
+ */
+ public int getNumberColumns() {
+ return numberColumns;
+ }
+
+ public void setNumberColumns(int numberColumns) {
+ numberColumns = numberColumns;
+ }
+
+ /**
+ * @hibernate.property column="allow_vote"
+ * @return
+ */
+ public boolean isAllowVote() {
+ return allowVote;
+ }
+
+ public void setAllowVote(boolean allowVote) {
+ this.allowVote = allowVote;
+ }
+
+ /**
+ * For display use
+ *
+ * @return
+ */
+ public String getMiniViewNumberStr() {
+ return miniViewNumberStr;
+ }
+
+ public void setMiniViewNumberStr(String minViewNumber) {
+ miniViewNumberStr = minViewNumber;
+ }
+
+ public List getOfflineFileList() {
+ return offlineFileList;
+ }
+
+ public void setOfflineFileList(List offlineFileList) {
+ this.offlineFileList = offlineFileList;
+ }
+
+ public List getOnlineFileList() {
+ return onlineFileList;
+ }
+
+ public void setOnlineFileList(List onlineFileList) {
+ this.onlineFileList = onlineFileList;
+ }
+
+ public void setToolContentHandler(IToolContentHandler toolContentHandler) {
+ this.toolContentHandler = toolContentHandler;
+ }
+
+ /**
+ * @hibernate.property column="reflect_instructions"
+ * @return
+ */
+ public String getReflectInstructions() {
+ return reflectInstructions;
+ }
+
+ public void setReflectInstructions(String reflectInstructions) {
+ this.reflectInstructions = reflectInstructions;
+ }
+
+ /**
+ * @hibernate.property column="reflect_on_activity"
+ * @return
+ */
+ public boolean isReflectOnActivity() {
+ return reflectOnActivity;
+ }
+
+ public void setReflectOnActivity(boolean reflectOnActivity) {
+ this.reflectOnActivity = reflectOnActivity;
+ }
+
+ /**
+ * @hibernate.property column="allow_rank"
+ * @return
+ */
+ public boolean isAllowRank() {
+ return allowRank;
+ }
+
+ public void setAllowRank(boolean allowRank) {
+ this.allowRank = allowRank;
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGalleryAttachment.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryAttachment.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,165 @@
+/****************************************************************
+ * 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: ImageGalleryAttachment.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.model;
+
+import java.util.Date;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.log4j.Logger;
+
+/**
+ * @author Dapeng Ni
+ *
+ * A Wrapper class for uploaded files. An Attachment cannot exist independently and must belong to a ImageGallery.
+ *
+ *
+ * @hibernate.class table="tl_laimag10_attachment"
+ *
+ */
+public class ImageGalleryAttachment implements Cloneable {
+ private static final Logger log = Logger.getLogger(ImageGalleryAttachment.class);
+
+ private Long uid;
+ private Long fileUuid;
+ private Long fileVersionId;
+ private String fileType;
+ private String fileName;
+ private Date created;
+
+ // Default contruction method
+ public ImageGalleryAttachment() {
+
+ }
+
+ // **********************************************************
+ // Function method for Attachment
+ // **********************************************************
+ @Override
+ public Object clone() {
+ Object obj = null;
+ try {
+ obj = super.clone();
+ ((ImageGalleryAttachment) obj).setUid(null);
+ } catch (CloneNotSupportedException e) {
+ ImageGalleryAttachment.log.error("When clone " + ImageGalleryAttachment.class + " failed");
+ }
+
+ return obj;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof ImageGalleryAttachment)) {
+ return false;
+ }
+
+ final ImageGalleryAttachment genericEntity = (ImageGalleryAttachment) 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.created, genericEntity.created).isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(uid).append(fileVersionId).append(fileName).append(fileType)
+ .append(created).toHashCode();
+ }
+
+ // **********************************************************
+ // get/set methods
+ // **********************************************************
+ /**
+ * @hibernate.id column="uid" generator-class="native"
+ */
+ public Long getUid() {
+ return uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ /**
+ * @hibernate.property column="file_version_id"
+ *
+ */
+ public Long getFileVersionId() {
+ return fileVersionId;
+ }
+
+ public void setFileVersionId(Long version) {
+ this.fileVersionId = version;
+ }
+
+ /**
+ * @hibernate.property column="file_type"
+ */
+ public String getFileType() {
+ return fileType;
+ }
+
+ public void setFileType(String type) {
+ this.fileType = type;
+ }
+
+ /**
+ * @hibernate.property column="file_name"
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String name) {
+ this.fileName = name;
+ }
+
+ /**
+ * @hibernate.property column="file_uuid"
+ * @return
+ */
+ public Long getFileUuid() {
+ return fileUuid;
+ }
+
+ public void setFileUuid(Long uuid) {
+ this.fileUuid = uuid;
+ }
+
+ /**
+ * @hibernate.property column="create_date"
+ * @return
+ */
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGalleryItem.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItem.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,283 @@
+/****************************************************************
+ * 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: ImageGalleryItem.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.model;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+
+/**
+ * ImageGallery
+ *
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_laimag10_imageGallery_item"
+ *
+ */
+public class ImageGalleryItem implements Cloneable {
+ private static final Logger log = Logger.getLogger(ImageGalleryItem.class);
+
+ private Long uid;
+
+ private String title;
+
+ private String description;
+
+ private int sequenceId;
+
+ private String url;
+
+ private boolean openUrlNewWindow;
+
+ private Long fileUuid;
+
+ private Long fileVersionId;
+
+ private String fileName;
+
+ private String fileType;
+
+ private boolean isHide;
+ private boolean isCreateByAuthor;
+
+ private Date createDate;
+ private ImageGalleryUser createBy;
+
+ // ***********************************************
+ // DTO fields:
+ private boolean complete;
+
+ @Override
+ public Object clone() {
+ ImageGalleryItem obj = null;
+ try {
+ obj = (ImageGalleryItem) super.clone();
+ (obj).setUid(null);
+ // clone ReourceUser as well
+ if (this.createBy != null) {
+ (obj).setCreateBy((ImageGalleryUser) this.createBy.clone());
+ }
+
+ } catch (CloneNotSupportedException e) {
+ ImageGalleryItem.log.error("When clone " + ImageGalleryItem.class + " failed");
+ }
+
+ return obj;
+ }
+
+ // **********************************************************
+ // Get/Set methods
+ // **********************************************************
+ /**
+ * @hibernate.id generator-class="native" type="java.lang.Long" column="uid"
+ * @return Returns the uid.
+ */
+ public Long getUid() {
+ return uid;
+ }
+
+ /**
+ * @param uid
+ * The uid to set.
+ */
+ public void setUid(Long userID) {
+ this.uid = userID;
+ }
+
+ /**
+ * @hibernate.property column="file_uuid"
+ *
+ * @return
+ */
+ public Long getFileUuid() {
+ return fileUuid;
+ }
+
+ public void setFileUuid(Long crUuid) {
+ this.fileUuid = crUuid;
+ }
+
+ /**
+ * @hibernate.property column="file_version_id"
+ * @return
+ */
+ public Long getFileVersionId() {
+ return fileVersionId;
+ }
+
+ public void setFileVersionId(Long crVersionId) {
+ this.fileVersionId = crVersionId;
+ }
+
+ /**
+ * @hibernate.property column="description"
+ * @return
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * Returns taskListItem sequence number.
+ *
+ * @return taskListItem sequence number
+ *
+ * @hibernate.property column="sequence_id"
+ */
+ public int getSequenceId() {
+ return sequenceId;
+ }
+
+ /**
+ * Sets taskListItem sequence number.
+ *
+ * @param sequenceId
+ * taskListItem sequence number
+ */
+ public void setSequenceId(int sequenceId) {
+ this.sequenceId = sequenceId;
+ }
+
+ /**
+ * @hibernate.property column="title" length="255"
+ * @return
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * @hibernate.property column="url" length="65535"
+ * @return
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * @hibernate.many-to-one cascade="none" column="create_by"
+ *
+ * @return
+ */
+ public ImageGalleryUser getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(ImageGalleryUser createBy) {
+ this.createBy = createBy;
+ }
+
+ /**
+ * @hibernate.property column="create_date"
+ * @return
+ */
+ public Date getCreateDate() {
+ return createDate;
+ }
+
+ public void setCreateDate(Date createDate) {
+ this.createDate = createDate;
+ }
+
+ /**
+ * @hibernate.property column="create_by_author"
+ * @return
+ */
+ public boolean isCreateByAuthor() {
+ return isCreateByAuthor;
+ }
+
+ public void setCreateByAuthor(boolean isCreateByAuthor) {
+ this.isCreateByAuthor = isCreateByAuthor;
+ }
+
+ /**
+ * @hibernate.property column="is_hide"
+ * @return
+ */
+ public boolean isHide() {
+ return isHide;
+ }
+
+ public void setHide(boolean isHide) {
+ this.isHide = isHide;
+ }
+
+ /**
+ * @hibernate.property column="file_type"
+ */
+ public String getFileType() {
+ return fileType;
+ }
+
+ public void setFileType(String type) {
+ this.fileType = type;
+ }
+
+ /**
+ * @hibernate.property column="file_name"
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String name) {
+ this.fileName = name;
+ }
+
+ /**
+ * @hibernate.property column="open_url_new_window"
+ * @return
+ */
+ public boolean isOpenUrlNewWindow() {
+ return openUrlNewWindow;
+ }
+
+ public void setOpenUrlNewWindow(boolean openUrlNewWindow) {
+ this.openUrlNewWindow = openUrlNewWindow;
+ }
+
+ public void setComplete(boolean complete) {
+ this.complete = complete;
+ }
+
+ public boolean isComplete() {
+ return complete;
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemInstruction.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGalleryItemInstruction.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemInstruction.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGalleryItemVisitLog.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryItemVisitLog.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,118 @@
+/****************************************************************
+ * 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: ImageGalleryItemVisitLog.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.model;
+
+import java.util.Date;
+
+/**
+ * ImageGallery
+ *
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_laimag10_item_log"
+ *
+ */
+public class ImageGalleryItemVisitLog {
+
+ private Long uid;
+ private ImageGalleryUser user;
+ private ImageGalleryItem imageGalleryItem;
+ private boolean complete;
+ private Date accessDate;
+ private Long sessionId;
+
+ /**
+ * @hibernate.property column="access_date"
+ * @return
+ */
+ public Date getAccessDate() {
+ return accessDate;
+ }
+
+ public void setAccessDate(Date accessDate) {
+ this.accessDate = accessDate;
+ }
+
+ /**
+ * @hibernate.many-to-one column="imageGallery_item_uid" cascade="none"
+ * @return
+ */
+ public ImageGalleryItem getImageGalleryItem() {
+ return imageGalleryItem;
+ }
+
+ public void setImageGalleryItem(ImageGalleryItem item) {
+ this.imageGalleryItem = item;
+ }
+
+ /**
+ * @hibernate.id generator-class="native" type="java.lang.Long" column="uid"
+ * @return Returns the log Uid.
+ */
+ public Long getUid() {
+ return uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+
+ /**
+ * @hibernate.many-to-one column="user_uid" cascade="none"
+ * @return
+ */
+ public ImageGalleryUser getUser() {
+ return user;
+ }
+
+ public void setUser(ImageGalleryUser user) {
+ this.user = user;
+ }
+
+ /**
+ * @hibernate.property column="complete"
+ * @return
+ */
+ public boolean isComplete() {
+ return complete;
+ }
+
+ public void setComplete(boolean complete) {
+ this.complete = complete;
+ }
+
+ /**
+ * @hibernate.property column="session_id"
+ * @return
+ */
+ public Long getSessionId() {
+ return sessionId;
+ }
+
+ public void setSessionId(Long sessionId) {
+ this.sessionId = sessionId;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGallerySession.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGallerySession.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,164 @@
+/****************************************************************
+ * 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: ImageGallerySession.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.model;
+
+import java.util.Date;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+
+/**
+ * ImageGallery
+ *
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_laimag10_session"
+ *
+ */
+public class ImageGallerySession {
+
+ private static Logger log = Logger.getLogger(ImageGallerySession.class);
+
+ private Long uid;
+ private Long sessionId;
+ private String sessionName;
+ private ImageGallery imageGallery;
+ private Date sessionStartDate;
+ private Date sessionEndDate;
+ // finish or not
+ private int status;
+ // imageGallery Items
+ private Set imageGalleryItems;
+
+ // **********************************************************
+ // Get/Set methods
+ // **********************************************************
+ /**
+ * @hibernate.id generator-class="native" type="java.lang.Long" column="uid"
+ * @return Returns the learnerID.
+ */
+ public Long getUid() {
+ return uid;
+ }
+
+ public void setUid(Long uuid) {
+ this.uid = uuid;
+ }
+
+ /**
+ * @hibernate.property column="session_end_date"
+ * @return
+ */
+ public Date getSessionEndDate() {
+ return sessionEndDate;
+ }
+
+ public void setSessionEndDate(Date sessionEndDate) {
+ this.sessionEndDate = sessionEndDate;
+ }
+
+ /**
+ * @hibernate.property column="session_start_date"
+ *
+ * @return
+ */
+ public Date getSessionStartDate() {
+ return sessionStartDate;
+ }
+
+ public void setSessionStartDate(Date sessionStartDate) {
+ this.sessionStartDate = sessionStartDate;
+ }
+
+ /**
+ * @hibernate.property
+ * @return
+ */
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+
+ /**
+ * @hibernate.many-to-one column="imageGallery_uid" cascade="none"
+ * @return
+ */
+ public ImageGallery getImageGallery() {
+ return imageGallery;
+ }
+
+ public void setImageGallery(ImageGallery imageGallery) {
+ this.imageGallery = imageGallery;
+ }
+
+ /**
+ * @hibernate.property column="session_id"
+ * @return
+ */
+ public Long getSessionId() {
+ return sessionId;
+ }
+
+ public void setSessionId(Long sessionId) {
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * @hibernate.property column="session_name" length="250"
+ * @return Returns the session name
+ */
+ public String getSessionName() {
+ return sessionName;
+ }
+
+ /**
+ *
+ * @param sessionName
+ * The session name to set.
+ */
+ public void setSessionName(String sessionName) {
+ this.sessionName = sessionName;
+ }
+
+ /**
+ *
+ *
+ * @hibernate.set lazy="true" inverse="false" cascade="all" order-by="create_date desc"
+ * @hibernate.collection-key column="session_uid"
+ * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem"
+ *
+ * @return
+ */
+ public Set getImageGalleryItems() {
+ return imageGalleryItems;
+ }
+
+ public void setImageGalleryItems(Set imageGalleryItems) {
+ this.imageGalleryItems = imageGalleryItems;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/Attic/ImageGalleryUser.hbm.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.hbm.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,237 @@
+/****************************************************************
+ * 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: ImageGalleryUser.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.model;
+
+import java.util.Date;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+
+/**
+ * ImageGallery
+ *
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_laimag10_user"
+ *
+ */
+public class ImageGalleryUser implements Cloneable {
+ private static final long serialVersionUID = -7043502180037866257L;
+ private static Logger log = Logger.getLogger(ImageGalleryUser.class);
+
+ private Long uid;
+ private Long userId;
+ private String firstName;
+ private String lastName;
+ private String loginName;
+ private boolean sessionFinished;
+
+ private ImageGallerySession session;
+ private ImageGallery imageGallery;
+
+ // =============== NON Persisit value: for display use ===========
+ // the user access some reousrce item date time. Use in monitoring summary page
+ private Date accessDate;
+
+ public ImageGalleryUser() {
+ }
+
+ public ImageGalleryUser(UserDTO user, ImageGallerySession session) {
+ this.userId = new Long(user.getUserID().intValue());
+ this.firstName = user.getFirstName();
+ this.lastName = user.getLastName();
+ this.loginName = user.getLogin();
+ this.session = session;
+ this.imageGallery = null;
+ this.sessionFinished = false;
+ }
+
+ public ImageGalleryUser(UserDTO user, ImageGallery content) {
+ this.userId = new Long(user.getUserID().intValue());
+ this.firstName = user.getFirstName();
+ this.lastName = user.getLastName();
+ this.loginName = user.getLogin();
+ this.session = null;
+ this.imageGallery = content;
+ this.sessionFinished = false;
+ }
+
+ /**
+ * Clone method from java.lang.Object
+ */
+ @Override
+ public Object clone() {
+
+ ImageGalleryUser user = null;
+ try {
+ user = (ImageGalleryUser) super.clone();
+ user.setUid(null);
+ // never clone session
+ user.setSession(null);
+ } catch (CloneNotSupportedException e) {
+ ImageGalleryUser.log.error("When clone " + ImageGalleryUser.class + " failed");
+ }
+
+ return user;
+ }
+
+ // **********************************************************
+ // Get/Set methods
+ // **********************************************************
+ /**
+ * @hibernate.id generator-class="native" type="java.lang.Long" column="uid"
+ * @return Returns the uid.
+ */
+ public Long getUid() {
+ return uid;
+ }
+
+ /**
+ * @param uid
+ * The uid to set.
+ */
+ public void setUid(Long userID) {
+ this.uid = userID;
+ }
+
+ /**
+ * @hibernate.property column="user_id" length="20"
+ * @return Returns the userId.
+ */
+ public Long getUserId() {
+ return userId;
+ }
+
+ /**
+ * @param userId
+ * The userId to set.
+ */
+ public void setUserId(Long userID) {
+ this.userId = userID;
+ }
+
+ /**
+ * @hibernate.property length="255" column="last_name"
+ * @return
+ */
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ /**
+ * @hibernate.property length="255" column="first_name"
+ * @return
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ /**
+ * @hibernate.property column="login_name"
+ * @return
+ */
+ public String getLoginName() {
+ return loginName;
+ }
+
+ public void setLoginName(String loginName) {
+ this.loginName = loginName;
+ }
+
+ /**
+ * @hibernate.many-to-one column="session_uid" cascade="none"
+ * @return
+ */
+ public ImageGallerySession getSession() {
+ return session;
+ }
+
+ public void setSession(ImageGallerySession session) {
+ this.session = session;
+ }
+
+ /**
+ * @hibernate.many-to-one column="imageGallery_uid" cascade="none"
+ * @return
+ */
+ public ImageGallery getImageGallery() {
+ return imageGallery;
+ }
+
+ public void setImageGallery(ImageGallery content) {
+ this.imageGallery = content;
+ }
+
+ /**
+ * @hibernate.property column="session_finished"
+ * @return
+ */
+ public boolean isSessionFinished() {
+ return sessionFinished;
+ }
+
+ public void setSessionFinished(boolean sessionFinished) {
+ this.sessionFinished = sessionFinished;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!(obj instanceof ImageGalleryUser)) {
+ return false;
+ }
+
+ final ImageGalleryUser user = (ImageGalleryUser) obj;
+
+ return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName).append(
+ this.lastName, user.lastName).append(this.loginName, user.loginName).isEquals();
+
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(uid).append(firstName).append(lastName).append(loginName).toHashCode();
+ }
+
+ public Date getAccessDate() {
+ return accessDate;
+ }
+
+ public void setAccessDate(Date accessDate) {
+ this.accessDate = accessDate;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,300 @@
+/****************************************************************
+ * 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: IImageGalleryService.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.service;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+
+import org.apache.struts.upload.FormFile;
+import org.lamsfoundation.lams.contentrepository.IVersionedNode;
+import org.lamsfoundation.lams.events.IEventNotificationService;
+import org.lamsfoundation.lams.notebook.model.NotebookEntry;
+import org.lamsfoundation.lams.tool.imageGallery.dto.ReflectDTO;
+import org.lamsfoundation.lams.tool.imageGallery.dto.Summary;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryAttachment;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+
+/**
+ * @author Dapeng.Ni
+ *
+ * Interface that defines the contract that all ShareImageGallery service provider must follow.
+ */
+public interface IImageGalleryService {
+
+ /**
+ * Get file IVersiondNode
by given package id and path.
+ *
+ * @param packageId
+ * @param relPathString
+ * @return
+ * @throws ImageGalleryApplicationException
+ */
+ IVersionedNode getFileNode(Long packageId, String relPathString) throws ImageGalleryApplicationException;
+
+ /**
+ * Get ImageGallery
by toolContentID.
+ *
+ * @param contentId
+ * @return
+ */
+ ImageGallery getImageGalleryByContentId(Long contentId);
+
+ /**
+ * Get a cloned copy of tool default tool content (ImageGallery) and assign the toolContentId of that copy as the
+ * given contentId
+ *
+ * @param contentId
+ * @return
+ * @throws ImageGalleryApplicationException
+ */
+ ImageGallery getDefaultContent(Long contentId) throws ImageGalleryApplicationException;
+
+ /**
+ * Get list of imageGallery items by given imageGalleryUid. These imageGallery items must be created by author.
+ *
+ * @param imageGalleryUid
+ * @return
+ */
+ List getAuthoredItems(Long imageGalleryUid);
+
+ /**
+ * Upload instruciton file into repository.
+ *
+ * @param file
+ * @param type
+ * @return
+ * @throws UploadImageGalleryFileException
+ */
+ ImageGalleryAttachment uploadInstructionFile(FormFile file, String type) throws UploadImageGalleryFileException;
+
+ /**
+ * Upload imageGallery item file to repository. i.e., single file, websize zip file, or learning object zip file.
+ *
+ * @param item
+ * @param file
+ * @throws UploadImageGalleryFileException
+ */
+ void uploadImageGalleryItemFile(ImageGalleryItem item, FormFile file) throws UploadImageGalleryFileException;
+
+ // ********** for user methods *************
+ /**
+ * Create a new user in database.
+ */
+ void createUser(ImageGalleryUser imageGalleryUser);
+
+ /**
+ * Get user by given userID and toolContentID.
+ *
+ * @param long1
+ * @return
+ */
+ ImageGalleryUser getUserByIDAndContent(Long userID, Long contentId);
+
+ /**
+ * Get user by sessionID and UserID
+ *
+ * @param long1
+ * @param sessionId
+ * @return
+ */
+ ImageGalleryUser getUserByIDAndSession(Long long1, Long sessionId);
+
+ // ********** Repository methods ***********************
+ /**
+ * Delete file from repository.
+ */
+ void deleteFromRepository(Long fileUuid, Long fileVersionId) throws ImageGalleryApplicationException;
+
+ /**
+ * Save or update imageGallery into database.
+ *
+ * @param ImageGallery
+ */
+ void saveOrUpdateImageGallery(ImageGallery ImageGallery);
+
+ /**
+ * Delete reource attachment(i.e., offline/online instruction file) from database. This method does not delete the
+ * file from repository.
+ *
+ * @param attachmentUid
+ */
+ void deleteImageGalleryAttachment(Long attachmentUid);
+
+ /**
+ * Delete resoruce item from database.
+ *
+ * @param uid
+ */
+ void deleteImageGalleryItem(Long uid);
+
+ /**
+ * Return all reource items within the given toolSessionID.
+ *
+ * @param sessionId
+ * @return
+ */
+ List getImageGalleryItemsBySessionId(Long sessionId);
+
+ /**
+ * Get imageGallery which is relative with the special toolSession.
+ *
+ * @param sessionId
+ * @return
+ */
+ ImageGallery getImageGalleryBySessionId(Long sessionId);
+
+ /**
+ * Get imageGallery toolSession by toolSessionId
+ *
+ * @param sessionId
+ * @return
+ */
+ ImageGallerySession getImageGallerySessionBySessionId(Long sessionId);
+
+ /**
+ * Save or update imageGallery session.
+ *
+ * @param resSession
+ */
+ void saveOrUpdateImageGallerySession(ImageGallerySession resSession);
+
+ void retrieveComplete(SortedSet imageGalleryItemList, ImageGalleryUser user);
+
+ void setItemComplete(Long imageGalleryItemUid, Long userId, Long sessionId);
+
+ void setItemAccess(Long imageGalleryItemUid, Long userId, Long sessionId);
+
+ /**
+ * the reqired number minus the count of view of the given user.
+ *
+ * @param userUid
+ * @return
+ */
+ int checkMiniView(Long toolSessionId, Long userId);
+
+ /**
+ * If success return next activity's url, otherwise return null.
+ *
+ * @param toolSessionId
+ * @param userId
+ * @return
+ */
+ String finishToolSession(Long toolSessionId, Long userId) throws ImageGalleryApplicationException;
+
+ ImageGalleryItem getImageGalleryItemByUid(Long itemUid);
+
+ /**
+ * Return monitoring summary list. The return value is list of imageGallery summaries for each groups.
+ *
+ * @param contentId
+ * @return
+ */
+ List> getSummary(Long contentId);
+
+ List getUserListBySessionItem(Long sessionId, Long itemUid);
+
+ /**
+ * Set a imageGallery item visible or not.
+ *
+ * @param itemUid
+ * @param visible
+ * true, item is visible. False, item is invisible.
+ */
+ void setItemVisible(Long itemUid, boolean visible);
+
+ /**
+ * Get imageGallery item Summary
list according to sessionId and skipHide flag.
+ *
+ * @param sessionId
+ * @param skipHide
+ * true, don't get imageGallery item if its isHide
flag is true. Otherwise, get all
+ * imageGallery item
+ * @return
+ */
+ public List exportBySessionId(Long sessionId, boolean skipHide);
+
+ public List> exportByContentId(Long contentId);
+
+ /**
+ * Create refection entry into notebook tool.
+ *
+ * @param sessionId
+ * @param notebook_tool
+ * @param tool_signature
+ * @param userId
+ * @param entryText
+ */
+ public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId,
+ String entryText);
+
+ /**
+ * Get reflection entry from notebook tool.
+ *
+ * @param sessionId
+ * @param idType
+ * @param signature
+ * @param userID
+ * @return
+ */
+ public NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID);
+
+ /**
+ * @param notebookEntry
+ */
+ public void updateEntry(NotebookEntry notebookEntry);
+
+ /**
+ * Get Reflect DTO list grouped by sessionID.
+ *
+ * @param contentId
+ * @return
+ */
+ Map> getReflectList(Long contentId, boolean setEntry);
+
+ /**
+ * Get user by UID
+ *
+ * @param uid
+ * @return
+ */
+ ImageGalleryUser getUser(Long uid);
+
+ public IEventNotificationService getEventNotificationService();
+
+ /**
+ * Gets a message from imageGallery bundle. Same as
in JSP pages.
+ *
+ * @param key
+ * key of the message
+ * @param args
+ * arguments for the message
+ * @return message content
+ */
+ String getLocalisedMessage(String key, Object[] args);
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryApplicationException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/Attic/ImageGalleryApplicationException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryApplicationException.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,48 @@
+/****************************************************************
+ * 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: ImageGalleryApplicationException.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.service;
+
+public class ImageGalleryApplicationException extends Exception {
+
+ public ImageGalleryApplicationException() {
+ super();
+
+ }
+
+ public ImageGalleryApplicationException(String message, Throwable cause) {
+ super(message, cause);
+
+ }
+
+ public ImageGalleryApplicationException(String message) {
+ super(message);
+
+ }
+
+ public ImageGalleryApplicationException(Throwable cause) {
+ super(cause);
+
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,1169 @@
+/****************************************************************
+ * 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: ImageGalleryServiceImpl.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.service;
+
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+
+import javax.swing.ImageIcon;
+
+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.IVersionedNode;
+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.events.IEventNotificationService;
+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.CoreNotebookConstants;
+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.imageGallery.ImageGalleryConstants;
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryAttachmentDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryItemDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryItemVisitDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGallerySessionDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dao.ImageGalleryUserDAO;
+import org.lamsfoundation.lams.tool.imageGallery.dto.ReflectDTO;
+import org.lamsfoundation.lams.tool.imageGallery.dto.Summary;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryAttachment;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItemVisitLog;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryToolContentHandler;
+import org.lamsfoundation.lams.tool.imageGallery.util.ReflectDTOComparator;
+import org.lamsfoundation.lams.tool.service.ILamsToolService;
+import org.lamsfoundation.lams.usermanagement.User;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.usermanagement.service.IUserManagementService;
+import org.lamsfoundation.lams.util.MessageService;
+import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.util.audit.IAuditService;
+import org.lamsfoundation.lams.util.wddx.WDDXProcessor;
+import org.lamsfoundation.lams.util.wddx.WDDXProcessorConversionException;
+import org.lamsfoundation.lams.util.zipfile.ZipFileUtil;
+import org.lamsfoundation.lams.util.zipfile.ZipFileUtilException;
+
+import com.sun.image.codec.jpeg.JPEGCodec;
+import com.sun.image.codec.jpeg.JPEGImageEncoder;
+
+/**
+ *
+ * @author Dapeng.Ni
+ *
+ */
+public class ImageGalleryServiceImpl implements IImageGalleryService, ToolContentManager, ToolSessionManager,
+ ToolContentImport102Manager
+
+{
+ static Logger log = Logger.getLogger(ImageGalleryServiceImpl.class.getName());
+
+ private ImageGalleryDAO imageGalleryDao;
+
+ private ImageGalleryItemDAO imageGalleryItemDao;
+
+ private ImageGalleryAttachmentDAO imageGalleryAttachmentDao;
+
+ private ImageGalleryUserDAO imageGalleryUserDao;
+
+ private ImageGallerySessionDAO imageGallerySessionDao;
+
+ private ImageGalleryItemVisitDAO imageGalleryItemVisitDao;
+
+ // tool service
+ private ImageGalleryToolContentHandler imageGalleryToolContentHandler;
+
+ private MessageService messageService;
+
+ // system services
+ private IRepositoryService repositoryService;
+
+ private ILamsToolService toolService;
+
+ private ILearnerService learnerService;
+
+ private IAuditService auditService;
+
+ private IUserManagementService userManagementService;
+
+ private IExportToolContentService exportContentService;
+
+ private ICoreNotebookService coreNotebookService;
+
+ private IEventNotificationService eventNotificationService;
+
+ public IVersionedNode getFileNode(Long itemUid, String relPathString) throws ImageGalleryApplicationException {
+ ImageGalleryItem item = (ImageGalleryItem) imageGalleryItemDao.getObject(ImageGalleryItem.class, itemUid);
+ if (item == null) {
+ throw new ImageGalleryApplicationException("Reource item " + itemUid + " not found.");
+ }
+
+ return getFile(item.getFileUuid(), item.getFileVersionId(), relPathString);
+ }
+
+ // *******************************************************************************
+ // Service method
+ // *******************************************************************************
+ /**
+ * Try to get the file. If forceLogin = false and an access denied exception occurs, call this method again to get a
+ * new ticket and retry file lookup. If forceLogin = true and it then fails then throw exception.
+ *
+ * @param uuid
+ * @param versionId
+ * @param relativePath
+ * @param attemptCount
+ * @return file node
+ * @throws ImscpApplicationException
+ */
+ private IVersionedNode getFile(Long uuid, Long versionId, String relativePath)
+ throws ImageGalleryApplicationException {
+
+ ITicket tic = getRepositoryLoginTicket();
+
+ try {
+
+ return repositoryService.getFileItem(tic, uuid, versionId, relativePath);
+
+ } catch (AccessDeniedException e) {
+
+ String error = "Unable to access repository to get file uuid " + uuid + " version id " + versionId
+ + " path " + relativePath + ".";
+
+ error = error + "AccessDeniedException: " + e.getMessage() + " Unable to retry further.";
+ ImageGalleryServiceImpl.log.error(error);
+ throw new ImageGalleryApplicationException(error, e);
+
+ } catch (Exception e) {
+
+ String error = "Unable to access repository to get file uuid " + uuid + " version id " + versionId
+ + " path " + relativePath + "." + " Exception: " + e.getMessage();
+ ImageGalleryServiceImpl.log.error(error);
+ throw new ImageGalleryApplicationException(error, e);
+
+ }
+ }
+
+ /**
+ * This method verifies the credentials of the ImageGallery 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 ImageGalleryApplicationException
+ */
+ private ITicket getRepositoryLoginTicket() throws ImageGalleryApplicationException {
+ ICredentials credentials = new SimpleCredentials(imageGalleryToolContentHandler.getRepositoryUser(),
+ imageGalleryToolContentHandler.getRepositoryId());
+ try {
+ ITicket ticket = repositoryService.login(credentials, imageGalleryToolContentHandler
+ .getRepositoryWorkspaceName());
+ return ticket;
+ } catch (AccessDeniedException ae) {
+ throw new ImageGalleryApplicationException("Access Denied to repository." + ae.getMessage());
+ } catch (WorkspaceNotFoundException we) {
+ throw new ImageGalleryApplicationException("Workspace not found." + we.getMessage());
+ } catch (LoginException e) {
+ throw new ImageGalleryApplicationException("Login failed." + e.getMessage());
+ }
+ }
+
+ public ImageGallery getImageGalleryByContentId(Long contentId) {
+ ImageGallery rs = imageGalleryDao.getByContentId(contentId);
+ if (rs == null) {
+ ImageGalleryServiceImpl.log.error("Could not find the content by given ID:" + contentId);
+ }
+ return rs;
+ }
+
+ public ImageGallery getDefaultContent(Long contentId) throws ImageGalleryApplicationException {
+ if (contentId == null) {
+ String error = messageService.getMessage("error.msg.default.content.not.find");
+ ImageGalleryServiceImpl.log.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+
+ ImageGallery defaultContent = getDefaultImageGallery();
+ // save default content by given ID.
+ ImageGallery content = new ImageGallery();
+ content = ImageGallery.newInstance(defaultContent, contentId, imageGalleryToolContentHandler);
+// content.setNextImageTitle(new Long(1));
+ return content;
+ }
+
+ public List getAuthoredItems(Long imageGalleryUid) {
+ return imageGalleryItemDao.getAuthoringItems(imageGalleryUid);
+ }
+
+ public ImageGalleryAttachment uploadInstructionFile(FormFile uploadFile, String fileType)
+ throws UploadImageGalleryFileException {
+ if ((uploadFile == null) || StringUtils.isEmpty(uploadFile.getFileName())) {
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.upload.file.not.found",
+ new Object[] { uploadFile }));
+ }
+
+ // upload file to repository
+ NodeKey nodeKey = processFile(uploadFile, fileType);
+
+ // create new attachement
+ ImageGalleryAttachment file = new ImageGalleryAttachment();
+ file.setFileType(fileType);
+ file.setFileUuid(nodeKey.getUuid());
+ file.setFileVersionId(nodeKey.getVersion());
+ file.setFileName(uploadFile.getFileName());
+ file.setCreated(new Date());
+
+ return file;
+ }
+
+ public void createUser(ImageGalleryUser imageGalleryUser) {
+ imageGalleryUserDao.saveObject(imageGalleryUser);
+ }
+
+ public ImageGalleryUser getUserByIDAndContent(Long userId, Long contentId) {
+
+ return imageGalleryUserDao.getUserByUserIDAndContentID(userId, contentId);
+
+ }
+
+ public ImageGalleryUser getUserByIDAndSession(Long userId, Long sessionId) {
+
+ return imageGalleryUserDao.getUserByUserIDAndSessionID(userId, sessionId);
+
+ }
+
+ public void deleteFromRepository(Long fileUuid, Long fileVersionId) throws ImageGalleryApplicationException {
+ ITicket ticket = getRepositoryLoginTicket();
+ try {
+ repositoryService.deleteVersion(ticket, fileUuid, fileVersionId);
+ } catch (Exception e) {
+ throw new ImageGalleryApplicationException("Exception occured while deleting files from"
+ + " the repository " + e.getMessage());
+ }
+ }
+
+ public void saveOrUpdateImageGallery(ImageGallery imageGallery) {
+ imageGalleryDao.saveObject(imageGallery);
+ }
+
+ public void deleteImageGalleryAttachment(Long attachmentUid) {
+ imageGalleryAttachmentDao.removeObject(ImageGalleryAttachment.class, attachmentUid);
+
+ }
+
+ public void saveOrUpdateImageGalleryItem(ImageGalleryItem item) {
+ imageGalleryItemDao.saveObject(item);
+ }
+
+ public void deleteImageGalleryItem(Long uid) {
+ imageGalleryItemDao.removeObject(ImageGalleryItem.class, uid);
+ }
+
+ public List getImageGalleryItemsBySessionId(Long sessionId) {
+ ImageGallerySession session = imageGallerySessionDao.getSessionBySessionId(sessionId);
+ if (session == null) {
+ ImageGalleryServiceImpl.log.error("Failed get ImageGallerySession by ID [" + sessionId + "]");
+ return null;
+ }
+ // add imageGallery items from Authoring
+ ImageGallery imageGallery = session.getImageGallery();
+ List items = new ArrayList();
+ items.addAll(imageGallery.getImageGalleryItems());
+
+ // add imageGallery items from ImageGallerySession
+ items.addAll(session.getImageGalleryItems());
+
+ return items;
+ }
+
+ public List exportBySessionId(Long sessionId, boolean skipHide) {
+ ImageGallerySession session = imageGallerySessionDao.getSessionBySessionId(sessionId);
+ if (session == null) {
+ ImageGalleryServiceImpl.log.error("Failed get ImageGallerySession by ID [" + sessionId + "]");
+ return null;
+ }
+ // initial imageGallery items list
+ List itemList = new ArrayList();
+ Set resList = session.getImageGallery().getImageGalleryItems();
+ for (ImageGalleryItem item : resList) {
+ if (skipHide && item.isHide()) {
+ continue;
+ }
+ // if item is create by author
+ if (item.isCreateByAuthor()) {
+ Summary sum = new Summary(session.getSessionId(), session.getSessionName(), item, false);
+ itemList.add(sum);
+ }
+ }
+
+ // get this session's all imageGallery items
+ Set sessList = session.getImageGalleryItems();
+ for (ImageGalleryItem item : sessList) {
+ if (skipHide && item.isHide()) {
+ continue;
+ }
+
+ // to skip all item create by author
+ if (!item.isCreateByAuthor()) {
+ Summary sum = new Summary(session.getSessionId(), session.getSessionName(), item, false);
+ itemList.add(sum);
+ }
+ }
+
+ return itemList;
+ }
+
+ public List> exportByContentId(Long contentId) {
+ ImageGallery imageGallery = imageGalleryDao.getByContentId(contentId);
+ List> groupList = new ArrayList();
+
+ // create init imageGallery items list
+ List initList = new ArrayList();
+ groupList.add(initList);
+ Set resList = imageGallery.getImageGalleryItems();
+ for (ImageGalleryItem item : resList) {
+ if (item.isCreateByAuthor()) {
+ Summary sum = new Summary(null, null, item, true);
+ initList.add(sum);
+ }
+ }
+
+ // session by session
+ List sessionList = imageGallerySessionDao.getByContentId(contentId);
+ for (ImageGallerySession session : sessionList) {
+ List group = new ArrayList();
+ // get this session's all imageGallery items
+ Set sessList = session.getImageGalleryItems();
+ for (ImageGalleryItem item : sessList) {
+ // to skip all item create by author
+ if (!item.isCreateByAuthor()) {
+ Summary sum = new Summary(session.getSessionId(), session.getSessionName(), item, false);
+ group.add(sum);
+ }
+ }
+ if (group.size() == 0) {
+ group.add(new Summary(session.getSessionId(), session.getSessionName(), null, false));
+ }
+ groupList.add(group);
+ }
+
+ return groupList;
+ }
+
+ public ImageGallery getImageGalleryBySessionId(Long sessionId) {
+ ImageGallerySession session = imageGallerySessionDao.getSessionBySessionId(sessionId);
+ // to skip CGLib problem
+ Long contentId = session.getImageGallery().getContentId();
+ ImageGallery res = imageGalleryDao.getByContentId(contentId);
+ int miniView = res.getNumberColumns();
+ // construct dto fields;
+ res.setMiniViewNumberStr(messageService.getMessage("label.learning.minimum.review", new Object[] { new Integer(
+ miniView) }));
+ return res;
+ }
+
+ public ImageGallerySession getImageGallerySessionBySessionId(Long sessionId) {
+ return imageGallerySessionDao.getSessionBySessionId(sessionId);
+ }
+
+ public void saveOrUpdateImageGallerySession(ImageGallerySession resSession) {
+ imageGallerySessionDao.saveObject(resSession);
+ }
+
+ public void retrieveComplete(SortedSet imageGalleryItemList, ImageGalleryUser user) {
+ for (ImageGalleryItem item : imageGalleryItemList) {
+ ImageGalleryItemVisitLog log = imageGalleryItemVisitDao.getImageGalleryItemLog(item.getUid(), user
+ .getUserId());
+ if (log == null) {
+ item.setComplete(false);
+ } else {
+ item.setComplete(log.isComplete());
+ }
+ }
+ }
+
+ public void setItemComplete(Long imageGalleryItemUid, Long userId, Long sessionId) {
+ ImageGalleryItemVisitLog log = imageGalleryItemVisitDao.getImageGalleryItemLog(imageGalleryItemUid, userId);
+ if (log == null) {
+ log = new ImageGalleryItemVisitLog();
+ ImageGalleryItem item = imageGalleryItemDao.getByUid(imageGalleryItemUid);
+ log.setImageGalleryItem(item);
+ ImageGalleryUser user = imageGalleryUserDao.getUserByUserIDAndSessionID(userId, sessionId);
+ log.setUser(user);
+ log.setSessionId(sessionId);
+ log.setAccessDate(new Timestamp(new Date().getTime()));
+ }
+ log.setComplete(true);
+ imageGalleryItemVisitDao.saveObject(log);
+ }
+
+ public void setItemAccess(Long imageGalleryItemUid, Long userId, Long sessionId) {
+ ImageGalleryItemVisitLog log = imageGalleryItemVisitDao.getImageGalleryItemLog(imageGalleryItemUid, userId);
+ if (log == null) {
+ log = new ImageGalleryItemVisitLog();
+ ImageGalleryItem item = imageGalleryItemDao.getByUid(imageGalleryItemUid);
+ log.setImageGalleryItem(item);
+ ImageGalleryUser user = imageGalleryUserDao.getUserByUserIDAndSessionID(userId, sessionId);
+ log.setUser(user);
+ log.setComplete(false);
+ log.setSessionId(sessionId);
+ log.setAccessDate(new Timestamp(new Date().getTime()));
+ imageGalleryItemVisitDao.saveObject(log);
+ }
+ }
+
+ public String finishToolSession(Long toolSessionId, Long userId) throws ImageGalleryApplicationException {
+ ImageGalleryUser user = imageGalleryUserDao.getUserByUserIDAndSessionID(userId, toolSessionId);
+ user.setSessionFinished(true);
+ imageGalleryUserDao.saveObject(user);
+
+ // ImageGallerySession session = imageGallerySessionDao.getSessionBySessionId(toolSessionId);
+ // session.setStatus(ImageGalleryConstants.COMPLETED);
+ // imageGallerySessionDao.saveObject(session);
+
+ String nextUrl = null;
+ try {
+ nextUrl = this.leaveToolSession(toolSessionId, userId);
+ } catch (DataMissingException e) {
+ throw new ImageGalleryApplicationException(e);
+ } catch (ToolException e) {
+ throw new ImageGalleryApplicationException(e);
+ }
+ return nextUrl;
+ }
+
+ public int checkMiniView(Long toolSessionId, Long userUid) {
+ int miniView = imageGalleryItemVisitDao.getUserViewLogCount(toolSessionId, userUid);
+ ImageGallerySession session = imageGallerySessionDao.getSessionBySessionId(toolSessionId);
+ if (session == null) {
+ ImageGalleryServiceImpl.log.error("Failed get session by ID [" + toolSessionId + "]");
+ return 0;
+ }
+ int reqView = session.getImageGallery().getNumberColumns();
+
+ return reqView - miniView;
+ }
+
+ public ImageGalleryItem getImageGalleryItemByUid(Long itemUid) {
+ return imageGalleryItemDao.getByUid(itemUid);
+ }
+
+ public List> getSummary(Long contentId) {
+ List> groupList = new ArrayList>();
+ List group = new ArrayList();
+
+ // get all item which is accessed by user
+ Map visitCountMap = imageGalleryItemVisitDao.getSummary(contentId);
+
+ ImageGallery imageGallery = imageGalleryDao.getByContentId(contentId);
+ Set resItemList = imageGallery.getImageGalleryItems();
+
+ // get all sessions in a imageGallery and retrieve all imageGallery items under this session
+ // plus initial imageGallery items by author creating (resItemList)
+ List sessionList = imageGallerySessionDao.getByContentId(contentId);
+ for (ImageGallerySession session : sessionList) {
+ // one new group for one session.
+ group = new ArrayList();
+ // firstly, put all initial imageGallery item into this group.
+ for (ImageGalleryItem item : resItemList) {
+ Summary sum = new Summary(session.getSessionId(), session.getSessionName(), item);
+ // set viewNumber according visit log
+ if (visitCountMap.containsKey(item.getUid())) {
+ sum.setViewNumber(visitCountMap.get(item.getUid()).intValue());
+ }
+ group.add(sum);
+ }
+ // get this session's all imageGallery items
+ Set sessItemList = session.getImageGalleryItems();
+ for (ImageGalleryItem item : sessItemList) {
+ // to skip all item create by author
+ if (!item.isCreateByAuthor()) {
+ Summary sum = new Summary(session.getSessionId(), session.getSessionName(), item);
+ // set viewNumber according visit log
+ if (visitCountMap.containsKey(item.getUid())) {
+ sum.setViewNumber(visitCountMap.get(item.getUid()).intValue());
+ }
+ group.add(sum);
+ }
+ }
+ // so far no any item available, so just put session name info to Summary
+ if (group.size() == 0) {
+ group.add(new Summary(session.getSessionId(), session.getSessionName(), null));
+ }
+ groupList.add(group);
+ }
+
+ return groupList;
+
+ }
+
+ public Map> getReflectList(Long contentId, boolean setEntry) {
+ Map> map = new HashMap>();
+
+ List sessionList = imageGallerySessionDao.getByContentId(contentId);
+ for (ImageGallerySession session : sessionList) {
+ Long sessionId = session.getSessionId();
+ boolean hasRefection = session.getImageGallery().isReflectOnActivity();
+ Set list = new TreeSet(new ReflectDTOComparator());
+ // get all users in this session
+ List users = imageGalleryUserDao.getBySessionID(sessionId);
+ for (ImageGalleryUser user : users) {
+ ReflectDTO ref = new ReflectDTO(user);
+
+ if (setEntry) {
+ NotebookEntry entry = getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, user.getUserId().intValue());
+ if (entry != null) {
+ ref.setReflect(entry.getEntry());
+ }
+ }
+
+ ref.setHasRefection(hasRefection);
+ list.add(ref);
+ }
+ map.put(sessionId, list);
+ }
+
+ return map;
+ }
+
+ public List getUserListBySessionItem(Long sessionId, Long itemUid) {
+ List logList = imageGalleryItemVisitDao.getImageGalleryItemLogBySession(sessionId,
+ itemUid);
+ List userList = new ArrayList(logList.size());
+ for (ImageGalleryItemVisitLog visit : logList) {
+ ImageGalleryUser user = visit.getUser();
+ user.setAccessDate(visit.getAccessDate());
+ userList.add(user);
+ }
+ return userList;
+ }
+
+ public void setItemVisible(Long itemUid, boolean visible) {
+ ImageGalleryItem item = imageGalleryItemDao.getByUid(itemUid);
+ if (item != null) {
+ // createBy should be null for system default value.
+ Long userId = 0L;
+ String loginName = "No user";
+ if (item.getCreateBy() != null) {
+ userId = item.getCreateBy().getUserId();
+ loginName = item.getCreateBy().getLoginName();
+ }
+ if (visible) {
+ auditService.logShowEntry(ImageGalleryConstants.TOOL_SIGNATURE, userId, loginName, item.toString());
+ } else {
+ auditService.logHideEntry(ImageGalleryConstants.TOOL_SIGNATURE, userId, loginName, item.toString());
+ }
+ item.setHide(!visible);
+ imageGalleryItemDao.saveObject(item);
+ }
+ }
+
+ public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId,
+ String entryText) {
+ return coreNotebookService.createNotebookEntry(sessionId, notebookToolType, toolSignature, userId, "",
+ entryText);
+ }
+
+ public NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID) {
+ List list = coreNotebookService.getEntry(sessionId, idType, signature, userID);
+ if ((list == null) || list.isEmpty()) {
+ return null;
+ } else {
+ return list.get(0);
+ }
+ }
+
+ /**
+ * @param notebookEntry
+ */
+ public void updateEntry(NotebookEntry notebookEntry) {
+ coreNotebookService.updateEntry(notebookEntry);
+ }
+
+ public ImageGalleryUser getUser(Long uid) {
+ return (ImageGalleryUser) imageGalleryUserDao.getObject(ImageGalleryUser.class, uid);
+ }
+
+ // *****************************************************************************
+ // private methods
+ // *****************************************************************************
+ private ImageGallery getDefaultImageGallery() throws ImageGalleryApplicationException {
+ Long defaultImageGalleryId = getToolDefaultContentIdBySignature(ImageGalleryConstants.TOOL_SIGNATURE);
+ ImageGallery defaultImageGallery = getImageGalleryByContentId(defaultImageGalleryId);
+ if (defaultImageGallery == null) {
+ String error = messageService.getMessage("error.msg.default.content.not.find");
+ ImageGalleryServiceImpl.log.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+
+ return defaultImageGallery;
+ }
+
+ private Long getToolDefaultContentIdBySignature(String toolSignature) throws ImageGalleryApplicationException {
+ Long contentId = null;
+ contentId = new Long(toolService.getToolDefaultContentIdBySignature(toolSignature));
+ if (contentId == null) {
+ String error = messageService.getMessage("error.msg.default.content.not.find");
+ ImageGalleryServiceImpl.log.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+ return contentId;
+ }
+
+ /**
+ * Process an uploaded file.
+ *
+ * @throws ImageGalleryApplicationException
+ * @throws FileNotFoundException
+ * @throws IOException
+ * @throws RepositoryCheckedException
+ * @throws InvalidParameterException
+ */
+ private NodeKey processFile(FormFile file, String fileType) throws UploadImageGalleryFileException {
+ NodeKey node = null;
+ if ((file != null) && !StringUtils.isEmpty(file.getFileName())) {
+ String fileName = file.getFileName();
+ try {
+ node = imageGalleryToolContentHandler.uploadFile(file.getInputStream(), fileName,
+ file.getContentType(), fileType);
+ String rr = imageGalleryToolContentHandler.getFileNode(node.getUuid()).getPath();
+ String ff = "";
+ } catch (InvalidParameterException e) {
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.invaid.param.upload"));
+ } catch (FileNotFoundException e) {
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.file.not.found"));
+ } catch (RepositoryCheckedException e) {
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.repository"));
+ } catch (IOException e) {
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.io.exception"));
+ }
+ }
+ return node;
+ }
+
+ public void uploadImageGalleryItemFile(ImageGalleryItem item, FormFile file) throws UploadImageGalleryFileException {
+ try {
+ InputStream is = file.getInputStream();
+ String fileName = file.getFileName();
+ String fileType = file.getContentType();
+
+ //TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// String packageDirectory = ZipFileUtil.expandZip(is, fileName);
+// String initFile = findWebsiteInitialItem(packageDirectory);
+// if (initFile == null) {
+// throw new UploadImageGalleryFileException(messageService
+// .getMessage("error.msg.website.no.initial.file"));
+// }
+
+
+
+ // upload file
+ NodeKey nodeKey = processFile(file, IToolContentHandler.TYPE_ONLINE);
+ item.setFileUuid(nodeKey.getUuid());
+ item.setFileVersionId(nodeKey.getVersion());
+
+ // create the package from the directory contents
+ item.setFileType(fileType);
+ item.setFileName(fileName);
+ } catch (FileNotFoundException e) {
+ ImageGalleryServiceImpl.log.error(messageService.getMessage("error.msg.file.not.found") + ":"
+ + e.toString());
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.file.not.found"));
+ } catch (IOException e) {
+ ImageGalleryServiceImpl.log.error(messageService.getMessage("error.msg.io.exception") + ":" + e.toString());
+ throw new UploadImageGalleryFileException(messageService.getMessage("error.msg.io.exception"));
+ }
+ }
+
+ /**
+ * Reads an image in a file and creates a thumbnail in another file.
+ *
+ * @param orig
+ * The name of image file.
+ * @param thumb
+ * The name of thumbnail file. Will be created if necessary.
+ * @param maxDim
+ * The width and height of the thumbnail must be maxDim pixels or less.
+ */
+ private static void createThumbnail(String orig, String thumb, int maxDim) {
+ try {
+ // Get the image from a file.
+ Image inImage = new ImageIcon(orig).getImage();
+
+ // Determine the scale.
+ double scale = (double) maxDim / (double) inImage.getHeight(null);
+ if (inImage.getWidth(null) > inImage.getHeight(null)) {
+ scale = (double) maxDim / (double) inImage.getWidth(null);
+ }
+
+ // Determine size of new image.
+ // One of them
+ // should equal maxDim.
+ int scaledW = (int) (scale * inImage.getWidth(null));
+ int scaledH = (int) (scale * inImage.getHeight(null));
+
+ // Create an image buffer in
+ // which to paint on.
+ BufferedImage outImage = new BufferedImage(scaledW, scaledH, BufferedImage.TYPE_INT_RGB);
+
+ // Set the scale.
+ AffineTransform tx = new AffineTransform();
+
+ // If the image is smaller than
+ // the desired image size,
+ // don't bother scaling.
+ if (scale < 1.0d) {
+ tx.scale(scale, scale);
+ }
+
+ // Paint image.
+ Graphics2D g2d = outImage.createGraphics();
+ g2d.drawImage(inImage, tx, null);
+ g2d.dispose();
+
+ // JPEG-encode the image
+ // and write to file.
+ OutputStream os = new FileOutputStream(thumb);
+ JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
+ encoder.encode(outImage);
+ os.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ System.exit(0);
+ }
+
+ /**
+ * Find out default.htm/html or index.htm/html in the given directory folder
+ *
+ * @param packageDirectory
+ * @return
+ */
+ private String findWebsiteInitialItem(String packageDirectory) {
+ File file = new File(packageDirectory);
+ if (!file.isDirectory()) {
+ return null;
+ }
+
+ File[] initFiles = file.listFiles(new FileFilter() {
+ public boolean accept(File pathname) {
+ if ((pathname == null) || (pathname.getName() == null)) {
+ return false;
+ }
+ String name = pathname.getName();
+ if (name.endsWith("default.html") || name.endsWith("default.htm") || name.endsWith("index.html")
+ || name.endsWith("index.htm")) {
+ return true;
+ }
+ return false;
+ }
+ });
+ if ((initFiles != null) && (initFiles.length > 0)) {
+ return initFiles[0].getName();
+ } else {
+ return null;
+ }
+ }
+
+ // *****************************************************************************
+ // set methods for Spring Bean
+ // *****************************************************************************
+ public void setAuditService(IAuditService auditService) {
+ this.auditService = auditService;
+ }
+
+ public void setLearnerService(ILearnerService learnerService) {
+ this.learnerService = learnerService;
+ }
+
+ public void setMessageService(MessageService messageService) {
+ this.messageService = messageService;
+ }
+
+ public void setRepositoryService(IRepositoryService repositoryService) {
+ this.repositoryService = repositoryService;
+ }
+
+ public void setImageGalleryAttachmentDao(ImageGalleryAttachmentDAO imageGalleryAttachmentDao) {
+ this.imageGalleryAttachmentDao = imageGalleryAttachmentDao;
+ }
+
+ public void setImageGalleryDao(ImageGalleryDAO imageGalleryDao) {
+ this.imageGalleryDao = imageGalleryDao;
+ }
+
+ public void setImageGalleryItemDao(ImageGalleryItemDAO imageGalleryItemDao) {
+ this.imageGalleryItemDao = imageGalleryItemDao;
+ }
+
+ public void setImageGallerySessionDao(ImageGallerySessionDAO imageGallerySessionDao) {
+ this.imageGallerySessionDao = imageGallerySessionDao;
+ }
+
+ public void setImageGalleryToolContentHandler(ImageGalleryToolContentHandler imageGalleryToolContentHandler) {
+ this.imageGalleryToolContentHandler = imageGalleryToolContentHandler;
+ }
+
+ public void setImageGalleryUserDao(ImageGalleryUserDAO imageGalleryUserDao) {
+ this.imageGalleryUserDao = imageGalleryUserDao;
+ }
+
+ public void setToolService(ILamsToolService toolService) {
+ this.toolService = toolService;
+ }
+
+ public ImageGalleryItemVisitDAO getImageGalleryItemVisitDao() {
+ return imageGalleryItemVisitDao;
+ }
+
+ public void setImageGalleryItemVisitDao(ImageGalleryItemVisitDAO imageGalleryItemVisitDao) {
+ this.imageGalleryItemVisitDao = imageGalleryItemVisitDao;
+ }
+
+ // *******************************************************************************
+ // ToolContentManager, ToolSessionManager methods
+ // *******************************************************************************
+
+ public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException {
+ ImageGallery toolContentObj = imageGalleryDao.getByContentId(toolContentId);
+ if (toolContentObj == null) {
+ try {
+ toolContentObj = getDefaultImageGallery();
+ } catch (ImageGalleryApplicationException e) {
+ throw new DataMissingException(e.getMessage());
+ }
+ }
+ if (toolContentObj == null) {
+ throw new DataMissingException("Unable to find default content for the imageGallery tool");
+ }
+
+ // set ImageGalleryToolContentHandler as null to avoid copy file node in repository again.
+ toolContentObj = ImageGallery.newInstance(toolContentObj, toolContentId, null);
+ toolContentObj.setToolContentHandler(null);
+ toolContentObj.setOfflineFileList(null);
+ toolContentObj.setOnlineFileList(null);
+ toolContentObj.setMiniViewNumberStr(null);
+ try {
+ exportContentService.registerFileClassForExport(ImageGalleryAttachment.class.getName(), "fileUuid",
+ "fileVersionId");
+ exportContentService.registerFileClassForExport(ImageGalleryItem.class.getName(), "fileUuid",
+ "fileVersionId");
+ exportContentService.exportToolContent(toolContentId, toolContentObj, imageGalleryToolContentHandler,
+ rootPath);
+ } catch (ExportToolContentException e) {
+ throw new ToolException(e);
+ }
+ }
+
+ public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion,
+ String toVersion) throws ToolException {
+
+ try {
+ exportContentService.registerFileClassForImport(ImageGalleryAttachment.class.getName(), "fileUuid",
+ "fileVersionId", "fileName", "fileType", null, null);
+ exportContentService.registerFileClassForImport(ImageGalleryItem.class.getName(), "fileUuid",
+ "fileVersionId", "fileName", "fileType", null, "initialItem");
+
+ Object toolPOJO = exportContentService.importToolContent(toolContentPath, imageGalleryToolContentHandler,
+ fromVersion, toVersion);
+ if (!(toolPOJO instanceof ImageGallery)) {
+ throw new ImportToolContentException(
+ "Import Share imageGallery tool content failed. Deserialized object is " + toolPOJO);
+ }
+ ImageGallery toolContentObj = (ImageGallery) toolPOJO;
+
+ // reset it to new toolContentId
+ toolContentObj.setContentId(toolContentId);
+ ImageGalleryUser user = imageGalleryUserDao.getUserByUserIDAndContentID(new Long(newUserUid.longValue()),
+ toolContentId);
+ if (user == null) {
+ user = new ImageGalleryUser();
+ UserDTO sysUser = ((User) userManagementService.findById(User.class, newUserUid)).getUserDTO();
+ user.setFirstName(sysUser.getFirstName());
+ user.setLastName(sysUser.getLastName());
+ user.setLoginName(sysUser.getLogin());
+ user.setUserId(new Long(newUserUid.longValue()));
+ user.setImageGallery(toolContentObj);
+ }
+ toolContentObj.setCreatedBy(user);
+
+ // reset all imageGalleryItem createBy user
+ Set items = toolContentObj.getImageGalleryItems();
+ for (ImageGalleryItem item : items) {
+ item.setCreateBy(user);
+ }
+ imageGalleryDao.saveObject(toolContentObj);
+ } 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 {
+ return new TreeMap();
+ }
+
+ public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException {
+ if (toContentId == null) {
+ throw new ToolException("Failed to create the SharedImageGalleryFiles tool seession");
+ }
+
+ ImageGallery imageGallery = null;
+ if (fromContentId != null) {
+ imageGallery = imageGalleryDao.getByContentId(fromContentId);
+ }
+ if (imageGallery == null) {
+ try {
+ imageGallery = getDefaultImageGallery();
+ } catch (ImageGalleryApplicationException e) {
+ throw new ToolException(e);
+ }
+ }
+
+ ImageGallery toContent = ImageGallery.newInstance(imageGallery, toContentId, imageGalleryToolContentHandler);
+ imageGalleryDao.saveObject(toContent);
+
+ // save imageGallery items as well
+ Set items = toContent.getImageGalleryItems();
+ if (items != null) {
+ Iterator iter = items.iterator();
+ while (iter.hasNext()) {
+ ImageGalleryItem item = (ImageGalleryItem) iter.next();
+ // createRootTopic(toContent.getUid(),null,msg);
+ }
+ }
+ }
+
+ public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException {
+ ImageGallery imageGallery = imageGalleryDao.getByContentId(toolContentId);
+ if (imageGallery == null) {
+ throw new ToolException("No found tool content by given content ID:" + toolContentId);
+ }
+ imageGallery.setDefineLater(value);
+ }
+
+ public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException {
+ ImageGallery imageGallery = imageGalleryDao.getByContentId(toolContentId);
+ if (imageGallery == null) {
+ throw new ToolException("No found tool content by given content ID:" + toolContentId);
+ }
+ imageGallery.setRunOffline(value);
+ }
+
+ public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException,
+ ToolException {
+ ImageGallery imageGallery = imageGalleryDao.getByContentId(toolContentId);
+ if (removeSessionData) {
+ List list = imageGallerySessionDao.getByContentId(toolContentId);
+ Iterator iter = list.iterator();
+ while (iter.hasNext()) {
+ ImageGallerySession session = (ImageGallerySession) iter.next();
+ imageGallerySessionDao.delete(session);
+ }
+ }
+ imageGalleryDao.delete(imageGallery);
+ }
+
+ public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException {
+ ImageGallerySession session = new ImageGallerySession();
+ session.setSessionId(toolSessionId);
+ session.setSessionName(toolSessionName);
+ ImageGallery imageGallery = imageGalleryDao.getByContentId(toolContentId);
+ session.setImageGallery(imageGallery);
+ imageGallerySessionDao.saveObject(session);
+ }
+
+ public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException {
+ if (toolSessionId == null) {
+ ImageGalleryServiceImpl.log.error("Fail to leave tool Session based on null tool session id.");
+ throw new ToolException("Fail to remove tool Session based on null tool session id.");
+ }
+ if (learnerId == null) {
+ ImageGalleryServiceImpl.log.error("Fail to leave tool Session based on null learner.");
+ throw new ToolException("Fail to remove tool Session based on null learner.");
+ }
+
+ ImageGallerySession session = imageGallerySessionDao.getSessionBySessionId(toolSessionId);
+ if (session != null) {
+ session.setStatus(ImageGalleryConstants.COMPLETED);
+ imageGallerySessionDao.saveObject(session);
+ } else {
+ ImageGalleryServiceImpl.log.error("Fail to leave tool Session.Could not find shared imageGallery "
+ + "session by given session id: " + toolSessionId);
+ throw new DataMissingException("Fail to leave tool Session."
+ + "Could not find shared imageGallery session by given session id: " + toolSessionId);
+ }
+ return learnerService.completeToolSession(toolSessionId, learnerId);
+ }
+
+ public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException {
+ return null;
+ }
+
+ public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException,
+ ToolException {
+ return null;
+ }
+
+ public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException {
+ imageGallerySessionDao.deleteBySessionId(toolSessionId);
+ }
+
+ /**
+ * 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 new TreeMap();
+ }
+
+ /**
+ * 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 null;
+ }
+
+ /* ===============Methods implemented from ToolContentImport102Manager =============== */
+
+ /**
+ * Import the data for a 1.0.2 Noticeboard or HTMLNoticeboard
+ */
+ public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) {}
+
+ /** 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 {
+
+ ImageGallery toolContentObj = getImageGalleryByContentId(toolContentId);
+ if (toolContentObj == null) {
+ throw new DataMissingException("Unable to set reflective data titled " + title
+ + " on activity toolContentId " + toolContentId + " as the tool content does not exist.");
+ }
+
+ toolContentObj.setReflectOnActivity(Boolean.TRUE);
+ toolContentObj.setReflectInstructions(description);
+ }
+
+ /* =================================================================================== */
+
+ public IExportToolContentService getExportContentService() {
+ return exportContentService;
+ }
+
+ public void setExportContentService(IExportToolContentService exportContentService) {
+ this.exportContentService = exportContentService;
+ }
+
+ public IUserManagementService getUserManagementService() {
+ return userManagementService;
+ }
+
+ public void setUserManagementService(IUserManagementService userManagementService) {
+ this.userManagementService = userManagementService;
+ }
+
+ public ICoreNotebookService getCoreNotebookService() {
+ return coreNotebookService;
+ }
+
+ public void setCoreNotebookService(ICoreNotebookService coreNotebookService) {
+ this.coreNotebookService = coreNotebookService;
+ }
+
+ public IEventNotificationService getEventNotificationService() {
+ return eventNotificationService;
+ }
+
+ public void setEventNotificationService(IEventNotificationService eventNotificationService) {
+ this.eventNotificationService = eventNotificationService;
+ }
+
+ public String getLocalisedMessage(String key, Object[] args) {
+ return messageService.getMessage(key, args);
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceProxy.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceProxy.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceProxy.java 11 Oct 2008 12:04:14 -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 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: ImageGalleryServiceProxy.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.service;
+
+import javax.servlet.ServletContext;
+
+import org.lamsfoundation.lams.tool.ToolContentManager;
+import org.lamsfoundation.lams.tool.ToolSessionManager;
+import org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * @author Dapeng.Ni
+ *
+ *
+ * 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 ImageGalleryServiceProxy {
+ /**
+ * Return the domain service object. 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 Shared imageGallery service object.
+ */
+ public static final IImageGalleryService getImageGalleryService(ServletContext servletContext) {
+ return (IImageGalleryService) ImageGalleryServiceProxy.getImageGalleryDomainService(servletContext);
+ }
+
+ public static final ToolSessionManager getSessionManager(ServletContext servletContext) {
+ return (ToolSessionManager) ImageGalleryServiceProxy.getImageGalleryDomainService(servletContext);
+ }
+
+ public static final ToolContentManager getContentManager(ServletContext servletContext) {
+ return (ToolContentManager) ImageGalleryServiceProxy.getImageGalleryDomainService(servletContext);
+ }
+
+ private static Object getImageGalleryDomainService(ServletContext servletContext) {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
+ return wac.getBean(ImageGalleryConstants.RESOURCE_SERVICE);
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/UploadImageGalleryFileException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/UploadImageGalleryFileException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/UploadImageGalleryFileException.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,48 @@
+/****************************************************************
+ * 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: UploadImageGalleryFileException.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.service;
+
+public class UploadImageGalleryFileException extends Exception {
+
+ public UploadImageGalleryFileException() {
+ super();
+
+ }
+
+ public UploadImageGalleryFileException(String message, Throwable cause) {
+ super(message, cause);
+
+ }
+
+ public UploadImageGalleryFileException(String message) {
+ super(message);
+
+ }
+
+ public UploadImageGalleryFileException(Throwable cause) {
+ super(cause);
+
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryItemComparator.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryItemComparator.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryItemComparator.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,23 @@
+package org.lamsfoundation.lams.tool.imageGallery.util;
+
+import java.util.Comparator;
+
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+
+/**
+ *
+ * @author steven
+ *
+ */
+public class ImageGalleryItemComparator implements Comparator {
+
+ public int compare(ImageGalleryItem o1, ImageGalleryItem o2) {
+ if(o1 != null && o2 != null){
+ return o1.getSequenceId() - o2.getSequenceId();
+ }else if(o1 != null)
+ return 1;
+ else
+ return -1;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryToolContentHandler.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryToolContentHandler.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryToolContentHandler.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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: ImageGalleryToolContentHandler.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.util;
+
+import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler;
+
+/**
+ * Simple client for accessing the content repository.
+ *
+ * @author Fiona Malikoff
+ */
+public class ImageGalleryToolContentHandler extends ToolContentHandler {
+
+ private static String repositoryWorkspaceName = "sharedimageGalleryworkspace";
+ private static String repositoryUser = "sharedimageGallery";
+ //sharedimageGallery
+ private static char[] repositoryId = {'l','a','m','s','-','s','h','a','r','e','d','r','e','s','o','u','r','c','e','s'};
+
+ /**
+ *
+ */
+ public ImageGalleryToolContentHandler() {
+ 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_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryWebUtils.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryWebUtils.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ImageGalleryWebUtils.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,54 @@
+/****************************************************************
+ * 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: ImageGalleryWebUtils.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.util;
+
+import org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants;
+
+/**
+ * Contains helper methods used by the Action Servlets
+ *
+ * @author Anthony Sukkar
+ *
+ */
+public class ImageGalleryWebUtils {
+
+ /**
+ * If there is not url prefix, such as http://, https:// or ftp:// etc, this
+ * method will add default url protocol.
+ *
+ * @param url
+ * @return
+ */
+ public static String protocol(String url) {
+ if (url == null)
+ return "";
+
+ if (!url.matches("^" + ImageGalleryConstants.ALLOW_PROTOCOL_REFIX + ".*"))
+ url = ImageGalleryConstants.DEFUALT_PROTOCOL_REFIX + url;
+
+ return url;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ReflectDTOComparator.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ReflectDTOComparator.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/util/ReflectDTOComparator.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,38 @@
+/****************************************************************
+ * 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.imageGallery.util;
+
+import java.util.Comparator;
+
+import org.lamsfoundation.lams.tool.imageGallery.dto.ReflectDTO;
+
+public class ReflectDTOComparator implements Comparator {
+ public int compare(ReflectDTO o1, ReflectDTO o2) {
+ if (o1 != null && o2 != null) {
+ return o1.getFullName().compareTo(o2.getFullName());
+ } else if (o1 != null)
+ return 1;
+ else
+ return -1;
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/AuthoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/AuthoringAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/AuthoringAction.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,1053 @@
+/****************************************************************
+ * 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 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.web.action;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.math.NumberUtils;
+import org.apache.log4j.Logger;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+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.authoring.web.AuthoringConstants;
+import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryAttachment;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+import org.lamsfoundation.lams.tool.imageGallery.service.IImageGalleryService;
+import org.lamsfoundation.lams.tool.imageGallery.service.ImageGalleryApplicationException;
+import org.lamsfoundation.lams.tool.imageGallery.service.UploadImageGalleryFileException;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryItemComparator;
+import org.lamsfoundation.lams.tool.imageGallery.web.form.ImageGalleryForm;
+import org.lamsfoundation.lams.tool.imageGallery.web.form.ImageGalleryItemForm;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.util.FileValidatorUtil;
+import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.web.session.SessionManager;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.lamsfoundation.lams.web.util.SessionMap;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * @author Andrey Balan
+ * @version $Revision: 1.1 $
+ */
+public class AuthoringAction extends Action {
+
+ private static Logger log = Logger.getLogger(AuthoringAction.class);
+
+ @Override
+ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws Exception {
+
+ String param = mapping.getParameter();
+ // -----------------------ImageGallery Author function ---------------------------
+ if (param.equals("start")) {
+ ToolAccessMode mode = getAccessMode(request);
+ // teacher mode "check for new" button enter.
+ if (mode != null) {
+ request.setAttribute(AttributeNames.ATTR_MODE, mode.toString());
+ } else {
+ request.setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.AUTHOR.toString());
+ }
+ return start(mapping, form, request, response);
+ }
+ if (param.equals("definelater")) {
+ // update define later flag to true
+ Long contentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID));
+ IImageGalleryService service = getImageGalleryService();
+ ImageGallery imageGallery = service.getImageGalleryByContentId(contentId);
+
+ imageGallery.setDefineLater(true);
+ service.saveOrUpdateImageGallery(imageGallery);
+
+ request.setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER.toString());
+ return start(mapping, form, request, response);
+ }
+ if (param.equals("initPage")) {
+ return initPage(mapping, form, request, response);
+ }
+ if (param.equals("updateContent")) {
+ return updateContent(mapping, form, request, response);
+ }
+ if (param.equals("uploadOnlineFile")) {
+ return uploadOnline(mapping, form, request, response);
+ }
+ if (param.equals("uploadOfflineFile")) {
+ return uploadOffline(mapping, form, request, response);
+ }
+ if (param.equals("deleteOnlineFile")) {
+ return deleteOnlineFile(mapping, form, request, response);
+ }
+ if (param.equals("deleteOfflineFile")) {
+ return deleteOfflineFile(mapping, form, request, response);
+ }
+ // ----------------------- Add imageGallery item function ---------------------------
+ if (param.equals("newItemInit")) {
+ return newItemlInit(mapping, form, request, response);
+ }
+ if (param.equals("editItemInit")) {
+ return editItemInit(mapping, form, request, response);
+ }
+ if (param.equals("saveOrUpdateItem")) {
+ return saveOrUpdateItem(mapping, form, request, response);
+ }
+ if (param.equals("removeItem")) {
+ return removeItem(mapping, form, request, response);
+ }
+ if (param.equals("upItem")) {
+ return upImage(mapping, form, request, response);
+ }
+ if (param.equals("downItem")) {
+ return downImage(mapping, form, request, response);
+ }
+ if (param.equals("removeItemAttachment")) {
+ return removeItemAttachment(mapping, form, request, response);
+ }
+
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+
+ /**
+ * Read imageGallery data from database and put them into HttpSession. It will redirect to init.do directly after
+ * this method run successfully.
+ *
+ * This method will avoid read database again and lost un-saved resouce item lost when user "refresh page",
+ *
+ * @throws ServletException
+ *
+ */
+ private ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws ServletException {
+
+ // save toolContentID into HTTPSession
+ Long contentId = new Long(WebUtil.readLongParam(request, ImageGalleryConstants.PARAM_TOOL_CONTENT_ID));
+
+ // get back the imageGallery and item list and display them on page
+ IImageGalleryService service = getImageGalleryService();
+
+ List items = null;
+ ImageGallery imageGallery = null;
+ ImageGalleryForm imageGalleryForm = (ImageGalleryForm) form;
+
+ // Get contentFolderID and save to form.
+ String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
+ imageGalleryForm.setContentFolderID(contentFolderID);
+
+ // initial Session Map
+ SessionMap sessionMap = new SessionMap();
+ request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap);
+ imageGalleryForm.setSessionMapID(sessionMap.getSessionID());
+
+ try {
+ imageGallery = service.getImageGalleryByContentId(contentId);
+ // if imageGallery does not exist, try to use default content instead.
+ if (imageGallery == null) {
+ imageGallery = service.getDefaultContent(contentId);
+ if (imageGallery.getImageGalleryItems() != null) {
+ items = new ArrayList(imageGallery.getImageGalleryItems());
+ } else {
+ items = null;
+ }
+ } else {
+ items = service.getAuthoredItems(imageGallery.getUid());
+ }
+
+ imageGalleryForm.setImageGallery(imageGallery);
+
+ // initialize instruction attachment list
+ List attachmentList = getAttachmentList(sessionMap);
+ attachmentList.clear();
+ attachmentList.addAll(imageGallery.getAttachments());
+ } catch (Exception e) {
+ AuthoringAction.log.error(e);
+ throw new ServletException(e);
+ }
+
+ // init it to avoid null exception in following handling
+ if (items == null) {
+ items = new ArrayList();
+ } else {
+ ImageGalleryUser imageGalleryUser = null;
+ // handle system default question: createBy is null, now set it to current user
+ for (ImageGalleryItem item : items) {
+ if (item.getCreateBy() == null) {
+ if (imageGalleryUser == null) {
+ // get back login user DTO
+ HttpSession ss = SessionManager.getSession();
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ imageGalleryUser = new ImageGalleryUser(user, imageGallery);
+ }
+ item.setCreateBy(imageGalleryUser);
+ }
+ }
+ }
+ // init imageGallery item list
+ SortedSet imageGalleryItemList = getImageGalleryItemList(sessionMap);
+ imageGalleryItemList.clear();
+ imageGalleryItemList.addAll(items);
+
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE_FORM, imageGalleryForm);
+ sessionMap.put(ImageGalleryConstants.ATTR_NEXT_IMAGE_TITLE, imageGallery.getNextImageTitle());
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Display same entire authoring page content from HttpSession variable.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ * @throws ServletException
+ */
+ private ActionForward initPage(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws ServletException {
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ ImageGalleryForm existForm = (ImageGalleryForm) sessionMap.get(ImageGalleryConstants.ATTR_RESOURCE_FORM);
+
+ ImageGalleryForm imageGalleryForm = (ImageGalleryForm) form;
+ try {
+ PropertyUtils.copyProperties(imageGalleryForm, existForm);
+ } catch (Exception e) {
+ throw new ServletException(e);
+ }
+
+ ToolAccessMode mode = getAccessMode(request);
+ if (mode.isAuthor()) {
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ } else {
+ return mapping.findForward(ImageGalleryConstants.DEFINE_LATER);
+ }
+ }
+
+ /**
+ * This method will persist all inforamtion in this authoring page, include all imageGallery item, information etc.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ * @throws ServletException
+ */
+ private ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws Exception {
+ ImageGalleryForm imageGalleryForm = (ImageGalleryForm) (form);
+
+ // get back sessionMAP
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(imageGalleryForm.getSessionMapID());
+
+ ToolAccessMode mode = getAccessMode(request);
+
+ ActionMessages errors = validateImageGallery(imageGalleryForm, request);
+ if (!errors.isEmpty()) {
+ saveErrors(request, errors);
+ if (mode.isAuthor()) {
+ return mapping.findForward("author");
+ } else {
+ return mapping.findForward("monitor");
+ }
+ }
+
+ ImageGallery imageGallery = imageGalleryForm.getImageGallery();
+ IImageGalleryService service = getImageGalleryService();
+
+ // **********************************Get ImageGallery PO*********************
+ ImageGallery imageGalleryPO = service.getImageGalleryByContentId(imageGalleryForm.getImageGallery()
+ .getContentId());
+ if (imageGalleryPO == null) {
+ // new ImageGallery, create it.
+ imageGalleryPO = imageGallery;
+ imageGalleryPO.setCreated(new Timestamp(new Date().getTime()));
+ imageGalleryPO.setUpdated(new Timestamp(new Date().getTime()));
+ } else {
+ if (mode.isAuthor()) {
+ Long uid = imageGalleryPO.getUid();
+ PropertyUtils.copyProperties(imageGalleryPO, imageGallery);
+ // get back UID
+ imageGalleryPO.setUid(uid);
+ } else { // if it is Teacher, then just update basic tab content (definelater)
+ imageGalleryPO.setInstructions(imageGallery.getInstructions());
+ imageGalleryPO.setTitle(imageGallery.getTitle());
+ // change define later status
+ imageGalleryPO.setDefineLater(false);
+ }
+ imageGalleryPO.setUpdated(new Timestamp(new Date().getTime()));
+ }
+
+ // *******************************Handle nextImageTitle*******************
+ Long nextConsecutiveImageTitle = (Long) sessionMap.get(ImageGalleryConstants.ATTR_NEXT_IMAGE_TITLE);
+ imageGalleryPO.setNextImageTitle(nextConsecutiveImageTitle);
+
+ // *******************************Handle user*******************
+ // try to get form system session
+ HttpSession ss = SessionManager.getSession();
+ // get back login user DTO
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ ImageGalleryUser imageGalleryUser = service.getUserByIDAndContent(new Long(user.getUserID().intValue()),
+ imageGalleryForm.getImageGallery().getContentId());
+ if (imageGalleryUser == null) {
+ imageGalleryUser = new ImageGalleryUser(user, imageGalleryPO);
+ }
+
+ imageGalleryPO.setCreatedBy(imageGalleryUser);
+
+ // **********************************Handle Authoring Instruction Attachement *********************
+ // merge attachment info
+ // so far, attPOSet will be empty if content is existed. because PropertyUtils.copyProperties() is executed
+ Set attPOSet = imageGalleryPO.getAttachments();
+ if (attPOSet == null) {
+ attPOSet = new HashSet();
+ }
+ List attachmentList = getAttachmentList(sessionMap);
+ List deleteAttachmentList = getDeletedAttachmentList(sessionMap);
+
+ // current attachemnt in authoring instruction tab.
+ Iterator iter = attachmentList.iterator();
+ while (iter.hasNext()) {
+ ImageGalleryAttachment newAtt = (ImageGalleryAttachment) iter.next();
+ attPOSet.add(newAtt);
+ }
+ attachmentList.clear();
+
+ // deleted attachment. 2 possible types: one is persist another is non-persist before.
+ iter = deleteAttachmentList.iterator();
+ while (iter.hasNext()) {
+ ImageGalleryAttachment delAtt = (ImageGalleryAttachment) iter.next();
+ iter.remove();
+ // it is an existed att, then delete it from current attachmentPO
+ if (delAtt.getUid() != null) {
+ Iterator attIter = attPOSet.iterator();
+ while (attIter.hasNext()) {
+ ImageGalleryAttachment att = (ImageGalleryAttachment) attIter.next();
+ if (delAtt.getUid().equals(att.getUid())) {
+ attIter.remove();
+ break;
+ }
+ }
+ service.deleteImageGalleryAttachment(delAtt.getUid());
+ }// end remove from persist value
+ }
+
+ // copy back
+ imageGalleryPO.setAttachments(attPOSet);
+ // ************************* Handle imageGallery items *******************
+ // Handle imageGallery items
+ Set itemList = new LinkedHashSet();
+ SortedSet topics = getImageGalleryItemList(sessionMap);
+ iter = topics.iterator();
+ while (iter.hasNext()) {
+ ImageGalleryItem item = (ImageGalleryItem) iter.next();
+ if (item != null) {
+ // This flushs user UID info to message if this user is a new user.
+ item.setCreateBy(imageGalleryUser);
+ itemList.add(item);
+ }
+ }
+ imageGalleryPO.setImageGalleryItems(itemList);
+ // delete instructino file from database.
+ List delImageGalleryItemList = getDeletedImageGalleryItemList(sessionMap);
+ iter = delImageGalleryItemList.iterator();
+ while (iter.hasNext()) {
+ ImageGalleryItem item = (ImageGalleryItem) iter.next();
+ iter.remove();
+ if (item.getUid() != null) {
+ service.deleteImageGalleryItem(item.getUid());
+ }
+ }
+ // handle imageGallery item attachment file:
+ List delItemAttList = getDeletedItemAttachmentList(sessionMap);
+ iter = delItemAttList.iterator();
+ while (iter.hasNext()) {
+ ImageGalleryItem delAtt = (ImageGalleryItem) iter.next();
+ iter.remove();
+ }
+
+ // if miniview number is bigger than available items, then set it topics size
+ if (imageGalleryPO.getNumberColumns() > topics.size()) {
+ imageGalleryPO.setNumberColumns((topics.size()));
+ }
+ // **********************************************
+ // finally persist imageGalleryPO again
+ service.saveOrUpdateImageGallery(imageGalleryPO);
+
+ // initialize attachmentList again
+ attachmentList = getAttachmentList(sessionMap);
+ attachmentList.addAll(imageGallery.getAttachments());
+ imageGalleryForm.setImageGallery(imageGalleryPO);
+
+ request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE);
+ if (mode.isAuthor()) {
+ return mapping.findForward("author");
+ } else {
+ return mapping.findForward("monitor");
+ }
+ }
+
+ /**
+ * Handle upload online instruction files request.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ * @throws UploadImageGalleryFileException
+ */
+ public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws UploadImageGalleryFileException {
+ return uploadFile(mapping, form, IToolContentHandler.TYPE_ONLINE, request);
+ }
+
+ /**
+ * Handle upload offline instruction files request.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ * @throws UploadImageGalleryFileException
+ */
+ public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws UploadImageGalleryFileException {
+ return uploadFile(mapping, form, IToolContentHandler.TYPE_OFFLINE, request);
+ }
+
+ /**
+ * Common method to upload online or offline instruction files request.
+ *
+ * @param mapping
+ * @param form
+ * @param type
+ * @param request
+ * @return
+ * @throws UploadImageGalleryFileException
+ */
+ private ActionForward uploadFile(ActionMapping mapping, ActionForm form, String type, HttpServletRequest request)
+ throws UploadImageGalleryFileException {
+
+ ImageGalleryForm imageGalleryForm = (ImageGalleryForm) form;
+ // get back sessionMAP
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(imageGalleryForm.getSessionMapID());
+
+ FormFile file;
+ if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) {
+ file = imageGalleryForm.getOfflineFile();
+ } else {
+ file = imageGalleryForm.getOnlineFile();
+ }
+
+ if ((file == null) || StringUtils.isBlank(file.getFileName())) {
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ // validate file size
+ ActionMessages errors = new ActionMessages();
+ FileValidatorUtil.validateFileSize(file, true, errors);
+ if (!errors.isEmpty()) {
+ this.saveErrors(request, errors);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ IImageGalleryService service = getImageGalleryService();
+ // upload to repository
+ ImageGalleryAttachment att = service.uploadInstructionFile(file, type);
+ // handle session value
+ List attachmentList = getAttachmentList(sessionMap);
+ List deleteAttachmentList = getDeletedAttachmentList(sessionMap);
+ // first check exist attachment and delete old one (if exist) to deletedAttachmentList
+ Iterator iter = attachmentList.iterator();
+ ImageGalleryAttachment existAtt;
+ while (iter.hasNext()) {
+ existAtt = (ImageGalleryAttachment) iter.next();
+ if (StringUtils.equals(existAtt.getFileName(), att.getFileName())
+ && StringUtils.equals(existAtt.getFileType(), att.getFileType())) {
+ // if there is same name attachment, delete old one
+ deleteAttachmentList.add(existAtt);
+ iter.remove();
+ break;
+ }
+ }
+ // add to attachmentList
+ attachmentList.add(att);
+
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+
+ }
+
+ /**
+ * Delete offline instruction file from current ImageGallery authoring page.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ public ActionForward deleteOfflineFile(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ return deleteFile(mapping, request, response, form, IToolContentHandler.TYPE_OFFLINE);
+ }
+
+ /**
+ * Delete online instruction file from current ImageGallery authoring page.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ public ActionForward deleteOnlineFile(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ return deleteFile(mapping, request, response, form, IToolContentHandler.TYPE_ONLINE);
+ }
+
+ /**
+ * General method to delete file (online or offline)
+ *
+ * @param mapping
+ * @param request
+ * @param response
+ * @param form
+ * @param type
+ * @return
+ */
+ private ActionForward deleteFile(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response,
+ ActionForm form, String type) {
+ Long versionID = new Long(WebUtil.readLongParam(request, ImageGalleryConstants.PARAM_FILE_VERSION_ID));
+ Long uuID = new Long(WebUtil.readLongParam(request, ImageGalleryConstants.PARAM_FILE_UUID));
+
+ // get back sessionMAP
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ // handle session value
+ List attachmentList = getAttachmentList(sessionMap);
+ List deleteAttachmentList = getDeletedAttachmentList(sessionMap);
+ // first check exist attachment and delete old one (if exist) to deletedAttachmentList
+ Iterator iter = attachmentList.iterator();
+ ImageGalleryAttachment existAtt;
+ while (iter.hasNext()) {
+ existAtt = (ImageGalleryAttachment) iter.next();
+ if (existAtt.getFileUuid().equals(uuID) && existAtt.getFileVersionId().equals(versionID)) {
+ // if there is same name attachment, delete old one
+ deleteAttachmentList.add(existAtt);
+ iter.remove();
+ }
+ }
+
+ request.setAttribute(ImageGalleryConstants.ATTR_FILE_TYPE_FLAG, type);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+
+ }
+
+
+ /**
+ * Remove imageGallery item attachment, such as single file, learning object ect. It is a ajax call and just
+ * temporarily remove from page, all permenant change will happen only when user sumbit this imageGallery item
+ * again.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward removeItemAttachment(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ request.setAttribute("itemAttachment", null);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Remove imageGallery item from HttpSession list and update page display. As authoring rule, all persist only
+ * happen when user submit whole page. So this remove is just impact HttpSession values.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward removeItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ // get back sessionMAP
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ int itemIdx = NumberUtils.stringToInt(request.getParameter(ImageGalleryConstants.PARAM_IMAGE_INDEX), -1);
+ if (itemIdx != -1) {
+ SortedSet imageGalleryList = getImageGalleryItemList(sessionMap);
+ List rList = new ArrayList(imageGalleryList);
+ ImageGalleryItem item = rList.remove(itemIdx);
+ imageGalleryList.clear();
+ imageGalleryList.addAll(rList);
+ // add to delList
+ List delList = getDeletedImageGalleryItemList(sessionMap);
+ delList.add(item);
+ }
+
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Move up current item.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward upImage(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ return switchItem(mapping, request, true);
+ }
+
+ /**
+ * Move down current item.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward downImage(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ return switchItem(mapping, request, false);
+ }
+
+ private ActionForward switchItem(ActionMapping mapping, HttpServletRequest request, boolean up) {
+ // get back sessionMAP
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ int imageIdx = NumberUtils.stringToInt(request.getParameter(ImageGalleryConstants.PARAM_IMAGE_INDEX), -1);
+ if (imageIdx != -1) {
+ SortedSet taskListList = getImageGalleryItemList(sessionMap);
+ List rList = new ArrayList(taskListList);
+ // get current and the target item, and switch their sequnece
+ ImageGalleryItem image = rList.get(imageIdx);
+ ImageGalleryItem repImage;
+ if (up)
+ repImage = rList.get(--imageIdx);
+ else
+ repImage = rList.get(++imageIdx);
+ int upSeqId = repImage.getSequenceId();
+ repImage.setSequenceId(image.getSequenceId());
+ image.setSequenceId(upSeqId);
+
+ // put back list, it will be sorted again
+ taskListList.clear();
+ taskListList.addAll(rList);
+ }
+
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Display edit page for existed imageGallery item.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward editItemInit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ // get back sessionMAP
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ int itemIdx = NumberUtils.stringToInt(request.getParameter(ImageGalleryConstants.PARAM_IMAGE_INDEX), -1);
+ ImageGalleryItem item = null;
+ if (itemIdx != -1) {
+ SortedSet imageGalleryList = getImageGalleryItemList(sessionMap);
+ List rList = new ArrayList(imageGalleryList);
+ item = rList.get(itemIdx);
+ if (item != null) {
+ populateItemToForm(itemIdx, item, (ImageGalleryItemForm) form, request);
+ }
+ }
+ return (item == null) ? null : mapping.findForward("file");
+ }
+
+ /**
+ * Display empty page for new imageGallery item.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward newItemlInit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ ((ImageGalleryItemForm) form).setSessionMapID(sessionMapID);
+
+ return mapping.findForward("file");
+ }
+
+ /**
+ * This method will get necessary information from imageGallery item form and save or update into
+ * HttpSession
ImageGalleryItemList. Notice, this save is not persist them into database, just save
+ * HttpSession
temporarily. Only they will be persist when the entire authoring page is being
+ * persisted.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ * @throws ServletException
+ */
+ private ActionForward saveOrUpdateItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ ImageGalleryItemForm itemForm = (ImageGalleryItemForm) form;
+ ActionErrors errors = validateImageGalleryItem(itemForm);
+
+ if (!errors.isEmpty()) {
+ this.addErrors(request, errors);
+ return mapping.findForward("file");
+ }
+
+ try {
+ extractFormToImageGalleryItem(request, itemForm);
+ } catch (Exception e) {
+ // any upload exception will display as normal error message rather then throw exception directly
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(ImageGalleryConstants.ERROR_MSG_UPLOAD_FAILED, e.getMessage()));
+ if (!errors.isEmpty()) {
+ this.addErrors(request, errors);
+ return mapping.findForward("file");
+ }
+ }
+ // set session map ID so that itemlist.jsp can get sessionMAP
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, itemForm.getSessionMapID());
+ // return null to close this window
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+
+
+ // *************************************************************************************
+ // Private method
+ // *************************************************************************************
+ /**
+ * Return ImageGalleryService bean.
+ */
+ private IImageGalleryService getImageGalleryService() {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet()
+ .getServletContext());
+ return (IImageGalleryService) wac.getBean(ImageGalleryConstants.RESOURCE_SERVICE);
+ }
+
+ /**
+ * @param request
+ * @return
+ */
+ private List getAttachmentList(SessionMap sessionMap) {
+ return getListFromSession(sessionMap, ImageGalleryConstants.ATT_ATTACHMENT_LIST);
+ }
+
+ /**
+ * @param request
+ * @return
+ */
+ private List getDeletedAttachmentList(SessionMap sessionMap) {
+ return getListFromSession(sessionMap, ImageGalleryConstants.ATTR_DELETED_ATTACHMENT_LIST);
+ }
+
+ /**
+ * List save current imageGallery items.
+ *
+ * @param request
+ * @return
+ */
+ private SortedSet getImageGalleryItemList(SessionMap sessionMap) {
+ SortedSet list = (SortedSet) sessionMap
+ .get(ImageGalleryConstants.ATTR_RESOURCE_ITEM_LIST);
+ if (list == null) {
+ list = new TreeSet(new ImageGalleryItemComparator());
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE_ITEM_LIST, list);
+ }
+ return list;
+ }
+
+ /**
+ * List save deleted imageGallery items, which could be persisted or non-persisted items.
+ *
+ * @param request
+ * @return
+ */
+ private List getDeletedImageGalleryItemList(SessionMap sessionMap) {
+ return getListFromSession(sessionMap, ImageGalleryConstants.ATTR_DELETED_RESOURCE_ITEM_LIST);
+ }
+
+ /**
+ * If a imageGallery item has attahment file, and the user edit this item and change the attachment to new file,
+ * then the old file need be deleted when submitting the whole authoring page. Save the file uuid and version id
+ * into ImageGalleryItem object for temporarily use.
+ *
+ * @param request
+ * @return
+ */
+ private List getDeletedItemAttachmentList(SessionMap sessionMap) {
+ return getListFromSession(sessionMap, ImageGalleryConstants.ATTR_DELETED_RESOURCE_ITEM_ATTACHMENT_LIST);
+ }
+
+ /**
+ * Get java.util.List
from HttpSession by given name.
+ *
+ * @param request
+ * @param name
+ * @return
+ */
+ private List getListFromSession(SessionMap sessionMap, String name) {
+ List list = (List) sessionMap.get(name);
+ if (list == null) {
+ list = new ArrayList();
+ sessionMap.put(name, list);
+ }
+ return list;
+ }
+
+ /**
+ * This method will populate imageGallery item information to its form for edit use.
+ *
+ * @param itemIdx
+ * @param item
+ * @param form
+ * @param request
+ */
+ private void populateItemToForm(int itemIdx, ImageGalleryItem item, ImageGalleryItemForm form,
+ HttpServletRequest request) {
+ form.setDescription(item.getDescription());
+ form.setTitle(item.getTitle());
+ form.setUrl(item.getUrl());
+ form.setOpenUrlNewWindow(item.isOpenUrlNewWindow());
+ if (itemIdx >= 0) {
+ form.setImageIndex(new Integer(itemIdx).toString());
+ }
+
+ if (item.getFileUuid() != null) {
+ form.setFileUuid(item.getFileUuid());
+ form.setFileVersionId(item.getFileVersionId());
+ form.setFileName(item.getFileName());
+ form.setHasFile(true);
+ } else {
+ form.setHasFile(false);
+ }
+ }
+
+ /**
+ * Extract web from content to imageGallery item.
+ *
+ * @param request
+ * @param itemForm
+ * @throws ImageGalleryApplicationException
+ */
+ private void extractFormToImageGalleryItem(HttpServletRequest request,
+ ImageGalleryItemForm itemForm) throws Exception {
+ /*
+ * BE CAREFUL: This method will copy nessary info from request form to a old or new ImageGalleryItem instance.
+ * It gets all info EXCEPT ImageGalleryItem.createDate and ImageGalleryItem.createBy, which need be set when
+ * persisting this imageGallery item.
+ */
+
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(itemForm.getSessionMapID());
+ // check whether it is "edit(old item)" or "add(new item)"
+ SortedSet imageGalleryList = getImageGalleryItemList(sessionMap);
+ int imageIdx = NumberUtils.stringToInt(itemForm.getImageIndex(), -1);
+ ImageGalleryItem item = null;
+
+ if (imageIdx == -1) { // add
+ item = new ImageGalleryItem();
+ item.setCreateDate(new Timestamp(new Date().getTime()));
+ int maxSeq = 1;
+ if (imageGalleryList != null && imageGalleryList.size() > 0) {
+ ImageGalleryItem last = imageGalleryList.last();
+ maxSeq = last.getSequenceId() + 1;
+ }
+ item.setSequenceId(maxSeq);
+ imageGalleryList.add(item);
+ } else { // edit
+ List rList = new ArrayList(imageGalleryList);
+ item = rList.get(imageIdx);
+ }
+
+ // uploadImageGalleryItemFile
+ // and setting file properties' fields: item.setFileUuid(); item.setFileVersionId(); item.setFileType(); item.setFileName();
+ if (itemForm.getFile() != null) {
+ // if it has old file, and upload a new, then save old to deleteList
+ ImageGalleryItem delAttItem = new ImageGalleryItem();
+ boolean hasOld = false;
+ if (item.getFileUuid() != null) {
+ hasOld = true;
+ // be careful, This new ImageGalleryItem object never be save into database
+ // just temporarily use for saving fileUuid and versionID use:
+ delAttItem.setFileUuid(item.getFileUuid());
+ delAttItem.setFileVersionId(item.getFileVersionId());
+ }
+ IImageGalleryService service = getImageGalleryService();
+ try {
+ service.uploadImageGalleryItemFile(item, itemForm.getFile());
+ } catch (UploadImageGalleryFileException e) {
+ // if it is new add , then remove it!
+ if (imageIdx == -1) {
+ imageGalleryList.remove(item);
+ }
+ throw e;
+ }
+ // put it after "upload" to ensure deleted file added into list only no exception happens during upload
+ if (hasOld) {
+ List delAtt = getDeletedItemAttachmentList(sessionMap);
+ delAtt.add(delAttItem);
+ }
+ }
+
+ String title = itemForm.getTitle();
+ if (StringUtils.isBlank(title)) {
+ Long nextConsecutiveImageTitle = (Long) sessionMap.get(ImageGalleryConstants.ATTR_NEXT_IMAGE_TITLE);
+ sessionMap.put(ImageGalleryConstants.ATTR_NEXT_IMAGE_TITLE, nextConsecutiveImageTitle+1);
+ String imageLocalized = getImageGalleryService().getLocalisedMessage("label.authoring.image", null);
+ title = imageLocalized + " " + nextConsecutiveImageTitle;
+ }
+ item.setTitle(title);
+
+ item.setDescription(itemForm.getDescription());
+ item.setCreateByAuthor(true);
+ item.setHide(false);
+ }
+
+ /**
+ * Validate imageGallery item.
+ *
+ * @param itemForm
+ * @return
+ */
+ private ActionErrors validateImageGalleryItem(ImageGalleryItemForm itemForm) {
+ ActionErrors errors = new ActionErrors();
+
+ // validate file size
+ FileValidatorUtil.validateFileSize(itemForm.getFile(), true, errors);
+ // for edit validate: file already exist
+ if (!itemForm.isHasFile()
+ && ((itemForm.getFile() == null) || StringUtils.isEmpty(itemForm.getFile().getFileName()))) {
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(ImageGalleryConstants.ERROR_MSG_FILE_BLANK));
+ }
+
+ //check for allowed format : gif, png, jpg
+ String contentType = itemForm.getFile().getContentType();
+ if (StringUtils.isEmpty(contentType) || !(contentType.equals("image/gif") || contentType.equals("image/png") || contentType.equals("image/jpg"))) {
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(ImageGalleryConstants.ERROR_MSG_NOT_ALLOWED_FORMAT));
+ }
+
+ return errors;
+ }
+
+ /**
+ * Validate imageGallery.
+ *
+ * @param imageGalleryForm
+ * @return
+ */
+ private ActionMessages validateImageGallery(ImageGalleryForm imageGalleryForm, HttpServletRequest request) {
+ ActionMessages errors = new ActionMessages();
+ // if (StringUtils.isBlank(imageGalleryForm.getImageGallery().getTitle())) {
+ // ActionMessage error = new ActionMessage("error.resource.item.title.blank");
+ // errors.add(ActionMessages.GLOBAL_MESSAGE, error);
+ // }
+
+ // define it later mode(TEACHER) skip below validation.
+ String modeStr = request.getParameter(AttributeNames.ATTR_MODE);
+ if (StringUtils.equals(modeStr, ToolAccessMode.TEACHER.toString())) {
+ return errors;
+ }
+
+ // Some other validation outside basic Tab.
+
+ return errors;
+ }
+
+ /**
+ * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode.
+ *
+ * @param request
+ * @return
+ */
+ 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;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/ClearSessionAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/ClearSessionAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/ClearSessionAction.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,48 @@
+/****************************************************************
+ * 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 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.web.action;
+
+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 Andrey.Balan
+ *
+ * @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_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,668 @@
+/****************************************************************
+ * 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: LearningAction.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.web.action;
+
+import java.io.IOException;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+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.imageGallery.ImageGalleryConstants;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+import org.lamsfoundation.lams.tool.imageGallery.service.IImageGalleryService;
+import org.lamsfoundation.lams.tool.imageGallery.service.ImageGalleryApplicationException;
+import org.lamsfoundation.lams.tool.imageGallery.service.UploadImageGalleryFileException;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryItemComparator;
+import org.lamsfoundation.lams.tool.imageGallery.web.form.ImageGalleryItemForm;
+import org.lamsfoundation.lams.tool.imageGallery.web.form.ReflectionForm;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.util.FileUtil;
+import org.lamsfoundation.lams.util.FileValidatorUtil;
+import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.web.session.SessionManager;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.lamsfoundation.lams.web.util.SessionMap;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ *
+ * @author Steve.Ni
+ *
+ * @version $Revision: 1.1 $
+ */
+public class LearningAction extends Action {
+
+ private static Logger log = Logger.getLogger(LearningAction.class);
+
+ @Override
+ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws IOException, ServletException {
+
+ String param = mapping.getParameter();
+ // -----------------------ImageGallery Learner function ---------------------------
+ if (param.equals("start")) {
+ return start(mapping, form, request, response);
+ }
+ if (param.equals("complete")) {
+ return complete(mapping, form, request, response);
+ }
+
+ if (param.equals("finish")) {
+ return finish(mapping, form, request, response);
+ }
+ if (param.equals("addfile")) {
+ return addItem(mapping, form, request, response);
+ }
+ if (param.equals("addurl")) {
+ return addItem(mapping, form, request, response);
+ }
+ if (param.equals("saveOrUpdateItem")) {
+ return saveOrUpdateItem(mapping, form, request, response);
+ }
+
+ // ================ Reflection =======================
+ if (param.equals("newReflection")) {
+ return newReflection(mapping, form, request, response);
+ }
+ if (param.equals("submitReflection")) {
+ return submitReflection(mapping, form, request, response);
+ }
+
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+
+ /**
+ * Initial page for add imageGallery item (single file or URL).
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward addItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ ImageGalleryItemForm itemForm = (ImageGalleryItemForm) form;
+ itemForm.setMode(WebUtil.readStrParam(request, AttributeNames.ATTR_MODE));
+ itemForm.setSessionMapID(WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID));
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Read imageGallery data from database and put them into HttpSession. It will redirect to init.do directly after
+ * this method run successfully.
+ *
+ * This method will avoid read database again and lost un-saved resouce item lost when user "refresh page",
+ *
+ */
+ private ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ // initial Session Map
+ SessionMap sessionMap = new SessionMap();
+ request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap);
+
+ // save toolContentID into HTTPSession
+ ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, true);
+
+ Long sessionId = new Long(request.getParameter(ImageGalleryConstants.PARAM_TOOL_SESSION_ID));
+
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID());
+ request.setAttribute(AttributeNames.ATTR_MODE, mode);
+ request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID, sessionId);
+
+ // get back the imageGallery and item list and display them on page
+ IImageGalleryService service = getImageGalleryService();
+ ImageGalleryUser imageGalleryUser = null;
+ if ((mode != null) && mode.isTeacher()) {
+ // monitoring mode - user is specified in URL
+ // imageGalleryUser may be null if the user was force completed.
+ imageGalleryUser = getSpecifiedUser(service, sessionId, WebUtil.readIntParam(request,
+ AttributeNames.PARAM_USER_ID, false));
+ } else {
+ imageGalleryUser = getCurrentUser(service, sessionId);
+ }
+
+ List items = null;
+ ImageGallery imageGallery;
+ items = service.getImageGalleryItemsBySessionId(sessionId);
+ imageGallery = service.getImageGalleryBySessionId(sessionId);
+
+ // check whehter finish lock is on/off
+ boolean lock = imageGallery.getLockWhenFinished() && (imageGalleryUser != null)
+ && imageGalleryUser.isSessionFinished();
+
+ // check whether there is only one imageGallery item and run auto flag is true or not.
+ boolean runAuto = false;
+ int itemsNumber = 0;
+ if (imageGallery.getImageGalleryItems() != null) {
+ itemsNumber = imageGallery.getImageGalleryItems().size();
+ if (imageGallery.isAllowVote() && (itemsNumber == 1)) {
+ ImageGalleryItem item = (ImageGalleryItem) imageGallery.getImageGalleryItems().iterator().next();
+ // only visible item can be run auto.
+ if (!item.isHide()) {
+ runAuto = true;
+ request.setAttribute(ImageGalleryConstants.ATTR_RESOURCE_ITEM_UID, item.getUid());
+ }
+ }
+ }
+
+ // get notebook entry
+ String entryText = new String();
+ if (imageGalleryUser != null) {
+ NotebookEntry notebookEntry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, imageGalleryUser.getUserId().intValue());
+ if (notebookEntry != null) {
+ entryText = notebookEntry.getEntry();
+ }
+ }
+
+ // basic information
+ sessionMap.put(ImageGalleryConstants.ATTR_TITLE, imageGallery.getTitle());
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE_INSTRUCTION, imageGallery.getInstructions());
+ sessionMap.put(ImageGalleryConstants.ATTR_FINISH_LOCK, lock);
+ sessionMap.put(ImageGalleryConstants.ATTR_LOCK_ON_FINISH, imageGallery.getLockWhenFinished());
+ sessionMap.put(ImageGalleryConstants.ATTR_USER_FINISHED, (imageGalleryUser != null)
+ && imageGalleryUser.isSessionFinished());
+
+ sessionMap.put(AttributeNames.PARAM_TOOL_SESSION_ID, sessionId);
+ sessionMap.put(AttributeNames.ATTR_MODE, mode);
+ // reflection information
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECTION_ON, imageGallery.isReflectOnActivity());
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECTION_INSTRUCTION, imageGallery.getReflectInstructions());
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECTION_ENTRY, entryText);
+ sessionMap.put(ImageGalleryConstants.ATTR_RUN_AUTO, new Boolean(runAuto));
+
+ // add define later support
+ if (imageGallery.isDefineLater()) {
+ return mapping.findForward("defineLater");
+ }
+
+ // set contentInUse flag to true!
+ imageGallery.setContentInUse(true);
+ imageGallery.setDefineLater(false);
+ service.saveOrUpdateImageGallery(imageGallery);
+
+ // add run offline support
+ if (imageGallery.getRunOffline()) {
+ sessionMap.put(ImageGalleryConstants.PARAM_RUN_OFFLINE, true);
+ return mapping.findForward("runOffline");
+ } else {
+ sessionMap.put(ImageGalleryConstants.PARAM_RUN_OFFLINE, false);
+ }
+
+ // init imageGallery item list
+ SortedSet imageGalleryItemList = getImageGalleryItemList(sessionMap);
+ imageGalleryItemList.clear();
+ if (items != null) {
+ // remove hidden items.
+ for (ImageGalleryItem item : items) {
+ // becuase in webpage will use this login name. Here is just
+ // initial it to avoid session close error in proxy object.
+ if (item.getCreateBy() != null) {
+ item.getCreateBy().getLoginName();
+ }
+ if (!item.isHide()) {
+ imageGalleryItemList.add(item);
+ }
+ }
+ }
+
+ // set complete flag for display purpose
+ if (imageGalleryUser != null) {
+ service.retrieveComplete(imageGalleryItemList, imageGalleryUser);
+ }
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE, imageGallery);
+
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Mark imageGallery item as complete status.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward complete(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ String mode = request.getParameter(AttributeNames.ATTR_MODE);
+ String sessionMapID = request.getParameter(ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+
+ doComplete(request);
+
+ request.setAttribute(AttributeNames.ATTR_MODE, mode);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Finish learning session.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward finish(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ // get back SessionMap
+ String sessionMapID = request.getParameter(ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ // get mode and ToolSessionID from sessionMAP
+ ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE);
+ Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID);
+
+ // auto run mode, when use finish the only one imageGallery item, mark it as complete then finish this activity
+ // as well.
+ String imageGalleryItemUid = request.getParameter(ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID);
+ if (imageGalleryItemUid != null) {
+ doComplete(request);
+ // NOTE:So far this flag is useless(31/08/2006).
+ // set flag, then finish page can know redir target is parent(AUTO_RUN) or self(normal)
+ request.setAttribute(ImageGalleryConstants.ATTR_RUN_AUTO, true);
+ } else {
+ request.setAttribute(ImageGalleryConstants.ATTR_RUN_AUTO, false);
+ }
+
+ if (!validateBeforeFinish(request, sessionMapID)) {
+ return mapping.getInputForward();
+ }
+
+ IImageGalleryService service = getImageGalleryService();
+ // get sessionId from HttpServletRequest
+ String nextActivityUrl = null;
+ try {
+ HttpSession ss = SessionManager.getSession();
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ Long userID = new Long(user.getUserID().longValue());
+
+ nextActivityUrl = service.finishToolSession(sessionId, userID);
+ request.setAttribute(ImageGalleryConstants.ATTR_NEXT_ACTIVITY_URL, nextActivityUrl);
+ } catch (ImageGalleryApplicationException e) {
+ LearningAction.log.error("Failed get next activity url:" + e.getMessage());
+ }
+
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Save file or url imageGallery item into database.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward saveOrUpdateItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ // get back SessionMap
+ String sessionMapID = request.getParameter(ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+
+ Long sessionId = (Long) sessionMap.get(ImageGalleryConstants.ATTR_TOOL_SESSION_ID);
+
+ String mode = request.getParameter(AttributeNames.ATTR_MODE);
+ ImageGalleryItemForm itemForm = (ImageGalleryItemForm) form;
+ ActionErrors errors = validateImageGalleryItem(itemForm);
+
+ if (!errors.isEmpty()) {
+ this.addErrors(request, errors);
+ return mapping.findForward("file");
+ }
+
+ // create a new ImageGalleryItem
+ ImageGalleryItem item = new ImageGalleryItem();
+ IImageGalleryService service = getImageGalleryService();
+ ImageGalleryUser imageGalleryUser = getCurrentUser(service, sessionId);
+ item.setTitle(itemForm.getTitle());
+ item.setDescription(itemForm.getDescription());
+ item.setCreateDate(new Timestamp(new Date().getTime()));
+ item.setCreateByAuthor(false);
+ item.setCreateBy(imageGalleryUser);
+
+ // special attribute for URL or FILE
+ try {
+ service.uploadImageGalleryItemFile(item, itemForm.getFile());
+ } catch (UploadImageGalleryFileException e) {
+ LearningAction.log.error("Failed upload ImageGallery File " + e.toString());
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+ // save and update session
+
+ ImageGallerySession resSession = service.getImageGallerySessionBySessionId(sessionId);
+ if (resSession == null) {
+ LearningAction.log.error("Failed update ImageGallerySession by ID[" + sessionId + "]");
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+ Set items = resSession.getImageGalleryItems();
+ if (items == null) {
+ items = new HashSet();
+ resSession.setImageGalleryItems(items);
+ }
+ items.add(item);
+ service.saveOrUpdateImageGallerySession(resSession);
+
+ // update session value
+ SortedSet imageGalleryItemList = getImageGalleryItemList(sessionMap);
+ imageGalleryItemList.add(item);
+
+ // URL or file upload
+ request.setAttribute(AttributeNames.ATTR_MODE, mode);
+
+ ImageGallery imageGallery = resSession.getImageGallery();
+ if (imageGallery.isAllowRank()
+ && service.getEventNotificationService().eventExists(ImageGalleryConstants.TOOL_SIGNATURE,
+ ImageGalleryConstants.EVENT_NAME_NOTIFY_TEACHERS_ON_ASSIGMENT_SUBMIT,
+ imageGallery.getContentId())) {
+ String fullName = imageGalleryUser.getLastName() + " " + imageGalleryUser.getFirstName();
+ service.getEventNotificationService().trigger(ImageGalleryConstants.TOOL_SIGNATURE,
+ ImageGalleryConstants.EVENT_NAME_NOTIFY_TEACHERS_ON_ASSIGMENT_SUBMIT, imageGallery.getContentId(),
+ new Object[] { fullName });
+ }
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Display empty reflection form.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward newReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ // get session value
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ if (!validateBeforeFinish(request, sessionMapID)) {
+ return mapping.getInputForward();
+ }
+
+ ReflectionForm refForm = (ReflectionForm) form;
+ HttpSession ss = SessionManager.getSession();
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+
+ refForm.setUserID(user.getUserID());
+ refForm.setSessionMapID(sessionMapID);
+
+ // get the existing reflection entry
+ IImageGalleryService submitFilesService = getImageGalleryService();
+
+ SessionMap map = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ Long toolSessionID = (Long) map.get(AttributeNames.PARAM_TOOL_SESSION_ID);
+ NotebookEntry entry = submitFilesService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, user.getUserID());
+
+ if (entry != null) {
+ refForm.setEntryText(entry.getEntry());
+ }
+
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Submit reflection form input database.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ ReflectionForm refForm = (ReflectionForm) form;
+ Integer userId = refForm.getUserID();
+
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID);
+
+ IImageGalleryService service = getImageGalleryService();
+
+ // check for existing notebook entry
+ NotebookEntry entry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, userId);
+
+ if (entry == null) {
+ // create new entry
+ service.createNotebookEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, userId, refForm.getEntryText());
+ } else {
+ // update existing entry
+ entry.setEntry(refForm.getEntryText());
+ entry.setLastModified(new Date());
+ service.updateEntry(entry);
+ }
+
+ return finish(mapping, form, request, response);
+ }
+
+ // *************************************************************************************
+ // Private method
+ // *************************************************************************************
+ private boolean validateBeforeFinish(HttpServletRequest request, String sessionMapID) {
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID);
+
+ HttpSession ss = SessionManager.getSession();
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ Long userID = new Long(user.getUserID().longValue());
+
+ IImageGalleryService service = getImageGalleryService();
+ int miniViewFlag = service.checkMiniView(sessionId, userID);
+ // if current user view less than reqired view count number, then just return error message.
+ // if it is runOffline content, then need not check minimum view count
+ Boolean runOffline = (Boolean) sessionMap.get(ImageGalleryConstants.PARAM_RUN_OFFLINE);
+ if ((miniViewFlag > 0) && !runOffline) {
+ ActionErrors errors = new ActionErrors();
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("lable.learning.minimum.view.number.less",
+ miniViewFlag));
+ this.addErrors(request, errors);
+ return false;
+ }
+
+ return true;
+ }
+
+ private IImageGalleryService getImageGalleryService() {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet()
+ .getServletContext());
+ return (IImageGalleryService) wac.getBean(ImageGalleryConstants.RESOURCE_SERVICE);
+ }
+
+ /**
+ * List save current imageGallery items.
+ *
+ * @param request
+ * @return
+ */
+ private SortedSet getImageGalleryItemList(SessionMap sessionMap) {
+ SortedSet list = (SortedSet) sessionMap
+ .get(ImageGalleryConstants.ATTR_RESOURCE_ITEM_LIST);
+ if (list == null) {
+ list = new TreeSet(new ImageGalleryItemComparator());
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE_ITEM_LIST, list);
+ }
+ return list;
+ }
+
+ /**
+ * Get java.util.List
from HttpSession by given name.
+ *
+ * @param request
+ * @param name
+ * @return
+ */
+ private List getListFromSession(SessionMap sessionMap, String name) {
+ List list = (List) sessionMap.get(name);
+ if (list == null) {
+ list = new ArrayList();
+ sessionMap.put(name, list);
+ }
+ return list;
+ }
+
+ private ImageGalleryUser getCurrentUser(IImageGalleryService service, Long sessionId) {
+ // try to get form system session
+ HttpSession ss = SessionManager.getSession();
+ // get back login user DTO
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ ImageGalleryUser imageGalleryUser = service.getUserByIDAndSession(new Long(user.getUserID().intValue()),
+ sessionId);
+
+ if (imageGalleryUser == null) {
+ ImageGallerySession session = service.getImageGallerySessionBySessionId(sessionId);
+ imageGalleryUser = new ImageGalleryUser(user, session);
+ service.createUser(imageGalleryUser);
+ }
+ return imageGalleryUser;
+ }
+
+ private ImageGalleryUser getSpecifiedUser(IImageGalleryService service, Long sessionId, Integer userId) {
+ ImageGalleryUser imageGalleryUser = service.getUserByIDAndSession(new Long(userId.intValue()), sessionId);
+ if (imageGalleryUser == null) {
+ LearningAction.log
+ .error("Unable to find specified user for imageGallery activity. Screens are likely to fail. SessionId="
+ + sessionId + " UserId=" + userId);
+ }
+ return imageGalleryUser;
+ }
+
+ /**
+ * @param itemForm
+ * @return
+ */
+ private ActionErrors validateImageGalleryItem(ImageGalleryItemForm itemForm) {
+ ActionErrors errors = new ActionErrors();
+ if (StringUtils.isBlank(itemForm.getTitle())) {
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(ImageGalleryConstants.ERROR_MSG_TITLE_BLANK));
+ }
+
+ //BYYYYYY MEEEEEE
+// if (itemForm.getItemType() == ImageGalleryConstants.RESOURCE_TYPE_URL) {
+// if (StringUtils.isBlank(itemForm.getUrl())) {
+// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(ImageGalleryConstants.ERROR_MSG_URL_BLANK));
+// // URL validation: Commom URL validate(1.3.0) work not very well: it can not support http://address:port
+// // format!!!
+// // UrlValidator validator = new UrlValidator();
+// // if(!validator.isValid(itemForm.getUrl()))
+// // errors.add(ActionMessages.GLOBAL_MESSAGE,new
+// // ActionMessage(ImageGalleryConstants.ERROR_MSG_INVALID_URL));
+// }
+// }
+
+ // if(itemForm.getItemType() == ImageGalleryConstants.RESOURCE_TYPE_WEBSITE
+ // ||itemForm.getItemType() == ImageGalleryConstants.RESOURCE_TYPE_LEARNING_OBJECT){
+ // if(StringUtils.isBlank(itemForm.getDescription()))
+ // errors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(ImageGalleryConstants.ERROR_MSG_DESC_BLANK));
+ // }
+
+
+ if ((itemForm.getFile() != null) && FileUtil.isExecutableFile(itemForm.getFile().getFileName())) {
+ ActionMessage msg = new ActionMessage("error.attachment.executable");
+ errors.add(ActionMessages.GLOBAL_MESSAGE, msg);
+ }
+
+ // validate item size
+ FileValidatorUtil.validateFileSize(itemForm.getFile(), false, errors);
+
+ // for edit validate: file already exist
+ if (!itemForm.isHasFile()
+ && ((itemForm.getFile() == null) || StringUtils.isEmpty(itemForm.getFile().getFileName()))) {
+ errors
+ .add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+ ImageGalleryConstants.ERROR_MSG_FILE_BLANK));
+ }
+ return errors;
+ }
+
+ /**
+ * Set complete flag for given imageGallery item.
+ *
+ * @param request
+ * @param sessionId
+ */
+ private void doComplete(HttpServletRequest request) {
+ // get back sessionMap
+ String sessionMapID = request.getParameter(ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ Long imageGalleryItemUid = new Long(request.getParameter(ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID));
+ IImageGalleryService service = getImageGalleryService();
+ HttpSession ss = SessionManager.getSession();
+ // get back login user DTO
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+
+ Long sessionId = (Long) sessionMap.get(ImageGalleryConstants.ATTR_TOOL_SESSION_ID);
+ service.setItemComplete(imageGalleryItemUid, new Long(user.getUserID().intValue()), sessionId);
+
+ // set imageGallery item complete tag
+ SortedSet imageGalleryItemList = getImageGalleryItemList(sessionMap);
+ for (ImageGalleryItem item : imageGalleryItemList) {
+ if (item.getUid().equals(imageGalleryItemUid)) {
+ item.setComplete(true);
+ break;
+ }
+ }
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,236 @@
+/****************************************************************
+ * 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: MonitoringAction.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.web.action;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.log4j.Logger;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.lamsfoundation.lams.events.IEventNotificationService;
+import org.lamsfoundation.lams.notebook.model.NotebookEntry;
+import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants;
+import org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants;
+import org.lamsfoundation.lams.tool.imageGallery.dto.ReflectDTO;
+import org.lamsfoundation.lams.tool.imageGallery.dto.Summary;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+import org.lamsfoundation.lams.tool.imageGallery.service.IImageGalleryService;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.web.session.SessionManager;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.lamsfoundation.lams.web.util.SessionMap;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+public class MonitoringAction extends Action {
+ public static Logger log = Logger.getLogger(MonitoringAction.class);
+
+ @Override
+ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws IOException, ServletException {
+ String param = mapping.getParameter();
+
+ request.setAttribute("initialTabId", WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true));
+
+ if (param.equals("summary")) {
+ return summary(mapping, form, request, response);
+ }
+
+ if (param.equals("listuser")) {
+ return listuser(mapping, form, request, response);
+ }
+ if (param.equals("showitem")) {
+ return showitem(mapping, form, request, response);
+ }
+ if (param.equals("hideitem")) {
+ return hideitem(mapping, form, request, response);
+ }
+ if (param.equals("viewReflection")) {
+ return viewReflection(mapping, form, request, response);
+ }
+
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+
+ private ActionForward hideitem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ Long itemUid = WebUtil.readLongParam(request, ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID);
+ IImageGalleryService service = getImageGalleryService();
+ service.setItemVisible(itemUid, false);
+
+ // get back SessionMap
+ String sessionMapID = request.getParameter(ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID());
+
+ // update session value
+ List groupList = (List) sessionMap.get(ImageGalleryConstants.ATTR_SUMMARY_LIST);
+ if (groupList != null) {
+ for (List group : groupList) {
+ for (Summary sum : group) {
+ if (itemUid.equals(sum.getItemUid())) {
+ sum.setItemHide(true);
+ break;
+ }
+ }
+ }
+ }
+
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ private ActionForward showitem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ Long itemUid = WebUtil.readLongParam(request, ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID);
+ IImageGalleryService service = getImageGalleryService();
+ service.setItemVisible(itemUid, true);
+
+ // get back SessionMap
+ String sessionMapID = request.getParameter(ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID());
+
+ // update session value
+ List groupList = (List) sessionMap.get(ImageGalleryConstants.ATTR_SUMMARY_LIST);
+ if (groupList != null) {
+ for (List group : groupList) {
+ for (Summary sum : group) {
+ if (itemUid.equals(sum.getItemUid())) {
+ sum.setItemHide(false);
+ break;
+ }
+ }
+ }
+ }
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ private ActionForward summary(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ // initial Session Map
+ SessionMap sessionMap = new SessionMap();
+ request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID());
+ // save contentFolderID into session
+ sessionMap.put(AttributeNames.PARAM_CONTENT_FOLDER_ID, WebUtil.readStrParam(request,
+ AttributeNames.PARAM_CONTENT_FOLDER_ID));
+
+ Long contentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID);
+ IImageGalleryService service = getImageGalleryService();
+ List> groupList = service.getSummary(contentId);
+
+ ImageGallery imageGallery = service.getImageGalleryByContentId(contentId);
+ imageGallery.toDTO();
+
+ Map> relectList = service.getReflectList(contentId, false);
+
+ // cache into sessionMap
+ sessionMap.put(ImageGalleryConstants.ATTR_SUMMARY_LIST, groupList);
+ sessionMap.put(ImageGalleryConstants.PAGE_EDITABLE, imageGallery.isContentInUse());
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE, imageGallery);
+ sessionMap.put(ImageGalleryConstants.ATTR_TOOL_CONTENT_ID, contentId);
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECT_LIST, relectList);
+ if (imageGallery.isAllowRank()) {
+ // Since we don't know if the event exists, we just try to create it.
+ service.getEventNotificationService().createEvent(ImageGalleryConstants.TOOL_SIGNATURE,
+ ImageGalleryConstants.EVENT_NAME_NOTIFY_TEACHERS_ON_ASSIGMENT_SUBMIT, contentId,
+ service.getLocalisedMessage("event.assigment.submit.subject", null),
+ service.getLocalisedMessage("event.assigment.submit.body", null));
+
+ HttpSession ss = SessionManager.getSession();
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ // Now we subscribe the teacher
+ service.getEventNotificationService().subscribe(ImageGalleryConstants.TOOL_SIGNATURE,
+ ImageGalleryConstants.EVENT_NAME_NOTIFY_TEACHERS_ON_ASSIGMENT_SUBMIT, contentId,
+ user.getUserID().longValue(), IEventNotificationService.DELIVERY_METHOD_MAIL,
+ IEventNotificationService.PERIODICITY_SINGLE);
+ }
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ private ActionForward listuser(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ Long sessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID);
+ Long itemUid = WebUtil.readLongParam(request, ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID);
+
+ // get user list by given item uid
+ IImageGalleryService service = getImageGalleryService();
+ List list = service.getUserListBySessionItem(sessionId, itemUid);
+
+ // set to request
+ request.setAttribute(ImageGalleryConstants.ATTR_USER_LIST, list);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ private ActionForward viewReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ Long uid = WebUtil.readLongParam(request, ImageGalleryConstants.ATTR_USER_UID);
+ Long sessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID);
+
+ IImageGalleryService service = getImageGalleryService();
+ ImageGalleryUser user = service.getUser(uid);
+ NotebookEntry notebookEntry = service.getEntry(sessionID, CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, user.getUserId().intValue());
+
+ ImageGallerySession session = service.getImageGallerySessionBySessionId(sessionID);
+
+ ReflectDTO refDTO = new ReflectDTO(user);
+ if (notebookEntry == null) {
+ refDTO.setFinishReflection(false);
+ refDTO.setReflect(null);
+ } else {
+ refDTO.setFinishReflection(true);
+ refDTO.setReflect(notebookEntry.getEntry());
+ }
+ refDTO.setReflectInstrctions(session.getImageGallery().getReflectInstructions());
+
+ request.setAttribute("userDTO", refDTO);
+ return mapping.findForward("success");
+ }
+
+ // *************************************************************************************
+ // Private method
+ // *************************************************************************************
+ private IImageGalleryService getImageGalleryService() {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet()
+ .getServletContext());
+ return (IImageGalleryService) wac.getBean(ImageGalleryConstants.RESOURCE_SERVICE);
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/ViewItemAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/Attic/ViewItemAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/ViewItemAction.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,295 @@
+/****************************************************************
+ * 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: ViewItemAction.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $ */
+package org.lamsfoundation.lams.tool.imageGallery.web.action;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.math.NumberUtils;
+import org.apache.log4j.Logger;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants;
+import org.lamsfoundation.lams.tool.imageGallery.dto.InstructionNavDTO;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryItem;
+import org.lamsfoundation.lams.tool.imageGallery.service.IImageGalleryService;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryItemComparator;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryWebUtils;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
+import org.lamsfoundation.lams.util.WebUtil;
+import org.lamsfoundation.lams.web.session.SessionManager;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.lamsfoundation.lams.web.util.SessionMap;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+public class ViewItemAction extends Action {
+
+ private static final Logger log = Logger.getLogger(ViewItemAction.class);
+
+ @Override
+ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) throws IOException, ServletException {
+
+ String param = mapping.getParameter();
+ // -----------------------Display Learning Object function ---------------------------
+ if (param.equals("reviewItem")) {
+ return reviewItem(mapping, form, request, response);
+ }
+ // for preview top frame html page use:
+ if (param.equals("nextInstruction")) {
+ return nextInstruction(mapping, form, request, response);
+ }
+ // for preview top frame html page use:
+ if (param.equals("openUrlPopup")) {
+ return openUrlPopup(mapping, form, request, response);
+ }
+
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+
+ /**
+ * Open url in popup window page.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward openUrlPopup(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ String url = request.getParameter(ImageGalleryConstants.PARAM_OPEN_URL_POPUP);
+ String title = request.getParameter(ImageGalleryConstants.PARAM_TITLE);
+ request.setAttribute(ImageGalleryConstants.PARAM_OPEN_URL_POPUP, url);
+ request.setAttribute(ImageGalleryConstants.PARAM_TITLE, title);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Return next instrucion to page. It need four input parameters, mode, imageIndex or itemUid, and insIdx.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward nextInstruction(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ String mode = request.getParameter(AttributeNames.ATTR_MODE);
+
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sesionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ ImageGalleryItem item = getImageGalleryItem(request, sesionMap, mode);
+ if (item == null) {
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+
+ int currIns = NumberUtils.stringToInt(request
+ .getParameter(ImageGalleryConstants.PARAM_CURRENT_INSTRUCTION_INDEX), 0);
+
+// Set instructions = item.getItemInstructions();
+// InstructionNavDTO navDto = new InstructionNavDTO();
+// // For Learner upload item, its instruction will display description/comment fields in ReosourceItem.
+// if (!item.isCreateByAuthor()) {
+// List navItems = new ArrayList(1);
+// // create a new instruction and put ImageGalleryItem description into it: just for display use.
+// ImageGalleryItemInstruction ins = new ImageGalleryItemInstruction();
+// ins.setSequenceId(1);
+// ins.setDescription(item.getDescription());
+// navItems.add(ins);
+// navDto.setAllInstructions(navItems);
+// instructions.add(ins);
+// } else {
+// navDto.setAllInstructions(new ArrayList(instructions));
+// }
+// navDto.setTitle(item.getTitle());
+// navDto.setTotal(instructions.size());
+// if (instructions.size() > 0) {
+// navDto.setInstruction((ImageGalleryItemInstruction) new ArrayList(instructions).get(currIns));
+// navDto.setCurrent(currIns + 1);
+// } else {
+// navDto.setCurrent(0);
+// navDto.setInstruction(null);
+// }
+
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+// request.setAttribute(ImageGalleryConstants.ATTR_RESOURCE_INSTRUCTION, navDto);
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+ }
+
+ /**
+ * Display main frame to display instrcution and item content.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return
+ */
+ private ActionForward reviewItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+ String mode = request.getParameter(AttributeNames.ATTR_MODE);
+
+ String sessionMapID = WebUtil.readStrParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID);
+ SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID);
+
+ ImageGalleryItem item = getImageGalleryItem(request, sessionMap, mode);
+
+ String idStr = request.getParameter(ImageGalleryConstants.ATTR_TOOL_SESSION_ID);
+ Long sessionId = NumberUtils.createLong(idStr);
+ // mark this item access flag if it is learner
+ if (ToolAccessMode.LEARNER.toString().equals(mode)) {
+ IImageGalleryService service = getImageGalleryService();
+ HttpSession ss = SessionManager.getSession();
+ // get back login user DTO
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ service.setItemAccess(item.getUid(), new Long(user.getUserID().intValue()), sessionId);
+ }
+
+ if (item == null) {
+ return mapping.findForward(ImageGalleryConstants.ERROR);
+ }
+ // set url to content frame
+ request.setAttribute(ImageGalleryConstants.ATTR_RESOURCE_REVIEW_URL, getReviewUrl(item, sessionMapID));
+
+ // these attribute will be use to instruction navigator page
+ request.setAttribute(AttributeNames.ATTR_MODE, mode);
+ int itemIdx = NumberUtils.stringToInt(request.getParameter(ImageGalleryConstants.PARAM_IMAGE_INDEX));
+ request.setAttribute(ImageGalleryConstants.PARAM_IMAGE_INDEX, itemIdx);
+ Long itemUid = NumberUtils.createLong(request.getParameter(ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID));
+ request.setAttribute(ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID, itemUid);
+ request.setAttribute(ImageGalleryConstants.ATTR_TOOL_SESSION_ID, sessionId);
+ request.setAttribute(ImageGalleryConstants.ATTR_SESSION_MAP_ID, sessionMapID);
+
+ return mapping.findForward(ImageGalleryConstants.SUCCESS);
+
+ }
+
+ // *************************************************************************************
+ // Private method
+ // *************************************************************************************
+ /**
+ * Return resoruce item according to ToolAccessMode.
+ *
+ * @param request
+ * @param sessionMap
+ * @param mode
+ * @return
+ */
+ private ImageGalleryItem getImageGalleryItem(HttpServletRequest request, SessionMap sessionMap, String mode) {
+ ImageGalleryItem item = null;
+ if (ImageGalleryConstants.MODE_AUTHOR_SESSION.equals(mode)) {
+ int itemIdx = NumberUtils.stringToInt(request.getParameter(ImageGalleryConstants.PARAM_IMAGE_INDEX), 0);
+ // authoring: does not save item yet, so only has ItemList from session and identity by Index
+ List imageGalleryList = new ArrayList(
+ getImageGalleryItemList(sessionMap));
+ item = imageGalleryList.get(itemIdx);
+ } else {
+ Long itemUid = NumberUtils.createLong(request.getParameter(ImageGalleryConstants.PARAM_RESOURCE_ITEM_UID));
+ // get back the imageGallery and item list and display them on page
+ IImageGalleryService service = getImageGalleryService();
+ item = service.getImageGalleryItemByUid(itemUid);
+ }
+ return item;
+ }
+
+ private IImageGalleryService getImageGalleryService() {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet()
+ .getServletContext());
+ return (IImageGalleryService) wac.getBean(ImageGalleryConstants.RESOURCE_SERVICE);
+ }
+
+ private static Pattern wikipediaPattern = Pattern.compile("wikipedia", Pattern.CASE_INSENSITIVE
+ | Pattern.UNICODE_CASE);
+
+ private Object getReviewUrl(ImageGalleryItem item, String sessionMapID) {
+// short type = item.getType();
+ String url = null;
+// switch (type) {
+// case ImageGalleryConstants.RESOURCE_TYPE_URL:
+// // See LDEV-1736 regarding wikipedia regex
+// Matcher matcher = ViewItemAction.wikipediaPattern.matcher(item.getUrl());
+// boolean wikipediaInURL = matcher.find();
+//
+// if (item.isOpenUrlNewWindow() || wikipediaInURL) {
+// try {
+// url = "/openUrlPopup.do?popupUrl="
+// + URLEncoder.encode(ImageGalleryWebUtils.protocol(item.getUrl()), "UTF8") + "&title="
+// + URLEncoder.encode(item.getTitle(), "UTF8");
+// } catch (UnsupportedEncodingException e) {
+// ViewItemAction.log.error(e);
+// }
+// } else {
+// url = ImageGalleryWebUtils.protocol(item.getUrl());
+// }
+// break;
+// case ImageGalleryConstants.RESOURCE_TYPE_FILE:
+// url = "/download/?uuid=" + item.getFileUuid() + "&preferDownload=false";
+// break;
+// case ImageGalleryConstants.RESOURCE_TYPE_WEBSITE:
+// url = "/download/?uuid=" + item.getFileUuid() + "&preferDownload=false";
+// break;
+// case ImageGalleryConstants.RESOURCE_TYPE_LEARNING_OBJECT:
+// url = "/pages/learningobj/mainframe.jsp?sessionMapID=" + sessionMapID;
+// break;
+// }
+ return url;
+ }
+
+ /**
+ * List save current imageGallery items.
+ *
+ * @param request
+ * @return
+ */
+ private SortedSet getImageGalleryItemList(SessionMap sessionMap) {
+ SortedSet list = (SortedSet) sessionMap.get(ImageGalleryConstants.ATTR_RESOURCE_ITEM_LIST);
+ if (list == null) {
+ list = new TreeSet(new ImageGalleryItemComparator());
+ sessionMap.put(ImageGalleryConstants.ATTR_RESOURCE_ITEM_LIST, list);
+ }
+ return list;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ImageGalleryForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ImageGalleryForm.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ImageGalleryForm.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,137 @@
+/****************************************************************
+ * 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: ImageGalleryForm.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.web.form;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.upload.FormFile;
+import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryAttachment;
+
+/**
+ *
+ * ImageGallery Form.
+ *
+ * @struts.form name="imageGalleryForm"
+ *
+ * User: Dapeng.Ni
+ */
+public class ImageGalleryForm extends ActionForm {
+ private static final long serialVersionUID = 3599879328307492312L;
+
+ private static Logger logger = Logger.getLogger(ImageGalleryForm.class.getName());
+
+ // Forum fields
+ private String sessionMapID;
+ private String contentFolderID;
+ private int currentTab;
+ private FormFile offlineFile;
+ private FormFile onlineFile;
+
+ private ImageGallery imageGallery;
+
+ public ImageGalleryForm() {
+ imageGallery = new ImageGallery();
+ imageGallery.setTitle("Shared ImageGallery");
+ currentTab = 1;
+ }
+
+ public void setImageGallery(ImageGallery imageGallery) {
+ this.imageGallery = imageGallery;
+ // set Form special varaible from given forum
+ if (imageGallery == null) {
+ logger.error("Initial ImageGalleryForum failed by null value of ImageGallery.");
+ }
+ }
+
+ public void reset(ActionMapping mapping, HttpServletRequest request) {
+ String param = mapping.getParameter();
+ // if it is start page, all data read out from database or current session
+ // so need not reset checkbox to refresh value!
+ if (!StringUtils.equals(param, "start") && !StringUtils.equals(param, "initPage")) {
+ imageGallery.setAllowCommentImages(false);
+ imageGallery.setAllowShareImages(false);
+ imageGallery.setLockWhenFinished(false);
+ imageGallery.setDefineLater(false);
+ imageGallery.setAllowVote(false);
+ imageGallery.setRunOffline(false);
+ imageGallery.setReflectOnActivity(false);
+ }
+ }
+
+ public int getCurrentTab() {
+ return currentTab;
+ }
+
+ public void setCurrentTab(int currentTab) {
+ this.currentTab = currentTab;
+ }
+
+ public FormFile getOfflineFile() {
+ return offlineFile;
+ }
+
+ public void setOfflineFile(FormFile offlineFile) {
+ this.offlineFile = offlineFile;
+ }
+
+ public FormFile getOnlineFile() {
+ return onlineFile;
+ }
+
+ public void setOnlineFile(FormFile onlineFile) {
+ this.onlineFile = onlineFile;
+ }
+
+ public ImageGallery getImageGallery() {
+ return imageGallery;
+ }
+
+ public String getSessionMapID() {
+ return sessionMapID;
+ }
+
+ public void setSessionMapID(String sessionMapID) {
+ this.sessionMapID = sessionMapID;
+ }
+
+ public String getContentFolderID() {
+ return contentFolderID;
+ }
+
+ public void setContentFolderID(String contentFolderID) {
+ this.contentFolderID = contentFolderID;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ImageGalleryItemForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ImageGalleryItemForm.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ImageGalleryItemForm.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,160 @@
+/****************************************************************
+ * 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: ImageGalleryItemForm.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.web.form;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.upload.FormFile;
+
+/**
+ * ImageGallery Item Form.
+ *
+ * @struts.form name="imageGalleryItemForm"
+ * @author Steve.Ni
+ *
+ * @version $Revision: 1.1 $
+ */
+public class ImageGalleryItemForm extends ActionForm {
+ private String imageIndex;
+ private String sessionMapID;
+
+ // tool access mode;
+ private String mode;
+
+ private String title;
+ private String description;
+ private String url;
+ private boolean openUrlNewWindow;
+ // flag of this item has attachment or not
+ private boolean hasFile;
+ private Long fileUuid;
+ private Long fileVersionId;
+ private String fileName;
+ private FormFile file;
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public FormFile getFile() {
+ return file;
+ }
+
+ public void setFile(FormFile file) {
+ this.file = file;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * Returns ImageGallery order index.
+ *
+ * @return ImageGallery order index
+ */
+ public String getImageIndex() {
+ return imageIndex;
+ }
+
+ /**
+ * Sets ImageGallery order index.
+ *
+ * @param imageIndex ImageGallery order index
+ */
+ public void setImageIndex(String imageIndex) {
+ this.imageIndex = imageIndex;
+ }
+
+ 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 boolean isHasFile() {
+ return hasFile;
+ }
+
+ public void setHasFile(boolean hasFile) {
+ this.hasFile = hasFile;
+ }
+
+ public boolean isOpenUrlNewWindow() {
+ return openUrlNewWindow;
+ }
+
+ public void setOpenUrlNewWindow(boolean openUrlNewWindow) {
+ this.openUrlNewWindow = openUrlNewWindow;
+ }
+
+ public String getSessionMapID() {
+ return sessionMapID;
+ }
+
+ public void setSessionMapID(String sessionMapID) {
+ this.sessionMapID = sessionMapID;
+ }
+
+ public String getMode() {
+ return mode;
+ }
+
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ReflectionForm.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ReflectionForm.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/form/ReflectionForm.java 11 Oct 2008 12:04:14 -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: ReflectionForm.java,v 1.1 2008/10/11 12:04:14 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.imageGallery.web.form;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.validator.ValidatorForm;
+
+/**
+ *
+ * Reflection Form.
+ *
+ * @struts.form name="reflectionForm"
+ *
+ */
+public class ReflectionForm extends ValidatorForm {
+ private static final long serialVersionUID = -9054365604649146735L;
+ private static Logger logger = Logger.getLogger(ReflectionForm.class.getName());
+
+ private Integer userID;
+ private String sessionMapID;
+ private String entryText;
+
+ public String getEntryText() {
+ return entryText;
+ }
+
+ public void setEntryText(String entryText) {
+ this.entryText = entryText;
+ }
+
+ public Integer getUserID() {
+ return userID;
+ }
+
+ public void setUserID(Integer userUid) {
+ this.userID = userUid;
+ }
+
+ public String getSessionMapID() {
+ return sessionMapID;
+ }
+
+ public void setSessionMapID(String sessionMapID) {
+ this.sessionMapID = sessionMapID;
+ }
+
+}
Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/servlet/ExportServlet.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/servlet/ExportServlet.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/servlet/ExportServlet.java 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,281 @@
+/****************************************************************
+ * 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 2008/10/11 12:04:14 andreyb Exp $$ */
+
+package org.lamsfoundation.lams.tool.imageGallery.web.servlet;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.servlet.ServletException;
+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.notebook.model.NotebookEntry;
+import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants;
+import org.lamsfoundation.lams.tool.imageGallery.dto.ReflectDTO;
+import org.lamsfoundation.lams.tool.imageGallery.dto.Summary;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallery;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGallerySession;
+import org.lamsfoundation.lams.tool.imageGallery.model.ImageGalleryUser;
+import org.lamsfoundation.lams.tool.imageGallery.service.IImageGalleryService;
+import org.lamsfoundation.lams.tool.imageGallery.service.ImageGalleryApplicationException;
+import org.lamsfoundation.lams.tool.imageGallery.service.ImageGalleryServiceProxy;
+import org.lamsfoundation.lams.tool.imageGallery.util.ReflectDTOComparator;
+import org.lamsfoundation.lams.tool.imageGallery.util.ImageGalleryToolContentHandler;
+import org.lamsfoundation.lams.util.FileUtil;
+import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.lamsfoundation.lams.web.util.SessionMap;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+/**
+ * Export portfolio servlet to export all shared imageGallery into offline HTML
+ * package.
+ *
+ * @author Steve.Ni
+ *
+ * @version $Revision: 1.1 $
+ */
+public class ExportServlet extends AbstractExportPortfolioServlet {
+ private static final long serialVersionUID = -4529093489007108143L;
+
+ private static Logger logger = Logger.getLogger(ExportServlet.class);
+
+ private final String FILENAME = "shared_imageGallery_main.html";
+
+ private ImageGalleryToolContentHandler handler;
+
+ private IImageGalleryService service;
+
+ @Override
+ public void init() throws ServletException {
+ service = ImageGalleryServiceProxy.getImageGalleryService(getServletContext());
+ super.init();
+ }
+
+ public String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) {
+
+// initial sessionMap
+ SessionMap sessionMap = new SessionMap();
+ request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap);
+
+ try {
+ if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) {
+ sessionMap.put(AttributeNames.ATTR_MODE,ToolAccessMode.LEARNER);
+ learner(request, response, directoryName, cookies,sessionMap);
+ } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) {
+ sessionMap.put(AttributeNames.ATTR_MODE,ToolAccessMode.TEACHER);
+ teacher(request, response, directoryName, cookies,sessionMap);
+ }
+ } catch (ImageGalleryApplicationException e) {
+ logger.error("Cannot perform export for imageGallery tool.");
+ }
+
+ String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ + request.getContextPath();
+ writeResponseToFile(basePath + "/pages/export/exportportfolio.jsp?sessionMapID="+sessionMap.getSessionID()
+ , 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 {
+
+ ImageGallery content = null;
+ if ( toolContentID != null ) {
+ content = service.getImageGalleryByContentId(toolContentID);
+ } else {
+ ImageGallerySession session=service.getImageGallerySessionBySessionId(toolSessionID);
+ if ( session != null )
+ content = session.getImageGallery();
+ }
+ if ( content != null ) {
+ activityTitle = content.getTitle();
+ }
+ }
+ return super.doOfflineExport(request, response, directoryName, cookies);
+ }
+
+
+
+ public void learner(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies, HashMap sessionMap)
+ throws ImageGalleryApplicationException {
+
+ if (userID == null || toolSessionID == null) {
+ String error = "Tool session Id or user Id is null. Unable to continue";
+ logger.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+
+ ImageGalleryUser learner = service.getUserByIDAndSession(userID,toolSessionID);
+
+ if (learner == null) {
+ String error = "The user with user id " + userID + " does not exist.";
+ logger.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+
+ ImageGallery content = service.getImageGalleryBySessionId(toolSessionID);
+
+ if (content == null) {
+ String error = "The content for this activity has not been defined yet.";
+ logger.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+
+
+ List group = service.exportBySessionId(toolSessionID,true);
+ saveFileToLocal(group, directoryName);
+
+ List groupList = new ArrayList();
+ if(group.size() > 0)
+ groupList.add(group);
+
+ // Add flag to indicate whether to render user notebook entries
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECTION_ON, content.isReflectOnActivity());
+
+ // Create reflectList if reflection is enabled.
+ if (content.isReflectOnActivity()) {
+ // Create reflectList, need to follow same structure used in teacher
+ // see service.getReflectList();
+ Map> map = new HashMap>();
+ Set reflectDTOSet = new TreeSet(new ReflectDTOComparator());
+ reflectDTOSet.add(getReflectionEntry(learner));
+ map.put(toolSessionID, reflectDTOSet);
+
+ // Add reflectList to sessionMap
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECT_LIST, map);
+ }
+
+ sessionMap.put(ImageGalleryConstants.ATTR_TITLE, content.getTitle());
+ sessionMap.put(ImageGalleryConstants.ATTR_INSTRUCTIONS, content.getInstructions());
+ sessionMap.put(ImageGalleryConstants.ATTR_SUMMARY_LIST, groupList);
+ }
+
+ public void teacher(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies, HashMap sessionMap)
+ throws ImageGalleryApplicationException {
+
+ // check if toolContentId exists in db or not
+ if (toolContentID == null) {
+ String error = "Tool Content Id is missing. Unable to continue";
+ logger.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+
+ ImageGallery content = service.getImageGalleryByContentId(toolContentID);
+
+ if (content == null) {
+ String error = "Data is missing from the database. Unable to Continue";
+ logger.error(error);
+ throw new ImageGalleryApplicationException(error);
+ }
+ List> groupList = service.exportByContentId(toolContentID);
+ if(groupList != null) {
+ for (List list : groupList) {
+ saveFileToLocal(list, directoryName);
+ }
+ }
+
+ // Add flag to indicate whether to render user notebook entries
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECTION_ON, content.isReflectOnActivity());
+
+ // Create reflectList if reflection is enabled.
+ if (content.isReflectOnActivity()) {
+ Map> reflectList = service.getReflectList(content.getContentId(), true);
+ // Add reflectList to sessionMap
+ sessionMap.put(ImageGalleryConstants.ATTR_REFLECT_LIST, reflectList);
+ }
+
+ // put it into HTTPSession
+ sessionMap.put(ImageGalleryConstants.ATTR_TITLE, content.getTitle());
+ sessionMap.put(ImageGalleryConstants.ATTR_INSTRUCTIONS, content.getInstructions());
+ sessionMap.put(ImageGalleryConstants.ATTR_SUMMARY_LIST, groupList);
+ }
+
+ private void saveFileToLocal(List list, String directoryName) {
+ handler = getToolContentHandler();
+ for (Summary summary : list) {
+// BYYYY MEEEE
+// //for learning object, it just display "No offlice pakcage avaliable" information.
+// if(summary.getItemType() == ImageGalleryConstants.RESOURCE_TYPE_LEARNING_OBJECT
+// || summary.getItemType() == ImageGalleryConstants.RESOURCE_TYPE_URL)
+// continue;
+ try{
+ int idx= 1;
+ String userName = summary.getUsername();
+ String localDir;
+ while(true){
+ localDir = FileUtil.getFullPath(directoryName,userName + "/" + idx);
+ File local = new File(localDir);
+ if(!local.exists()){
+ local.mkdirs();
+ break;
+ }
+ idx++;
+ }
+ summary.setAttachmentLocalUrl(userName + "/" + idx + "/" + summary.getFileUuid() + '.' + FileUtil.getFileExtension(summary.getFileName()));
+ handler.saveFile(summary.getFileUuid(), FileUtil.getFullPath(directoryName, summary.getAttachmentLocalUrl()));
+ } catch (Exception e) {
+ logger.error("Export forum topic attachment failed: " + e.toString());
+ }
+ }
+
+ }
+
+ private ImageGalleryToolContentHandler getToolContentHandler() {
+ if ( handler == null ) {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext());
+ handler = (ImageGalleryToolContentHandler) wac.getBean(ImageGalleryConstants.TOOL_CONTENT_HANDLER_NAME);
+ }
+ return handler;
+ }
+
+ private ReflectDTO getReflectionEntry(ImageGalleryUser imageGalleryUser) {
+ ReflectDTO reflectDTO = new ReflectDTO(imageGalleryUser);
+ NotebookEntry notebookEntry = service.getEntry(imageGalleryUser.getSession().getSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL,
+ ImageGalleryConstants.TOOL_SIGNATURE, imageGalleryUser.getUserId().intValue());
+
+ // check notebookEntry is not null
+ if (notebookEntry != null) {
+ reflectDTO.setReflect(notebookEntry.getEntry());
+ logger.debug("Could not find notebookEntry for ImageGalleryUser: " + imageGalleryUser.getUid());
+ }
+ return reflectDTO;
+ }
+}
Index: lams_tool_images/web/403.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/403.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/403.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,6 @@
+<%@ 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_images/web/404.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/404.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/404.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,8 @@
+<%@ 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_images/web/error.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/error.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/error.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,69 @@
+
+
+<%@ 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_images/web/login.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/login.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/login.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,12 @@
+<%@ 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_images/web/WEB-INF/.cvsignore
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/Attic/.cvsignore,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/.cvsignore 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,4 @@
+lib
+struts-config.xml
+validation.xml
+classes
Index: lams_tool_images/web/WEB-INF/tiles-defs.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/Attic/tiles-defs.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tiles-defs.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/web.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/web.xml 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,358 @@
+
+
+
+ Shared ImageGallery
+
+ Shared ImageGallery tool
+
+
+ javax.servlet.jsp.jstl.fmt.localizationContext
+ org.lamsfoundation.lams.tool.imageGallery.ApplicationResources
+
+
+ contextConfigLocation
+
+ classpath:/org/lamsfoundation/lams/applicationContext.xml
+ classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml
+ classpath:/org/lamsfoundation/lams/toolApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/tool/imageGallery/imageGalleryApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/tool/imageGallery/dbupdates/autopatchContext.xml
+
+
+
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+
+
+ org.lamsfoundation.lams.web.session.SetMaxTimeoutListener
+
+
+
+
+ hibernateFilter
+
+ org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
+
+
+ sessionFactoryBeanName
+ imageGallerySessionFactory
+
+
+
+
+ SystemSessionFilter
+
+ org.lamsfoundation.lams.web.session.SystemSessionFilter
+
+
+
+ LocaleFilter
+
+ org.lamsfoundation.lams.web.filter.LocaleFilter
+
+
+ encoding
+ UTF-8
+
+
+
+
+ hibernateFilter
+ /*
+
+
+ SystemSessionFilter
+ /*
+
+
+ LocaleFilter
+ /*
+
+
+
+
+
+ exportPortfolio
+ org.lamsfoundation.lams.tool.imageGallery.web.servlet.ExportServlet
+
+
+
+ action
+ org.apache.struts.action.ActionServlet
+
+ config
+ /WEB-INF/struts-config.xml
+
+
+ debug
+ 999
+
+
+ detail
+ 1
+
+
+ validate
+ true
+
+ 2
+
+
+
+ Connector
+ com.fredck.FCKeditor.connector.ConnectorServlet
+
+ baseDir
+ /UserFiles/
+
+
+ debug
+ false
+
+ 1
+
+
+
+
+ Instructions Download
+ Instructions Download
+ download
+ org.lamsfoundation.lams.contentrepository.client.ToolDownload
+
+ toolContentHandlerBeanName
+ imageGalleryToolContentHandler
+
+ 3
+
+
+
+ action
+ *.do
+
+
+
+ Connector
+ /editor/filemanager/browser/default/connectors/jsp/connector
+
+
+
+ download
+ /download/*
+
+
+
+ exportPortfolio
+ /exportPortfolio
+
+
+
+
+
+
+
+ tags-bean
+ /WEB-INF/tlds/struts/struts-bean.tld
+
+
+ tags-html
+ /WEB-INF/tlds/struts/struts-html.tld
+
+
+ tags-logic
+ /WEB-INF/tlds/struts/struts-logic.tld
+
+
+ tags-tiles
+ /WEB-INF/tlds/struts/struts-tiles.tld
+
+
+
+
+
+ tags-fmt
+ /WEB-INF/tlds/jstl/fmt.tld
+
+
+ tags-core
+ /WEB-INF/tlds/jstl/c.tld
+
+
+ tags-function
+ /WEB-INF/tlds/jstl/fn.tld
+
+
+ tags-xml
+ /WEB-INF/tlds/jstl/x.tld
+
+
+
+
+
+ fck-editor
+ /WEB-INF/tlds/fckeditor/FCKeditor.tld
+
+
+
+
+
+ tags-lams
+ /WEB-INF/tlds/lams/lams.tld
+
+
+
+
+
+
+
+ Secure Content
+ /*
+
+
+ LEARNER
+ TEACHER
+ MONITOR
+ AUTHOR
+ ADMIN
+ SYSADMIN
+ AUTHOR ADMIN
+
+
+
+
+
+ Authoring Update
+ /authoring/*
+
+
+ AUTHOR
+ AUTHOR ADMIN
+ SYSADMIN
+
+
+
+
+ Staff Content
+ /monitoring.do
+
+
+ MONITOR
+ TEACHER
+
+
+
+
+ Staff Content
+ /definelater.do
+
+
+ MONITOR
+ TEACHER
+
+
+
+
+
+ Adminstrator Content
+ /admin.do
+
+
+ ADMIN
+
+
+
+
+ LAMS System Adminstrator Content
+ /sysadmin.do
+
+
+ SYSADMIN
+
+
+
+
+
+ Download Files
+ /download/
+
+
+ LEARNER
+ AUTHOR
+ MONITOR
+ TEACHER
+ ADMIN
+ SYSADMIN
+ AUTHOR ADMIN
+
+
+
+
+
+
+
+ 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
+
+
+
+
+ FORM
+ LAMS
+
+ /login.jsp
+ /login.jsp?failed=y
+
+
+
+
+ 500
+ /error.jsp
+
+
+ 403
+ /403.jsp
+
+
+ 404
+ /404.jsp
+
+
+
Index: lams_tool_images/web/WEB-INF/tags/AuthoringButton.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/AuthoringButton.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/AuthoringButton.tag 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,93 @@
+<%
+/****************************************************************
+ * 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_images/web/WEB-INF/tags/Date.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Date.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/Date.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/DefineLater.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/DefineLater.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/DefineLater.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/ExportPortOutput.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/ExportPortOutput.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/ExportPortOutput.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/FCKEditor.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/FCKEditor.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/FCKEditor.tag 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,57 @@
+<%@ 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="contentFolderID" required="false" rtexprvalue="true"%>
+
+
+
+
+
+
+
+
+
+ /fckeditor/
+
+
+
+
+ ${value}
+
+
+
+
+
Index: lams_tool_images/web/WEB-INF/tags/Head.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Head.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/Head.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/ImgButtonWrapper.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/ImgButtonWrapper.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/ImgButtonWrapper.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/LearnerFlashEnabled.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/LearnerFlashEnabled.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/LearnerFlashEnabled.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/Passon.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/Passon.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/Passon.tag 11 Oct 2008 12:04:14 -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" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "
+ quality="high"
+ scale="noscale"
+ bgcolor="#FFFFFF"
+ width="1"
+ height="1"
+ swliveconnect=true
+ id="passon"
+ name="passon"
+ align=""
+ type="application/x-shockwave-flash"
+ pluginspage="http://www.macromedia.com/go/getflashplayer" />
+
+
+
Index: lams_tool_images/web/WEB-INF/tags/ProgressOutput.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/ProgressOutput.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/ProgressOutput.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/Tab.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Tab.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/Tab.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/TabBody.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/TabBody.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/TabBody.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/TabName.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/TabName.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/TabName.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/Tabs.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Tabs.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/Tabs.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tags/headItems.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/headItems.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tags/headItems.tag 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/fckeditor/FCKeditor.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/fckeditor/Attic/FCKeditor.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/fckeditor/FCKeditor.tld 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,215 @@
+
+
+
+
+ 2.3
+ 1.1
+ FCKeditor
+ http://fckeditor.net/tags-fckeditor
+ FCKeditor taglib
+
+ editor
+ com.fredck.FCKeditor.tags.FCKeditorTag
+ JSP
+
+ id
+ true
+ true
+
+
+ basePath
+ false
+ true
+
+
+ toolbarSet
+ false
+ true
+
+
+ width
+ false
+ true
+
+
+ height
+ false
+ true
+
+
+ customConfigurationsPath
+ false
+ true
+
+
+ editorAreaCSS
+ false
+ true
+
+
+ baseHref
+ false
+ true
+
+
+ skinPath
+ false
+ true
+
+
+ pluginsPath
+ false
+ true
+
+
+ fullPage
+ false
+ true
+
+
+ debug
+ false
+ true
+
+
+ autoDetectLanguage
+ false
+ true
+
+
+ defaultLanguage
+ false
+ true
+
+
+ contentLangDirection
+ false
+ true
+
+
+ enableXHTML
+ false
+ true
+
+
+ enableSourceXHTML
+ false
+ true
+
+
+ fillEmptyBlocks
+ false
+ true
+
+
+ formatSource
+ false
+ true
+
+
+ formatOutput
+ false
+ true
+
+
+ formatIndentator
+ false
+ true
+
+
+ geckoUseSPAN
+ false
+ true
+
+
+ startupFocus
+ false
+ true
+
+
+ forcePasteAsPlainText
+ false
+ true
+
+
+ forceSimpleAmpersand
+ false
+ true
+
+
+ tabSpaces
+ false
+ true
+
+
+ useBROnCarriageReturn
+ false
+ true
+
+
+ toolbarStartExpanded
+ false
+ true
+
+
+ toolbarCanCollapse
+ false
+ true
+
+
+ fontColors
+ false
+ true
+
+
+ fontNames
+ false
+ true
+
+
+ fontSizes
+ false
+ true
+
+
+ fontFormats
+ false
+ true
+
+
+ stylesXmlPath
+ false
+ true
+
+
+ linkBrowserURL
+ false
+ true
+
+
+ imageBrowserURL
+ false
+ true
+
+
+ flashBrowserURL
+ false
+ true
+
+
+ linkUploadURL
+ false
+ true
+
+
+ imageUploadURL
+ false
+ true
+
+
+ flashUploadURL
+ false
+ true
+
+
+
Index: lams_tool_images/web/WEB-INF/tlds/jstl/c.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/jstl/c.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/jstl/c.tld 11 Oct 2008 12:04:14 -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 imageGallery to import.
+
+ url
+ true
+ true
+
+
+
+Name of the exported scoped variable for the
+imageGallery'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
+imageGallery's content. The type of the scoped
+variable is Reader.
+
+ varReader
+ false
+ false
+
+
+
+Name of the context when accessing a relative
+URL imageGallery that belongs to a foreign
+context.
+
+ context
+ false
+ true
+
+
+
+Character encoding of the content at the input
+imageGallery.
+
+ 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 imageGallery to redirect to.
+
+ url
+ false
+ true
+
+
+
+Name of the context when redirecting to a relative URL
+imageGallery 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
+imageGallery 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_images/web/WEB-INF/tlds/jstl/fmt.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/jstl/fmt.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/jstl/fmt.tld 11 Oct 2008 12:04:14 -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 imageGallery bundle to be used by its tag body
+
+ bundle
+ org.apache.taglibs.standard.tag.rt.fmt.BundleTag
+ JSP
+
+
+ImageGallery bundle base name. This is the bundle's
+fully-qualified imageGallery 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 imageGallery bundle and stores it in the named scoped variable or
+ the bundle configuration variable
+
+ setBundle
+ org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag
+ empty
+
+
+ImageGallery bundle base name. This is the bundle's
+fully-qualified imageGallery 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 imageGallery
+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_images/web/WEB-INF/tlds/jstl/fn.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/jstl/fn.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/jstl/fn.tld 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/jstl/x.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/jstl/x.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/jstl/x.tld 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/lams/lams.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/lams/lams.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/lams/lams.tld 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,513 @@
+
+
+
+
+ 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
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+ Converts role name into form usable as message imageGallery key
+ Converts role name into form usable as message imageGallery key
+
+
+ role
+ org.lamsfoundation.lams.web.tag.RoleTag
+ empty
+
+
+ Converts role name into form usable as message imageGallery key
+ role
+ true
+
+ 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
+
+
+ index
+ 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
+
+
+ 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_images/web/WEB-INF/tlds/struts/struts-bean.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/struts/struts-bean.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/struts/struts-bean.tld 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/struts/struts-html.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/struts/struts-html.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/struts/struts-html.tld 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/struts/struts-logic.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/struts/struts-logic.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/struts/struts-logic.tld 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/struts/struts-nested.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/struts/struts-nested.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/struts/struts-nested.tld 11 Oct 2008 12:04:14 -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_images/web/WEB-INF/tlds/struts/struts-tiles.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tlds/struts/struts-tiles.tld,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/WEB-INF/tlds/struts/struts-tiles.tld 11 Oct 2008 12:04:14 -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_images/web/common/fckeditorheader.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/common/Attic/fckeditorheader.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/common/fckeditorheader.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,5 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
Index: lams_tool_images/web/common/footer.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/common/footer.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/common/footer.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1 @@
+
Index: lams_tool_images/web/common/header.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/common/header.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/common/header.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,17 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/common/messages.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/common/messages.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/common/messages.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,8 @@
+<%-- Error Messages --%>
+
+
+
+
+
+
+
Index: lams_tool_images/web/common/tabbedheader.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/common/tabbedheader.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/common/tabbedheader.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,17 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/common/taglibs.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/common/taglibs.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/common/taglibs.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,12 @@
+<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
+<%@ taglib uri="tags-tiles" prefix="tiles" %>
+<%@ taglib uri="tags-bean" prefix="bean" %>
+<%@ taglib uri="tags-html" prefix="html" %>
+<%@ taglib uri="tags-logic" prefix="logic" %>
+<%@ taglib uri="tags-function" prefix="fn" %>
+<%@ taglib uri="tags-core" prefix="c" %>
+<%@ taglib uri="tags-fmt" prefix="fmt" %>
+<%@ taglib uri="tags-xml" prefix="x" %>
+<%@ taglib uri="tags-lams" prefix="lams" %>
+<%@ taglib uri="fck-editor" prefix="FCK"%>
+
Index: lams_tool_images/web/images/icon_imageGallery.swf
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/images/icon_imageGallery.swf,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/css/imageGallery.css
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/css/imageGallery.css,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/includes/css/imageGallery.css 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,33 @@
+.innerforms {
+ border: 0px;
+ font-size: small;
+ font-style: normal;
+ width:100%;
+}
+
+div.error, div.message {
+ background-color: #ffffcc;
+ border: 1px solid #000;
+ color: #000000;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ margin: 10px auto;
+ padding: 3px;
+ text-align: left;
+ vertical-align: bottom;
+}
+
+/* use a different color for the errors */
+div.error {
+ border: 2px solid red;
+}
+
+img.validationWarning, div.errors img.icon, div.messages img.icon {
+ border: 0;
+ width: 14px;
+ height: 13px;
+ vertical-align: top;
+}
+div.message img.icon {
+ vertical-align: middle;
+}
Index: lams_tool_images/web/includes/images/.cvsignore
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/.cvsignore,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/includes/images/.cvsignore 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1 @@
+Thumbs.db
Index: lams_tool_images/web/includes/images/cross.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/cross.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/downarrow.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/downarrow.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/downarrow_disabled.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/downarrow_disabled.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/edit.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/edit.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/indicator.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/indicator.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/spacer.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/spacer.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/tick.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/tick.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/uparrow.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/uparrow.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/images/uparrow_disabled.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/images/uparrow_disabled.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/includes/javascript/imageGallerycommon.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/javascript/imageGallerycommon.js,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/includes/javascript/imageGallerycommon.js 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,10 @@
+ function showBusy(targetDiv){
+ if($(targetDiv+"_Busy") != null){
+ Element.show(targetDiv+"_Busy");
+ }
+ }
+ function hideBusy(targetDiv){
+ if($(targetDiv+"_Busy") != null){
+ Element.hide(targetDiv+"_Busy");
+ }
+ }
Index: lams_tool_images/web/includes/javascript/imageGalleryitem.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/javascript/imageGalleryitem.js,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/includes/javascript/imageGalleryitem.js 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,29 @@
+ var itemAttachmentTargetDiv = "itemAttachmentArea";
+ function removeItemAttachment(idx){
+ //var id = "instructionItem" + idx;
+ //Element.remove(id);
+ var url= removeItemAttachmentUrl;
+ var reqIDVar = new Date();
+ var param = "reqID="+reqIDVar.getTime();
+ removeItemAttachmentLoading();
+ var myAjax = new Ajax.Updater(
+ itemAttachmentTargetDiv,
+ url,
+ {
+ method:'post',
+ parameters:param,
+ onComplete:removeItemAttachmentComplete,
+ evalScripts:true
+ }
+ );
+ }
+ function removeItemAttachmentLoading(){
+ showBusy(itemAttachmentTargetDiv);
+ }
+ function removeItemAttachmentComplete(){
+ hideBusy(itemAttachmentTargetDiv);
+ }
+
+ function cancelImageGalleryItem(){
+ window.top.hideMessage();
+ }
Index: lams_tool_images/web/includes/javascript/tree.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/javascript/Attic/tree.js,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/includes/javascript/tree.js 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,139 @@
+// Title: Tigra Tree
+// Description: See the demo at url
+// URL: http://www.softcomplex.com/products/tigra_menu_tree/
+// Version: 1.1
+// Date: 11-12-2002 (mm-dd-yyyy)
+// Notes: This script is free. Visit official site for further details.
+
+function tree (a_items, a_template) {
+
+ this.a_tpl = a_template;
+ this.a_config = a_items;
+ this.o_root = this;
+ this.a_index = [];
+ this.o_selected = null;
+ this.n_depth = -1;
+
+ var o_icone = new Image(),
+ o_iconl = new Image();
+ o_icone.src = a_template['icon_e'];
+ o_iconl.src = a_template['icon_l'];
+ a_template['im_e'] = o_icone;
+ a_template['im_l'] = o_iconl;
+ for (var i = 0; i < 64; i++)
+ if (a_template['icon_' + i]) {
+ var o_icon = new Image();
+ a_template['im_' + i] = o_icon;
+ o_icon.src = a_template['icon_' + i];
+ }
+
+ this.toggle = function (n_id) { var o_item = this.a_index[n_id]; o_item.open(o_item.b_opened) };
+ this.select = function (n_id) { return this.a_index[n_id].select(); };
+ this.mout = function (n_id) { this.a_index[n_id].upstatus(true) };
+ this.mover = function (n_id) { this.a_index[n_id].upstatus() };
+
+ this.a_children = [];
+ for (var i = 0; i < a_items.length; i++)
+ new tree_item(this, i);
+
+ this.n_id = trees.length;
+ trees[this.n_id] = this;
+
+ for (var i = 0; i < this.a_children.length; i++) {
+ document.write(this.a_children[i].init());
+ this.a_children[i].open();
+ }
+}
+function tree_item (o_parent, n_order) {
+
+ this.n_depth = o_parent.n_depth + 1;
+ this.a_config = o_parent.a_config[n_order + (this.n_depth ? 2 : 0)];
+ if (!this.a_config) return;
+
+ this.o_root = o_parent.o_root;
+ this.o_parent = o_parent;
+ this.n_order = n_order;
+ this.b_opened = !this.n_depth;
+
+ this.n_id = this.o_root.a_index.length;
+ this.o_root.a_index[this.n_id] = this;
+ o_parent.a_children[n_order] = this;
+
+ this.a_children = [];
+ for (var i = 0; i < this.a_config.length - 2; i++)
+ new tree_item(this, i);
+
+ this.get_icon = item_get_icon;
+ this.open = item_open;
+ this.select = item_select;
+ this.init = item_init;
+ this.upstatus = item_upstatus;
+ this.is_last = function () { return this.n_order == this.o_parent.a_children.length - 1 };
+}
+
+function item_open (b_close) {
+ var o_idiv = get_element('i_div' + this.o_root.n_id + '_' + this.n_id);
+ if (!o_idiv) return;
+
+ if (!o_idiv.innerHTML) {
+ var a_children = [];
+ for (var i = 0; i < this.a_children.length; i++)
+ a_children[i]= this.a_children[i].init();
+ o_idiv.innerHTML = a_children.join('');
+ }
+ o_idiv.style.display = (b_close ? 'none' : 'block');
+
+ this.b_opened = !b_close;
+ var o_jicon = document.images['j_img' + this.o_root.n_id + '_' + this.n_id],
+ o_iicon = document.images['i_img' + this.o_root.n_id + '_' + this.n_id];
+ if (o_jicon) o_jicon.src = this.get_icon(true);
+ if (o_iicon) o_iicon.src = this.get_icon();
+ this.upstatus();
+}
+
+function item_select (b_deselect) {
+ if (!b_deselect) {
+ var o_olditem = this.o_root.o_selected;
+ this.o_root.o_selected = this;
+ if (o_olditem) o_olditem.select(true);
+ }
+ var o_iicon = document.images['i_img' + this.o_root.n_id + '_' + this.n_id];
+ if (o_iicon) o_iicon.src = this.get_icon();
+ get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
+
+ this.upstatus();
+ return Boolean(this.a_config[1]);
+}
+
+function item_upstatus (b_clear) {
+ window.setTimeout('window.status="' + (b_clear ? '' : this.a_config[0] + (this.a_config[1] ? ' ('+ this.a_config[1] + ')' : '')) + '"', 10);
+}
+
+function item_init () {
+ var a_offset = [],
+ o_current_item = this.o_parent;
+ for (var i = this.n_depth; i > 1; i--) {
+ a_offset[i] = ' ';
+ o_current_item = o_current_item.o_parent;
+ }
+ //NDPNDP: if the link href='0', then display non-link fields
+ return '' + (this.a_children.length ? '
' : '');
+ /**
+ return '' + (this.a_children.length ? '
' : '');
+ **/
+}
+
+function item_get_icon (b_junction) {
+ return this.o_root.a_tpl['icon_' + ((this.n_depth ? 0 : 32) + (this.a_children.length ? 16 : 0) + (this.a_children.length && this.b_opened ? 8 : 0) + (!b_junction && this.o_root.o_selected == this ? 4 : 0) + (b_junction ? 2 : 0) + (b_junction && this.is_last() ? 1 : 0))];
+}
+
+var trees = [];
+get_element = document.all ?
+ function (s_id) { return document.all[s_id] } :
+ function (s_id) { return document.getElementById(s_id) };
Index: lams_tool_images/web/includes/javascript/tree_tpl.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/includes/javascript/Attic/tree_tpl.js,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/includes/javascript/tree_tpl.js 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,36 @@
+/*
+ Feel free to use your custom icons for the tree. Make sure they are all of the same size.
+ User icons collections are welcome, we'll publish them giving all regards.
+*/
+
+var TREE_TPL = {
+ 'target' : 'contentFrame', // name of the frame links will be opened in
+ // other possible values are: _blank, _parent, _search, _self and _top
+
+ 'icon_e' : 'icons/empty.gif', // empty image
+ 'icon_l' : 'icons/line.gif', // vertical line
+
+ 'icon_32' : 'icons/base.gif', // root leaf icon normal
+ 'icon_36' : 'icons/base.gif', // root leaf icon selected
+
+ 'icon_48' : 'icons/base.gif', // root icon normal
+ 'icon_52' : 'icons/base.gif', // root icon selected
+ 'icon_56' : 'icons/base.gif', // root icon opened
+ 'icon_60' : 'icons/base.gif', // root icon selected
+
+ 'icon_16' : 'icons/folder.gif', // node icon normal
+ 'icon_20' : 'icons/folderopen.gif', // node icon selected
+ 'icon_24' : 'icons/folderopen.gif', // node icon opened
+ 'icon_28' : 'icons/folderopen.gif', // node icon selected opened
+
+ 'icon_0' : 'icons/page.gif', // leaf icon normal
+ 'icon_4' : 'icons/page.gif', // leaf icon selected
+
+ 'icon_2' : 'icons/joinbottom.gif', // junction for leaf
+ 'icon_3' : 'icons/join.gif', // junction for last leaf
+ 'icon_18' : 'icons/plusbottom.gif', // junction for closed node
+ 'icon_19' : 'icons/plus.gif', // junctioin for last closed node
+ 'icon_26' : 'icons/minusbottom.gif',// junction for opened node
+ 'icon_27' : 'icons/minus.gif' // junctioin for last opended node
+};
+
Index: lams_tool_images/web/layout/ frame.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/layout/Attic/ frame.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/layout/ frame.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,56 @@
+<%--
+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
+--%>
+<%@ include file="/common/taglibs.jsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This tool requires the support of frames. Your browser does not support frames.
+
+
+
+
Index: lams_tool_images/web/layout/default.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/layout/Attic/default.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/layout/default.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,20 @@
+<%@ include file="/common/taglibs.jsp"%>
+<%@ taglib uri="tags-tiles" prefix="tiles"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/advance.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/advance.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/advance.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,101 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ checked="checked"
+ />
+
+
+
+
+
+ checked="checked"
+ />
+
+
+
+
+
+
+
+
+
+
+
+ ${status.index}
+
+
+
+
+ ${status.index}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/authoring.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/authoring.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/authoring.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,108 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+<%@ page import="org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants"%>
+
+
+
+
+
+
+ <%@ include file="/common/tabbedheader.jsp"%>
+ <%@ include file="/common/fckeditorheader.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Default value
+ cancelButtonLabelKey="label.authoring.cancel.button"
+ saveButtonLabelKey="label.authoring.save.button"
+ cancelConfirmMsgKey="authoring.msg.cancel.save"
+ accessMode="author"
+ --%>
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/basic.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/basic.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/basic.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,148 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/pages/authoring/parts/itemlist.jsp"%>
+
+
+
+ ');" class="button-add-item">
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/definelater.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/definelater.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/definelater.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,85 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+<%@ page import="java.util.HashSet"%>
+<%@ page import="org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants"%>
+<%@ page import="java.util.Set"%>
+<%Set tabs = new HashSet();
+ tabs.add("label.authoring.heading.basic");
+ pageContext.setAttribute("tabs", tabs);
+
+ %>
+
+
+
+
+ <%@ include file="/common/tabbedheader.jsp"%>
+ <%@ include file="/common/fckeditorheader.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/definelaterforbid.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/definelaterforbid.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/definelaterforbid.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,21 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/instructions.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/Attic/instructions.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/instructions.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,131 @@
+<%@ include file="/common/taglibs.jsp"%>
+<%@ page
+ import="org.lamsfoundation.lams.contentrepository.client.IToolContentHandler"%>
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/start.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/start.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/start.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+<%@ include file="/common/taglibs.jsp" %>
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/parts/addfile.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/parts/Attic/addfile.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/parts/addfile.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/pages/authoring/parts/itemattachment.jsp"%>
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/parts/instructionfilelist.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/parts/Attic/instructionfilelist.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/parts/instructionfilelist.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,65 @@
+<%@ include file="/common/taglibs.jsp"%>
+<%@ page
+ import="org.lamsfoundation.lams.contentrepository.client.IToolContentHandler"%>
+
+
+
+
+
+
+
+
+
+
+
+
+<%-- check whehter has target file type --%>
+
+
+
+
+
+
+<%-- Display target file type --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/parts/itemattachment.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/parts/Attic/itemattachment.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/parts/itemattachment.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,25 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/authoring/parts/itemlist.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/authoring/parts/itemlist.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/authoring/parts/itemlist.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,86 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+<%-- This script will works when a new resoruce item submit in order to refresh "ImageGallery List" panel. --%>
+
Index: lams_tool_images/web/pages/export/exportportfolio.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/export/exportportfolio.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/export/exportportfolio.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,220 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${title}
+
+
+
+ ${instructions}
+
+
+
+
+
+
+
+
+
+
+
+ ${group[0].sessionName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Bold styling is to indicate an item created by the author --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${item.itemTitle}
+
+
+
+
+
+
+
+
+ ${itemInstruction}
+
+
+
+
+
+
+
+
+
+
+
+ ${item.username}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Display reflection entries --%>
+
+
+
+ <%-- End all answers for this question --%>
+
+
+
+
+
+
+ ${reflectDTO.fullName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/itemreview/initnav.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/itemreview/Attic/initnav.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/itemreview/initnav.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,24 @@
+<%--
+To avoid use HttpSession (LDEV-199), try to
+use request.setAttribute() transfer value. But this page is embeded into a Frame html page, directly
+request can not block on frame page, so use this trick page redirect request, then server side could handle this
+request using this page as target
+--%>
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/itemreview/instructionsnav.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/itemreview/Attic/instructionsnav.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/itemreview/instructionsnav.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,115 @@
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+<%-- runAuto and reflectOn does not set when authoring preview mode then set false as default value --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${instructions.title}
+
+ <%@ include file="/common/header.jsp"%>
+
+ <%-- param has higher level for request attribute --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${instructions.instruction.description}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/itemreview/mainframe.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/itemreview/Attic/mainframe.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/itemreview/mainframe.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,26 @@
+<%--
+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
+--%>
+<%@ include file="/common/taglibs.jsp" %>
+
+ ?mode=${mode}&itemIndex=${itemIndex}&itemUid=${itemUid}&toolSessionID=${toolSessionID}&sessionMapID=${sessionMapID}"
+ name=headerFrame" marginheight="0" scrolling="YES">
+
+
Index: lams_tool_images/web/pages/itemreview/openurl.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/itemreview/Attic/openurl.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/itemreview/openurl.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,22 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+ ${title}
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/addfile.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/Attic/addfile.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/addfile.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,46 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/addurl.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/Attic/addurl.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/addurl.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,57 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/definelater.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/definelater.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/definelater.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+<%@include file="/common/taglibs.jsp"%>
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/finish.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/finish.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/finish.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+<%-- This page just for : redir finish page to parent rather that part of the frame --%>
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/learning.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/learning.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/learning.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,271 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+ <%-- param has higher level for request attribute --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${imageGallery.title}
+
+
+
+ ${imageGallery.instructions}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${item.title}
+
+
+ [${item.createBy.loginName}]
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ ${imageGallery.miniViewNumberStr}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- end mode != teacher --%>
+
+
+
+
+
+
+ ${sessionMap.reflectInstructions}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/notebook.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/notebook.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/notebook.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,53 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${sessionMap.title}
+
+
+ <%@ include file="/common/messages.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/runoffline.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/Attic/runoffline.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/runoffline.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,85 @@
+
+
+<%@include file="/common/taglibs.jsp"%>
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+ ${sessionMap.title}
+
+
+
+
+
+
+
+
+
+ ${sessionMap.reflectInstructions}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/start.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/start.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/start.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,22 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learning/success.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/success.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learning/success.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learningobj/defaultcontent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/Attic/defaultcontent.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learningobj/defaultcontent.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,31 @@
+<%--
+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
+--%>
+<%@ include file="/common/taglibs.jsp" %>
+
+
+
+
+
+ Please click on a link on the left to start.
+
+
+
+
Index: lams_tool_images/web/pages/learningobj/mainframe.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/Attic/mainframe.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learningobj/mainframe.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,30 @@
+<%--
+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
+--%>
+
+<%@ include file="/common/taglibs.jsp" %>
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learningobj/navigatortree.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/Attic/navigatortree.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learningobj/navigatortree.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,101 @@
+<%--
+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
+--%>
+
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The content package details are missing.
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/learningobj/xmltree.xsl
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/Attic/xmltree.xsl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learningobj/xmltree.xsl 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+var TREE_ITEMS = [
+
+];
+
+
+
+
+
+
+ [' ',' ',
+
+ ],
+
+
+ [' ',0,
+
+ ],
+
+
+
+
+
\ No newline at end of file
Index: lams_tool_images/web/pages/learningobj/icons/.cvsignore
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/.cvsignore,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/learningobj/icons/.cvsignore 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1 @@
+Thumbs.db
Index: lams_tool_images/web/pages/learningobj/icons/base.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/base.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/empty.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/empty.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/folder.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/folder.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/folderopen.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/folderopen.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/join.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/join.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/joinbottom.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/joinbottom.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/line.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/line.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/minus.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/minus.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/minusbottom.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/minusbottom.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/page.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/page.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/plus.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/plus.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/learningobj/icons/plusbottom.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learningobj/icons/Attic/plusbottom.gif,v
diff -u
Binary files differ
Index: lams_tool_images/web/pages/monitoring/editactivity.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/editactivity.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/editactivity.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,43 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/monitoring/instructions.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/Attic/instructions.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/instructions.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,96 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/monitoring/monitoring.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/monitoring.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/monitoring.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,57 @@
+
+
+<%@ include file="/common/taglibs.jsp"%>
+<%@ page import="org.lamsfoundation.lams.tool.imageGallery.ImageGalleryConstants"%>
+
+
+
+ <%@ include file="/common/tabbedheader.jsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/monitoring/notebook.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/notebook.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/notebook.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,48 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+ <%@ include file="/common/header.jsp"%>
+
+
+
+
+
+
+
+ ${userDTO.fullName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/monitoring/statistic.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/statistic.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/statistic.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,91 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- display group name on first row--%>
+
+
+
+ ${item.sessionName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${item.itemTitle}
+
+
+
+ ${item.username}
+
+
+
+
+
+
+
+
+ ${item.viewNumber}
+
+
+ 0
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/monitoring/summary.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/summary.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/summary.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,292 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${sessionMap.imageGallery.miniViewImageGalleryNumber}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${sessionMap.imageGallery.reflectInstructions}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- display group name on first row--%>
+
+
+
+ ${item.sessionName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- End group title display --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${item.itemTitle}
+
+
+
+ ${item.username}
+
+
+
+
+
+
+
+
+ ${item.viewNumber}
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- Reflection list --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${user.fullName}
+
+
+ ${user.loginName}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_images/web/pages/monitoring/userlist.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/userlist.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_images/web/pages/monitoring/userlist.jsp 11 Oct 2008 12:04:14 -0000 1.1
@@ -0,0 +1,54 @@
+
+
+
+<%@ include file="/common/taglibs.jsp"%>
+
+
+ <%@ include file="/common/header.jsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${user.loginName}
+
+
+
+
+
+ ${user.firstName},${user.lastName}
+
+
+
+
+
+ Close
+
+
+
+
+
+
+
+