application_link::new (public)

 application_link::new -this_package_id this_package_id \
    -target_package_id target_package_id

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

Create a new link between this_package_id and target_package_id.

Switches:
-this_package_id (required)
ID of the package that you want linked to the target package.
-target_package_id (required)
The ID of the target package.

Partial Call Graph (max 5 caller/called nodes):
%3 install::xml::action::application-link install::xml::action::application-link (private) application_link::new application_link::new install::xml::action::application-link->application_link::new ad_conn ad_conn (public) application_link::new->ad_conn db_exec_plsql db_exec_plsql (public) application_link::new->db_exec_plsql

Testcases:
No testcase defined.
Source code:
    if {[catch {ad_conn user_id} user_id]} {
        set user_id 0
    }

    if {[catch {ad_conn peeraddr} id_addr]} {
        set id_addr 127.0.0.1
    }

    set result [db_exec_plsql create_forward_link {}]
    db_exec_plsql create_backward_link {}

    return $result
Generic XQL file:
packages/acs-tcl/tcl/application-link-procs.xql

PostgreSQL XQL file:
<fullquery name="application_link::new.create_forward_link">
    <querytext>
		    select acs_rel__new (
					 null,
					 'application_link',
					 :this_package_id,
					 :target_package_id,
					 :this_package_id,
					 :user_id,
					 :id_addr
					 )
    </querytext>
</fullquery>

<fullquery name="application_link::new.create_backward_link">
    <querytext>
		    select acs_rel__new (
					 null,
					 'application_link',
					 :target_package_id,
					 :this_package_id,
					 :this_package_id,
					 :user_id,
					 :id_addr
					 )
    </querytext>
</fullquery>
packages/acs-tcl/tcl/application-link-procs-postgresql.xql

Oracle XQL file:
<fullquery name="application_link::new.create_forward_link">
    <querytext>
		    begin
		    :1 = acs_rel.new (
				      rel_id => null,
				      rel_type => 'application_link',
				      object_id_one => :this_package_id,
				      object_id_two => :target_package_id,
				      context_id => :this_package_id,
				      creation_user => :user_id,
				      creation_ip => :id_addr
				      );
		    end;
    </querytext>
</fullquery>

<fullquery name="application_link::new.create_backward_link">
    <querytext>
		    begin
		    :1 = acs_rel.new (
				      rel_id => null,
				      rel_type => 'application_link',
				      object_id_one => :target_package_id,
				      object_id_two => :this_package_id,
				      context_id => :this_package_id,
				      creation_user => :user_id,
				      creation_ip => :id_addr
				      );
		    end;
    </querytext>
</fullquery>
packages/acs-tcl/tcl/application-link-procs-oracle.xql

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