application-data-link-procs.tcl

Procs of application data linking

Location:
packages/acs-tcl/tcl/application-data-link-procs.tcl
Created:
2005-05-23
Author:
Timo Hentschel <timo@timohentschel.de>

Procedures in this file

Detailed information

application_data_link::delete_from_list (public)

 application_data_link::delete_from_list [ -object_id object_id ] \
    [ -link_object_id_list link_object_id_list ] \
    [ -relation_tag relation_tag ]

Delete references

Switches:
-object_id (optional)
Object to delete links from
-link_object_id_list (optional)
List of linked object_ids to delete
-relation_tag (optional)
Relationship identifier
Author:
Dave Bauer <dave@solutiongrove.com>
Created:
2006-08-31

Partial Call Graph (max 5 caller/called nodes):
%3 application_data_link::update_links_from application_data_link::update_links_from (public) application_data_link::delete_from_list application_data_link::delete_from_list application_data_link::update_links_from->application_data_link::delete_from_list db_dml db_dml (public) application_data_link::delete_from_list->db_dml

Testcases:
No testcase defined.

application_data_link::delete_links (public)

 application_data_link::delete_links -object_id object_id \
    [ -relation_tag relation_tag ]

Delete application data links for all objects linking to the given object_id. Optionally delete by object_id and relation_tag.

Switches:
-object_id (required)
Object ID that you want application data links removed from.
-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::delete_links application_data_link::delete_links test_data_links_with_tag->application_data_link::delete_links db_dml db_dml (public) application_data_link::delete_links->db_dml db_list db_list (public) application_data_link::delete_links->db_list

Testcases:
data_links_with_tag

application_data_link::exist_link (public)

 application_data_link::exist_link -object_id object_id \
    -target_object_id target_object_id [ -relation_tag relation_tag ]

Check for the existence of a link from an object_id to a target_object_id, with optional relation_tag.

Switches:
-object_id (required)
The object we're looking for a link from
-target_object_id (required)
The object we're looking for a link to
-relation_tag (optional)
Relationship identifier

Partial Call Graph (max 5 caller/called nodes):
%3 application_data_link::new application_data_link::new (public) application_data_link::exist_link application_data_link::exist_link application_data_link::new->application_data_link::exist_link application_data_link::get application_data_link::get (public) application_data_link::exist_link->application_data_link::get

Testcases:
No testcase defined.

application_data_link::get (public)

 application_data_link::get -object_id object_id \
    [ -relation_tag relation_tag ]

Retrieves a list of object_ids for all objects linked to the given object_id, tagged with the optional relation_tag.

Switches:
-object_id (required)
Retrieve objects linked to this object_id
-relation_tag (optional)
Relationship identifier.
Returns:
List of linked object ids.

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_with_tag data_links_with_tag (test acs-tcl) application_data_link::get application_data_link::get test_data_links_with_tag->application_data_link::get db_list db_list (public) application_data_link::get->db_list application_data_link::exist_link application_data_link::exist_link (public) application_data_link::exist_link->application_data_link::get

Testcases:
data_links_with_tag

application_data_link::get_linked (public)

 application_data_link::get_linked -from_object_id from_object_id \
    -to_object_type to_object_type [ -relation_tag relation_tag ]

Gets the ID for the object linked to from_object_id and matches the to_object_type. Optionally, pass a relationship tag.

Switches:
-from_object_id (required)
Object ID of linked-from object.
-to_object_type (required)
Object type of linked-to object.
-relation_tag (optional)
Relationship identifier
Returns:
object_id of linked object.

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_with_tag data_links_with_tag (test acs-tcl) application_data_link::get_linked application_data_link::get_linked test_data_links_with_tag->application_data_link::get_linked application_data_link::get_linked_not_cached application_data_link::get_linked_not_cached (private) application_data_link::get_linked->application_data_link::get_linked_not_cached util_memoize util_memoize (public) application_data_link::get_linked->util_memoize packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->application_data_link::get_linked

Testcases:
data_links_with_tag

application_data_link::get_linked_content (public)

 application_data_link::get_linked_content \
    -from_object_id from_object_id -to_content_type to_content_type \
    [ -relation_tag relation_tag ]

Gets the content of the linked object.

Switches:
-from_object_id (required)
Object ID of linked-from object.
-to_content_type (required)
Content type of linked-to object.
-relation_tag (optional)
Returns:
item_id for the content item.

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_with_tag data_links_with_tag (test acs-tcl) application_data_link::get_linked_content application_data_link::get_linked_content test_data_links_with_tag->application_data_link::get_linked_content application_data_link::get_linked_content_not_cached application_data_link::get_linked_content_not_cached (private) application_data_link::get_linked_content->application_data_link::get_linked_content_not_cached util_memoize util_memoize (public) application_data_link::get_linked_content->util_memoize

Testcases:
data_links_with_tag

