Index: openacs-4/packages/fs-portlet/sql/oracle/fs-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/oracle/fs-portlet-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/fs-portlet/sql/oracle/fs-portlet-create.sql 14 Nov 2001 21:59:53 -0000 1.5 +++ openacs-4/packages/fs-portlet/sql/oracle/fs-portlet-create.sql 17 Nov 2001 21:36:43 -0000 1.6 @@ -1,15 +1,13 @@ -- -- /fs-portlet/sql/oracle/fs-portlet-create.sql -- - -- Creates fs portlet - -- Copyright (C) 2001 OpenForce, Inc. -- @author Arjun Sanyal (arjun@openforce.net) -- @creation-date 2001-30-09 - +-- -- $Id$ - +-- -- 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 @@ -19,12 +17,51 @@ begin ds_id := portal_datasource.new( name => 'fs-portlet', - link => 'file-storage', - description => 'Displays the given folder_id ', - content => 'fs_portlet::show', - configurable_p => 't' + description => 'Displays the given folder_id' ); + -- the standard 4 params + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 't' +); + + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' +); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' +); + + + -- fs-specific params + -- community_id must be configured portal_datasource.set_def_param ( datasource_id => ds_id, @@ -43,16 +80,113 @@ value => '' ); - -- shaded_p - portal_datasource.set_def_param ( - datasource_id => ds_id, - config_required_p => 't', - configured_p => 't', - key => 'shaded_p', - value => 'f' -); end; / show errors +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl.new ( + 'portal_datasource', + 'fs_portlet', + 'fs_portlet' + ); + +end; +/ +show errors + +declare + foo integer; +begin + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'MyName', + 'fs_portlet::my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'GetPrettyName', + 'fs_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'Link', + 'fs_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'AddSelfToPage', + 'fs_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'Show', + 'fs_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'Edit', + 'fs_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'RemoveSelfFromPage', + 'fs_portlet::remove_self_from_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'MakeSelfAvailable', + 'fs_portlet::make_self_available', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'fs_portlet', + 'MakeSelfUnavailable', + 'fs_portlet::make_self_unavailable', + 'TCL' + ); +end; +/ +show errors + +declare + foo integer; +begin + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'fs_portlet' + ); +end; +/ +show errors +