Index: openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/sql/postgresql/dotlrn-fs-create.sql 9 Jul 2002 20:11:22 -0000 1.1 @@ -0,0 +1,167 @@ +-- +-- 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 fs applet for dotLRN +-- copyright 2001, OpenForce +-- distributed under GPL v2.0 +-- +-- +-- ben,arjun@openforce.net +-- +-- 10/05/2001 +-- + +-- @author dan chak (chak@openforce.net) +-- ported to postgres 2002-07-09 + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''dotlrn_fs'' + ); + + -- add all the hooks + + -- GetPrettyName + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''GetPrettyName'', + ''dotlrn_fs::get_pretty_name'', + ''TCL'' + ); + + -- AddApplet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''AddApplet'', + ''dotlrn_fs::add_applet'', + ''TCL'' + ); + + -- RemoveApplet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''RemoveApplet'', + ''dotlrn_fs::remove_applet'', + ''TCL'' + ); + + -- AddAppletToCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''AddAppletToCommunity'', + ''dotlrn_fs::add_applet_to_community'', + ''TCL'' + ); + + -- RemoveAppletFromCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''RemoveAppletFromCommunity'', + ''dotlrn_fs::remove_applet_from_community'', + ''TCL'' + ); + + -- AddUser + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''AddUser'', + ''dotlrn_fs::add_user'', + ''TCL'' + ); + + -- RemoveUser + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''RemoveUser'', + ''dotlrn_fs::remove_user'', + ''TCL'' + ); + + -- AddUserToCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''AddUserToCommunity'', + ''dotlrn_fs::add_user_to_community'', + ''TCL'' + ); + + -- RemoveUserFromCommunity + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''RemoveUserFromCommunity'', + ''dotlrn_fs::remove_user_from_community'', + ''TCL'' + ); + + -- AddPortlet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''AddPortlet'', + ''dotlrn_fs::add_portlet'', + ''TCL'' + ); + + -- RemovePortlet + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''RemovePortlet'', + ''dotlrn_fs::remove_portlet'', + ''TCL'' + ); + + -- Clone + foo := acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_fs'', + ''Clone'', + ''dotlrn_fs::clone'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_fs'' + ); + + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql 9 Jul 2002 20:10:24 -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 fs contents portlet +-- +-- @author Arjun Sanyal(arjun@openforce.net) +-- @version $Id: fs-contents-portlet-create.sql,v 1.1 2002/07/09 20:10:24 chak Exp $ +-- + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; + foo integer; +begin + + ds_id := portal_datasource__new( + ''fs_contents_portlet'', + ''Displays one fs folder in a table'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' + ); + + 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'', + ''folder_id'', + '''' + ); + + -- create the implementation + foo := acs_sc_impl__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''fs_contents_portlet'' + ); + + -- add all the hooks + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''GetMyName'', + ''fs_contents_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''GetPrettyName'', + ''fs_contents_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''Link'', + ''fs_contents_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''AddSelfToPage'', + ''fs_contents_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''Show'', + ''fs_contents_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''Edit'', + ''fs_contents_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_contents_portlet'', + ''RemoveSelfFromPage'', + ''fs_contents_portlet::remove_self_from_page'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new( + ''portal_datasource'', + ''fs_contents_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + + Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql 9 Jul 2002 20:10:24 -0000 1.1 @@ -0,0 +1,180 @@ +-- +-- 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 file-storage portlet +-- +-- @author Arjun Sanyal(arjun@openforce.net) +-- @creation-date 2001-30-09 +-- @version $Id: fs-portlet-create.sql,v 1.1 2002/07/09 20:10:24 chak Exp $ +-- +-- @author dan chak (chak@openforce.net) +-- ported to postgres 2002-07-09 + +\i fs-contents-portlet-create.sql + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; + foo integer; + begin + + ds_id := portal_datasource__new( + ''fs_portlet'', + ''Displays the given folder_id'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' + ); + + 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'', + ''scoped_p'', + ''t'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''folder_id'', + '''' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''contents_url'', + '''' + ); + + -- create the implementation + foo := acs_sc_impl__new( + ''portal_datasource'', + ''fs_portlet'', + ''fs_portlet'' + ); + + -- add all the hooks + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''GetMyName'', + ''fs_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''GetPrettyName'', + ''fs_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''Link'', + ''fs_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''AddSelfToPage'', + ''fs_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''Show'', + ''fs_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''Edit'', + ''fs_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new( + ''portal_datasource'', + ''fs_portlet'', + ''RemoveSelfFromPage'', + ''fs_portlet::remove_self_from_page'', + ''TCL'' + ); + + -- Add the binding + perform acs_sc_binding__new( + ''portal_datasource'', + ''fs_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql 9 Jul 2002 20:10:24 -0000 1.1 @@ -0,0 +1,125 @@ +-- +-- 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. +-- + +-- +-- /fs-portlet/sql/oracle/fs-portlet-drop.sql +-- + +-- Drops fs portlet + +-- Copyright (C) 2001 Openforce, Inc. +-- @author Arjun Sanyal (arjun@openforce.net) +-- @creation-date 2001-30-09 + +-- $Id: fs-portlet-drop.sql,v 1.1 2002/07/09 20:10:24 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 + +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 = ''fs-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_0() +returns integer as ' +declare + foo integer; +begin + + -- drop the hooks + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''GetMyName'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''GetPrettyName'' + ); + + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''Link'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''AddSelfToPage'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''Show'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''Edit'' + ); + + foo := acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''fs-portlet'', + ''RemoveSelfFromPage'' + ); + + -- Drop the binding + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''fs-portlet'' + ); + + -- drop the impl + foo := acs_sc_impl__delete ( + ''portal_datasource'', + ''fs-portlet'' + ); + + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); +