Index: lams_common/build.xml =================================================================== diff -u -r93560c29902b6d48904f54afd972bce95e42a98b -r4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29 --- lams_common/build.xml (.../build.xml) (revision 93560c29902b6d48904f54afd972bce95e42a98b) +++ lams_common/build.xml (.../build.xml) (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -276,6 +276,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_common/conf/hibernate/mappings/hibernate.properties =================================================================== diff -u --- lams_common/conf/hibernate/mappings/hibernate.properties (revision 0) +++ lams_common/conf/hibernate/mappings/hibernate.properties (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,7 @@ +hibernate.connection.username=lams +hibernate.connection.password=lamsdemo +hibernate.connection.url=jdbc:mysql://localhost/lams +hibernate.connection.driver_class=com.mysql.jdbc.Driver +hibernate.dialect=org.hibernate.dialect.MySQLDialect + + Index: lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/journal/model/JournalEntry.hbm.xml =================================================================== diff -u --- lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/journal/model/JournalEntry.hbm.xml (revision 0) +++ lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/journal/model/JournalEntry.hbm.xml (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_common/db/sql/create_journal_tables.sql =================================================================== diff -u --- lams_common/db/sql/create_journal_tables.sql (revision 0) +++ lams_common/db/sql/create_journal_tables.sql (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,2 @@ +drop table if exists lams_journal_entry; +create table lams_journal_entry (uid bigint not null auto_increment, lesson_id bigint, tool_session_id bigint, toolSignature varchar(255), user_id bigint, title varchar(255), entry varchar(255), primary key (uid)); Index: lams_common/db/sql/journal_table-schema.sql =================================================================== diff -u --- lams_common/db/sql/journal_table-schema.sql (revision 0) +++ lams_common/db/sql/journal_table-schema.sql (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,2 @@ +drop table if exists lams_journal_entry; +create table lams_journal_entry (uid bigint not null auto_increment, lesson_id bigint, tool_session_id bigint, toolSignature varchar(255), user_id bigint, title varchar(255), entry varchar(255), primary key (uid)); Index: lams_common/src/java/org/lamsfoundation/lams/commonContext.xml =================================================================== diff -u -r44e305392a129a0ef9c373b5cdd6b5bdb993183e -r4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29 --- lams_common/src/java/org/lamsfoundation/lams/commonContext.xml (.../commonContext.xml) (revision 44e305392a129a0ef9c373b5cdd6b5bdb993183e) +++ lams_common/src/java/org/lamsfoundation/lams/commonContext.xml (.../commonContext.xml) (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -71,6 +71,9 @@ org/lamsfoundation/lams/themes/CSSProperty.hbm.xml org/lamsfoundation/lams/themes/CSSStyle.hbm.xml org/lamsfoundation/lams/themes/CSSThemeVisualElement.hbm.xml + + + org/lamsfoundation/lams/journal/model/JournalEntry.hbm.xml @@ -178,7 +181,12 @@ - + + + + + + @@ -218,6 +226,11 @@ + + + + + jboss.cache:service=TreeCache - - Index: lams_common/src/java/org/lamsfoundation/lams/journal/dao/IJournalEntryDAO.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/journal/dao/IJournalEntryDAO.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/journal/dao/IJournalEntryDAO.java (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,30 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.journal.dao; + +public interface IJournalEntryDAO { + +} Index: lams_common/src/java/org/lamsfoundation/lams/journal/dao/hibernate/JournalEntryDAO.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/journal/dao/hibernate/JournalEntryDAO.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/journal/dao/hibernate/JournalEntryDAO.java (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,41 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.journal.dao.hibernate; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.journal.dao.IJournalEntryDAO; + +public class JournalEntryDAO extends BaseDAO implements IJournalEntryDAO { + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + +} Index: lams_common/src/java/org/lamsfoundation/lams/journal/model/JournalEntry.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/journal/model/JournalEntry.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/journal/model/JournalEntry.java (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,127 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.journal.model; + +/** + * @hibernate.class table="lams_journal_entry" + */ +public class JournalEntry implements java.io.Serializable, Cloneable { + + private static final long serialVersionUID = 653296132134948803L; + + private Long uid; + + private Long lessionID; + + private Long toolSessionID; + + private String toolSignature; + + private Long userID; + + private String title; + + private String entry; + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public void setLessionID(Long lessionID) { + this.lessionID = lessionID; + } + + /** + * @hibernate.property column="lesson_id" length="20" + * + */ + public Long getLessionID() { + return lessionID; + } + + /** + * @hibernate.property column="tool_session_id" + */ + public Long getToolSessionID() { + return toolSessionID; + } + + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + + /** + * @hibernate.property column="toolSignature" + */ + public String getToolSignature() { + return toolSignature; + } + + public void setToolSignature(String toolSignature) { + this.toolSignature = toolSignature; + } + + /** + * @hibernate.property column="user_id" + */ + public Long getUserID() { + return userID; + } + + public void setUserID(Long userID) { + this.userID = userID; + } + + /** + * @hibernate.property column="title" + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="entry" + */ + public String getEntry() { + return entry; + } + + public void setEntry(String entry) { + this.entry = entry; + } + +} Index: lams_common/src/java/org/lamsfoundation/lams/journal/service/IJournalService.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/journal/service/IJournalService.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/journal/service/IJournalService.java (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,45 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.journal.service; + +public interface IJournalService { + + Long createJournalEntry(String toolSignature, Long toolSessionID, + Integer userID, String title, String entry); + + Long createNotebookEntry(String toolSignature, Long toolSessionID, + Integer userID, String title, String entry); + + Long createJournalEntry(Long lessonID, Integer userID, String title, + String entry); + + Long createNotebookEntry(Long lessonID, Integer userID, String title, + String entry); + + void getEntry(String toolSignature, Long toolSessionID, Long userID); + + void getEntry(Long JournalEntryID); +} Index: lams_common/src/java/org/lamsfoundation/lams/journal/service/JournalService.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/journal/service/JournalService.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/journal/service/JournalService.java (revision 4dc7a29fbadab19482cdbe649eb2fe66ddf0cf29) @@ -0,0 +1,78 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.journal.service; + +import org.lamsfoundation.lams.journal.dao.IJournalEntryDAO; + +public class JournalService implements IJournalService { + + private IJournalEntryDAO journalEntryDAO; + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + + public Long createJournalEntry(String toolSignature, Long toolSessionID, Integer userID, String title, String entry) { + // TODO Auto-generated method stub + return null; + } + + public Long createNotebookEntry(String toolSignature, Long toolSessionID, Integer userID, String title, String entry) { + // TODO Auto-generated method stub + return null; + } + + public Long createJournalEntry(Long lessonID, Integer userID, String title, String entry) { + // TODO Auto-generated method stub + return null; + } + + public Long createNotebookEntry(Long lessonID, Integer userID, String title, String entry) { + + return new Long(99); + } + + public void getEntry(String toolSignature, Long toolSessionID, Long userID) { + // TODO Auto-generated method stub + + } + + public void getEntry(Long JournalEntryID) { + // TODO Auto-generated method stub + + } + + /* ********** Used by Spring to "inject" the linked objects ************* */ + + public void setJournalEntryDAO(IJournalEntryDAO journalEntryDAO) { + this.journalEntryDAO = journalEntryDAO; + } + +}