Index: lams_tool_larsrc/.classpath
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/.classpath (.../.classpath) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/.classpath (.../.classpath) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1,6 +1,6 @@
-
+
@@ -16,5 +16,8 @@
+
+
+
Index: lams_tool_larsrc/.cvsignore
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/.cvsignore (.../.cvsignore) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/.cvsignore (.../.cvsignore) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1,2 +1,3 @@
.myeclipse
.mymetadata
+build
Index: lams_tool_larsrc/build.xml
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/build.xml (.../build.xml) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/build.xml (.../build.xml) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -16,6 +16,9 @@
+
+
+
Index: lams_tool_larsrc/conf/hibernate/mappings/.cvsignore
===================================================================
diff -u
--- lams_tool_larsrc/conf/hibernate/mappings/.cvsignore (revision 0)
+++ lams_tool_larsrc/conf/hibernate/mappings/.cvsignore (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1 @@
+org
Index: lams_tool_larsrc/conf/xdoclet/struts-actions.xml
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1,4 +1,4 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ -->
Index: lams_tool_larsrc/conf/xdoclet/struts-message-resources.xml
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/conf/xdoclet/struts-message-resources.xml (.../struts-message-resources.xml) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/conf/xdoclet/struts-message-resources.xml (.../struts-message-resources.xml) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1 +1 @@
-
+
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/conf/xdoclet/validation-forms.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_larsrc/db/model/resource.clay
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/db/model/resource.clay (.../resource.clay) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/db/model/resource.clay (.../resource.clay) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -11,7 +11,522 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/db/sql/table-schema.sql
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/db/sql/table-schema.sql (.../table-schema.sql) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/db/sql/table-schema.sql (.../table-schema.sql) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1,41 +1,29 @@
-alter table tl_lafrum11_attachment drop foreign key FK389AD9A2FE939F2A;
-alter table tl_lafrum11_attachment drop foreign key FK389AD9A2131CE31E;
-alter table tl_lafrum11_forum drop foreign key FK87917942E42F4351;
-alter table tl_lafrum11_forum_user drop foreign key FK7B83A4A85F0116B6;
-alter table tl_lafrum11_message drop foreign key FK4A6067E8E42F4351;
-alter table tl_lafrum11_message drop foreign key FK4A6067E897F0DB46;
-alter table tl_lafrum11_message drop foreign key FK4A6067E8131CE31E;
-alter table tl_lafrum11_message drop foreign key FK4A6067E824089E4D;
-alter table tl_lafrum11_message drop foreign key FK4A6067E89357B45B;
-alter table tl_lafrum11_message drop foreign key FK4A6067E8647A7264;
-alter table tl_lafrum11_message_seq drop foreign key FKD2C71F88FE939F2A;
-alter table tl_lafrum11_message_seq drop foreign key FKD2C71F8845213B4D;
-alter table tl_lafrum11_tool_session drop foreign key FK5A04D7AE131CE31E;
-drop table if exists tl_lafrum11_attachment;
-drop table if exists tl_lafrum11_forum;
-drop table if exists tl_lafrum11_forum_user;
-drop table if exists tl_lafrum11_message;
-drop table if exists tl_lafrum11_message_seq;
-drop table if exists tl_lafrum11_report;
-drop table if exists tl_lafrum11_tool_session;
-create table tl_lafrum11_attachment (
+alter table tl_larsrc11_attachment drop foreign key FK1E7009430E79035;
+alter table tl_larsrc11_resource drop foreign key FK89093BF758092FB;
+alter table tl_larsrc11_resource_item drop foreign key FKF52D1F9330E79035;
+alter table tl_larsrc11_session drop foreign key FK24AA78C530E79035;
+alter table tl_larsrc11_user drop foreign key FK30113BFC506CD584;
+drop table if exists tl_larsrc11_attachment;
+drop table if exists tl_larsrc11_resource;
+drop table if exists tl_larsrc11_resource_item;
+drop table if exists tl_larsrc11_session;
+drop table if exists tl_larsrc11_user;
+create table tl_larsrc11_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,
- forum_uid bigint,
- message_uid bigint,
+ resource_uid bigint,
primary key (uid)
);
-create table tl_lafrum11_forum (
+create table tl_larsrc11_resource (
uid bigint not null auto_increment,
create_date datetime,
update_date datetime,
create_by bigint,
title varchar(255),
- allow_anonym bit,
run_offline bit,
lock_on_finished bit,
instructions text,
@@ -44,74 +32,38 @@
content_in_use bit,
define_later bit,
content_id bigint unique,
- allow_edit bit,
- allow_rich_editor bit,
- limited_of_chars integer,
- limited_input_flag bit,
+ allow_add_files bit,
+ allow_add_urls bit,
+ min_view_resource_number integer,
+ allow_auto_run bit,
primary key (uid)
);
-create table tl_lafrum11_forum_user (
+create table tl_larsrc11_resource_item (
uid bigint not null auto_increment,
- user_id bigint,
- last_name varchar(255),
- first_name varchar(255),
- session_id bigint,
- login_name varchar(255),
+ resource_uid bigint,
primary key (uid)
);
-create table tl_lafrum11_message (
+create table tl_larsrc11_session (
uid bigint not null auto_increment,
- create_date datetime,
- last_reply_date datetime,
- update_date datetime,
- create_by bigint,
- modified_by bigint,
- subject varchar(255),
- body text,
- is_authored bit,
- is_anonymous bit,
- forum_session_uid bigint,
- parent_uid bigint,
- forum_uid bigint,
- reply_number integer,
- hide_flag bit,
- report_id bigint,
- primary key (uid)
-);
-create table tl_lafrum11_message_seq (
- uid bigint not null auto_increment,
- root_message_uid bigint,
- message_uid bigint,
- message_level smallint,
- primary key (uid)
-);
-create table tl_lafrum11_report (
- uid bigint not null auto_increment,
- comment text,
- release_date datetime,
- mark float,
- primary key (uid)
-);
-create table tl_lafrum11_tool_session (
- uid bigint not null auto_increment,
session_end_date datetime,
session_start_date datetime,
status integer,
- forum_uid bigint,
+ resource_uid bigint,
session_id bigint,
session_name varchar(250),
primary key (uid)
);
-alter table tl_lafrum11_attachment add index FK389AD9A2FE939F2A (message_uid), add constraint FK389AD9A2FE939F2A foreign key (message_uid) references tl_lafrum11_message (uid);
-alter table tl_lafrum11_attachment add index FK389AD9A2131CE31E (forum_uid), add constraint FK389AD9A2131CE31E foreign key (forum_uid) references tl_lafrum11_forum (uid);
-alter table tl_lafrum11_forum add index FK87917942E42F4351 (create_by), add constraint FK87917942E42F4351 foreign key (create_by) references tl_lafrum11_forum_user (uid);
-alter table tl_lafrum11_forum_user add index FK7B83A4A85F0116B6 (session_id), add constraint FK7B83A4A85F0116B6 foreign key (session_id) references tl_lafrum11_tool_session (uid);
-alter table tl_lafrum11_message add index FK4A6067E8E42F4351 (create_by), add constraint FK4A6067E8E42F4351 foreign key (create_by) references tl_lafrum11_forum_user (uid);
-alter table tl_lafrum11_message add index FK4A6067E897F0DB46 (report_id), add constraint FK4A6067E897F0DB46 foreign key (report_id) references tl_lafrum11_report (uid);
-alter table tl_lafrum11_message add index FK4A6067E8131CE31E (forum_uid), add constraint FK4A6067E8131CE31E foreign key (forum_uid) references tl_lafrum11_forum (uid);
-alter table tl_lafrum11_message add index FK4A6067E824089E4D (parent_uid), add constraint FK4A6067E824089E4D foreign key (parent_uid) references tl_lafrum11_message (uid);
-alter table tl_lafrum11_message add index FK4A6067E89357B45B (forum_session_uid), add constraint FK4A6067E89357B45B foreign key (forum_session_uid) references tl_lafrum11_tool_session (uid);
-alter table tl_lafrum11_message add index FK4A6067E8647A7264 (modified_by), add constraint FK4A6067E8647A7264 foreign key (modified_by) references tl_lafrum11_forum_user (uid);
-alter table tl_lafrum11_message_seq add index FKD2C71F88FE939F2A (message_uid), add constraint FKD2C71F88FE939F2A foreign key (message_uid) references tl_lafrum11_message (uid);
-alter table tl_lafrum11_message_seq add index FKD2C71F8845213B4D (root_message_uid), add constraint FKD2C71F8845213B4D foreign key (root_message_uid) references tl_lafrum11_message (uid);
-alter table tl_lafrum11_tool_session add index FK5A04D7AE131CE31E (forum_uid), add constraint FK5A04D7AE131CE31E foreign key (forum_uid) references tl_lafrum11_forum (uid);
+create table tl_larsrc11_user (
+ uid bigint not null auto_increment,
+ user_id bigint,
+ last_name varchar(255),
+ first_name varchar(255),
+ login_name varchar(255),
+ session_id bigint,
+ primary key (uid)
+);
+alter table tl_larsrc11_attachment add index FK1E7009430E79035 (resource_uid), add constraint FK1E7009430E79035 foreign key (resource_uid) references tl_larsrc11_resource (uid);
+alter table tl_larsrc11_resource add index FK89093BF758092FB (create_by), add constraint FK89093BF758092FB foreign key (create_by) references tl_larsrc11_user (uid);
+alter table tl_larsrc11_resource_item add index FKF52D1F9330E79035 (resource_uid), add constraint FKF52D1F9330E79035 foreign key (resource_uid) references tl_larsrc11_resource (uid);
+alter table tl_larsrc11_session add index FK24AA78C530E79035 (resource_uid), add constraint FK24AA78C530E79035 foreign key (resource_uid) references tl_larsrc11_resource (uid);
+alter table tl_larsrc11_user add index FK30113BFC506CD584 (session_id), add constraint FK30113BFC506CD584 foreign key (session_id) references tl_larsrc11_session (uid);
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,158 @@
+# CVS ID: $Id$ #
+appName = Shared Resources
+#=========================labels===========================#
+#-------------------------Authoring Labels-----------------#
+label.authoring.heading.basic=Forum
+label.authoring.heading.basic.desc=Basic input information for forum
+label.authoring.heading.instructions.desc=Please input online and offline instructions
+label.authoring.heading.advance.desc=Please input advance options for Forum
+label.authoring.create.new.topic=Create a new topic
+
+label.authoring.basic.title=Title
+label.authoring.basic.instruction=Instruction
+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.advance.lock.on.finished=Lock on finished
+
+label.authoring.save.button=Save
+label.authoring.cancel.button=Cancel
+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.allow.edit=Allow Edit
+label.authoring.advance.use.richeditor=Allow Rich Editor
+label.authoring.advance.limited.input=Limitation of input characters
+
+lable.topic.title.subject=Subject
+lable.topic.title.body=Body
+lable.topic.title.update=Last post
+lable.topic.title.author=Author
+lable.topic.title.startedby=Start by
+lable.topic.title.replies=Replies
+lable.topic.title.mark=Mark
+lable.topic.subject.by=By
+label.back.to.forum=Go back to froum
+lable.topic.title.message.number=# of Msg
+lable.topic.title.average.mark= Aver mark
+authoring.exception= There is a problem in forum authoring page, the reason is {0}
+#-------------------------END Authoring Labels END-----------------#
+
+#---------------------------------Monitoring ----------------------------------#
+page.title.monitoring.content.userlist=Summary
+page.title.monitoring.view.user.mark=View user mark
+page.title.monitoring.edit.user.mark=Edit user mark
+page.title.monitoring.view.activity=View Activity
+page.title.monitoring.edit.activity=Edit Activity
+page.title.monitoring.view.instructions=View Instructions
+page.title.monitoring.view.topic=View topic
+page.title.monitoring.statistic=Statistic
+page.title.monitoring.definelater=Forum Tool Define
+
+label.monitoring.edit.activity.cancel=Cancel
+label.monitoring.edit.activity.update=Update
+label.monitoring.edit.activity.edit=Edit
+
+label.monitoring.statistic.average.mark= Average message mark
+lable.monitoring.statistic.total.message=# of total message
+
+message.monitoring.edit.activity.not.editable=This Activity is no longer editable
+#------------------------------End Monitoring ----------------------------------#
+
+## errors
+errors.header=
+errors.footer=
+
+#error.title = System Error!
+error.valueReqd = Value Required
+error.inputFileTooLarge = Input File size is too large!
+error.uploading = error uploading
+error.mark.needNumber= Mark must be int value
+error.mark.invalid.number= Mark is invalid number format
+error.fail.get.forum=No Forum available
+error.title.empty=Title can not be blank
+#General Messages
+message.msg.maxFileSize = Max 250K
+
+##Message
+title.messageTopic.open = Topic Details
+
+title.message.add = Add Message
+title.message.open = View Message
+title.message.reply = Reply Message
+title.message.edit = Edit Message
+title.message.view=Message Board
+title.message.view.topic=View Message
+title.message.delete=Delete Message
+
+message.label.subject = Subject
+message.label.body = Body
+message.label.attachment = Attachment
+message.label.postedOn = Posted On:
+message.label.threadReplies = Thread Replies
+message.link.reply = Reply
+
+##Labels
+label.open = Open
+label.delete = Delete
+label.download = Download
+label.view = View
+label.edit = Edit
+label.reply = Reply
+label.done = Done
+label.finish= Finish
+label.newtopic= New Topic
+label.refresh= Refresh
+lable.char.left=Characters left
+label.basic=Basic
+label.advanced=Advanced
+label.instructions=Instructions
+##Buttons
+button.upload = Upload
+button.done = Done
+button.submit = Submit
+button.on = On
+button.off = Off
+button.add = Add
+button.cancel = Cancel
+
+js.error.invalid.number=The input is invalid number format
+js.error.min.number=The input must be greater than 0
+js.error.title=The following error(s) occurred:
+
+#not list in spanish yet
+monitoring.tab.summary=Summary
+monitoring.tab.instructions=Instruction
+monitoring.tab.edit.activity=Edit Activity
+
+monitoring.user.post.topic=provides following posts:
+lable.topic.title.comment=Comment
+message.not.avaliable=Not Available
+lable.update.mark=Update mark
+message.assign.mark= Please assign a mark and a comment for the report by
+message.session.name=Session Name
+message.monitoring.summary.no.users=No users available
+message.view.all.marks=View all marks
+message.download.marks=Download marks
+label.monitoring.summary.view.forum= View forum
+
+#new messages 6/3/06
+message.monitoring.summary.no.session=No Session Available
+
+#new messages 7/3/06
+topic.message.subject.hidden=Message subject hidden
+topic.message.body.hidden=Message body hidden
+label.show=Show
+label.hide=Hide
+
+#new messages 10/3/06
+page.title.monitoring.init=Forum Monitoring
+monitoring.tab.statistics=Statistics
+# NB monitoring.tab.edit.statistics was removed
+label.save=Save
+label.cancel=Cancel
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/DummyServiceBean.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/DummyServiceBean.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/DummyServiceBean.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,25 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc;
+
+public class DummyServiceBean {
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/DAO.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/DAO.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/DAO.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.rsrc.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_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceAttachmentDAO.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceAttachmentDAO.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceAttachmentDAO.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,25 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao;
+
+public interface ResourceAttachmentDAO extends DAO {
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceDAO.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceDAO.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceDAO.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,25 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao;
+
+public interface ResourceDAO extends DAO {
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceItemDAO.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceItemDAO.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceItemDAO.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,25 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao;
+
+public interface ResourceItemDAO extends DAO {
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceSessionDAO.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceSessionDAO.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceSessionDAO.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,25 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao;
+
+public interface ResourceSessionDAO extends DAO {
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceUserDAO.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceUserDAO.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/ResourceUserDAO.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,25 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao;
+
+public interface ResourceUserDAO extends DAO {
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/BaseDAOHibernate.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/BaseDAOHibernate.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/BaseDAOHibernate.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,77 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.rsrc.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.rsrc.dao.DAO;
+import org.springframework.orm.ObjectRetrievalFailureException;
+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);
+
+ if (o == null) {
+ throw new ObjectRetrievalFailureException(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_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceAttachmentDAOHibernate.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceAttachmentDAOHibernate.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceAttachmentDAOHibernate.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,27 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao.hibernate;
+
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceAttachmentDAO;
+
+public class ResourceAttachmentDAOHibernate extends BaseDAOHibernate implements ResourceAttachmentDAO{
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceDAOHibernate.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceDAOHibernate.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceDAOHibernate.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,28 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao.hibernate;
+
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceDAO;
+
+
+public class ResourceDAOHibernate extends BaseDAOHibernate implements ResourceDAO{
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceItemDAOHibernate.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceItemDAOHibernate.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceItemDAOHibernate.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,27 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao.hibernate;
+
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceItemDAO;
+
+public class ResourceItemDAOHibernate extends BaseDAOHibernate implements ResourceItemDAO{
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceSessionDAOHibernate.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceSessionDAOHibernate.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceSessionDAOHibernate.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,28 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao.hibernate;
+
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceSessionDAO;
+
+
+public class ResourceSessionDAOHibernate extends BaseDAOHibernate implements ResourceSessionDAO{
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceUserDAOHibernate.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceUserDAOHibernate.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/ResourceUserDAOHibernate.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,28 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.dao.hibernate;
+
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceUserDAO;
+
+
+public class ResourceUserDAOHibernate extends BaseDAOHibernate implements ResourceUserDAO{
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/IContentPackageConverter.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/IContentPackageConverter.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/IContentPackageConverter.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.ims;
+
+/**
+ * A ContentPackageConverter converts an IMS Content Package into the
+ * data needed for our tool. The only implementation initially done was
+ * SimpleContentPackageCoverter.
+ *
+ * The creation method of the converter (which is unique to each converter)
+ * will need to parse the package and have the data ready for the "get"
+ * calls.
+ *
+ * Note: Classes that implement this interface should be normal POJOS,
+ * not singletons. This allows them to have instance data.
+ */
+interface IContentPackageConverter {
+
+ /**
+ * @return Returns the defaultItem.
+ */
+ public abstract String getDefaultItem();
+
+ /**
+ * @return Returns the description.
+ */
+ public abstract String getDescription();
+
+ /**
+ * @return Returns the organzationXML.
+ */
+ public abstract String getOrganzationXML();
+
+ /**
+ * @return Returns the schema.
+ */
+ public abstract String getSchema();
+
+ /**
+ * @return Returns the title.
+ */
+ public abstract String getTitle();
+}
\ No newline at end of file
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/IMSManifestException.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/IMSManifestException.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/IMSManifestException.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ http://www.gnu.org/licenses/gpl.txt
+*/
+
+package org.lamsfoundation.lams.tool.rsrc.ims;
+
+/**
+ * This exception is thrown when an error occurs that may be related to
+ * the formatting of the IMS content package. e.g. the manifest file
+ * is missing.
+ *
+ * @author Fiona Malikoff
+ */
+public class IMSManifestException extends ImscpApplicationException {
+
+ /**
+ *
+ */
+ public IMSManifestException() {
+ super();
+ }
+
+ /**
+ * @param arg0
+ */
+ public IMSManifestException(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ */
+ public IMSManifestException(Throwable arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ * @param arg1
+ */
+ public IMSManifestException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/ImscpApplicationException.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/ImscpApplicationException.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/ImscpApplicationException.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ http://www.gnu.org/licenses/gpl.txt
+*/
+
+package org.lamsfoundation.lams.tool.rsrc.ims;
+
+/**
+ * Generic exception for the imscr tool.
+ * @author Fiona Malikoff
+ */
+public class ImscpApplicationException extends Exception {
+
+ /**
+ *
+ */
+ public ImscpApplicationException() {
+ super();
+ }
+
+ /**
+ * @param arg0
+ */
+ public ImscpApplicationException(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ */
+ public ImscpApplicationException(Throwable arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ * @param arg1
+ */
+ public ImscpApplicationException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/OrganizationXMLDef.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/OrganizationXMLDef.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/OrganizationXMLDef.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,40 @@
+/*
+ Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ http://www.gnu.org/licenses/gpl.txt
+*/
+
+package org.lamsfoundation.lams.tool.rsrc.ims;
+
+/**
+ * This contains the "tag" of items in the organization xml. May be used
+ * by JSP pages to get the tag names right!
+ *
+ * @author Fiona Malikoff
+ */
+public final class OrganizationXMLDef {
+
+ public static final String DEFAULT = "default";
+ public static final String ITEM = "item";
+ public static final String PARAMETERS = "parameters";
+ public static final String HREF = "href";
+ public static final String IDENTIFIER = "identifier";
+ public static final String RESOURCE = "resource";
+ public static final String TITLE = "title";
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/SimpleContentPackageConverter.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/SimpleContentPackageConverter.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ims/SimpleContentPackageConverter.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,490 @@
+/*
+ Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ http://www.gnu.org/licenses/gpl.txt
+*/
+
+package org.lamsfoundation.lams.tool.rsrc.ims;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.Namespace;
+
+import uk.ac.reload.jdom.XMLDocument;
+import uk.ac.reload.jdom.XMLPath;
+import uk.ac.reload.jdom.XMLUtils;
+import uk.ac.reload.moonunit.contentpackaging.CP_Core;
+
+/**
+ * SimpleContentPackageConverter contains the code required for
+ * parsing the IMS Content Package and converting the info into our
+ * own structures.
+ *
+ * Note: this class has instance data, so do not use it as a singleton.
+ *
+ * @author Fiona Malikoff
+ */
+class SimpleContentPackageConverter implements IContentPackageConverter {
+
+ private Logger log = Logger.getLogger(SimpleContentPackageConverter.class);
+
+ // manifestDoc and cpCore are set up in the constructor. They are then used
+ // to generate the rest of the values
+ private XMLDocument manifestDoc = null;
+ private CP_Core cpCore = null;
+
+ private String schema=null;
+ private String title=null;
+ private String description=null;
+ private String defaultItem=null;
+ private String organzationXML=null;
+
+ // cachedResourceList is used to avoid building up the list
+ // every time an item is parsed - otherwise there is a lot
+ // of processing done by the reload code time and time again.
+ private Element[] cachedResourceList = null;
+
+ /** Set up a package converter, using the supplied directory as the package.
+ * The package should be parsed automatically and the values readied for calls
+ * to getSchema(), getTitle(), etc.
+ *
+ * @param directoryName: directory containing an expanded IMS content package.
+ * @throws IMSManifestException if there is an error in parsing the manifest file
+ * due to an error in the file or an unexpected value.
+ * @throws ImscpApplicationException if there is any other error
+ */
+ public SimpleContentPackageConverter(String directoryName)
+ throws IMSManifestException, ImscpApplicationException {
+
+ this.manifestDoc = getDocument(directoryName);
+ this.cpCore = new CP_Core(manifestDoc);
+
+ // initialise the property file required for the reload code. Needed to make
+ // the metadata call work. If we remove the metadata call, then this constructor
+ // may be removed.
+ System.setProperty("editor.properties.file", "uk.ac.reload.editor.properties.rb");
+
+ parsePackage();
+ }
+
+ /** Parse IMS content package expanded out
+ * into the supplied directory. Note: the manifest file is expected to be in the
+ * root of the supplied directory.
+ *
+ * @throws ImscpApplicationException
+ * @throws IMSManifestException
+ */
+ private void parsePackage( ) throws IMSManifestException, ImscpApplicationException {
+
+ String schemaText = getText(manifestDoc, "//metadata/schema");
+ String schemaVersion = getText(manifestDoc, "//metadata/schemaversion");
+ this.schema = ( schemaText != null ? schemaText : "unknown" )
+ + " " + ( schemaVersion != null ? schemaVersion : "unknown") ;
+
+ Document orgs = buildOrganisationList();
+ if ( orgs == null ) {
+ String error = "Unable to convert organizations from manifest file to our own structure. Reason unknown - buildOrganisationList returned null";
+ log.error(error);
+ throw new ImscpApplicationException(error);
+ }
+
+ try {
+ this.organzationXML = XMLUtils.write2XMLString(orgs);
+ } catch ( IOException ioe ) {
+ String error = "Exception thrown converting organization structure (as document) to an XML string."+ioe.getMessage();
+ log.error(error,ioe);
+ throw new ImscpApplicationException(error,ioe);
+ }
+
+ XMLPath xmlPath = new XMLPath("//metadata/*:lom/*:general/*:title/*:langstring");
+ this.title = getMetaValue(xmlPath);
+ if ( this.title == null ) {
+ // try the old root name - untested
+ xmlPath = new XMLPath("//metadata/*:record/*:general/*:title/*:langstring");
+ this.title = getMetaValue(xmlPath);
+ }
+
+ xmlPath = new XMLPath("//metadata/*:lom/*:general/*:description/*:langstring");
+ this.description = getMetaValue(xmlPath);
+ if ( this.description == null ) {
+ // try the old root name - untested
+ xmlPath = new XMLPath("//metadata/*:record/*:general/*:description/*:langstring");
+ this.description = getMetaValue(xmlPath);
+ }
+
+ }
+
+
+ /**
+ * Finds a value at the given xmlPath. If only one element, uses that value.
+ * If more than one element, tries to find an English value.
+ * @param xmlPath
+ * @return Value of the element found at xmlPath.
+ */
+ private String getMetaValue(XMLPath xmlPath) {
+ Element[] elList = manifestDoc.getElements(xmlPath);
+ String value = null;
+ if ( elList != null ) {
+ if ( elList.length == 0 ) {
+ value="Unknown";
+ } else if ( elList.length == 1 ) {
+ value=elList[0].getTextTrim();
+ } else {
+ value = null;
+ // TODO check if it is really testing for english
+ for ( int i=0; value == null && i < elList.length; i++ ) {
+ // grab the first English one
+ Element el = elList[i];
+ String attrValue = el.getAttributeValue("lang", Namespace.XML_NAMESPACE );
+ if ( attrValue != null && attrValue.startsWith("en") ) {
+ value = el.getTextTrim();
+ }
+ }
+ if ( value == null ) {
+ // can't seem to find an English one, just pick the first
+ value=elList[0].getTextTrim();
+ }
+ }
+ }
+ return value;
+ }
+
+ /* Get the text for this element - expect only 1 */
+ private String getText(XMLDocument document, String xmlPathString ) {
+ XMLPath xmlPath = new XMLPath(xmlPathString);
+ Element el = document.getElement(xmlPath);
+ return el != null ? el.getTextTrim() : null;
+ }
+
+ private String debug(XMLDocument document, String param, String xmlPathString ) {
+ XMLPath xmlPath = new XMLPath(xmlPathString);
+ Element[]elList = document.getElements(xmlPath);
+ if ( elList != null ) {
+ log.error(param+" xp: length "+elList.length+" el "+elList);
+ if ( elList.length >= 1 ) {
+ log.error("text is "+elList[0].getTextTrim());
+ return elList[0].getTextTrim();
+ }
+ } else {
+ log.error(param+" xp: el is null");
+ }
+ return null;
+ }
+
+ /**
+ * @param directoryName
+ * @return
+ * @throws JDOMException
+ * @throws IOException
+ */
+ private XMLDocument getDocument(String directoryName) throws IMSManifestException {
+ try {
+ XMLDocument doc = new XMLDocument();
+ doc.loadDocument(new File(directoryName, "imsmanifest.xml"));
+ return doc;
+ } catch (JDOMException je) {
+ String error = "Parsing error occured while loading imsmanifest.xml file. Contents of file may be invalid. "+je.getMessage();
+ log.error(error, je);
+ throw new IMSManifestException(error, je);
+ } catch (FileNotFoundException e) {
+ String error = "Unable to find imsmanifest file in the package."+e.getMessage();
+ log.error(error, e);
+ throw new IMSManifestException(error, e);
+ } catch (IOException ioe) {
+ String error = "IOException occured while loading imsmanifest file. "+ioe.getMessage();
+ log.error(error, ioe);
+ throw new IMSManifestException(error, ioe);
+ }
+ }
+
+ /** Built an XML document which is a list of organisations/resources.
+ */
+ private Document buildOrganisationList( ) throws IMSManifestException {
+
+ Namespace nm = cpCore.getRootManifestElement().getNamespace();
+
+ Element rootElement = cpCore.getRootManifestElement();
+ Element orgsElement = rootElement.getChild(CP_Core.ORGANIZATIONS, nm);
+
+ // set up a list of all the resources
+
+ // now get all the organizations and set up the new XML document, combining
+ // the organization and the resources.
+ Element defaultOrg = cpCore.getDefaultOrganization(orgsElement);
+ String defaultOrgIdentifier = null;
+ if ( defaultOrg != null )
+ defaultOrgIdentifier = defaultOrg.getAttributeValue("identifier");
+
+ log.debug("cpCore default org id: "+defaultOrgIdentifier);
+
+ Element newRootElement = new Element("organizations");
+ setAttribute(newRootElement, "version", "imscp1");
+ Document doc = new Document(newRootElement);
+
+ Element[] orgs = cpCore.getOrganizationsAllowed(orgsElement);
+ Element initOrganizationElement =null;
+ for ( int i=0; i
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/Resource.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/Resource.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/Resource.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,427 @@
+package org.lamsfoundation.lams.tool.rsrc.model;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.log4j.Logger;
+
+/**
+ * Resource
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_larsrc11_resource"
+ *
+ */
+public class Resource implements Cloneable{
+
+ private static final Logger log = Logger.getLogger(Resource.class);
+
+ //key
+ private Long uid;
+ //tool contentID
+ private Long contentId;
+ private String title;
+ private String instructions;
+ //advance
+ private boolean runOffline;
+ private boolean runAuto;
+ private int minViewResourceNumber;
+ private boolean allowAddFiles;
+ private boolean allowAddUrls;
+
+ private boolean lockWhenFinished;
+ private boolean defineLater;
+ private boolean contentInUse;
+ //instructions
+ private String onlineInstructions;
+ private String offlineInstructions;
+ private Set attachments;
+
+ //general infomation
+ private Date created;
+ private Date updated;
+ private ResourceUser createdBy;
+
+ //resource Items
+ private Set resourceItems;
+ /**
+ * Default contruction method.
+ *
+ */
+ public Resource(){
+ attachments = new HashSet();
+ resourceItems = new HashSet();
+ }
+// **********************************************************
+ // Function method for Resource
+// **********************************************************
+ public Object clone(){
+
+ Resource resource = null;
+ try{
+ resource = (Resource) super.clone();
+ resource.setUid(null);
+ //clone attachment
+ if(attachments != null){
+ Iterator iter = attachments.iterator();
+ Set set = new HashSet();
+ while(iter.hasNext()){
+ ResourceAttachment file = (ResourceAttachment)iter.next();
+ ResourceAttachment newFile = (ResourceAttachment) file.clone();
+ //if toolContentHandle is null, just clone old file without duplicate it in repository
+// if(toolContentHandler != null){
+// //duplicate file node in repository
+// NodeKey keys = toolContentHandler.copyFile(file.getFileUuid());
+// newFile.setFileUuid(keys.getUuid());
+// newFile.setFileVersionId(keys.getVersion());
+// }
+ set.add(newFile);
+ }
+ resource.attachments = set;
+ }
+ } catch (CloneNotSupportedException e) {
+ log.error("When clone " + Resource.class + " failed");
+// } catch (ItemNotFoundException e) {
+// log.error("When clone " + Resource.class + " failed");
+// } catch (RepositoryCheckedException e) {
+// log.error("When clone " + Resource.class + " failed");
+ }
+
+ return resource;
+ }
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (!(o instanceof Resource))
+ return false;
+
+ final Resource genericEntity = (Resource) o;
+
+ return new EqualsBuilder()
+ .append(this.uid,genericEntity.uid)
+ .append(this.title,genericEntity.title)
+ .append(this.instructions,genericEntity.instructions)
+ .append(this.onlineInstructions,genericEntity.onlineInstructions)
+ .append(this.offlineInstructions,genericEntity.offlineInstructions)
+ .append(this.created,genericEntity.created)
+ .append(this.updated,genericEntity.updated)
+ .append(this.createdBy,genericEntity.createdBy)
+ .isEquals();
+ }
+
+ 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));
+ }
+
+ //**********************************************************
+ // 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 resources.
+ *
+ * @hibernate.many-to-one
+ * cascade="none"
+ * column="create_by"
+ *
+ */
+ public ResourceUser getCreatedBy() {
+ return createdBy;
+ }
+
+ /**
+ * @param createdBy The userid of the user who created this Share resources.
+ */
+ public void setCreatedBy(ResourceUser 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) {
+ this.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 resource 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 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="resource_uid"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.tool.rsrc.model.ResourceAttachment"
+ *
+ * @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="true"
+ * cascade="none"
+ * order-by="create_date desc"
+ * @hibernate.collection-key column="resource_uid"
+ * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.rsrc.model.ResourceItem"
+ *
+ * @return
+ */
+ public Set getResourceItems() {
+ return resourceItems;
+ }
+ public void setResourceItems(Set resourceItems) {
+ this.resourceItems= resourceItems;
+ }
+
+
+ /**
+ * @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_add_files"
+ * @return
+ */
+ public boolean isAllowAddFiles() {
+ return allowAddFiles;
+ }
+ public void setAllowAddFiles(boolean allowAddFiles) {
+ this.allowAddFiles = allowAddFiles;
+ }
+ /**
+ * @hibernate.property column="allow_add_urls"
+ * @return
+ */
+ public boolean isAllowAddUrls() {
+ return allowAddUrls;
+ }
+ public void setAllowAddUrls(boolean allowAddUrls) {
+ this.allowAddUrls = allowAddUrls;
+ }
+ /**
+ * @hibernate.property column="min_view_resource_number"
+ * @return
+ */
+ public int getMinViewResourceNumber() {
+ return minViewResourceNumber;
+ }
+ public void setMinViewResourceNumber(int minViewResourceNumber) {
+ this.minViewResourceNumber = minViewResourceNumber;
+ }
+ /**
+ * @hibernate.property column="allow_auto_run"
+ * @return
+ */
+ public boolean isRunAuto() {
+ return runAuto;
+ }
+ public void setRunAuto(boolean runAuto) {
+ this.runAuto = runAuto;
+ }
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.hbm.xml
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.hbm.xml (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.hbm.xml (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,140 @@
+package org.lamsfoundation.lams.tool.rsrc.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 Resource.
+ *
+ *
+ * @hibernate.class table="tl_larsrc11_attachment"
+ *
+ */
+public class ResourceAttachment implements Cloneable{
+ private static final Logger log = Logger.getLogger(ResourceAttachment.class);
+
+ private Long uid;
+ private Long fileUuid;
+ private Long fileVersionId;
+ private String fileType;
+ private String fileName;
+ private Date created;
+
+ //Default contruction method
+ public ResourceAttachment(){
+
+ }
+// **********************************************************
+ // Function method for Attachment
+// **********************************************************
+ public Object clone(){
+ Object obj = null;
+ try {
+ obj = super.clone();
+ ((ResourceAttachment)obj).setUid(null);
+ } catch (CloneNotSupportedException e) {
+ log.error("When clone " + ResourceAttachment.class + " failed");
+ }
+
+ return obj;
+ }
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (!(o instanceof ResourceAttachment))
+ return false;
+
+ final ResourceAttachment genericEntity = (ResourceAttachment) 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();
+ }
+
+ 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_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.hbm.xml
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.hbm.xml (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.hbm.xml (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,49 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.model;
+/**
+ * Resource
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_larsrc11_resource_item"
+ *
+ */
+public class ResourceItem {
+
+ private Long uid;
+
+// **********************************************************
+ // Get/Set methods
+// **********************************************************
+ /**
+ * @hibernate.id generator-class="identity" 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;
+ }
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.hbm.xml
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.hbm.xml (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.hbm.xml (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,149 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.model;
+
+import java.util.Date;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Resource
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_larsrc11_session"
+ *
+ */
+public class ResourceSession implements Cloneable{
+
+ private static Logger log = Logger.getLogger(ResourceSession.class);
+
+ private Long uid;
+ private Long sessionId;
+ private String sessionName;
+ private Resource resource;
+ private Date sessionStartDate;
+ private Date sessionEndDate;
+ //finish or not
+ private int status;
+
+// **********************************************************
+ // Function method for ForumToolSession
+// **********************************************************
+ public Object clone(){
+
+ ResourceSession session = null;
+ try{
+ session = (ResourceSession) super.clone();
+
+ } catch (CloneNotSupportedException e) {
+ log.error("When clone " + ResourceSession.class + " failed");
+ }
+ return session;
+ }
+
+
+// **********************************************************
+ // Get/Set methods
+// **********************************************************
+ /**
+ * @hibernate.id generator-class="identity" 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="resource_uid"
+ * cascade="none"
+ * @return
+ */
+ public Resource getResource() {
+ return resource;
+ }
+ public void setResource(Resource resource) {
+ this.resource = resource;
+ }
+ /**
+ * @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;
+ }
+
+
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.hbm.xml
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.hbm.xml (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.hbm.xml (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,162 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.model;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.log4j.Logger;
+/**
+ * Resource
+ * @author Dapeng Ni
+ *
+ * @hibernate.class table="tl_larsrc11_user"
+ *
+ */
+public class ResourceUser {
+ private static final long serialVersionUID = -7043502180037866257L;
+ private static Logger log = Logger.getLogger(ResourceUser.class);
+
+ private Long uid;
+ private Long userId;
+ private String firstName;
+ private String lastName;
+ private String loginName;
+ private ResourceSession session;
+
+ public ResourceUser(){
+ }
+
+// **********************************************************
+ // Function method for ForumUser
+// **********************************************************
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
+ public Object clone() {
+
+ Object obj = null;
+ try {
+ obj = super.clone();
+ } catch (CloneNotSupportedException e) {
+ log.error("When clone " + ResourceUser.class + " failed");
+ }
+ return obj;
+ }
+
+
+// **********************************************************
+ // Get/Set methods
+// **********************************************************
+ /**
+ * @hibernate.id generator-class="identity" 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_id"
+ * cascade="none"
+ * @return
+ */
+ public ResourceSession getSession() {
+ return session;
+ }
+
+ public void setSession(ResourceSession session) {
+ this.session = session;
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!(obj instanceof ResourceUser))
+ return false;
+
+ final ResourceUser user = (ResourceUser) 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();
+
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder().append(uid).append(firstName)
+ .append(lastName).append(loginName)
+ .toHashCode();
+ }
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/applicationContext.xml
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/applicationContext.xml (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/model/applicationContext.xml (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org/lamsfoundation/lams/tool/imscp/PackageVO.hbm.xml
+ org/lamsfoundation/lams/tool/imscp/UserPackageVO.hbm.xml
+ org/lamsfoundation/lams/tool/imscp/UserProgressVO.hbm.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PROPAGATION_REQUIRED,-ImscpApplicationException
+ PROPAGATION_REQUIRED,-ImscpApplicationException
+ PROPAGATION_REQUIRED,-ImscpApplicationException
+ PROPAGATION_REQUIRED,readOnly,-ImscpApplicationException
+ PROPAGATION_REQUIRED,-ImscpApplicationException
+ PROPAGATION_REQUIRED,-ImscpApplicationException
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+ org.lamsfoundation.lams.tool.rsrc.ApplicationResources
+
+
+
+
+
+
+
+
+
+
+
+
+ org/lamsfoundation/lams/tool/rsrc/model/Resource.hbm.xml
+ org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.hbm.xml
+ org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.hbm.xml
+ org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.hbm.xml
+ org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.hbm.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+ PROPAGATION_REQUIRED,-java.lang.Exception
+
+
+
+
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,33 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.rsrc.service;
+
+/**
+ * @author Dapeng.Ni
+ *
+ * Interface that defines the contract that all ShareResource service provider must follow.
+ */
+public interface IResourceService
+{
+}
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,90 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.rsrc.service;
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.service.IRepositoryService;
+import org.lamsfoundation.lams.learning.service.ILearnerService;
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceAttachmentDAO;
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceDAO;
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceItemDAO;
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceSessionDAO;
+import org.lamsfoundation.lams.tool.rsrc.dao.ResourceUserDAO;
+import org.lamsfoundation.lams.tool.rsrc.util.ResourceToolContentHandler;
+import org.lamsfoundation.lams.tool.service.ILamsToolService;
+import org.lamsfoundation.lams.util.MessageService;
+
+/**
+ *
+ * @author Dapeng.Ni
+ *
+ */
+public class ResourceServiceImpl implements
+ IResourceService
+
+{
+ static Logger logger = Logger.getLogger(ResourceServiceImpl.class.getName());
+ private ResourceDAO resourceDao;
+ private ResourceItemDAO resourceItemDao;
+ private ResourceAttachmentDAO resourceAttachmentDao;
+ private ResourceUserDAO resourceUserDao;
+ private ResourceSessionDAO resourceSessionDao;
+ //tool service
+ private ResourceToolContentHandler resourceToolContentHandler;
+ private MessageService messageService;
+ //system services
+ private IRepositoryService repositoryService;
+ private ILamsToolService toolService;
+ private ILearnerService learnerService;
+
+
+ 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 setResourceAttachmentDao(ResourceAttachmentDAO resourceAttachmentDao) {
+ this.resourceAttachmentDao = resourceAttachmentDao;
+ }
+ public void setResourceDao(ResourceDAO resourceDao) {
+ this.resourceDao = resourceDao;
+ }
+ public void setResourceItemDao(ResourceItemDAO resourceItemDao) {
+ this.resourceItemDao = resourceItemDao;
+ }
+ public void setResourceSessionDao(ResourceSessionDAO resourceSessionDao) {
+ this.resourceSessionDao = resourceSessionDao;
+ }
+ public void setResourceToolContentHandler(ResourceToolContentHandler resourceToolContentHandler) {
+ this.resourceToolContentHandler = resourceToolContentHandler;
+ }
+ public void setResourceUserDao(ResourceUserDAO resourceUserDao) {
+ this.resourceUserDao = resourceUserDao;
+ }
+ public void setToolService(ILamsToolService toolService) {
+ this.toolService = toolService;
+ }
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceProxy.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceProxy.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceProxy.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,71 @@
+/***************************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ***********************************************************************/
+
+package org.lamsfoundation.lams.tool.rsrc.service;
+
+import javax.servlet.ServletContext;
+
+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 ResourceServiceProxy
+{
+ /**
+ * Return the mc 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 mcq service object.
+ */
+ public static final IResourceService getMcService(ServletContext servletContext)
+ {
+ return (IResourceService)getMcDomainService(servletContext);
+ }
+//
+// public static final ToolSessionManager getMcSessionManager(ServletContext servletContext)
+// {
+// return (ToolSessionManager)getMcDomainService(servletContext);
+// }
+//
+// public static final ToolContentManager getMcContentManager(ServletContext servletContext)
+// {
+// return (ToolContentManager)getMcDomainService(servletContext);
+// }
+
+ private static Object getMcDomainService(ServletContext servletContext)
+ {
+ WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
+ return wac.getBean("mcService");
+ }
+
+}
\ No newline at end of file
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/util/ResourceToolContentHandler.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/util/ResourceToolContentHandler.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/util/ResourceToolContentHandler.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,65 @@
+/*
+Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+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; either version 2 of the License, or
+(at your option) any later version.
+
+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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+http://www.gnu.org/licenses/gpl.txt
+*/
+package org.lamsfoundation.lams.tool.rsrc.util;
+
+import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler;
+
+/**
+ * Simple client for accessing the content repository.
+ *
+ * @author Fiona Malikoff
+ */
+public class ResourceToolContentHandler extends ToolContentHandler {
+
+ private static String repositoryWorkspaceName = "sharedresourcesworkspace";
+ private static String repositoryUser = "sharedresources";
+ //sharedresources
+ private static char[] repositoryId = {'l','a','m','s','-','s','h','a','r','e','d','r','e','s','o','u','r','c','e','s'};
+
+ /**
+ *
+ */
+ public ResourceToolContentHandler() {
+ 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_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/ApplicationResources.properties
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/ApplicationResources.properties (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/ApplicationResources.properties (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,62 @@
+# Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+#
+# 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; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+#
+# http://www.gnu.org/licenses/gpl.txt
+
+# Resources for parameter 'org.lamsfoundation.lams.tool.imscp.web.ApplicationResources'
+#=========================Error Messages===========================#
+error.field.mandatory={0} must not be empty.
+error.directoryUnavailable=Unable to read directory {0}. It may not exist, may not be readable or may not be a directory.
+error.packageMissing=No content package can be found - have you uploaded the package yet?
+error.zipFileFormat=Unable to extract the zip file that was uploaded. Please check if the file you uploaded is a valid zip file. If it is a valid zip file, please contact your administrator. An error has been written in the logs.
+error.exception.imscpApplication=An internal error has occured with the IMS Content Package tool. If reporting this error, please report:
{0}
+error.exception.imsManifest=An error has occured while processing the imsmanifest.xml file from the content package.
The file may be missing, in an invalid format or may be an unsupported version. Please check that the content package is valid - try opening it using a zip utility and checking that the file imsmanifest.xml exists.
. If reporting this error, please report:
{0}
+error.exception.general=An general error has occured. If reporting this error, please report:
{0}
+
+#=========================UploadAction Look Up Dispatch Token===========================#
+button.basic=Basic
+button.uploadFile=Upload Package
+button.preview=Preview
+button.advanced=Advanced
+button.instructions=Instructions
+button.uploadInstructions=Upload
+button.done=Done
+
+#=========================General Labels===========================#
+label.error=Error
+label.toolContentId.missing=An system error has occured: toolContentId is missing. Unable to continue.
+
+#=========================abasic Labels===========================#
+label.fileHeading=Step 1: Upload a file:
+label.fileEntry=File:
+label.titleHeading=Step 2: Review title and description
+label.titleEntry=Title:
+label.descEntry=Description:
+label.orgEntry=Organization of package:
+label.noPackageYet=No package loaded.
+
+#=========================aadvanced Labels===========================#
+label.lockOnFinish=Lock on Finish?
+
+#=========================ainstructions Labels===========================#
+label.onlineInstructions=Online Instructions
+label.offlineInstructions=Offline Instructions
+
+#=========================Complete Labels===========================#
+label.complete.title=Content Package Configured.
+label.complete.instructions=The content package is configured
+
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,106 @@
+/*
+ *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ *
+ *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; either version 2 of the License, or
+ *(at your option) any later version.
+ *
+ *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ *USA
+ *
+ *http://www.gnu.org/licenses/gpl.txt
+ */
+package org.lamsfoundation.lams.tool.rsrc.web.action;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+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.rsrc.service.IResourceService;
+
+/**
+ * @author Steve.Ni
+ * @version $Revision$
+ */
+public class AuthoringAction extends Action {
+ private static Logger log = Logger.getLogger(AuthoringAction.class);
+ private IResourceService rsrcService;
+
+ public ActionForward execute(ActionMapping mapping, ActionForm form,
+ HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+
+// String param = mapping.getParameter();
+// //-----------------------Forum Author function ---------------------------
+// if (param.equals("initPage")) {
+//// request.getSession().setAttribute(ForumConstants.MODE,ForumConstants.AUTHOR_MODE);
+// return initPage(mapping, form, request, response);
+// }
+// if (param.equals("monitoringInitPage")) {
+//// request.getSession().setAttribute(ForumConstants.MODE,ForumConstants.MONITOR_MODE);
+// 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);
+// }
+// //-----------------------Topic function ---------------------------
+// if (param.equals("newTopic")) {
+// return newTopic(mapping, form, request, response);
+// }
+// if (param.equals("createTopic")) {
+// return createTopic(mapping, form, request, response);
+// }
+// if (param.equals("editTopic")) {
+// return editTopic(mapping, form, request, response);
+// }
+// if (param.equals("updateTopic")) {
+// return updateTopic(mapping, form, request, response);
+// }
+// if (param.equals("viewTopic")) {
+// return viewTopic(mapping, form, request, response);
+// }
+// if (param.equals("deleteTopic")) {
+// return deleteTopic(mapping, form, request, response);
+// }
+// if (param.equals("deleteAttachment")) {
+// return deleteAttachment(mapping, form, request, response);
+// }
+// if (param.equals("refreshTopic")) {
+// return refreshTopic(mapping, form, request, response);
+// }
+// if (param.equals("finishTopic")) {
+// return finishTopic(mapping, form, request, response);
+// }
+ return mapping.findForward("error");
+ }
+ //******************************************************************************************************************
+ // Forum Author functions
+ //******************************************************************************************************************
+
+}
Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/form/ResourceForm.java
===================================================================
diff -u
--- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/form/ResourceForm.java (revision 0)
+++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/form/ResourceForm.java (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,18 @@
+package org.lamsfoundation.lams.tool.rsrc.web.form;
+
+import org.apache.log4j.Logger;
+import org.apache.struts.validator.ValidatorForm;
+
+/**
+ *
+ * Message Form.
+ * @struts.form name="resourceForm"
+ *
+ * User: Dapeng.Ni
+ */
+public class ResourceForm extends ValidatorForm {
+ private static final long serialVersionUID = -6054354910960460120L;
+ private static Logger logger = Logger.getLogger(ResourceForm.class.getName());
+
+
+}
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/dao/DAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/dao/hibernate/BaseDAOHibernate.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/ims/IContentPackageConverter.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/ims/IMSManifestException.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/ims/ImscpApplicationException.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/ims/OrganizationXMLDef.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/ims/SimpleContentPackageConverter.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/model/Resource.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/model/ResourceAttachment.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/model/ResourceItem.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/model/ResourceSession.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/model/ResourceUser.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/model/applicationContext.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/rsrcApplicationContext.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/service/IResourceService.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceImpl.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/service/ResourceServiceProxy.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/web/action/ApplicationResources.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef refers to a dead (removed) revision in file `lams_tool_larsrc/src/org/lamsfoundation/lams/tool/rsrc/web/form/ResourceForm.java'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_larsrc/web/WEB-INF/.cvsignore
===================================================================
diff -u
--- lams_tool_larsrc/web/WEB-INF/.cvsignore (revision 0)
+++ lams_tool_larsrc/web/WEB-INF/.cvsignore (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,2 @@
+lib
+struts-config.xml
Index: lams_tool_larsrc/web/WEB-INF/struts/.cvsignore
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/web/WEB-INF/struts/.cvsignore (.../.cvsignore) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/web/WEB-INF/struts/.cvsignore (.../.cvsignore) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1 +1,2 @@
tlds
+validation.xml
Index: lams_tool_larsrc/web/WEB-INF/struts/tiles-defs.xml
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/web/WEB-INF/struts/tiles-defs.xml (.../tiles-defs.xml) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/web/WEB-INF/struts/tiles-defs.xml (.../tiles-defs.xml) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -22,142 +22,15 @@
-->
-
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: lams_tool_larsrc/web/WEB-INF/web.xml
===================================================================
diff -u -r0a704617c31a5847217132f6b7cd73a4b9b43c9f -r5d0efcab8441b253fc761272cbaeb62aa4f4a4ef
--- lams_tool_larsrc/web/WEB-INF/web.xml (.../web.xml) (revision 0a704617c31a5847217132f6b7cd73a4b9b43c9f)
+++ lams_tool_larsrc/web/WEB-INF/web.xml (.../web.xml) (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -1,9 +1,9 @@
- forum
+ Shared Resources
- Forum tool
+ Shared Resources tool
javax.servlet.jsp.jstl.fmt.localizationContext
Index: lams_tool_larsrc/web/common/footer.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/common/footer.jsp (revision 0)
+++ lams_tool_larsrc/web/common/footer.jsp (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1 @@
+
Index: lams_tool_larsrc/web/common/header.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/common/header.jsp (revision 0)
+++ lams_tool_larsrc/web/common/header.jsp (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,64 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_larsrc/web/common/taglibs.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/common/taglibs.jsp (revision 0)
+++ lams_tool_larsrc/web/common/taglibs.jsp (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,10 @@
+<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
+<%@ taglib uri="tags-bean" prefix="bean" %>
+<%@ taglib uri="tags-logic" prefix="logic" %>
+<%@ taglib uri="tags-tiles" prefix="tiles" %>
+<%@ taglib uri="tags-html" prefix="html" %>
+<%@ taglib uri="tags-core" prefix="c"%>
+<%@ taglib uri="tags-fmt" prefix="fmt"%>
+<%@ taglib uri="tags-lams" prefix="lams" %>
+<%@ taglib uri="fck-editor" prefix="FCK"%>
+
Index: lams_tool_larsrc/web/layout/default.jsp
===================================================================
diff -u
--- lams_tool_larsrc/web/layout/default.jsp (revision 0)
+++ lams_tool_larsrc/web/layout/default.jsp (revision 5d0efcab8441b253fc761272cbaeb62aa4f4a4ef)
@@ -0,0 +1,20 @@
+<%@ include file="/common/taglibs.jsp"%>
+<%@ taglib uri="tags-tiles" prefix="tiles"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+