Index: openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql,v diff -u -r1.3 -r1.3.4.1 --- openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql 17 May 2005 17:53:36 -0000 1.3 +++ openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-admin-portlet-create.sql 21 Sep 2006 08:51:50 -0000 1.3.4.1 @@ -3,149 +3,146 @@ -- Creates LORS Management portlet -- -- @author Ernie Ghiglione (ErnieG@mm.st) --- @creation-date 2004-04-10 +-- Adapted for Oracle by Mario Aguado +-- @author Mario Aguado +-- @creation-date 20/09/2006 -- @cvs-id $Id$ -- -create function inline_0 () -returns integer as ' declare ds_id portal_datasources.datasource_id%TYPE; begin - ds_id = portal_datasource__new( - ''lorsm_admin_portlet'', - ''Displays a folder_id'' - ); + ds_id := portal_datasource.new( + name => 'lorsm_admin_portlet', + description => 'Displays a folder_id' + ); -RAISE NOTICE '' created new ds''; - - perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''f'' + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 'f' ); -RAISE NOTICE '' set shadeable''; - perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''f'' + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 'f' ); -RAISE NOTICE '' set hideable''; - perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' ); - perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' ); - perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' ); - perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''f'', - ''package_id'', - '' '' + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'package_id', + value => ' ' ); + +end; +/ +show errors; - -return 0; - -end;' language 'plpgsql'; - - - -select inline_0(); - -drop function inline_0 (); - +declare + foo integer; +begin -- create the implementation -select acs_sc_impl__new ( - 'portal_datasource', - 'lorsm_admin_portlet', - 'lorsm_admin_portlet' -); + foo := acs_sc_impl.new ( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_pretty_name => 'lorsm_admin_portlet', + impl_owner_name => 'lorsm_admin_portlet' + ); -- add all the hooks -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'GetMyName', - 'lorsm_admin_portlet::get_my_name', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'GetMyName', + impl_alias => 'lorsm_admin_portlet::get_my_name', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'GetPrettyName', - 'lorsm_admin_portlet::get_pretty_name', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'GetPrettyName', + impl_alias => 'lorsm_admin_portlet::get_pretty_name', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'Link', - 'lorsm_admin_portlet::link', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'Link', + impl_alias => 'lorsm_admin_portlet::link', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'AddSelfToPage', - 'lorsm_admin_portlet::add_self_to_page', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'AddSelfToPage', + impl_alias => 'lorsm_admin_portlet::add_self_to_page', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'Show', - 'lorsm_admin_portlet::show', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'Show', + impl_alias => 'lorsm_admin_portlet::show', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'Edit', - 'lorsm_admin_portlet::edit', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'Edit', + impl_alias => 'lorsm_admin_portlet::edit', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_admin_portlet', - 'RemoveSelfFromPage', - 'lorsm_admin_portlet::remove_self_from_page', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet', + impl_operation_name => 'RemoveSelfFromPage', + impl_alias => 'lorsm_admin_portlet::remove_self_from_page', + impl_pl => 'TCL' + ); -- Add the binding -select acs_sc_binding__new( - 'portal_datasource', - 'lorsm_admin_portlet' -); + acs_sc_binding.new( + contract_name => 'portal_datasource', + impl_name => 'lorsm_admin_portlet' + ); +end; +/ +show errors; \ No newline at end of file Index: openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql,v diff -u -r1.3 -r1.3.4.1 --- openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql 17 May 2005 17:53:36 -0000 1.3 +++ openacs-4/packages/lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql 21 Sep 2006 08:51:50 -0000 1.3.4.1 @@ -1,156 +1,159 @@ --- /lorsm-portlet/sql/postgresql/lorsm-portlet-create.sql +-- packages/lorsm-portlet/sql/oracle/lorsm-portlet-create.sql -- -- Creates LORS Management portlet -- -- @author Ernie Ghiglione (ErnieG@mm.st) --- @creation-date 2004-04-10 +-- Adapted for Oracle by Mario Aguado +-- @author Mario Aguado +-- @creation-date 20/09/2006 -- @cvs-id $Id$ -- -create function inline_0 () -returns integer as ' declare ds_id portal_datasources.datasource_id%TYPE; begin - ds_id = portal_datasource__new( - ''lorsm_portlet'', - ''Displays a Folder_id'' + ds_id := portal_datasource.new( + name => 'lorsm_portlet', + description => 'Displays a Folder_id' ); -perform portal_datasource__set_def_param( - ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''t'' -); + portal_datasource.set_def_param( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 't' + ); -perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' -); + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' + ); -perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' -); + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' + ); -perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' -); + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' + ); -perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' -); + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' + ); -perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''t'', - ''style'', - ''list'' -); + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'style', + value => 'list' + ); -perform portal_datasource__set_def_param ( - ds_id, - ''t'', - ''f'', - ''package_id'', - '' '' -); + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'package_id', + value => ' ' + ); -return 0; +end; +/ +show errors; -end; ' language 'plpgsql'; - -select inline_0 (); - -drop function inline_0 (); - +declare + foo integer; +begin -- create the implementation -select acs_sc_impl__new( - 'portal_datasource', - 'lorsm_portlet', - 'lorsm_portlet' -); + foo := acs_sc_impl.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_pretty_name => 'lorsm_portlet', + impl_owner_name => 'lorsm_portlet' + ); -- add all the hooks -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'GetMyName', - 'lorsm_portlet::get_my_name', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'GetMyName', + impl_alias => 'lorsm_portlet::get_my_name', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'GetPrettyName', - 'lorsm_portlet::get_pretty_name', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'GetPrettyName', + impl_alias => 'lorsm_portlet::get_pretty_name', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'Link', - 'lorsm_portlet::link', - 'TCL' -); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'Link', + impl_alias => 'lorsm_portlet::link', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'AddSelfToPage', - 'lorsm_portlet::add_self_to_page', - 'TCL' - ); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'AddSelfToPage', + impl_alias => 'lorsm_portlet::add_self_to_page', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'Show', - 'lorsm_portlet::show', - 'TCL' - ); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'Show', + impl_alias => 'lorsm_portlet::show', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'Edit', - 'lorsm_portlet::edit', - 'TCL' - ); + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'Edit', + impl_alias => 'lorsm_portlet::edit', + impl_pl => 'TCL' + ); + + foo := acs_sc_impl_alias.new( + impl_contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet', + impl_operation_name => 'RemoveSelfFromPage', + impl_alias => 'lorsm_portlet::remove_self_from_page', + impl_pl => 'TCL' + ); -select acs_sc_impl_alias__new( - 'portal_datasource', - 'lorsm_portlet', - 'RemoveSelfFromPage', - 'lorsm_portlet::remove_self_from_page', - 'TCL' - ); - -- Add the binding -select acs_sc_binding__new ( - 'portal_datasource', - 'lorsm_portlet' -); + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'lorsm_portlet' + ); +end; +/ +show errors; -\i lorsm-admin-portlet-create.sql +@@ lorsm-admin-portlet-create.sql