Home
The Toolkit for Online Communities
17605 Community Members, 0 members online, 2750 visitors today
Log In Register
OpenACS Home : ACS API Browser : ACS Tcl 5.5.1 : application-data-link-procs.tcl
Publicity:
[Public Only | All]

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
 

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.
 

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
 

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.
 

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.
 

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.
 

application_data_link::get_linked_content_not_cached (public)

 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.
 

application_data_link::get_linked_not_cached (public)

 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.
 

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)
 

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)
 

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 directon 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
 

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
 

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
 

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
 

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
 

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
 

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)
-relation_tag (optional)
Relationship identifier
Returns:
List of updated linked object_ids
Author:
Dave Bauer <dave@solutiongrove.com>
Created:
2006-08-31
 

[ show source ]