• Publicity: Public Only All

notification-reply-procs.tcl

Notification Replies. When a user replies to a notification, this reply must be stored and handled appropriately. These procs help to manage such handling.

Location:
packages/notifications/tcl/notification-reply-procs.tcl
Created:
2002-06-02
Author:
Ben Adida
CVS Identification:
$Id: notification-reply-procs.tcl,v 1.6.2.2 2022/07/12 14:08:53 antoniop Exp $

Procedures in this file

Detailed information

notification::reply::delete (public)

 notification::reply::delete -reply_id reply_id

delete a reply, usually after it's been processed.

Switches:
-reply_id
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 notification::reply::sweep::process_all_replies notification::reply::sweep::process_all_replies (private) notification::reply::delete notification::reply::delete notification::reply::sweep::process_all_replies->notification::reply::delete db_exec_plsql db_exec_plsql (public) notification::reply::delete->db_exec_plsql

Testcases:
No testcase defined.

notification::reply::get (public)

 notification::reply::get -reply_id reply_id -array array

Get the information for the reply in a Tcl array

Switches:
-reply_id
(required)
-array
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 forum::notification::process_reply forum::notification::process_reply (private) notification::reply::get notification::reply::get forum::notification::process_reply->notification::reply::get db_1row db_1row (public) notification::reply::get->db_1row

Testcases:
No testcase defined.

notification::reply::new (public)

 notification::reply::new [ -reply_id reply_id ] -object_id object_id \
    -type_id type_id -from_user from_user -subject subject \
    -content content [ -reply_date reply_date ]

store a new reply

Switches:
-reply_id
(optional)
-object_id
(required)
-type_id
(required)
-from_user
(required)
-subject
(required)
-content
(required)
-reply_date
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 callback::acs_mail_lite::incoming_email::impl::notifications callback::acs_mail_lite::incoming_email::impl::notifications (private) notification::reply::new notification::reply::new callback::acs_mail_lite::incoming_email::impl::notifications->notification::reply::new notification::email::load_qmail_mail_queue notification::email::load_qmail_mail_queue (private) notification::email::load_qmail_mail_queue->notification::reply::new package_instantiate_object package_instantiate_object (public) notification::reply::new->package_instantiate_object

Testcases:
No testcase defined.
[ hide source ] | [ make this the default ]

Content File Source

ad_library {

    Notification Replies.

    When a user replies to a notification, this reply must be stored and handled appropriately.
    These procs help to manage such handling.

    @creation-date 2002-06-02
    @author Ben Adida <ben@openforce.biz>
    @cvs-id $Id: notification-reply-procs.tcl,v 1.6.2.2 2022/07/12 14:08:53 antoniop Exp $

}

namespace eval notification::reply {

    d_proc -public new {
        {-reply_id ""}
        {-object_id:required}
        {-type_id:required}
        {-from_user:required}
        {-subject:required}
        {-content:required}
        {-reply_date ""}
    } {
        store a new reply
    } {
        # Truncate subject to 100 chars, which is the limit in the data model (for some obscure reason)
        set subject [string range $subject 0 99]

        set extra_vars [ns_set create s \
                            reply_id $reply_id \
                            object_id $object_id \
                            type_id $type_id \
                            from_user $from_user \
                            subject $subject \
                            content $content \
                            reply_date $reply_date \
                           ]

        set reply_id [package_instantiate_object -extra_vars $extra_vars notification_reply]

        return $reply_id
    }

    d_proc -public get {
        {-reply_id:required}
        {-array:required}
    } {
        Get the information for the reply in a Tcl array
    } {
        # Select the info into the upvar'ed Tcl Array
        upvar $array row
        db_1row select_reply {} -column_array row
    }

    d_proc -public delete {
        {-reply_id:required}
    } {
        delete a reply, usually after it's been processed.
    } {
        db_exec_plsql delete_reply {}
    }

}

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: