Index: openacs-4/packages/bm-portlet/sql/postgresql/bm-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bm-portlet/sql/postgresql/bm-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bm-portlet/sql/postgresql/bm-portlet-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,173 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- +-- +-- +-- Creates the bulk-mail portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-05-13 +-- @version $Id: bm-portlet-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''bm_portlet'', + ''Displays spam info for the given package'' + ); + +perform portal_datasource__set_def_param( + ds_id, --datasource_id + ''t'', --config_required_p + ''t'', --configured_p + ''shadeable_p'', --key + ''t'' --value +); + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' +); + +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''scoped_p'', + ''t'' +); + +return 0; + +end; ' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + + +-- create the implementation +select acs_sc_impl__new( + 'portal_datasource', + 'bm_portlet', + 'bm_portlet' + ); + + -- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'GetMyName', + 'bm_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'GetPrettyName', + 'bm_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'Link', + 'bm_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'AddSelfToPage', + 'bm_portlet::add_self_to_page', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'Show', + 'bm_portlet::show', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'Edit', + 'bm_portlet::edit', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'bm_portlet', + 'RemoveSelfFromPage', + 'bm_portlet::remove_self_from_page', + 'TCL' +); + +select acs_sc_binding__new( + 'portal_datasource', --contract_name + 'bm_portlet' --impl_name +); Index: openacs-4/packages/bm-portlet/sql/postgresql/bm-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bm-portlet/sql/postgresql/bm-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bm-portlet/sql/postgresql/bm-portlet-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,110 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Drops the bulk-mail portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-05-13 +-- @version $Id: bm-portlet-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''bm_portlet''; + + if not found then + raise notice ''No datasource_id found here '', ds_id ; + ds_id := null; + end if; + + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'GetMyName' +); + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'GetPrettyName' +); + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'Link' +); + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'AddSelfToPage' +); + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'Show' +); + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'Edit' +); + +select acs_sc_impl_alias__delete ( + 'portal_datasource', + 'bm_portlet', + 'RemoveSelfFromPage' +); + +--drop the binding +select acs_sc_binding__delete ( + 'portal_datasource', + 'bm_portlet' +); + +--drop the impl +select acs_sc_impl__delete ( + 'portal_datasource', + 'bm_portlet' +); Index: openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,137 @@ +-- +-- Copyright(C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the bulk-mail portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-05-13 +-- @version $Id: dotlrn-bm-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +select acs_sc_impl__new( + 'dotlrn_applet', -- impl contract name + 'dotlrn_bm', -- impl name + 'dotlrn_bm' -- impl owner name +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', -- impl contract name + 'dotlrn_bm', -- impl name + 'GetPrettyName', -- impl operation name + 'dotlrn_bm::get_pretty_name', -- impl alias + 'TCL' -- impl pl +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddApplet', + 'dotlrn_bm::add_applet', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveApplet', + 'dotlrn_bm::remove_applet', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddAppletToCommunity', + 'dotlrn_bm::add_applet_to_community', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveAppletFromCommunity', + 'dotlrn_bm::remove_applet_from_community', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddUser', + 'dotlrn_bm::add_user', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveUser', + 'dotlrn_bm::remove_user', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddUserToCommunity', + 'dotlrn_bm::add_user_to_community', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveUserFromCommunity', + 'dotlrn_bm::remove_user_from_community', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddPortlet', + 'dotlrn_bm::add_portlet', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemovePortlet', + 'dotlrn_bm::remove_portlet', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'dotlrn_applet', + 'dotlrn_bm', + 'Clone', + 'dotlrn_bm::clone', + 'TCL' +); + +select acs_sc_binding__new( + 'dotlrn_applet', --contract name + 'dotlrn_bm' --impl name +); + + + Index: openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bm/sql/postgresql/dotlrn-bm-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,110 @@ +-- +-- Copyright(C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- +-- +-- Drops the bulk-mail portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-05-13 +-- @version $Id: dotlrn-bm-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +select acs_sc_impl__delete( + 'dotlrn_applet', -- impl contract name + 'dotlrn_bm' -- impl name +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', -- impl contract name + 'dotlrn_bm', -- impl name + 'GetPrettyName' -- impl operation name +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddApplet' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveApplet' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddAppletToCommunity' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveAppletFromCommunity' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddUser' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveUser' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddUserToCommunity' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemoveUserFromCommunity' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'AddPortlet' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'RemovePortlet' +); + +select acs_sc_impl_alias__delete( + 'dotlrn_applet', + 'dotlrn_bm', + 'Clone' +); + +select acs_sc_binding__delete( + 'dotlrn_applet', --contract name + 'dotlrn_bm' --impl name +); + + Index: openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,164 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + + +-- +-- The forums applet for dotLRN +-- copyright 2001, OpenForce +-- distributed under GPL v2.0 +-- +-- +-- ben,arjun@openforce.net +-- +-- 10/05/2001 +-- redone for Forums by Ben 05/29/2002 +-- +-- ported to postgres by mohan pakkurti (mohan@pakkurti.com) +-- 2002-07-12 + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''dotlrn_forums'' + ); + + -- add all the hooks + + -- GetPrettyName + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''GetPrettyName'', + ''dotlrn_forums::get_pretty_name'', + ''TCL'' + ); + + -- AddApplet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddApplet'', + ''dotlrn_forums::add_applet'', + ''TCL'' + ); + + -- RemoveApplet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveApplet'', + ''dotlrn_forums::remove_applet'', + ''TCL'' + ); + + -- AddAppletToCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddAppletToCommunity'', + ''dotlrn_forums::add_applet_to_community'', + ''TCL'' + ); + + -- RemoveAppletFromCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveAppletFromCommunity'', + ''dotlrn_forums::remove_applet_from_community'', + ''TCL'' + ); + -- AddUser + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddUser'', + ''dotlrn_forums::add_user'', + ''TCL'' + ); + + -- RemoveUser + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveUser'', + ''dotlrn_forums::remove_user'', + ''TCL'' + ); + + -- AddUserToCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddUserToCommunity'', + ''dotlrn_forums::add_user_to_community'', + ''TCL'' + ); + + -- RemoveUserFromCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemoveUserFromCommunity'', + ''dotlrn_forums::remove_user_from_community'', + ''TCL'' + ); + + -- AddPortlet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''AddPortlet'', + ''dotlrn_forums::add_portlet'', + ''TCL'' + ); + + -- RemovePortlet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''RemovePortlet'', + ''dotlrn_forums::remove_portlet'', + ''TCL'' + ); + + -- Clone + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_forums'', + ''Clone'', + ''dotlrn_forums::clone'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_forums'' + ); + + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,148 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the research paper module dotLRN applet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-research-applet-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +-- create the implementation +select acs_sc_impl__new ( + 'dotlrn_applet', --impl_contract_name + 'dotlrn_research', --impl_name + 'dotlrn_research' --impl_owner_name +); + +-- GetPrettyName +select acs_sc_impl_alias__new ( + 'dotlrn_applet', --impl_contract_name + 'dotlrn_research', --impl_name + 'GetPrettyName', --impl_operation_name + 'dotlrn_research::get_pretty_name', --impl_alias + 'TCL' --impl_pl +); + +-- AddApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddApplet', + 'dotlrn_research::add_applet', + 'TCL' + ); + + -- RemoveApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveApplet', + 'dotlrn_research::remove_applet', + 'TCL' + ); + + -- AddAppletToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddAppletToCommunity', + 'dotlrn_research::add_applet_to_community', + 'TCL' + ); + + -- RemoveAppletFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveAppletFromCommunity', + 'dotlrn_research::remove_applet_from_community', + 'TCL' + ); + + -- AddUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddUser', + 'dotlrn_research::add_user', + 'TCL' + ); + + -- RemoveUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUser', + 'dotlrn_research::remove_user', + 'TCL' + ); + + -- AddUserToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddUserToCommunity', + 'dotlrn_research::add_user_to_community', + 'TCL' + ); + + -- RemoveUserFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUserFromCommunity', + 'dotlrn_research::remove_user_from_community', + 'TCL' + ); + + -- AddPortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddPortlet', + 'dotlrn_research::add_portlet', + 'TCL' + ); + + -- RemovePortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemovePortlet', + 'dotlrn_research::remove_portlet', + 'TCL' + ); + + -- Clone +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_research', + 'Clone', + 'dotlrn_research::clone', + 'TCL' + ); + +-- Add the binding +select acs_sc_binding__new ( + 'dotlrn_applet', --contract_name + 'dotlrn_research' --impl_name +); Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-applet-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,121 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Drops the research paper module dotLRN applet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-research-applet-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +select acs_sc_binding__delete ( + 'dotlrn_applet', --contract_name + 'dotlrn_research' --impl_name +); + +-- GetPrettyName +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', --impl_contract_name + 'dotlrn_research', --impl_name + 'GetPrettyName' --impl_operation_name +); + +-- AddApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddApplet' + ); + + -- RemoveApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveApplet' + ); + + -- AddAppletToCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddAppletToCommunity' + ); + + -- RemoveAppletFromCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveAppletFromCommunity' + ); + + -- AddUser +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddUser' + ); + + -- RemoveUser +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUser' + ); + + -- AddUserToCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddUserToCommunity' + ); + + -- RemoveUserFromCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemoveUserFromCommunity' + ); + + -- AddPortlet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'AddPortlet' + ); + + -- RemovePortlet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'RemovePortlet' + ); + + -- Clone +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_research', + 'Clone' + ); + +select acs_sc_impl__delete ( + 'dotlrn_applet', --impl_contract_name + 'dotlrn_research' --impl_name + ); Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,44 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the dotLRN research paper module +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-research-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create table dotlrn_research_papers ( + community_id integer constraint dotlrn_rp_community_id_fk + references dotlrn_communities_all (community_id) + constraint dotlrn_rp_community_id_nn + not null, + file_id integer constraint dotlrn_rp_file_id_fk + references cr_revisions (revision_id) + constraint dotlrn_rp_file_id_nn + not null, + constraint dotlrn_research_papers_pk + primary key (community_id, file_id) +); + +\i research-portlet-create.sql +\i research-admin-portlet-create.sql +\i dotlrn-research-applet-create.sql Index: openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/dotlrn-research-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,34 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the dotLRN research paper module +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-research-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +\i dotlrn-research-applet-drop.sql +\i research-admin-portlet-drop.sql; +\i research-portlet-drop.sql; + +drop table dotlrn_research_papers; + Index: openacs-4/packages/dotlrn-research/sql/postgresql/research-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/Attic/research-admin-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/research-admin-portlet-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,171 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the research paper module portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: research-admin-portlet-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''research_admin_portlet'', + ''Displays a list of research papers'' + ); + +-- the standard 4 params +-- shadeable_p +perform portal_datasource__set_def_param( + ds_id, --datasource_id + ''t'', --config_required_p + ''t'', --configured_p + ''shadeable_p'', --key + ''t'' --value +); + +-- hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- shaded_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + +-- link_hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + +-- party_id +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''party_id'', + '''' +); + +return 0; + +end; ' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + + +-- create the implementation +select acs_sc_impl__new( + 'portal_datasource', + 'research_admin_portlet', + 'research_admin_portlet' +); + + -- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'GetMyName', + 'research_admin_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'GetPrettyName', + 'research_admin_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'Link', + 'research_admin_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'AddSelfToPage', + 'research_admin_portlet::add_self_to_page', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'Show', + 'research_admin_portlet::show', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'Edit', + 'research_admin_portlet::edit', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_admin_portlet', + 'RemoveSelfFromPage', + 'research_admin_portlet::remove_self_from_page', + 'TCL' +); + + -- Add the binding +select acs_sc_binding__new( + 'portal_datasource', -- contract_name + 'research_admin_portlet' -- impl_name +); Index: openacs-4/packages/dotlrn-research/sql/postgresql/research-admin-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/Attic/research-admin-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/research-admin-portlet-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,108 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the research paper module portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: research-admin-portlet-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''research_admin_portlet''; + + if not found then + raise exception ''No datasource_id found here '',ds_id ; + ds_id := null; + end if; + + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + + +select acs_sc_binding__delete( + 'portal_datasource', --contract_name + 'research_admin_portlet' --impl_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', --impl_contract_name + 'research_admin_portlet', --impl_name + 'GetMyName' --impl_operation_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_admin_portlet', + 'GetPrettyName' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_admin_portlet', + 'Link' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_admin_portlet', + 'AddSelfToPage' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_admin_portlet', + 'Show' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_admin_portlet', + 'Edit' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_admin_portlet', + 'RemoveSelfFromPage' +); + +select acs_sc_impl__delete( + 'portal_datasource', --impl_contract_name + 'research_admin_portlet' --impl_name +); Index: openacs-4/packages/dotlrn-research/sql/postgresql/research-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/Attic/research-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/research-portlet-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,172 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the research paper module portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: research-portlet-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''research_portlet'', + ''Displays a list of research papers'' +); + + +-- the standard 4 params +-- shadeable_p +perform portal_datasource__set_def_param( + ds_id, --datasource_id + ''t'', --config_required_p + ''t'', --configured_p + ''shadeable_p'', --key + ''t'' --value +); + + -- hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + +-- user_editable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + +-- shaded_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + +-- link_hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + +-- party_id +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''party_id'', + '''' +); + +return 0; + +end; ' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + + +-- create the implementation +select acs_sc_impl__new( + 'portal_datasource', + 'research_portlet', + 'research_portlet' +); + +-- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'GetMyName', + 'research_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'GetPrettyName', + 'research_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'Link', + 'research_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'AddSelfToPage', + 'research_portlet::add_self_to_page', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'Show', + 'research_portlet::show', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'Edit', + 'research_portlet::edit', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'research_portlet', + 'RemoveSelfFromPage', + 'research_portlet::remove_self_from_page', + 'TCL' +); + + -- Add the binding +select acs_sc_binding__new( + 'portal_datasource', --contract_name + 'research_portlet' --impl_name +); Index: openacs-4/packages/dotlrn-research/sql/postgresql/research-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-research/sql/postgresql/Attic/research-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-research/sql/postgresql/research-portlet-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,107 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the research paper module portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: research-portlet-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''research_portlet''; + + if not found then + raise exception ''No datasource_id found here '',ds_id ; + ds_id := null; + end if; + + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + +select acs_sc_binding__delete( + 'portal_datasource', --contract_name + 'research_portlet' --impl_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', --impl_contract_name + 'research_portlet', --impl_name + 'MyName' --impl_operation_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_portlet', + 'GetPrettyName' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_portlet', + 'Link' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_portlet', + 'AddSelfToPage' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_portlet', + 'Show' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_portlet', + 'Edit' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'research_portlet', + 'RemoveSelfFromPage' +); + +select acs_sc_impl__delete( + 'portal_datasource', --impl_contract_name + 'research_portlet' --impl_name +); Index: openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-create.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,160 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- The dotlrn applet for the STATIC data portlet +-- copyright 2001, OpenForce +-- distributed under GPL v2.0 +-- +-- +-- arjun@openforce.net +-- +-- $Id: dotlrn-static-create.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- +create function inline_0() +returns integer as ' +begin + -- create the implementation + perform acs_sc_impl__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''dotlrn_static'' + ); + + -- add all the hooks + + -- GetPrettyName + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''GetPrettyName'', + ''dotlrn_static::get_pretty_name'', + ''TCL'' + ); + + -- AddApplet + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddApplet'', + ''dotlrn_static::add_applet'', + ''TCL'' + ); + + -- RemoveApplet + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveApplet'', + ''dotlrn_static::remove_applet'', + ''TCL'' + ); + + -- AddAppletToCommunity + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddAppletToCommunity'', + ''dotlrn_static::add_applet_to_community'', + ''TCL'' + ); + + -- RemoveAppletFromCommunity + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveAppletFromCommunity'', + ''dotlrn_static::remove_applet_from_community'', + ''TCL'' + ); + + -- AddUser + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddUser'', + ''dotlrn_static::add_user'', + ''TCL'' + ); + + -- RemoveUser + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveUser'', + ''dotlrn_static::remove_user'', + ''TCL'' + ); + + -- AddUserToCommunity + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddUserToCommunity'', + ''dotlrn_static::add_user_to_community'', + ''TCL'' + ); + + -- RemoveUserFromCommunity + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveUserFromCommunity'', + ''dotlrn_static::remove_user_from_community'', + ''TCL'' + ); + + -- AddPortlet + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', -- impl_contract_name + ''dotlrn_static'', -- impl_name + ''AddPortlet'', -- impl_operation_name + ''dotlrn_static::add_portlet'', -- impl_alias + ''TCL'' -- impl_pl + ); + + -- RemovePortlet + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemovePortlet'', + ''dotlrn_static::remove_portlet'', + ''TCL'' + ); + + -- Clone + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''Clone'', + ''dotlrn_static::clone'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_static'' + ); + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + Index: openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-static/sql/postgresql/dotlrn-static-drop.sql 15 Jul 2002 20:43:41 -0000 1.1 @@ -0,0 +1,144 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- The dotlrn applet for the STATIC data portlet +-- copyright 2001, OpenForce +-- distributed under GPL v2.0 +-- +-- +-- arjun@openforce.net +-- +-- $Id: dotlrn-static-drop.sql,v 1.1 2002/07/15 20:43:41 chak Exp $ +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- +create function inline_0() +returns integer as ' +begin + + perform acs_sc_impl__delete( + ''dotlrn_applet'', -- impl_contract_name + ''dotlrn_static'' -- impl_name + ); + + +-- delete all the hooks + +-- GetPrettyName + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''GetPrettyName'' + ); + + + -- AddApplet + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddApplet'' + ); + + + + -- RemoveApplet + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveApplet'' + ); + + -- AddAppletToCommunity + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddAppletToCommunity'' + ); + + + -- RemoveAppletFromCommunity + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveAppletFromCommunity'' + ); + + -- AddUser + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddUser'' + ); + + -- RemoveUser + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveUser'' + ); + + -- AddUserToCommunity + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''AddUserToCommunity'' + ); + + -- RemoveUserFromCommunity + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemoveUserFromCommunity'' + ); + + -- AddPortlet + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', -- impl_contract_name + ''dotlrn_static'', -- impl_name + ''AddPortlet'' -- impl_operation_name + ); + + -- RemovePortlet + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''RemovePortlet'' + ); + + -- Clone + perform acs_sc_impl_alias__delete ( + ''dotlrn_applet'', + ''dotlrn_static'', + ''Clone'' + ); + + + -- Remove the binding + perform acs_sc_binding__delete ( + ''dotlrn_applet'', + ''dotlrn_static'' + ); + + RAISE NOTICE '' Finished deleting dotlrn-static sc....''; + +return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,148 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the syllabus paper module dotLRN applet +-- +-- @author arjun (arjun@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-syllabus-applet-create.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +-- create the implementation +select acs_sc_impl__new ( + 'dotlrn_applet', --impl contract name + 'dotlrn_syllabus', --impl name + 'dotlrn_syllabus' --impl owner name + ); + +-- GetPrettyName +select acs_sc_impl_alias__new ( + 'dotlrn_applet', --impl contract name + 'dotlrn_syllabus', --impl name + 'GetPrettyName', --impl operation name + 'dotlrn_syllabus::get_pretty_name', --impl alias + 'TCL' --impl pl + ); + + -- AddApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddApplet', + 'dotlrn_syllabus::add_applet', + 'TCL' + ); + + -- RemoveApplet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveApplet', + 'dotlrn_syllabus::remove_applet', + 'TCL' + ); + + -- AddAppletToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddAppletToCommunity', + 'dotlrn_syllabus::add_applet_to_community', + 'TCL' + ); + + -- RemoveAppletFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveAppletFromCommunity', + 'dotlrn_syllabus::remove_applet_from_community', + 'TCL' + ); + + -- AddUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddUser', + 'dotlrn_syllabus::add_user', + 'TCL' + ); + + -- RemoveUser +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveUser', + 'dotlrn_syllabus::remove_user', + 'TCL' + ); + + -- AddUserToCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddUserToCommunity', + 'dotlrn_syllabus::add_user_to_community', + 'TCL' + ); + + -- RemoveUserFromCommunity +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveUserFromCommunity', + 'dotlrn_syllabus::remove_user_from_community', + 'TCL' +); + +-- AddPortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddPortlet', + 'dotlrn_syllabus::add_portlet', + 'TCL' +); + +-- RemovePortlet +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemovePortlet', + 'dotlrn_syllabus::remove_portlet', + 'TCL' +); + +-- Clone +select acs_sc_impl_alias__new ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'Clone', + 'dotlrn_syllabus::clone', + 'TCL' +); + +-- Add the binding +select acs_sc_binding__new ( + 'dotlrn_applet', --contract name + 'dotlrn_syllabus' --impl name +); Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-applet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,94 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Drops the syllabus module dotLRN applet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-syllabus-applet-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +select acs_sc_binding__delete ( + 'dotlrn_applet', --contract_name + 'dotlrn_syllabus' --impl_name +); + +-- GetPrettyName +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', --impl_contract_name + 'dotlrn_syllabus', --impl_name + 'GetPrettyName' --impl_operation_name +); + +-- AddApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddApplet' +); + +-- AddAppletToCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddAppletToCommunity' +); + +-- RemoveApplet +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveApplet' +); + +-- AddUser +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddUser' +); + +-- AddUserToCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'AddUserToCommunity' +); + +-- RemoveUser +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveUser' +); + +-- RemoveUserFromCommunity +select acs_sc_impl_alias__delete ( + 'dotlrn_applet', + 'dotlrn_syllabus', + 'RemoveUserFromCommunity' +); + +select acs_sc_impl__delete ( + 'dotlrn_applet', --impl_contract_name + 'dotlrn_syllabus' --impl_name +); + Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,31 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the dotLRN syllabus module +-- +-- @author arjun (arjun@openforce.net) +-- @version $Id: dotlrn-syllabus-create.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + + +\i syllabus-portlet-create.sql +\i syllabus-admin-portlet-create.sql +\i dotlrn-syllabus-applet-create.sql Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/dotlrn-syllabus-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,34 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the dotLRN syllabus module +-- +-- @author arjun (arjun@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: dotlrn-syllabus-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + + +\i dotlrn-syllabus-applet-drop.sql +\i syllabus-admin-portlet-drop.sql +\i syllabus-portlet-drop.sql + + Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-admin-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-admin-portlet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,162 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the syllabus module portlet +-- +-- @author arjun (arjun@openforce.net) +-- @version $Id: syllabus-admin-portlet-create.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''syllabus_admin_portlet'', + ''A syllabus'' + ); + + +-- the standard 4 params +-- shadeable_p +perform portal_datasource__set_def_param( + ds_id, --datasource id + ''t'', --config required p + ''t'', --configured p + ''shadeable_p'', --key + ''t'' --value +); + +-- hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- shaded_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- link_hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + +return 0; + +end; ' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + +-- create the implementation +select acs_sc_impl__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'syllabus_admin_portlet' +); + +-- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'GetMyName', + 'syllabus_admin_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'GetPrettyName', + 'syllabus_admin_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'Link', + 'syllabus_admin_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'AddSelfToPage', + 'syllabus_admin_portlet::add_self_to_page', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'Show', + 'syllabus_admin_portlet::show', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'Edit', + 'syllabus_admin_portlet::edit', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_admin_portlet', + 'RemoveSelfFromPage', + 'syllabus_admin_portlet::remove_self_from_page', + 'TCL' +); + + -- Add the binding +select acs_sc_binding__new( + 'portal_datasource', --contract name + 'syllabus_admin_portlet' --impl name +); + Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-admin-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-admin-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-admin-portlet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,107 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the syllabus module portlet +-- +-- @author arjun (arjun@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: syllabus-admin-portlet-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''syllabus_admin_portlet''; + + if not found then + raise exception ''No datasource_id found here '',ds_id ; + ds_id := null; + end if; + + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + +select acs_sc_binding__delete( + 'portal_datasource', --contract_name + 'syllabus_admin_portlet' --impl_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', --impl_contract_name + 'syllabus_admin_portlet', --impl_name + 'GetMyName' --impl_operation_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_admin_portlet', + 'GetPrettyName' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_admin_portlet', + 'Link' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_admin_portlet', + 'AddSelfToPage' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_admin_portlet', + 'Show' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_admin_portlet', + 'Edit' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_admin_portlet', + 'RemoveSelfFromPage' +); + +select acs_sc_impl__delete( + 'portal_datasource', --impl_contract_name + 'syllabus_admin_portlet' --impl_name +); Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-portlet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,160 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the syllabus module portlet +-- +-- @author arjun (arjun@openforce.net) +-- @version $Id: syllabus-portlet-create.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id = portal_datasource__new( + ''syllabus_portlet'', + ''A portlet for a syllabus of a class'' + ); + +-- the standard 4 params +-- shadeable_p +perform portal_datasource__set_def_param( + ds_id, --datasource id + ''t'', --config_required_p + ''t'', --configured_p + ''shadeable_p'', --key + ''t'' --value +); + +-- hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + +-- user_editable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + +-- shaded_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + +-- link_hideable_p +perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + +return 0; + +end; ' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + +-- create the implementation +select acs_sc_impl__new( + 'portal_datasource', + 'syllabus_portlet', + 'syllabus_portlet' +); + +-- add all the hooks +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'GetMyName', + 'syllabus_portlet::get_my_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'GetPrettyName', + 'syllabus_portlet::get_pretty_name', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'Link', + 'syllabus_portlet::link', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'AddSelfToPage', + 'syllabus_portlet::add_self_to_page', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'Show', + 'syllabus_portlet::show', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'Edit', + 'syllabus_portlet::edit', + 'TCL' +); + +select acs_sc_impl_alias__new( + 'portal_datasource', + 'syllabus_portlet', + 'RemoveSelfFromPage', + 'syllabus_portlet::remove_self_from_page', + 'TCL' +); + + -- Add the binding +select acs_sc_binding__new( + 'portal_datasource', --contract name + 'syllabus_portlet' --impl_name +); Index: openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-syllabus/sql/postgresql/syllabus-portlet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,108 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- Creates the syllabus paper module portlet +-- +-- @author arjun (arjun@openforce.net) +-- @creation-date 2002-02-24 +-- @version $Id: syllabus-portlet-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- Postgresql port adarsh@symphinity.com +-- +-- 11th July 2002 +-- + +create function inline_0 () +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''syllabus_portlet''; + + if not found then + raise exception ''No datasource_id found here '',ds_id ; + ds_id := null; + end if; + + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + + +select acs_sc_binding__delete( + 'portal_datasource', --contract_name + 'syllabus_portlet' --impl_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', -- impl_contract_name + 'syllabus_portlet', --impl_name + 'GetMyName' --impl_operation_name +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_portlet', + 'GetPrettyName' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_portlet', + 'Link' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_portlet', + 'AddSelfToPage' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_portlet', + 'Show' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_portlet', + 'Edit' +); + +select acs_sc_impl_alias__delete( + 'portal_datasource', + 'syllabus_portlet', + 'RemoveSelfFromPage' +); + +select acs_sc_impl__delete( + 'portal_datasource', --impl_contract_name + 'syllabus_portlet' --impl_name +); Index: openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,214 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- packages/forums-portlet/sql/forums-portlets-create.sql +-- + +-- Creates forums datasources for portal portlets + +-- Copyright (C) 2001 OpenForce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) +-- @creation-date 2001-30-09 + +-- $Id: forums-admin-portlet-create.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +-- ported to postgres by mohan pakkurti (mohan@pakkurti.com) +-- 2002-07-12 + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''forums_admin_portlet'', + ''Displays the forums_admin'' + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''f'' +); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + -- forums_admin-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' +); + +return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''forums_admin_portlet'' + ); + +return 0; +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''GetMyName'', + ''forums_admin_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''GetPrettyName'', + ''forums_admin_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''Link'', + ''forums_admin_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''AddSelfToPage'', + ''forums_admin_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''Show'', + ''forums_admin_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''Edit'', + ''forums_admin_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_admin_portlet'', + ''RemoveSelfFromPage'', + ''forums_admin_portlet::remove_self_from_page'', + ''TCL'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', + ''forums_admin_portlet'' + ); +return 0; +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + Index: openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,227 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- packages/forums-portlet/sql/forums-portlets-create.sql +-- + +-- Creates forums datasources for portal portlets + +-- Copyright (C) 2001 OpenForce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) +-- @creation-date 2001-30-09 + +-- $Id: forums-portlet-create.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +-- ported to postgres by mohan pakkurti (mohan@pakkurti.com) +-- 2002-07-12 + +-- \i forums-portlet-sc-create.sql + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new ( + ''forums_portlet'', + ''Displays the forums'' + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' + ); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' + ); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' + ); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' + ); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' + ); + + + -- forums-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' + ); + + -- do we show the community name or not? + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''display_group_name_p'', + ''t'' + ); +return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''portal_datasource'', + ''forums_portlet'', + ''forums_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''GetMyName'', + ''forums_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''GetPrettyName'', + ''forums_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''Link'', + ''forums_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''AddSelfToPage'', + ''forums_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''Show'', + ''forums_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''Edit'', + ''forums_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''forums_portlet'', + ''RemoveSelfFromPage'', + ''forums_portlet::remove_self_from_page'', + ''TCL'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', + ''forums_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + +\i forums-admin-portlet-create.sql + Index: openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,131 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- packages/forums-portlets/sql/forums-portlets-drop.sql +-- + +-- Drops forums datasources for portal portlets + +-- Copyright (C) 2001 Openforce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) +-- @creation-date 2001-30-09 + +-- $Id: forums-portlet-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +-- ported to postgres by mohan pakkurti (mohan@pakkurti.com) +-- 2002-07-12 + + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + +-- begin + select datasource_id into ds_id + from portal_datasources + where name = ''forums-portlet''; +-- exception when no_data_found then +-- ds_id := null; +-- end; + + if ds_id is not null then + portal_datasource__delete(ds_id); + end if; + +return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + + +create function inline_1() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''GetMyName'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''GetPrettyName'' + ); + + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''Link'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''AddSelfToPage'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''Show'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''Edit'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''forums_portlet'', + ''RemoveSelfFromPage'' + ); + + -- Drop the binding + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''forums_portlet'' + ); + + -- drop the impl + foo := acs_sc_impl__delete ( + ''portal_datasource'', + ''forums_portlet'' + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + + Index: openacs-4/packages/static-portlet/sql/postgresql/static-admin-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-admin-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-admin-portlet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,118 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- static-admin-portlet-drop.sql +-- + +-- Deletes a portal datasource for the static portlet factory +-- (admin interface) + +-- Copyright (C) 2001 OpenForce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: static-admin-portlet-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + + +create function inline_1() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''static_admin_portlet''; + + if not found then + RAISE EXCEPTION '' No datasource id found '', ds_id; + ds_id := null; + end if; + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + + -- drop the hooks + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''GetMyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''GetPrettyName'' + ); + + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''Link'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''AddSelfToPage'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''Show'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''Edit'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_admin_portlet'', + ''RemoveSelfFromPage'' + ); + + -- Drop the binding + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''static_admin_portlet'' + ); + + -- drop the impl + perform acs_sc_impl__delete ( + ''portal_datasource'', + ''static_admin_portlet'' + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + Index: openacs-4/packages/static-portlet/sql/postgresql/static-admin-portlet.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-admin-portlet.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-admin-portlet.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,190 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- static-admin-portlet.sql +-- + +-- Creates a portal datasource for the static portlet factory +-- (admin interface) + +-- Copyright (C) 2001 OpenForce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: static-admin-portlet.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''static_admin_portlet'', -- name + ''Displays the admin interface for the static data portlets'' -- Description + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''shadeable_p'', -- key + ''f'' -- value +); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + -- static-admin-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' +); + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + + +create function inline_1() +returns integer as ' +begin + -- create the implementation + perform acs_sc_impl__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''static_admin_portlet'' + ); + + -- add all the hooks + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''GetMyName'', + ''static_admin_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''GetPrettyName'', + ''static_admin_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''Link'', + ''static_admin_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''AddSelfToPage'', + ''static_admin_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''Show'', + ''static_admin_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''Edit'', + ''static_admin_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_admin_portlet'', + ''RemoveSelfFromPage'', + ''static_admin_portlet::remove_self_from_page'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', -- contract_name + ''static_admin_portlet'' -- impl_name + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); + +drop function inline_1(); Index: openacs-4/packages/static-portlet/sql/postgresql/static-core-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-core-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-core-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,126 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- static-core-drop.sql +-- +-- arjun@openforce.net +-- +-- The core DM and API for static portal content +-- +-- $Id: static-core-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + +--drop permissions +delete from acs_permissions where object_id in (select content_id from static_portal_content); + +--drop objects +create function inline_0 () +returns integer as ' +declare + object_rec record; +begin + for object_rec in select object_id from acs_objects where object_type=''static_portal_content'' + loop + perform acs_object__delete( object_rec.object_id ); + end loop; + + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + +-- +-- Datamodel +-- + + +drop table static_portal_content; + +-- +-- Objects +-- + + +create function inline_1() +returns integer as ' +begin + + perform acs_object_type__drop_type ( + ''static_portal_content'', -- object_type + ''t'' + ); + return 0; +end;' language 'plpgsql'; + +select inline_1(); + +drop function inline_1(); + +-- +-- API +-- + +drop function static_portal_content_item__new ( + integer, varchar, varchar, varchar, timestamp, integer,varchar, integer + ) ; +drop function static_portal_content_item__delete ( integer); + + +-- +-- perms +-- + +create function inline_2() +returns integer as ' +begin + + -- unbindbind privileges to global names + + perform acs_privilege__remove_child(''create'',''static_portal_create''); + perform acs_privilege__remove_child(''read'',''static_portal_read''); + perform acs_privilege__remove_child(''delete'',''static_portal_delete''); + perform acs_privilege__remove_child(''write'',''static_portal_modify''); + perform acs_privilege__remove_child(''admin'',''static_portal_admin''); + + -- set up the admin priv + + perform acs_privilege__remove_child(''static_portal_admin'', ''static_portal_create''); + perform acs_privilege__remove_child(''static_portal_admin'', ''static_portal_read''); + perform acs_privilege__remove_child(''static_portal_admin'', ''static_portal_delete''); + perform acs_privilege__remove_child(''static_portal_admin'', ''static_portal_modify''); + + + perform acs_privilege__drop_privilege(''static_portal_create''); + perform acs_privilege__drop_privilege(''static_portal_read''); + perform acs_privilege__drop_privilege(''static_portal_delete''); + perform acs_privilege__drop_privilege(''static_portal_modify''); + perform acs_privilege__drop_privilege(''static_portal_admin''); + + + return 0; +end;' language 'plpgsql'; + +select inline_2(); + +drop function inline_2(); + Index: openacs-4/packages/static-portlet/sql/postgresql/static-core.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-core.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-core.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,173 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- static-core.sql +-- +-- arjun@openforce.net +-- +-- The core DM and API for static portal content +-- +-- $Id: static-core.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ +-- +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + +-- +-- Objects +-- + + +create function inline_0() +returns integer as ' +begin + + perform acs_object_type__create_type ( + ''static_portal_content'', -- object_type + ''Static Content'', -- pretty_name + ''Static Content'', -- pretty_plural + ''acs_object'', -- supertype + ''static_portal_content'', -- table_name + ''content_id'', -- id_column + null, -- package_name + ''f'', -- abstract_p + null, -- type_extension_table + null -- name_method + ); + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + + +-- +-- Datamodel +-- +create table static_portal_content ( + content_id integer + constraint static_p_c_fk + references acs_objects(object_id) + constraint static_p_c_pk + primary key, + package_id integer + not null, + pretty_name varchar(100) + constraint static_p_c_pretty_name_nn + not null, + content varchar(4000) +); + + + +-- +-- API +-- + +create function static_portal_content_item__new ( + integer, -- package_id in static_portal_content.package_id%TYPE default null, + varchar, -- pretty_name in static_portal_content.pretty_name%TYPE default null, + varchar, -- content in static_portal_content.content%TYPE default null, + varchar, -- object_type in acs_objects.object_type%TYPE default [static_portal_content], + timestamp, -- creation_date in acs_objects.creation_date%TYPE default sysdate, + integer, -- creation_user in acs_objects.creation_user%TYPE default null, + varchar, -- creation_ip in acs_objects.creation_ip%TYPE default null, + integer -- context_id in acs_objects.context_id%TYPE default null + ) +returns integer as ' + declare + p_package_id alias for $1, + p_pretty_name alias for $2, + p_content alias for $3, + p_object_type alias for $4, + p_creation_date alias for $5, + p_creation_user alias for $6, + p_creation_ip alias for $7, + p_context_id alias for $8, + v_content_id static_portal_content.content_id%TYPE; + begin + v_content_id := acs_object__new ( + p_object_type, + p_creation_date, + p_creation_user, + p_creation_ip, + p_context_id + ); + + if p_object_type is null then + p_object_type := ''static_portal_content''; + end if; + + insert into static_portal_content + (content_id, package_id, pretty_name, content) + values + (v_content_id, p_package_id, p_pretty_name, p_content); + + return v_content_id; +end;' language 'plpgsql'; + + +create function static_portal_content_item__delete ( + integer -- content_id in static_portal_content.content_id%TYPE + ) +returns integer as ' +declare + p_content_id alias for $1; +begin + delete from static_portal_content where content_id = p_content_id; + acs_object__delete(p_content_id); + return 0; +end;' language 'plpgsql'; + + +-- +-- perms +-- + +create function inline_1() +returns integer as ' +begin + + perform acs_privilege__create_privilege(''static_portal_create''); + perform acs_privilege__create_privilege(''static_portal_read''); + perform acs_privilege__create_privilege(''static_portal_delete''); + perform acs_privilege__create_privilege(''static_portal_modify''); + perform acs_privilege__create_privilege(''static_portal_admin''); + + -- set up the admin priv + + perform acs_privilege__add_child(''static_portal_admin'', ''static_portal_create''); + perform acs_privilege__add_child(''static_portal_admin'', ''static_portal_read''); + perform acs_privilege__add_child(''static_portal_admin'', ''static_portal_delete''); + perform acs_privilege__add_child(''static_portal_admin'', ''static_portal_modify''); + + -- bind privileges to global names + + perform acs_privilege__add_child(''create'',''static_portal_create''); + perform acs_privilege__add_child(''read'',''static_portal_read''); + perform acs_privilege__add_child(''delete'',''static_portal_delete''); + perform acs_privilege__add_child(''write'',''static_portal_modify''); + perform acs_privilege__add_child(''admin'',''static_portal_admin''); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); + +drop function inline_1(); + Index: openacs-4/packages/static-portlet/sql/postgresql/static-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-portlet-create.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- +\i static-core.sql +\i static-portlet.sql +\i static-admin-portlet.sql Index: openacs-4/packages/static-portlet/sql/postgresql/static-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-portlet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- +\i static-core-drop.sql +\i static-portlet-portlet-drop.sql +\i static-admin-portlet-drop.sql Index: openacs-4/packages/static-portlet/sql/postgresql/static-portlet-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-portlet-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-portlet-portlet-drop.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,121 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- static-portlet-portlet-drop.sql +-- + +-- Deletes a portal datasource for the static portlet factory + +-- Copyright (C) 2001 OpenForce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: static-portlet-portlet-drop.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + + +create function inline_1() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id into ds_id + from portal_datasources + where name = ''static_portlet''; + + if not found then + RAISE EXCEPTION '' No datasource id found '', ds_id; + ds_id := null; + end if; + + if ds_id is NOT null then + perform portal_datasource__delete(ds_id); + end if; + + -- drop the hooks + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''GetMyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''GetPrettyName'' + ); + + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''Link'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''AddSelfToPage'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''Show'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''Edit'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''static_portlet'', + ''RemoveSelfFromPage'' + ); + + -- Drop the binding + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''static_portlet'' + ); + + -- drop the impl + perform acs_sc_impl__delete ( + ''portal_datasource'', + ''static_portlet'' + ); + + return 0; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + + + + + Index: openacs-4/packages/static-portlet/sql/postgresql/static-portlet.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/sql/postgresql/static-portlet.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/sql/postgresql/static-portlet.sql 15 Jul 2002 20:43:42 -0000 1.1 @@ -0,0 +1,201 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- 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. +-- + +-- +-- static-portlet.sql +-- + +-- Creates a portal datasource for the static portlet factory + +-- Copyright (C) 2001 OpenForce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) + +-- $Id: static-portlet.sql,v 1.1 2002/07/15 20:43:42 chak Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html +-- +-- PostGreSQL port samir@symphinity.com 11 July 2002 +-- + + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''static_portlet'', -- name + ''Displays static data portlet'' -- description + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''shadeable_p'', -- key + ''t'' -- value + ); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' + ); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' + ); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + -- static-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' +); + + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''f'', + ''content_id'', + '''' +); + + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + + +create function inline_1() +returns integer as ' +begin + + -- create the implementation + perform acs_sc_impl__new ( + ''portal_datasource'', + ''static_portlet'', + ''static_portlet'' + ); + + -- add all the hooks + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''GetMyName'', + ''static_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''GetPrettyName'', + ''static_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''Link'', + ''static_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''AddSelfToPage'', + ''static_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''Show'', + ''static_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''Edit'', + ''static_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''static_portlet'', + ''RemoveSelfFromPage'', + ''static_portlet::remove_self_from_page'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', -- contract_name + ''static_portlet'' -- impl_name + ); + + + return 0; +end;' language 'plpgsql'; + +select inline_1(); + +drop function inline_1();