Index: openacs-4/packages/dotlrn-chat/dotlrn-chat.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/dotlrn-chat.info,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/dotlrn-chat.info 14 Mar 2006 12:30:02 -0000 1.1
@@ -0,0 +1,21 @@
+
+
+
+
+ dotLRN Chat Applet
+ dotLRN Chat Applets
+ f
+ t
+
+
+ OpenACS
+ 2004-10-10
+ OpenACS
+
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.ca_ES.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.ca_ES.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.ca_ES.ISO-8859-1.xml 14 Mar 2006 12:30:02 -0000 1.1
@@ -0,0 +1,5 @@
+
+
+
+ Xat
+
Index: openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.en_US.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.en_US.ISO-8859-1.xml 14 Mar 2006 12:30:02 -0000 1.1
@@ -0,0 +1,5 @@
+
+
+
+ Chat
+
Index: openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.es_ES.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.es_ES.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/catalog/dotlrn-chat.es_ES.ISO-8859-1.xml 14 Mar 2006 12:30:02 -0000 1.1
@@ -0,0 +1,5 @@
+
+
+
+ Sala
+
Index: openacs-4/packages/dotlrn-chat/sql/oracle/dotlrn-chat-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/sql/oracle/dotlrn-chat-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/sql/oracle/dotlrn-chat-create.sql 14 Mar 2006 12:30:02 -0000 1.1
@@ -0,0 +1,161 @@
+--
+-- Copyright (C) 2004 University of Valencia
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN 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.
+--
+-- dotLRN 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.
+--
+--
+-- Procedures to support the dotlrn chat
+--
+-- @author Emma (eraffenne@innova.uned.es)
+-- @creation-date 2006-01-04
+-- @version $Id: dotlrn-chat-create.sql,v 1.1 2006/03/14 12:30:02 emmar Exp $
+
+declare
+ v_impl_id acs_sc_impls.impl_id%TYPE;
+ v_impl_alias_id acs_sc_impl_aliases.impl_id%TYPE;
+begin
+
+-- create the implementation
+ v_impl_id := acs_sc_impl.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_pretty_name => 'Chat applet',
+ impl_owner_name => 'dotlrn_chat'
+ );
+
+-- add all the hooks
+
+-- GetPrettyName
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'GetPrettyName',
+ impl_alias => 'dotlrn_chat::get_pretty_name',
+ impl_pl => 'TCL'
+ );
+
+-- AddApplet
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddApplet',
+ impl_alias => 'dotlrn_chat::add_applet',
+ impl_pl => 'TCL'
+ );
+
+-- RemoveApplet
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveApplet',
+ impl_alias => 'dotlrn_chat::remove_applet',
+ impl_pl => 'TCL'
+ );
+
+-- AddAppletToCommunity
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddAppletToCommunity',
+ impl_alias => 'dotlrn_chat::add_applet_to_community',
+ impl_pl => 'TCL'
+ );
+
+-- RemoveAppletFromCommunity
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveAppletFromCommunity',
+ impl_alias => 'dotlrn_chat::remove_applet_from_community',
+ impl_pl => 'TCL'
+ );
+
+-- AddUser
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddUser',
+ impl_alias => 'dotlrn_chat::add_user',
+ impl_pl => 'TCL'
+ );
+
+-- RemoveUser
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveUser',
+ impl_alias => 'dotlrn_chat::remove_user',
+ impl_pl => 'TCL'
+ );
+
+-- AddUserToCommunity
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddUserToCommunity',
+ impl_alias => 'dotlrn_chat::add_user_to_community',
+ impl_pl => 'TCL'
+ );
+
+-- RemoveUserFromCommunity
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveUserFromCommunity',
+ impl_alias => 'dotlrn_chat::remove_user_from_community',
+ impl_pl => 'TCL'
+ );
+
+-- AddPortlet
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddPortlet',
+ impl_alias => 'dotlrn_chat::add_portlet',
+ impl_pl => 'TCL'
+ );
+
+-- RemovePortlet
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemovePortlet',
+ impl_alias => 'dotlrn_chat::remove_portlet',
+ impl_pl => 'TCL'
+ );
+
+-- Clone
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'Clone',
+ impl_alias => 'dotlrn_chat::clone',
+ impl_pl => 'TCL'
+ );
+
+ v_impl_alias_id := acs_sc_impl_alias.new (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'ChangeEventHandler',
+ impl_alias => 'dotlrn_chat::change_event_handler',
+ impl_pl => 'TCL'
+ );
+
+-- Add the binding
+ acs_sc_binding.new (
+ contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat'
+ );
+end;
+/
+show errors
Index: openacs-4/packages/dotlrn-chat/sql/oracle/dotlrn-chat-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/sql/oracle/dotlrn-chat-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/sql/oracle/dotlrn-chat-drop.sql 14 Mar 2006 12:30:02 -0000 1.1
@@ -0,0 +1,127 @@
+--
+-- Copyright (C) 2004 University of Valencia
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN 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.
+--
+-- dotLRN 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.
+--
+--
+-- Procedures to support the dotlrn chat
+--
+-- @author Emma (eraffenne@innova.uned.es)
+-- @creation-date 2006-01-04
+-- @version $Id: dotlrn-chat-drop.sql,v 1.1 2006/03/14 12:30:02 emmar Exp $
+
+declare
+ v_impl_id acs_sc_impls.impl_id%TYPE;
+begin
+
+ acs_sc_impl.del(
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat'
+ );
+
+
+-- add all the hooks
+
+-- GetPrettyName
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'GetPrettyName'
+ );
+
+-- AddApplet
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddApplet'
+ );
+
+-- RemoveApplet
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveApplet'
+ );
+
+-- AddAppletToCommunity
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddAppletToCommunity'
+ );
+
+-- RemoveAppletFromCommunity
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveAppletFromCommunity'
+ );
+
+-- AddUser
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddUser'
+ );
+
+-- RemoveUser
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveUser'
+ );
+
+-- AddUserToCommunity
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddUserToCommunity'
+ );
+
+-- RemoveUserFromCommunity
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemoveUserFromCommunity'
+ );
+
+-- AddPortlet
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'AddPortlet'
+ );
+
+-- RemovePortlet
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'RemovePortlet'
+ );
+
+-- Clone
+ v_impl_id := acs_sc_impl_alias.del (
+ impl_contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat',
+ impl_operation_name => 'Clone'
+ );
+
+
+-- Add the binding
+ acs_sc_binding.del (
+ contract_name => 'dotlrn_applet',
+ impl_name => 'dotlrn_chat'
+ );
+end;
+/
+show errors
Index: openacs-4/packages/dotlrn-chat/sql/postgresql/dotlrn-chat-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/sql/postgresql/dotlrn-chat-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/sql/postgresql/dotlrn-chat-create.sql 14 Mar 2006 12:30:03 -0000 1.1
@@ -0,0 +1,152 @@
+--
+-- Copyright (C) 2004 University of Valencia
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN 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.
+--
+-- dotLRN 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.
+--
+--
+-- Procedures to support the dotlrn chat
+--
+-- @author agustin (Agustin.Lopez@uv.es)
+-- @creation-date 2004-10-10
+-- @version $Id: dotlrn-chat-create.sql,v 0.1 2004/10/10
+
+-- create the implementation
+select acs_sc_impl__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'dotlrn_chat'
+);
+
+-- add all the hooks
+
+-- GetPrettyName
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'GetPrettyName',
+ 'dotlrn_chat::get_pretty_name',
+ 'TCL'
+);
+
+-- AddApplet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddApplet',
+ 'dotlrn_chat::add_applet',
+ 'TCL'
+);
+
+-- RemoveApplet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveApplet',
+ 'dotlrn_chat::remove_applet',
+ 'TCL'
+);
+
+-- AddAppletToCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddAppletToCommunity',
+ 'dotlrn_chat::add_applet_to_community',
+ 'TCL'
+);
+
+-- RemoveAppletFromCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveAppletFromCommunity',
+ 'dotlrn_chat::remove_applet_from_community',
+ 'TCL'
+);
+
+-- AddUser
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddUser',
+ 'dotlrn_chat::add_user',
+ 'TCL'
+);
+
+-- RemoveUser
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveUser',
+ 'dotlrn_chat::remove_user',
+ 'TCL'
+);
+
+-- AddUserToCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddUserToCommunity',
+ 'dotlrn_chat::add_user_to_community',
+ 'TCL'
+);
+
+-- RemoveUserFromCommunity
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveUserFromCommunity',
+ 'dotlrn_chat::remove_user_from_community',
+ 'TCL'
+);
+
+-- AddPortlet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddPortlet',
+ 'dotlrn_chat::add_portlet',
+ 'TCL'
+ );
+
+-- RemovePortlet
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemovePortlet',
+ 'dotlrn_chat::remove_portlet',
+ 'TCL'
+);
+
+-- Clone
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'Clone',
+ 'dotlrn_chat::clone',
+ 'TCL'
+);
+
+select acs_sc_impl_alias__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'ChangeEventHandler',
+ 'dotlrn_chat::change_event_handler',
+ 'TCL'
+);
+
+-- Add the binding
+select acs_sc_binding__new (
+ 'dotlrn_applet',
+ 'dotlrn_chat'
+);
Index: openacs-4/packages/dotlrn-chat/sql/postgresql/dotlrn-chat-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/sql/postgresql/dotlrn-chat-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/sql/postgresql/dotlrn-chat-drop.sql 14 Mar 2006 12:30:03 -0000 1.1
@@ -0,0 +1,120 @@
+--
+-- Copyright (C) 2004 University of Valencia
+--
+-- This file is part of dotLRN.
+--
+-- dotLRN 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.
+--
+-- dotLRN 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.
+--
+--
+-- Procedures to support the dotlrn chat
+--
+-- @author agustin (Agustin.Lopez@uv.es)
+-- @creation-date 2004-10-10
+-- @version $Id: dotlrn-chat-drop.sql,v 0.1 2004/10/10
+
+select acs_sc_impl__delete(
+ 'dotlrn_applet', -- impl_contract_name
+ 'dotlrn_chat' -- impl_name
+);
+
+
+-- add all the hooks
+
+-- GetPrettyName
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'GetPrettyName'
+);
+
+-- AddApplet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddApplet'
+);
+
+-- RemoveApplet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveApplet'
+);
+
+-- AddAppletToCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddAppletToCommunity'
+);
+
+-- RemoveAppletFromCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveAppletFromCommunity'
+);
+
+-- AddUser
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddUser'
+);
+
+-- RemoveUser
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveUser'
+);
+
+-- AddUserToCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddUserToCommunity'
+);
+
+-- RemoveUserFromCommunity
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemoveUserFromCommunity'
+);
+
+-- AddPortlet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'AddPortlet'
+ );
+
+-- RemovePortlet
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'RemovePortlet'
+);
+
+-- Clone
+select acs_sc_impl_alias__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat',
+ 'Clone'
+);
+
+
+-- Add the binding
+select acs_sc_binding__delete (
+ 'dotlrn_applet',
+ 'dotlrn_chat'
+);
Index: openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs-oracle.xql 14 Mar 2006 12:30:03 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+oracle8.1.6
+
+
+
+ begin
+ chat.clone (
+ :old_package_id,
+ :new_package_id
+ );
+ end;
+
+
+
+
+
Index: openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs-postgresql.xql 14 Mar 2006 12:30:03 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+postgresql7.1
+
+
+
+ select chat__clone (
+ :old_package_id,
+ :new_package_id
+ );
+
+
+
+
+
Index: openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl 14 Mar 2006 12:30:03 -0000 1.1
@@ -0,0 +1,222 @@
+#
+# Copyright (C) 2004 University of Valencia
+#
+# This file is part of dotLRN.
+#
+# dotLRN 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.
+#
+# dotLRN 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.
+#
+
+ad_library {
+
+ Procs to set up the dotLRN chat applet
+
+ @author agustin (Agustin.Lopez@uv.es)
+ @creation-date 2004-10-10
+ @version $Id: dotlrn-chat-procs.tcl,v 0.1 2004/10/10
+
+}
+
+namespace eval dotlrn_chat {
+
+ ad_proc -public applet_key {
+ } {
+ What's my applet key?
+ } {
+ return dotlrn_chat
+ }
+
+ ad_proc -public package_key {
+ } {
+ What package do I deal with?
+ } {
+ return chat
+ }
+
+ ad_proc -public my_package_key {
+ } {
+ What package do I deal with?
+ } {
+ return "dotlrn-chat"
+ }
+
+ ad_proc -public get_pretty_name {
+ } {
+ returns the pretty name
+ } {
+ return "[_ dotlrn-chat.pretty_name]"
+ }
+
+ ad_proc -public add_applet {
+ } {
+ One time init - must be repeatable!
+ } {
+ dotlrn_applet::add_applet_to_dotlrn -applet_key [applet_key] -package_key [my_package_key]
+ }
+
+ ad_proc -public remove_applet {
+ } {
+ One time destroy.
+ } {
+ dotlrn_applet::remove_applet_from_dotlrn -applet_key [applet_key]
+ }
+
+ ad_proc -public add_applet_to_community {
+ community_id
+ } {
+ Add the chat applet to a specifc dotlrn community
+ } {
+ set portal_id [dotlrn_community::get_portal_id -community_id $community_id]
+
+ # create the chat package instance (all in one, I've mounted it)
+ set package_id [dotlrn::instantiate_and_mount $community_id [package_key]]
+
+ # set up the admin portal
+ set admin_portal_id [dotlrn_community::get_admin_portal_id \
+ -community_id $community_id
+ ]
+
+ chat_admin_portlet::add_self_to_page \
+ -portal_id $admin_portal_id \
+ -package_id $package_id
+
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+ add_portlet_helper $portal_id $args
+
+ return $package_id
+ }
+
+ ad_proc -public remove_applet_from_community {
+ community_id
+ } {
+ remove the applet from the community
+ } {
+ ad_return_complaint 1 "[applet_key] remove_applet_from_community not implimented!"
+ }
+
+ ad_proc -public add_user {
+ user_id
+ } {
+ one time user-specifuc init
+ } {
+ # noop
+ }
+
+ ad_proc -public remove_user {
+ user_id
+ } {
+ } {
+ # noop
+ }
+
+ ad_proc -public add_user_to_community {
+ community_id
+ user_id
+ } {
+ Add a user to a specifc dotlrn community
+ } {
+ set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [applet_key]]
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+
+ # use "append" here since we want to aggregate
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+ ns_set put $args param_action append
+ add_portlet_helper $portal_id $args
+ }
+
+ ad_proc -public remove_user_from_community {
+ community_id
+ user_id
+ } {
+ Remove a user from a community
+ } {
+ set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [applet_key]]
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+
+ set args [ns_set create]
+ ns_set put $args package_id $package_id
+
+ remove_portlet $portal_id $args
+ }
+
+ ad_proc -public add_portlet {
+ portal_id
+ } {
+ A helper proc to add the underlying portlet to the given portal.
+
+ @param portal_id
+ } {
+ # simple, no type specific stuff, just set some dummy values
+
+ set args [ns_set create]
+ ns_set put $args package_id 0
+ ns_set put $args param_action overwrite
+ add_portlet_helper $portal_id $args
+ }
+
+ ad_proc -public add_portlet_helper {
+ portal_id
+ args
+ } {
+ A helper proc to add the underlying portlet to the given portal.
+
+ @param portal_id
+ @param args an ns_set
+ } {
+ chat_portlet::add_self_to_page \
+ -portal_id $portal_id \
+ -package_id [ns_set get $args package_id] \
+ -param_action [ns_set get $args param_action]
+ }
+
+ ad_proc -public remove_portlet {
+ portal_id
+ args
+ } {
+ A helper proc to remove the underlying portlet from the given portal.
+
+ @param portal_id
+ @param args A list of key-value pairs (possibly user_id, community_id, and more)
+ } {
+ chat_portlet::remove_self_from_page \
+ -portal_id $portal_id \
+ -package_id [ns_set get $args package_id]
+ }
+
+ ad_proc -public clone {
+ old_community_id
+ new_community_id
+ } {
+ Clone this applet's content from the old community to the new one
+ } {
+ ns_log notice "Cloning: [applet_key]"
+ set new_package_id [add_applet_to_community $new_community_id]
+ set old_package_id [dotlrn_community::get_applet_package_id \
+ -community_id $old_community_id \
+ -applet_key [applet_key]
+ ]
+
+ db_exec_plsql call_chat_clone {}
+ return $new_package_id
+ }
+
+ ad_proc -public change_event_handler {
+ community_id
+ event
+ old_value
+ new_value
+ } {
+ listens for the following events:
+ } {
+ }
+
+}