application_data_link::new (public)

 application_data_link::new -this_object_id this_object_id \
    -target_object_id target_object_id [ -relation_tag relation_tag ]

Defined in packages/acs-tcl/tcl/application-data-link-procs.tcl

Create a new data link between this_object_id and target_object_id.

Switches:
-this_object_id (required)
ID of the object that you want linked to the target object.
-target_object_id (required)
The ID of the target object.
-relation_tag (optional)
Relationship identifier

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_with_tag data_links_with_tag (test acs-tcl) application_data_link::new application_data_link::new test_data_links_with_tag->application_data_link::new application_data_link::exist_link application_data_link::exist_link (public) application_data_link::new->application_data_link::exist_link application_data_link::new_from application_data_link::new_from (public) application_data_link::new->application_data_link::new_from application_data_link::new_to application_data_link::new_to (public) application_data_link::new->application_data_link::new_to callback::pm::project_new::impl::file_storage callback::pm::project_new::impl::file_storage (private) callback::pm::project_new::impl::file_storage->application_data_link::new callback::pm::project_new::impl::forums callback::pm::project_new::impl::forums (private) callback::pm::project_new::impl::forums->application_data_link::new packages/bug-tracker/www/related-file-add.tcl packages/bug-tracker/ www/related-file-add.tcl packages/bug-tracker/www/related-file-add.tcl->application_data_link::new

Testcases:
data_links_with_tag
Source code:
    if { [catch {
        application_data_link::new_from  -object_id $this_object_id  -to_object_id $target_object_id  -relation_tag $relation_tag

        application_data_link::new_to  -object_id $this_object_id  -from_object_id $target_object_id  -relation_tag $relation_tag

    }]}  {
        # check if error occurred because of existing link
        if { [application_data_link::exist_link -object_id $this_object_id -target_object_id $target_object_id -relation_tag $relation_tag] eq "1" } {
            ns_log Debug "application_data_link::new: link already exists"
        } else {
            ns_log Error "application_data_link::new: link creation failure"
        }
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/application-data-link-procs.xql

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