application_data_link::get_linked_content_not_cached (private)

 application_data_link::get_linked_content_not_cached \
    -from_object_id from_object_id -to_content_type to_content_type \
    [ -relation_tag relation_tag ]

Gets the content of the linked object.

Switches:
-from_object_id (required)
Object ID of linked-from object.
-to_content_type (required)
Content type of linked-to object.
-relation_tag (optional)
Returns:
item_id for the content item.

Partial Call Graph (max 5 caller/called nodes):
%3 application_data_link::get_linked_content application_data_link::get_linked_content (public) application_data_link::get_linked_content_not_cached application_data_link::get_linked_content_not_cached application_data_link::get_linked_content->application_data_link::get_linked_content_not_cached db_list db_list (public) application_data_link::get_linked_content_not_cached->db_list

Testcases:
No testcase defined.

application_data_link::get_linked_not_cached (private)

 application_data_link::get_linked_not_cached \
    -from_object_id from_object_id -to_object_type to_object_type \
    [ -relation_tag relation_tag ]

Gets the ID for the object linked to from_object_id and matches the to_object_type. Optionally, pass a relationship tag.

Switches:
-from_object_id (required)
Object ID of linked-from object.
-to_object_type (required)
Object type of linked-to object.
-relation_tag (optional)
Relationship identifier
Returns:
object_id of linked object.

Partial Call Graph (max 5 caller/called nodes):
%3 application_data_link::get_linked application_data_link::get_linked (public) application_data_link::get_linked_not_cached application_data_link::get_linked_not_cached application_data_link::get_linked->application_data_link::get_linked_not_cached db_list db_list (public) application_data_link::get_linked_not_cached->db_list

Testcases:
No testcase defined.

application_data_link::get_links_from (public)

 application_data_link::get_links_from -object_id object_id \
    [ -to_type to_type ] [ -relation_tag relation_tag ]

Get a list of objects that are linked from an object, possible using the relation_tag. If to_type is a subtype of content_revision, we lookup content_items that have that content_type

