forum::notification::get_url (private)

 forum::notification::get_url object_id

Defined in packages/forums/tcl/forum-reply-procs.tcl

Returns a full url to the object_id.
Handles messages and forums. This proc implements the GetURL operation of the NotificationType Service Contract and should not be invoked directly.

Parameters:
object_id

Partial Call Graph (max 5 caller/called nodes):
%3 AcsSc.notificationtype.geturl.forums_forum_moderator_notif_type AcsSc.notificationtype.geturl.forums_forum_moderator_notif_type (private) forum::notification::get_url forum::notification::get_url AcsSc.notificationtype.geturl.forums_forum_moderator_notif_type->forum::notification::get_url AcsSc.notificationtype.geturl.forums_forum_notif_type AcsSc.notificationtype.geturl.forums_forum_notif_type (private) AcsSc.notificationtype.geturl.forums_forum_notif_type->forum::notification::get_url AcsSc.notificationtype.geturl.forums_message_moderator_notif_type AcsSc.notificationtype.geturl.forums_message_moderator_notif_type (private) AcsSc.notificationtype.geturl.forums_message_moderator_notif_type->forum::notification::get_url AcsSc.notificationtype.geturl.forums_message_notif_type AcsSc.notificationtype.geturl.forums_message_notif_type (private) AcsSc.notificationtype.geturl.forums_message_notif_type->forum::notification::get_url ad_url ad_url (public) forum::notification::get_url->ad_url db_string db_string (public) forum::notification::get_url->db_string forum::message::get forum::message::get (public) forum::notification::get_url->forum::message::get

Testcases:
No testcase defined.
Source code:

    set object_type [db_string select_object_type {}]

    if {$object_type eq "forums_message" } {

            # object is a message
        set message_id $object_id
        forum::message::get -message_id $message_id -array message
        set forum_id $message(forum_id)
        set forum_url "[ad_url][db_string select_forums_package_url {}]"
        return ${forum_url}message-view?message_id=$message(root_message_id)

    } else {

        # object_type is a forum
        set forum_id $object_id
        set forum_url "[ad_url][db_string select_forums_package_url {}]"      
        return ${forum_url}forum-view?forum_id=$forum_id

        }
Generic XQL file:
<fullquery name="forum::notification::get_url.select_object_type">
    <querytext>	
	select object_type 
	from acs_objects
	where object_id = :object_id
        </querytext>
</fullquery>
packages/forums/tcl/forum-reply-procs.xql

PostgreSQL XQL file:
<fullquery name="forum::notification::get_url.select_forums_package_url">
    <querytext>
            select site_node__url(node_id) 
            from site_nodes
            where object_id = (select package_id
                               from forums_forums
                               where forums_forums.forum_id = :forum_id)
        </querytext>
</fullquery>
packages/forums/tcl/forum-reply-procs-postgresql.xql

Oracle XQL file:
<fullquery name="forum::notification::get_url.select_forums_package_url">
    <querytext>
            select site_node.url(node_id)
            from site_nodes
            where object_id = (select package_id
                               from forums_forums
                               where forums_forums.forum_id = :forum_id)
        </querytext>
</fullquery>
packages/forums/tcl/forum-reply-procs-oracle.xql

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