Index: openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl 4 Jun 2006 00:45:47 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl 27 Jul 2006 01:39:15 -0000 1.3 @@ -12,6 +12,12 @@ -this_object_id:required -target_object_id:required } { + Create a new data link between this_object_id and target_object_id. + + @param this_object_id ID of the object that you want linked to the target + object. + @param target_object_id The ID of the target object. +} { set forward_rel_id [db_nextval acs_data_links_seq] set backward_rel_id [db_nextval acs_data_links_seq] @@ -22,6 +28,12 @@ ad_proc -public application_data_link::delete_links { -object_id:required } { + Delete application data links for all objects linking to the given + object_id. + + @param object_id Object ID that you want application data links removed + from. +} { set rel_ids [db_list linked_objects {}] foreach rel_id $rel_ids { @@ -32,19 +44,39 @@ ad_proc -public application_data_link::get { -object_id:required } { + Retrieves a list of object_ids for all objects linked to the + given object_id. + + @return List of linked object ids. +} { return [db_list linked_objects {}] } ad_proc -public application_data_link::get_linked { -from_object_id:required -to_object_type:required } { + Gets the ID for the object linked to from_object_id and matches the + to_object_type. + + @param from_object_id Object ID of linked-from object. + @param to_object_type Object type of linked-to object. + + @return object_id of linked object. +} { return [db_list linked_object {}] } ad_proc -public application_data_link::get_linked_content { -from_object_id:required -to_content_type:required } { + Gets the content of the linked object. + + @param from_object_id Object ID of linked-from object. + @param to_content_type Content type of linked-to object. + + @return item_id for the content item. +} { return [db_list linked_object {}] } Index: openacs-4/packages/acs-tcl/tcl/application-link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/application-link-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/application-link-procs.tcl 4 Jun 2006 00:45:47 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/application-link-procs.tcl 27 Jul 2006 01:39:15 -0000 1.5 @@ -12,6 +12,12 @@ -this_package_id:required -target_package_id:required } { + Create a new link between this_package_id and target_package_id. + + @param this_package_id ID of the package that you want linked to the target + package. + @param target_package_id The ID of the target package. +} { if {[catch {ad_conn user_id} user_id]} { set user_id 0 } @@ -29,6 +35,12 @@ ad_proc -public application_link::delete_links { -package_id:required } { + Delete application links for all packages linking to the given + package_id. + + @param package_id Package ID that you want application links removed + from. +} { set rel_ids [db_list linked_packages {}] foreach rel_id $rel_ids { @@ -39,13 +51,26 @@ ad_proc -public application_link::get { -package_id:required } { + Retrieves a list of package_ids for all applications linked to the + given package_id. + + @return List of linked package ids. +} { return [db_list linked_packages {}] } ad_proc -public application_link::get_linked { -from_package_id:required -to_package_key:required } { + Gets the ID for the application linked to from_package_id and matches the + to_package_type. + + @param from_package_id Object ID of linked-from application. + @param to_package_type Object type of linked-to application. + + @return package_id of linked package. +} { return [db_list linked_package {}] }