Switches:
-object_id (required)
object_id one, get objects linked from this object
-to_type (optional)
object_type of the objects to get links to
-relation_tag (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_update_links data_links_update_links (test acs-tcl) application_data_link::get_links_from application_data_link::get_links_from test_data_links_update_links->application_data_link::get_links_from test_data_links_update_links_with_tag data_links_update_links_with_tag (test acs-tcl) test_data_links_update_links_with_tag->application_data_link::get_links_from content::type::is_content_type content::type::is_content_type (public) application_data_link::get_links_from->content::type::is_content_type db_list db_list (public) application_data_link::get_links_from->db_list db_map db_map (public) application_data_link::get_links_from->db_map application_data_link::update_links_from application_data_link::update_links_from (public) application_data_link::update_links_from->application_data_link::get_links_from

Testcases:
data_links_update_links, data_links_update_links_with_tag

application_data_link::get_links_to (public)

 application_data_link::get_links_to -object_id object_id \
    [ -from_type from_type ] [ -relation_tag relation_tag ]

Get a list of objects that are linked to an object, possible using the relation_tag. If from_type is a subtype of content_revision, we lookup content_items that have that content_type

Switches:
-object_id (required)
object_id two, get objects linked to this object
-from_type (optional)
object_type of the objects to get links from
-relation_tag (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 content::type::is_content_type content::type::is_content_type (public) db_list db_list (public) db_map db_map (public) application_data_link::get_links_to application_data_link::get_links_to application_data_link::get_links_to->content::type::is_content_type application_data_link::get_links_to->db_list application_data_link::get_links_to->db_map

Testcases:
No testcase defined.

application_data_link::link_exists (public)

 application_data_link::link_exists [ -from_object_id from_object_id ] \
    [ -to_object_id to_object_id ] [ -relation_tag relation_tag ]

Check if a link exists, only checks in the direction requested. Optionally check if the link has the given tag.

Switches:
-from_object_id (optional)
-to_object_id (optional)
-relation_tag (optional)
Returns:
0 or 1
Author:
Dave Bauer <dave@solutiongrove.com>
Created:
2006-08-31

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_with_tag data_links_with_tag (test acs-tcl) application_data_link::link_exists application_data_link::link_exists test_data_links_with_tag->application_data_link::link_exists db_0or1row db_0or1row (public) application_data_link::link_exists->db_0or1row application_data_link::update_links_from application_data_link::update_links_from (public) application_data_link::update_links_from->application_data_link::link_exists

Testcases:
data_links_with_tag

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 ]

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

application_data_link::new_from (public)

 application_data_link::new_from -object_id object_id \
    -to_object_id to_object_id [ -relation_tag relation_tag ]

Create a new data link between this_object_id and target_object_id.

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

Partial Call Graph (max 5 caller/called nodes):
%3 application_data_link::new application_data_link::new (public) application_data_link::new_from application_data_link::new_from application_data_link::new->application_data_link::new_from application_data_link::update_links_from application_data_link::update_links_from (public) application_data_link::update_links_from->application_data_link::new_from db_dml db_dml (public) application_data_link::new_from->db_dml db_nextval db_nextval (public) application_data_link::new_from->db_nextval util_memoize_flush_regexp util_memoize_flush_regexp (public) application_data_link::new_from->util_memoize_flush_regexp

Testcases:
No testcase defined.

application_data_link::new_to (public)

 application_data_link::new_to -object_id object_id \
    -from_object_id from_object_id [ -relation_tag relation_tag ]

Create a new data link between this_object_id and target_object_id.

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

Partial Call Graph (max 5 caller/called nodes):
%3 application_data_link::new application_data_link::new (public) application_data_link::new_to application_data_link::new_to application_data_link::new->application_data_link::new_to db_dml db_dml (public) application_data_link::new_to->db_dml db_nextval db_nextval (public) application_data_link::new_to->db_nextval util_memoize_flush_regexp util_memoize_flush_regexp (public) application_data_link::new_to->util_memoize_flush_regexp

Testcases:
No testcase defined.

application_data_link::relation_tag_where_clause (public)

 application_data_link::relation_tag_where_clause \
    [ -relation_tag relation_tag ]

Utility proc to return relation tag where clause fragment. We show all object links regardless of tag if relation_tag is empty string.

Switches:
-relation_tag (optional)
Relationship identifier

Partial Call Graph (max 5 caller/called nodes):
%3 db_map db_map (public) application_data_link::relation_tag_where_clause application_data_link::relation_tag_where_clause application_data_link::relation_tag_where_clause->db_map

Testcases:
No testcase defined.

application_data_link::scan_for_links (public)

 application_data_link::scan_for_links [ -text text ]

Search for object references within text Supports /o/ /file/ /image/ object URL formats

Switches:
-text (optional)
Text to scan for object links
Returns:
List of linked object_ids
Author:
Dave Bauer <dave@solutiongrove.com>
Created:
2006-08-31

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_scan_links data_links_scan_links (test acs-tcl) application_data_link::scan_for_links application_data_link::scan_for_links test_data_links_scan_links->application_data_link::scan_for_links test_data_links_scan_links_with_tag data_links_scan_links_with_tag (test acs-tcl) test_data_links_scan_links_with_tag->application_data_link::scan_for_links test_data_links_update_links data_links_update_links (test acs-tcl) test_data_links_update_links->application_data_link::scan_for_links test_data_links_update_links_with_tag data_links_update_links_with_tag (test acs-tcl) test_data_links_update_links_with_tag->application_data_link::scan_for_links ad_url ad_url (public) application_data_link::scan_for_links->ad_url db_list db_list (public) application_data_link::scan_for_links->db_list application_data_link::update_links_from application_data_link::update_links_from (public) application_data_link::update_links_from->application_data_link::scan_for_links

Testcases:
data_links_scan_links, data_links_update_links, data_links_scan_links_with_tag, data_links_update_links_with_tag

application_data_link::update_links_from (public)

 application_data_link::update_links_from [ -object_id object_id ] \
    [ -text text ] [ -link_object_ids link_object_ids ] \
    [ -relation_tag relation_tag ]

Update the references to this object in the database, optionally update links using the given relation_tag.

Switches:
-object_id (optional)
Object_id to update
-text (optional)
Text to scan for references
-link_object_ids (optional)
List of object ids to update the links to. Links not in this list will be deleted, and any in this list that are not in the database will be added.
-relation_tag (optional)
Relationship identifier
Returns:
List of updated linked object_ids
Author:
Dave Bauer <dave@solutiongrove.com>
Created:
2006-08-31

Partial Call Graph (max 5 caller/called nodes):
%3 test_data_links_update_links data_links_update_links (test acs-tcl) application_data_link::update_links_from application_data_link::update_links_from test_data_links_update_links->application_data_link::update_links_from test_data_links_update_links_with_tag data_links_update_links_with_tag (test acs-tcl) test_data_links_update_links_with_tag->application_data_link::update_links_from application_data_link::delete_from_list application_data_link::delete_from_list (public) application_data_link::update_links_from->application_data_link::delete_from_list application_data_link::get_links_from application_data_link::get_links_from (public) application_data_link::update_links_from->application_data_link::get_links_from application_data_link::link_exists application_data_link::link_exists (public) application_data_link::update_links_from->application_data_link::link_exists application_data_link::new_from application_data_link::new_from (public) application_data_link::update_links_from->application_data_link::new_from application_data_link::scan_for_links application_data_link::scan_for_links (public) application_data_link::update_links_from->application_data_link::scan_for_links Class ::xowiki::WikiForm Class ::xowiki::WikiForm (public) Class ::xowiki::WikiForm->application_data_link::update_links_from

Testcases:
data_links_update_links, data_links_update_links_with_tag
[ show source ]