content-item-procs.tcl

Tcl API for cr_items in the content repository

Location:
packages/acs-content-repository/tcl/content-item-procs.tcl
Created:
2004-05-28
Authors:
Dave Bauer <dave@thedesignexperience.org>
Jun Yamog
CVS Identification:
$Id: content-item-procs.tcl,v 1.38.2.12 2023/10/30 14:46:58 antoniop Exp $

Procedures in this file

Detailed information

content::item::content_is_null (public)

 content::item::content_is_null revision_id

Determines if the content for the revision is null (not mereley zero-length)

Parameters:
revision_id (required)
The revision id
Returns:
1 if the content is null, 0 otherwise

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::content_is_null content::item::content_is_null test_content_item->content::item::content_is_null db_string db_string (public) content::item::content_is_null->db_string publish::write_content publish::write_content (public) publish::write_content->content::item::content_is_null

Testcases:
content_item

content::item::content_methods_by_type (public)

 content::item::content_methods_by_type [ -get_labels ] content_type

Determines all the valid content methods for instantiating a content type. Possible choices are text_entry, file_upload, no_content and xml_import. Currently, this proc merely removes the text_entry method if the item does not have a text mime type registered to it. In the future, a more sophisticated mechanism will be implemented.

Switches:
-get_labels (optional, boolean)
Return not just a list of types, but a list of name-value pairs, as in the -options ATS switch for form widgets
Parameters:
content_type (required)
The content type
Returns:
A Tcl list of all possible content methods

Partial Call Graph (max 5 caller/called nodes):
%3 db_list db_list (public) content::item::content_methods_by_type content::item::content_methods_by_type content::item::content_methods_by_type->db_list

Testcases:
No testcase defined.

content::item::content_type (public, deprecated)

 content::item::content_type -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Switches:
-item_id (required)
The item_id of the content item
Returns:
The content type of the item, or an empty string if no such item exists
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) content::item::get_content_type content::item::get_content_type (public) content::item::content_type content::item::content_type content::item::content_type->ad_log_deprecated content::item::content_type->content::item::get_content_type

Testcases:
No testcase defined.

content::item::copy (public)

 content::item::copy -item_id item_id \
    -target_folder_id target_folder_id \
    [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
    [ -name name ]
Switches:
-item_id (required)
- item_id of the content to be copied from. source content item
-target_folder_id (required)
- destination folder where the new content item is be passed
-creation_user (optional)
-
-creation_ip (optional)
-
-name (optional)
- the name of the new item, useful if you are copying in the same folder.
Returns:
item_id of the new copied item
Author:
Jun Yamog
Created:
2004-06-27 copy a content item to a new content item

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::copy content::item::copy test_content_item->content::item::copy package_exec_plsql package_exec_plsql (public) content::item::copy->package_exec_plsql packages/file-storage/www/move.tcl packages/file-storage/ www/move.tcl packages/file-storage/www/move.tcl->content::item::copy

Testcases:
content_item

content::item::delete (public)

 content::item::delete -item_id item_id
Switches:
-item_id (required)
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-05-28 Delete a content item from the database. If the content item to delete has children content items referencing its parent via acs_objects.context_id then this proc will fail.

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_image content_image (test acs-content-repository) content::item::delete content::item::delete test_content_image->content::item::delete test_content_item content_item (test acs-content-repository) test_content_item->content::item::delete test_content_revision content_revision (test acs-content-repository) test_content_revision->content::item::delete content::revision::cleanup content::revision::cleanup (private) content::item::delete->content::revision::cleanup content::revision::collect_cleanup_data content::revision::collect_cleanup_data (private) content::item::delete->content::revision::collect_cleanup_data db_1row db_1row (public) content::item::delete->db_1row db_transaction db_transaction (public) content::item::delete->db_transaction package_exec_plsql package_exec_plsql (public) content::item::delete->package_exec_plsql acs_user::erase_portrait acs_user::erase_portrait (public) acs_user::erase_portrait->content::item::delete bug_tracker::bug::delete bug_tracker::bug::delete (public) bug_tracker::bug::delete->content::item::delete content::extlink::delete content::extlink::delete (public) content::extlink::delete->content::item::delete general_comments_delete_messages general_comments_delete_messages (public) general_comments_delete_messages->content::item::delete packages/bug-tracker/www/related-file-delete.tcl packages/bug-tracker/ www/related-file-delete.tcl packages/bug-tracker/www/related-file-delete.tcl->content::item::delete

Testcases:
content_image, content_item, content_revision

content::item::get (public)

 content::item::get -item_id item_id [ -revision revision ] \
    [ -array_name array_name ]

Get an item.

Switches:
-item_id (required)
-revision (optional, defaults to "live")
live, latest
-array_name (optional, defaults to "content_item")
name of array to upvar content into
Returns:
upvars array_name containing all attributes of the content type except content
returns 0 if item does not exists or 1 if query was successful
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-05-28

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_folder content_folder (test acs-content-repository) content::item::get content::item::get test_content_folder->content::item::get test_content_item content_item (test acs-content-repository) test_content_item->content::item::get acs_object_type::get acs_object_type::get (public) content::item::get->acs_object_type::get acs_object_type::get_table_name acs_object_type::get_table_name (public) content::item::get->acs_object_type::get_table_name content::item::get_content_type content::item::get_content_type (public) content::item::get->content::item::get_content_type db_0or1row db_0or1row (public) content::item::get->db_0or1row fs::item_editable_info fs::item_editable_info (public, deprecated) fs::item_editable_info->content::item::get fs::publish_versioned_object_to_file_system fs::publish_versioned_object_to_file_system (public) fs::publish_versioned_object_to_file_system->content::item::get packages/acs-subsite/lib/home.tcl packages/acs-subsite/ lib/home.tcl packages/acs-subsite/lib/home.tcl->content::item::get packages/acs-subsite/www/shared/portrait-bits.tcl packages/acs-subsite/ www/shared/portrait-bits.tcl packages/acs-subsite/www/shared/portrait-bits.tcl->content::item::get packages/acs-subsite/www/user/portrait/upload.tcl packages/acs-subsite/ www/user/portrait/upload.tcl packages/acs-subsite/www/user/portrait/upload.tcl->content::item::get

Testcases:
content_folder, content_item

content::item::get_best_revision (public)

 content::item::get_best_revision -item_id item_id

Attempts to retrieve the live revision for the item. If no live revision exists, attempts to retrieve the latest revision. If the item has no revisions, returns an empty string.

Switches:
-item_id (required)
The item_id of the content item
Returns:
The best revision_id for the item, or an empty string if no revisions exist
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) content::item::get_best_revision content::item::get_best_revision test_cr_item_search_triggers->content::item::get_best_revision package_exec_plsql package_exec_plsql (public) content::item::get_best_revision->package_exec_plsql content::init content::init (public) content::init->content::item::get_best_revision image::resize image::resize (public) image::resize->content::item::get_best_revision packages/forums/lib/message/attachment-list.tcl packages/forums/ lib/message/attachment-list.tcl packages/forums/lib/message/attachment-list.tcl->content::item::get_best_revision packages/general-comments/www/admin/delete.tcl packages/general-comments/ www/admin/delete.tcl packages/general-comments/www/admin/delete.tcl->content::item::get_best_revision packages/general-comments/www/delete.tcl packages/general-comments/ www/delete.tcl packages/general-comments/www/delete.tcl->content::item::get_best_revision

Testcases:
cr_item_search_triggers

content::item::get_content (public)

 content::item::get_content [ -revision_id revision_id ] \
    [ -item_id item_id ] -array array

Create a onerow datasource called content in the calling frame which contains all attributes for the revision (including inherited ones).

The datasource will contain a column called "text", representing the main content (blob) of the revision, but only if the revision has a textual mime-type.

Switches:
-revision_id (optional)
The revision whose attributes are to be retrieved
-item_id (optional)
The item_id of the corresponding item. You can provide this as an optimization. If you don't provide revision_id, you must provide item_id, and the item must have a live revision.
-array (required)
Returns:
1 on success (and set the array in the calling frame), 0 on failure
See Also:
  • proc content::item::get_content_type

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_image content_image (test acs-content-repository) content::item::get_content content::item::get_content test_content_image->content::item::get_content test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) test_content_item_nested_structure->content::item::get_content test_content_revision content_revision (test acs-content-repository) test_content_revision->content::item::get_content content::item::get_live_revision content::item::get_live_revision (public) content::item::get_content->content::item::get_live_revision content::item::get_revision_content content::item::get_revision_content (public) content::item::get_content->content::item::get_revision_content content::revision::item_id content::revision::item_id (public) content::item::get_content->content::revision::item_id

Testcases:
content_image, content_item_nested_structure, content_revision

content::item::get_content_type (public)

 content::item::get_content_type -item_id item_id

Retrieves the content type of the item. If the item does not exist, returns an empty string.

Switches:
-item_id (required)
The item_id of the content item
Returns:
The content type of the item, or an empty string if no such item exists

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::get_content_type content::item::get_content_type test_content_item->content::item::get_content_type package_exec_plsql package_exec_plsql (public) content::item::get_content_type->package_exec_plsql content::init content::init (public) content::init->content::item::get_content_type content::item::content_type content::item::content_type (public, deprecated) content::item::content_type->content::item::get_content_type content::item::get content::item::get (public) content::item::get->content::item::get_content_type content::revision::new content::revision::new (public) content::revision::new->content::item::get_content_type oacs_dav::handle_request oacs_dav::handle_request (public) oacs_dav::handle_request->content::item::get_content_type

Testcases:
content_item

content::item::get_context (public, deprecated)

 content::item::get_context -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Switches:
-item_id (required)
Returns:
NUMBER(38)

Partial Call Graph (max 5 caller/called nodes):
%3 acs_object::get_element acs_object::get_element (public) ad_log_deprecated ad_log_deprecated (public) content::item::get_context content::item::get_context content::item::get_context->acs_object::get_element content::item::get_context->ad_log_deprecated

Testcases:
No testcase defined.

content::item::get_descendants (public)

 content::item::get_descendants -parent_id parent_id [ -depth depth ]

Returns the ids of every content item that is descendant of supplied parent_id.

Switches:
-parent_id (required)
-depth (optional)
how deep we should go in the hierarchy. 1 means direct children. Returns every descendant when not specified.
Returns:
list of cr_items.item_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::get_descendants content::item::get_descendants test_content_item_nested_structure->content::item::get_descendants db_list db_list (public) content::item::get_descendants->db_list

Testcases:
content_item_nested_structure

content::item::get_id (public)

 content::item::get_id -item_path item_path \
    [ -root_folder_id root_folder_id ] \
    [ -resolve_index resolve_index ]

Looks up the item_path starting with the root folder and returns item_id for that content item or empty, if none exists

Switches:
-item_path (required)
-root_folder_id (optional)
-resolve_index (optional)
Returns:
The item_id of the found item, or the empty string on failure

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::get_id content::item::get_id test_content_item->content::item::get_id test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) test_cr_item_search_triggers->content::item::get_id test_image_new image_new (test acs-content-repository) test_image_new->content::item::get_id package_exec_plsql package_exec_plsql (public) content::item::get_id->package_exec_plsql attachments::richtext::require_root_folder attachments::richtext::require_root_folder (private) attachments::richtext::require_root_folder->content::item::get_id content::init content::init (public) content::init->content::item::get_id fs::get_item_id fs::get_item_id (public) fs::get_item_id->content::item::get_id image::get_size_item_id image::get_size_item_id (private) image::get_size_item_id->content::item::get_id packages/file-storage/www/folder-add.tcl packages/file-storage/ www/folder-add.tcl packages/file-storage/www/folder-add.tcl->content::item::get_id

Testcases:
image_new, content_item, cr_item_search_triggers

content::item::get_id_by_name (public)

 content::item::get_id_by_name -name name -parent_id parent_id

Returns The item_id of the content item with the passed in name

Switches:
-name (required)
Name of the content item
-parent_id (required)
Parent_id of the content item
Returns:
The item_id belonging to the name, empty string if no item_id was found

Partial Call Graph (max 5 caller/called nodes):
%3 test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) content::item::get_id_by_name content::item::get_id_by_name test_cr_item_search_triggers->content::item::get_id_by_name test_fs_add_file_to_folder fs_add_file_to_folder (test file-storage) test_fs_add_file_to_folder->content::item::get_id_by_name db_string db_string (public) content::item::get_id_by_name->db_string fs::file_copy fs::file_copy (public) fs::file_copy->content::item::get_id_by_name packages/acs-developer-support/www/css-edit.tcl packages/acs-developer-support/ www/css-edit.tcl packages/acs-developer-support/www/css-edit.tcl->content::item::get_id_by_name packages/file-storage/www/copy.tcl packages/file-storage/ www/copy.tcl packages/file-storage/www/copy.tcl->content::item::get_id_by_name packages/file-storage/www/folder-create.tcl packages/file-storage/ www/folder-create.tcl packages/file-storage/www/folder-create.tcl->content::item::get_id_by_name packages/file-storage/www/folder-zip-add.tcl packages/file-storage/ www/folder-zip-add.tcl packages/file-storage/www/folder-zip-add.tcl->content::item::get_id_by_name

Testcases:
cr_item_search_triggers, fs_add_file_to_folder

content::item::get_latest_revision (public)

 content::item::get_latest_revision -item_id item_id

Retrieves the latest revision for the item. If the item has no live revision, returns an empty string.

Switches:
-item_id (required)
The item_id of the content item
Returns:
The latest revision_id for the item, or an empty string if no revisions exist
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::get_latest_revision content::item::get_latest_revision test_content_item->content::item::get_latest_revision test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) test_cr_item_search_triggers->content::item::get_latest_revision package_exec_plsql package_exec_plsql (public) content::item::get_latest_revision->package_exec_plsql content::item::publish content::item::publish (public) content::item::publish->content::item::get_latest_revision email_image::get_user_email email_image::get_user_email (public) email_image::get_user_email->content::item::get_latest_revision general_comments_new general_comments_new (public) general_comments_new->content::item::get_latest_revision packages/general-comments/www/view-comment.tcl packages/general-comments/ www/view-comment.tcl packages/general-comments/www/view-comment.tcl->content::item::get_latest_revision

Testcases:
content_item, cr_item_search_triggers

content::item::get_live_revision (public)

 content::item::get_live_revision -item_id item_id

Retrieves the live revision for the item. If the item has no live revision, returns an empty string.

Switches:
-item_id (required)
The item_id of the content item
Returns:
The live revision_id for the item, or an empty string if no live revision exists
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) content::item::get_live_revision content::item::get_live_revision test_cr_item_search_triggers->content::item::get_live_revision package_exec_plsql package_exec_plsql (public) content::item::get_live_revision->package_exec_plsql apm_generate_tarball apm_generate_tarball (public) apm_generate_tarball->content::item::get_live_revision content::init content::init (public) content::init->content::item::get_live_revision content::item::get_content content::item::get_content (public) content::item::get_content->content::item::get_live_revision fs::get_object_info fs::get_object_info (public) fs::get_object_info->content::item::get_live_revision packages/acs-subsite/www/user/portrait/index.tcl packages/acs-subsite/ www/user/portrait/index.tcl packages/acs-subsite/www/user/portrait/index.tcl->content::item::get_live_revision

Testcases:
cr_item_search_triggers

content::item::get_parent_folder (public)

 content::item::get_parent_folder -item_id item_id
Switches:
-item_id (required)
Returns:
NUMBER(38)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) content::item::get_parent_folder content::item::get_parent_folder test_cr_item_search_triggers->content::item::get_parent_folder package_exec_plsql package_exec_plsql (public) content::item::get_parent_folder->package_exec_plsql packages/file-storage/www/file-add.tcl packages/file-storage/ www/file-add.tcl packages/file-storage/www/file-add.tcl->content::item::get_parent_folder packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl packages/file-storage/www/file.tcl->content::item::get_parent_folder packages/file-storage/www/index.tcl packages/file-storage/ www/index.tcl packages/file-storage/www/index.tcl->content::item::get_parent_folder

Testcases:
cr_item_search_triggers

content::item::get_path (public)

 content::item::get_path -item_id item_id \
    [ -root_folder_id root_folder_id ]
Switches:
-item_id (required)
-root_folder_id (optional)
Returns:
VARCHAR2

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::get_path content::item::get_path test_content_item_nested_structure->content::item::get_path package_exec_plsql package_exec_plsql (public) content::item::get_path->package_exec_plsql content_search::url content_search::url (private) content_search::url->content::item::get_path packages/file-storage/lib/folder-links.tcl packages/file-storage/ lib/folder-links.tcl packages/file-storage/lib/folder-links.tcl->content::item::get_path packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl packages/file-storage/www/file.tcl->content::item::get_path packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl packages/file-storage/www/folder-chunk.tcl->content::item::get_path

Testcases:
content_item_nested_structure

content::item::get_publish_date (public)

 content::item::get_publish_date -item_id item_id [ -is_live is_live ]
Switches:
-item_id (required)
-is_live (optional)
Returns:
DATE

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::get_publish_date content::item::get_publish_date test_content_item_nested_structure->content::item::get_publish_date package_exec_plsql package_exec_plsql (public) content::item::get_publish_date->package_exec_plsql

Testcases:
content_item_nested_structure

content::item::get_publish_status (public)

 content::item::get_publish_status -item_id item_id

Get the publish status of the item. The publish status will be one of the following:

  • production - The item is still in production. The workflow (if any) is not finished, and the item has no live revision.
  • ready - The item is ready for publishing
  • live - The item has been published
  • expired - The item has been published in the past, but its publication has expired

Switches:
-item_id (required)
The item_id of the content item
Returns:
The publish status of the item, or the empty string on failure
See Also:
  • proc content::item::is_publishable

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::get_publish_status content::item::get_publish_status test_content_item_nested_structure->content::item::get_publish_status db_string db_string (public) content::item::get_publish_status->db_string

Testcases:
content_item_nested_structure

content::item::get_revision_content (public)

 content::item::get_revision_content -revision_id revision_id \
    [ -item_id item_id ]

Create a one-row datasource called content in the calling frame which contains all attributes for the revision (including inherited ones). The datasource will contain a column called "text", representing the main content (blob) of the revision, but only if the revision has a textual mime-type.

Switches:
-revision_id (required)
The revision whose attributes are to be retrieved
-item_id (optional)
The item_id of the corresponding item.
Returns:
1 on success (and create a content array in the calling frame), 0 on failure
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::get_revision_content content::item::get_revision_content test_content_item_nested_structure->content::item::get_revision_content acs_object_type::get_table_name acs_object_type::get_table_name (public) content::item::get_revision_content->acs_object_type::get_table_name content::revision::item_id content::revision::item_id (public) content::item::get_revision_content->content::revision::item_id db_0or1row db_0or1row (public) content::item::get_revision_content->db_0or1row db_1row db_1row (public) content::item::get_revision_content->db_1row db_map db_map (public) content::item::get_revision_content->db_map content::item::get_content content::item::get_content (public) content::item::get_content->content::item::get_revision_content

Testcases:
content_item_nested_structure

content::item::get_revision_count (public)

 content::item::get_revision_count -item_id item_id
Switches:
-item_id (required)
Returns:
NUMBER

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_revision content_revision (test acs-content-repository) content::item::get_revision_count content::item::get_revision_count test_content_revision->content::item::get_revision_count package_exec_plsql package_exec_plsql (public) content::item::get_revision_count->package_exec_plsql

Testcases:
content_revision

content::item::get_root_folder (public)

 content::item::get_root_folder [ -item_id item_id ]
Switches:
-item_id (optional)
Returns:
NUMBER(38)

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::get_root_folder content::item::get_root_folder test_content_item->content::item::get_root_folder test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) test_content_item_nested_structure->content::item::get_root_folder package_exec_plsql package_exec_plsql (public) content::item::get_root_folder->package_exec_plsql content_search::url content_search::url (private) content_search::url->content::item::get_root_folder

Testcases:
content_item, content_item_nested_structure

content::item::get_template (public)

 content::item::get_template -item_id item_id -use_context use_context

Retrieves the template which can be used to render the item. If there is a template registered directly to the item, returns the id of that template. Otherwise, returns the id of the default template registered to the item's content_type. Returns an empty string on failure.

Switches:
-item_id (required)
The item_id
-use_context (required)
The context in which the template will be used (e.g. public)
Returns:
The template_id of the template which can be used to render the item, or an empty string on failure

Partial Call Graph (max 5 caller/called nodes):
%3 publish::merge_with_template publish::merge_with_template (private) content::item::get_template content::item::get_template publish::merge_with_template->content::item::get_template package_exec_plsql package_exec_plsql (public) content::item::get_template->package_exec_plsql

Testcases:
No testcase defined.

content::item::get_title (public)

 content::item::get_title -item_id item_id [ -is_live is_live ]

Get the title for the item. If a live revision for the item exists, use the live revision. Otherwise, use the latest revision.

Switches:
-item_id (required)
The item_id of the content item
-is_live (optional, defaults to "f")
If true, return the title of the live revision, otherwise the one of the latest revision (default). Boolean, 't' or 'f'.
Returns:
The title of the item
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 attachments::get_title attachments::get_title (public) content::item::get_title content::item::get_title attachments::get_title->content::item::get_title packages/acs-core-docs/www/files/tutorial/note-delete.tcl packages/acs-core-docs/ www/files/tutorial/note-delete.tcl packages/acs-core-docs/www/files/tutorial/note-delete.tcl->content::item::get_title packages/bug-tracker/www/related-file-delete.tcl packages/bug-tracker/ www/related-file-delete.tcl packages/bug-tracker/www/related-file-delete.tcl->content::item::get_title packages/bug-tracker/www/related-file-update.tcl packages/bug-tracker/ www/related-file-update.tcl packages/bug-tracker/www/related-file-update.tcl->content::item::get_title package_exec_plsql package_exec_plsql (public) content::item::get_title->package_exec_plsql

Testcases:
No testcase defined.

content::item::get_virtual_path (public)

 content::item::get_virtual_path -item_id item_id \
    [ -root_folder_id root_folder_id ]

Retrieves the relative path to the item. The path is relative to the page root, and has no extension (Example: "/foo/bar/baz").

Switches:
-item_id (required)
The item_id for the item, for which the path is computed
-root_folder_id (optional)
Starts path resolution from this folder. Defaults to the root of the sitemap (when null).
Returns:
The path to the item, or an empty string on failure

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::get_virtual_path content::item::get_virtual_path test_content_item_nested_structure->content::item::get_virtual_path package_exec_plsql package_exec_plsql (public) content::item::get_virtual_path->package_exec_plsql fs::rss::datasource fs::rss::datasource (private) fs::rss::datasource->content::item::get_virtual_path fs::webdav_url fs::webdav_url (public) fs::webdav_url->content::item::get_virtual_path publish::item_include_tag publish::item_include_tag (public) publish::item_include_tag->content::item::get_virtual_path publish::merge_with_template publish::merge_with_template (private) publish::merge_with_template->content::item::get_virtual_path publish::write_content publish::write_content (public) publish::write_content->content::item::get_virtual_path

Testcases:
content_item_nested_structure

content::item::is_index_page (public)

 content::item::is_index_page -item_id item_id -folder_id folder_id
Switches:
-item_id (required)
-folder_id (required)
Returns:
VARCHAR2

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::is_index_page content::item::is_index_page content::item::is_index_page->package_exec_plsql

Testcases:
No testcase defined.

content::item::is_publishable (public)

 content::item::is_publishable -item_id item_id

Determine if the item is publishable. The item is publishable only if:

  • All child relations, as well as item relations, are satisfied (according to min_n and max_n)
  • The workflow (if any) for the item is finished

Switches:
-item_id (required)
The item_id of the content item
Returns:
't' if the item is publishable, 'f' otherwise
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::is_publishable content::item::is_publishable content::item::is_publishable->package_exec_plsql

Testcases:
No testcase defined.

content::item::is_published (public)

 content::item::is_published -item_id item_id
Switches:
-item_id (required)
Returns:
CHAR

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::is_published content::item::is_published test_content_item_nested_structure->content::item::is_published package_exec_plsql package_exec_plsql (public) content::item::is_published->package_exec_plsql

Testcases:
content_item_nested_structure

content::item::is_subclass (public)

 content::item::is_subclass -object_type object_type \
    -supertype supertype
Switches:
-object_type (required)
-supertype (required)
Returns:
CHAR

Partial Call Graph (max 5 caller/called nodes):
%3 test_attachments_name_api attachments_name_api (test attachments) content::item::is_subclass content::item::is_subclass test_attachments_name_api->content::item::is_subclass package_exec_plsql package_exec_plsql (public) content::item::is_subclass->package_exec_plsql attachments::get_title attachments::get_title (public) attachments::get_title->content::item::is_subclass packages/attachments/www/go-to-attachment.tcl packages/attachments/ www/go-to-attachment.tcl packages/attachments/www/go-to-attachment.tcl->content::item::is_subclass packages/forums/lib/message/attachment-list.tcl packages/forums/ lib/message/attachment-list.tcl packages/forums/lib/message/attachment-list.tcl->content::item::is_subclass

Testcases:
attachments_name_api

content::item::is_valid_child (public)

 content::item::is_valid_child -item_id item_id \
    -content_type content_type [ -relation_tag relation_tag ]
Switches:
-item_id (required)
-content_type (required)
-relation_tag (optional)
Returns:
CHAR

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::is_valid_child content::item::is_valid_child content::item::is_valid_child->package_exec_plsql

Testcases:
No testcase defined.

content::item::move (public)

 content::item::move -item_id item_id \
    -target_folder_id target_folder_id [ -name name ]

Move an item to a folder.

Switches:
-item_id (required)
item to move
-target_folder_id (required)
folder to move the item to
-name (optional)
new name, allows move with rename
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-05-28

Partial Call Graph (max 5 caller/called nodes):
%3 packages/file-storage/www/move.tcl packages/file-storage/ www/move.tcl content::item::move content::item::move packages/file-storage/www/move.tcl->content::item::move package_exec_plsql package_exec_plsql (public) content::item::move->package_exec_plsql

Testcases:
No testcase defined.

content::item::new (public)

 content::item::new -name name [ -parent_id parent_id ] \
    [ -item_id item_id ] [ -locale locale ] \
    [ -creation_date creation_date ] [ -creation_user creation_user ] \
    [ -context_id context_id ] [ -package_id package_id ] \
    [ -creation_ip creation_ip ] [ -item_subtype item_subtype ] \
    [ -content_type content_type ] [ -title title ] \
    [ -description description ] [ -mime_type mime_type ] \
    [ -nls_language nls_language ] [ -text text ] [ -data data ] \
    [ -relation_tag relation_tag ] [ -is_live is_live ] \
    [ -storage_type storage_type ] [ -attributes attributes ] \
    [ -tmp_filename tmp_filename ]

Create a new content item This proc creates versioned content items where content_type iscontent_revision or subtypes of content revision. There are procedures for each other base content item. This procedure uses package_instantiate object. Under PostgreSQL the object_type new function must be registered with define_function_args.

Switches:
-name (required)
name of the item, must be unique for the folder
-parent_id (optional)
parent object of this content_item
-item_id (optional)
item_id of this content_item. If this is not specified an item_id will be generated automatically
-locale (optional)
-
-creation_date (optional)
defaults to current date and time
-creation_user (optional)
-
-context_id (optional)
Context of the item. usually used in conjunction with permissions.
-package_id (optional)
Package ID of the object
-creation_ip (optional)
-
-item_subtype (optional, defaults to "content_item")
-content_type (optional, defaults to "content_revision")
content_revision or subtype of content_revision
-title (optional)
- title of content_revision to be created
-description (optional)
of content_revision to be created
-mime_type (optional)
-nls_language (optional)
- ???
-text (optional)
- text of content revision to be created
-data (optional)
- ???
-relation_tag (optional)
-is_live (optional, defaults to "f")
-storage_type (optional, defaults to "file")
file, lob, or text (postgresql only)
-attributes (optional)
A list of lists of pairs of additional attributes and their values to pass to the constructor. Each pair is a list of two elements: key => value such as [list [list attribute value] [list attribute value]]
-tmp_filename (optional)
file containing content to be added to new revision. Caller is responsible to handle cleaning up the temporary file
Returns:
item_id of the new content item
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-05-28
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_image content_image (test acs-content-repository) content::item::new content::item::new test_content_image->content::item::new test_content_item content_item (test acs-content-repository) test_content_item->content::item::new test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) test_content_item_nested_structure->content::item::new test_content_revision content_revision (test acs-content-repository) test_content_revision->content::item::new test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) test_cr_item_search_triggers->content::item::new ad_conn ad_conn (public) content::item::new->ad_conn content::revision::new content::revision::new (public) content::item::new->content::revision::new cr_check_mime_type cr_check_mime_type (public) content::item::new->cr_check_mime_type db_transaction db_transaction (public) content::item::new->db_transaction package_exec_plsql package_exec_plsql (public) content::item::new->package_exec_plsql acs_user::create_portrait acs_user::create_portrait (public) acs_user::create_portrait->content::item::new apm_generate_tarball apm_generate_tarball (public) apm_generate_tarball->content::item::new attachments::richtext::file_attach attachments::richtext::file_attach (public) attachments::richtext::file_attach->content::item::new attachments::richtext::require_root_folder attachments::richtext::require_root_folder (private) attachments::richtext::require_root_folder->content::item::new email_image::edit_email_image email_image::edit_email_image (public) email_image::edit_email_image->content::item::new

Testcases:
content_image, content_item, content_item_nested_structure, content_revision, cr_item_search_triggers, data_links_update_links, data_links_update_links_with_tag, data_links_with_tag

content::item::publish (public)

 content::item::publish -item_id item_id [ -revision_id revision_id ]

Publish a content item. Updates the live_revision and publish_date attributes, and sets publish_status to live.

Switches:
-item_id (required)
The id of the content item
-revision_id (optional)
The id of the revision to publish. Defaults to the latest revision.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 content::item::get_latest_revision content::item::get_latest_revision (public) content::item::set_live_revision content::item::set_live_revision (public) content::item::publish content::item::publish content::item::publish->content::item::get_latest_revision content::item::publish->content::item::set_live_revision

Testcases:
No testcase defined.

content::item::register_template (public)

 content::item::register_template -item_id item_id \
    -template_id template_id -use_context use_context
Switches:
-item_id (required)
-template_id (required)
-use_context (required)

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::register_template content::item::register_template content::item::register_template->package_exec_plsql

Testcases:
No testcase defined.

content::item::relate (public)

 content::item::relate -item_id item_id -object_id object_id \
    [ -relation_tag relation_tag ] [ -order_n order_n ] \
    [ -relation_type relation_type ]
Switches:
-item_id (required)
-object_id (required)
-relation_tag (optional)
-order_n (optional)
-relation_type (optional, defaults to "cr_item_rel")
Returns:
NUMBER(38)

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::relate content::item::relate content::item::relate->package_exec_plsql

Testcases:
No testcase defined.

content::item::rename (public)

 content::item::rename -item_id item_id -name name

Rename an item.

Switches:
-item_id (required)
-name (required)
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-05-28 Rename a content item.

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::rename content::item::rename test_content_item->content::item::rename package_exec_plsql package_exec_plsql (public) content::item::rename->package_exec_plsql

Testcases:
content_item

content::item::set_live_revision (public)

 content::item::set_live_revision -revision_id revision_id \
    [ -publish_status publish_status ]
Switches:
-revision_id (required)
-publish_status (optional, defaults to "ready")

Partial Call Graph (max 5 caller/called nodes):
%3 test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) content::item::set_live_revision content::item::set_live_revision test_cr_item_search_triggers->content::item::set_live_revision package_exec_plsql package_exec_plsql (public) content::item::set_live_revision->package_exec_plsql content::item::publish content::item::publish (public) content::item::publish->content::item::set_live_revision content::item::upload_file content::item::upload_file (public) content::item::upload_file->content::item::set_live_revision content::revision::new content::revision::new (public) content::revision::new->content::item::set_live_revision fs::add_version fs::add_version (public) fs::add_version->content::item::set_live_revision fs::file_copy fs::file_copy (public) fs::file_copy->content::item::set_live_revision

Testcases:
cr_item_search_triggers

content::item::set_release_period (public)

 content::item::set_release_period -item_id item_id \
    [ -start_when start_when ] [ -end_when end_when ]
Switches:
-item_id (required)
-start_when (optional)
-end_when (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::set_release_period content::item::set_release_period content::item::set_release_period->package_exec_plsql

Testcases:
No testcase defined.

content::item::unpublish (public)

 content::item::unpublish -item_id item_id \
    [ -publish_status publish_status ]

Unpublish a content item.

Switches:
-item_id (required)
The id of the content item
-publish_status (optional, defaults to "production")
The publish_status to put the item in after unpublishing it.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item_nested_structure content_item_nested_structure (test acs-content-repository) content::item::unpublish content::item::unpublish test_content_item_nested_structure->content::item::unpublish content::item::update content::item::update (public) content::item::unpublish->content::item::update

Testcases:
content_item_nested_structure

content::item::unregister_template (public)

 content::item::unregister_template -item_id item_id \
    [ -template_id template_id ] [ -use_context use_context ]
Switches:
-item_id (required)
-template_id (optional)
-use_context (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::unregister_template content::item::unregister_template content::item::unregister_template->package_exec_plsql

Testcases:
No testcase defined.

content::item::unrelate (public)

 content::item::unrelate -rel_id rel_id
Switches:
-rel_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 package_exec_plsql package_exec_plsql (public) content::item::unrelate content::item::unrelate content::item::unrelate->package_exec_plsql

Testcases:
No testcase defined.

content::item::unset_live_revision (public)

 content::item::unset_live_revision -item_id item_id
Switches:
-item_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) content::item::unset_live_revision content::item::unset_live_revision test_cr_item_search_triggers->content::item::unset_live_revision package_exec_plsql package_exec_plsql (public) content::item::unset_live_revision->package_exec_plsql

Testcases:
cr_item_search_triggers

content::item::update (public)

 content::item::update -item_id item_id -attributes attributes

Update standard non-versioned content item attributes (cr_items) Valid attributes: name parent_id latest_revision live_revision locale publish_status

Switches:
-item_id (required)
item to update
-attributes (required)
A list of pairs of additional attributes and their values to get. Each pair is a list of two elements: key => value
Returns:
Error:
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2004-06-04

Partial Call Graph (max 5 caller/called nodes):
%3 test_content_item content_item (test acs-content-repository) content::item::update content::item::update test_content_item->content::item::update test_cr_item_search_triggers cr_item_search_triggers (test acs-content-repository) test_cr_item_search_triggers->content::item::update db_dml db_dml (public) content::item::update->db_dml content::folder::update content::folder::update (public) content::folder::update->content::item::update content::item::unpublish content::item::unpublish (public) content::item::unpublish->content::item::update

Testcases:
content_item, cr_item_search_triggers

content::item::upload_file (public)

 content::item::upload_file -upload_file upload_file \
    -parent_id parent_id [ -package_id package_id ] [ -title title ]

Store the file uploaded under the parent_id if a file was uploaded

Switches:
-upload_file (required)
File to upload
-parent_id (required)
Parent ID
-package_id (optional)
-title (optional)
Title of the uploaded file
Returns:
revision_id of the generated item
Author:
Malte Sussdorff <sussdorff@sussdorff.de>
Created:
2005-06-21

Partial Call Graph (max 5 caller/called nodes):
%3 packages/bug-tracker/www/related-file-add.tcl packages/bug-tracker/ www/related-file-add.tcl content::item::upload_file content::item::upload_file packages/bug-tracker/www/related-file-add.tcl->content::item::upload_file ad_sanitize_filename ad_sanitize_filename (public) content::item::upload_file->ad_sanitize_filename content::item::set_live_revision content::item::set_live_revision (public) content::item::upload_file->content::item::set_live_revision cr_import_content cr_import_content (public) content::item::upload_file->cr_import_content db_list db_list (public) content::item::upload_file->db_list template::util::file::get_property template::util::file::get_property (public) content::item::upload_file->template::util::file::get_property

Testcases:
No testcase defined.
[ show source ]