Index: openacs-4/packages/notifications/sql/oracle/delivery-method-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/Attic/delivery-method-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/sql/oracle/delivery-method-sc-create.sql 25 Jun 2002 20:23:32 -0000 1.1 @@ -0,0 +1,68 @@ + +-- +-- The Notifications Package +-- +-- @author Ben Adida (ben@openforce.net) +-- @version $Id: delivery-method-sc-create.sql,v 1.1 2002/06/25 20:23:32 ben Exp $ +-- +-- Copyright OpenForce, 2002. +-- +-- GNU GPL v2 +-- + +-- +-- The service contract for defining a delivery method +-- + +declare + foo integer; +begin + foo := acs_sc_contract.new ( + contract_name => 'NotificationDeliveryMethod', + contract_desc => 'Notification Delivery Method' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationDeliveryMethod.Send.InputType', + msg_type_spec => 'to_user_id:integer,reply_object_id:integer,notification_type_id:integer,subject:string,content:string' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationDeliveryMethod.Send.OutputType', + msg_type_spec => '' + ); + + foo := acs_sc_operation.new ( + contract_name => 'NotificationDeliveryMethod', + operation_name => 'Send', + operation_desc => 'send a notification', + operation_iscachable_p => 'f', + operation_nargs => 5, + operation_inputtype => 'NotificationDeliveryMethod.Send.InputType', + operation_outputtype => 'NotificationDeliveryMethod.Send.OutputType' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationDeliveryMethod.ScanReplies.InputType', + msg_type_spec => '' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationDeliveryMethod.ScanReplies.OutputType', + msg_type_spec => '' + ); + + foo := acs_sc_operation.new ( + contract_name => 'NotificationDeliveryMethod', + operation_name => 'ScanReplies', + operation_desc => 'scan for replies', + operation_iscachable_p => 'f', + operation_nargs => 0, + operation_inputtype => 'NotificationDeliveryMethod.ScanReplies.InputType', + operation_outputtype => 'NotificationDeliveryMethod.ScanReplies.OutputType' + ); + +end; +/ +show errors + Index: openacs-4/packages/notifications/sql/oracle/email-sc-impl-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/Attic/email-sc-impl-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/sql/oracle/email-sc-impl-create.sql 25 Jun 2002 20:23:32 -0000 1.1 @@ -0,0 +1,61 @@ + +-- +-- The Notifications Package +-- +-- @author Ben Adida (ben@openforce.net) +-- @version $Id: email-sc-impl-create.sql,v 1.1 2002/06/25 20:23:32 ben Exp $ +-- +-- Copyright OpenForce, 2002. +-- +-- GNU GPL v2 +-- + +-- +-- The service contract implementation for email +-- + +declare + impl_id integer; + foo integer; +begin + + impl_id := acs_sc_impl.new ( + 'NotificationDeliveryMethod', + 'notification_email', + 'notifications' + ); + + foo := acs_sc_impl.new_alias ( + 'NotificationDeliveryMethod', + 'notification_email' + 'Send', + 'notification::email::send', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'NotificationDeliveryMethod', + 'notification_email' + 'ScanReplies', + 'notification::email::scan_replies', + 'TCL' + ); + + foo := acs_sc_binding.new ( + contract_name => 'NotificationDeliveryMethod', + impl_name => 'notification_email' + ); + + foo:= notification_delivery_method.new( + short_name => 'email', + sc_impl_id => impl_id, + pretty_name => 'Email', + creation_user => null, + creation_ip => null + ); + + +end; +/ +show errors + Index: openacs-4/packages/notifications/sql/oracle/notification-type-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/Attic/notification-type-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/sql/oracle/notification-type-sc-create.sql 25 Jun 2002 20:23:32 -0000 1.1 @@ -0,0 +1,68 @@ + +-- +-- The Notifications Package +-- +-- @author Ben Adida (ben@openforce.net) +-- @version $Id: notification-type-sc-create.sql,v 1.1 2002/06/25 20:23:32 ben Exp $ +-- +-- Copyright OpenForce, 2002. +-- +-- GNU GPL v2 +-- + +-- +-- The service contract for a notification type +-- + +declare + foo integer; +begin + foo := acs_sc_contract.new ( + contract_name => 'NotificationType', + contract_desc => 'Notification Type' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationType.GetURL.InputType', + msg_type_spec => 'object_id:integer' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationType.GetURL.OutputType', + msg_type_spec => 'url:string' + ); + + foo := acs_sc_operation.new ( + contract_name => 'NotificationType', + operation_name => 'GetURL', + operation_desc => 'gets the URL for an object in this notification type', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'NotificationType.GetURL.InputType', + operation_outputtype => 'NotificationType.GetURL.OutputType' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationType.ProcessReply.InputType', + msg_type_spec => 'reply_id:integer' + ); + + foo := acs_sc_msg_type.new ( + msg_type_name => 'NotificationType.ProcessReply.OutputType', + msg_type_spec => 'success_p:boolean' + ); + + foo := acs_sc_operation.new ( + contract_name => 'NotificationType', + operation_name => 'ProcessReply', + operation_desc => 'Process a single reply', + operation_iscachable_p => 'f', + operation_nargs => 1, + operation_inputtype => 'NotificationType.ProcessReply.InputType', + operation_outputtype => 'NotificationType.ProcessReply.OutputType' + ); + +end; +/ +show errors + Index: openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 25 Jun 2002 18:58:06 -0000 1.5 +++ openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 25 Jun 2002 20:23:32 -0000 1.6 @@ -51,7 +51,7 @@ constraint notif_type_type_id_pk primary key, sc_impl_id integer not null - constraint notif_deliv_meth_impl_id_fk + constraint notif_type_impl_id_fk references acs_sc_impls(impl_id), short_name varchar(100) constraint notif_type_short_name_nn Index: openacs-4/packages/notifications/sql/oracle/notifications-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/notifications/sql/oracle/notifications-create.sql 25 Jun 2002 18:58:06 -0000 1.4 +++ openacs-4/packages/notifications/sql/oracle/notifications-create.sql 25 Jun 2002 20:23:32 -0000 1.5 @@ -16,5 +16,6 @@ -- @ notifications-interval-sc-create.sql -- @ notifications-delivery-sc-create.sql +@ delivery-method-sc-create.sql @ notifications-init.sql @ email-sc-impl-create.sql