content::item::delete (public)

 content::item::delete -item_id item_id

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

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.

Testcases:
content_image, content_item, content_revision
Source code:
    set result 0
    db_1row get_storage_type {select storage_type, storage_area_key from cr_items where item_id = :item_id}

    set cleanup_data [::content::revision::collect_cleanup_data  -item_id $item_id  -storage_type $storage_type]
    db_transaction {
        set result [package_exec_plsql  -var_list [list [list item_id $item_id]]  content_item del]
        #
        # In case, everything goes well in the call above, we perform
        # the cleanup.
        #
        ::content::revision::cleanup  -storage_area_key $storage_area_key  -storage_type $storage_type  -data $cleanup_data
    }
    return $result
Generic XQL file:
packages/acs-content-repository/tcl/content-item-procs.xql

PostgreSQL XQL file:
packages/acs-content-repository/tcl/content-item-procs-postgresql.xql

Oracle XQL file:
packages/acs-content-repository/tcl/content-item-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: