notification::type::new (public)

 notification::type::new [ -all_intervals ] [ -all_delivery_methods ] \
    [ -type_id type_id ] -sc_impl_id sc_impl_id -short_name short_name \
    -pretty_name pretty_name [ -description description ]

Defined in packages/notifications/tcl/notification-type-procs.tcl

create a new notification type. Must provide a service contract implementation ID.

Switches:
-all_intervals (optional, boolean, defaults to "0")
-all_delivery_methods (optional, boolean, defaults to "0")
-type_id (optional)
-sc_impl_id (required)
-short_name (required)
-pretty_name (required)
-description (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 faq::apm_callback::create_all_faq_type faq::apm_callback::create_all_faq_type (private) notification::type::new notification::type::new faq::apm_callback::create_all_faq_type->notification::type::new faq::apm_callback::create_one_faq_type faq::apm_callback::create_one_faq_type (private) faq::apm_callback::create_one_faq_type->notification::type::new forum::install::create_moderator_notification_types forum::install::create_moderator_notification_types (private) forum::install::create_moderator_notification_types->notification::type::new forum::install::create_user_notification_types forum::install::create_user_notification_types (private) forum::install::create_user_notification_types->notification::type::new news::install::create_news_item_type news::install::create_news_item_type (private) news::install::create_news_item_type->notification::type::new db_dml db_dml (public) notification::type::new->db_dml package_instantiate_object package_instantiate_object (public) notification::type::new->package_instantiate_object

Testcases:
No testcase defined.
Source code:
        set extra_vars [ns_set create s  type_id $type_id  sc_impl_id $sc_impl_id  short_name $short_name  pretty_name $pretty_name  description $description  ]

        set type_id [package_instantiate_object -extra_vars $extra_vars notification_type]

        if { $all_intervals_p } {
            db_dml enable_all_intervals {}
        }

        if { $all_delivery_methods_p } {
            db_dml enable_all_delivery_methods {}
        }

        acs::per_thread_cache flush -pattern notifications.get_type_id($short_name)

        return $type_id
Generic XQL file:
<fullquery name="notification::type::new.enable_all_intervals">
    <querytext>
        insert into notification_types_intervals
        (type_id, interval_id)
        select :type_id, interval_id
        from   notification_intervals
    </querytext>
</fullquery>

<fullquery name="notification::type::new.enable_all_delivery_methods">
    <querytext>
        insert into notification_types_del_methods
        (type_id, delivery_method_id)
        select :type_id, delivery_method_id
        from   notification_delivery_methods
    </querytext>
</fullquery>
packages/notifications/tcl/notification-type-procs.xql

PostgreSQL XQL file:
packages/notifications/tcl/notification-type-procs-postgresql.xql

Oracle XQL file:
packages/notifications/tcl/notification-type-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: