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 ]

Defined in packages/acs-content-repository/tcl/content-item-procs.tcl

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
[ show source ]
Show another procedure: