oacs_dav::impl::content_folder::delete (private)

 oacs_dav::impl::content_folder::delete

Defined in packages/oacs-dav/tcl/oacs-dav-procs.tcl

DELETE DAV method for generic content folder

Partial Call Graph (max 5 caller/called nodes):
%3 AcsSc.dav.delete.content_folder AcsSc.dav.delete.content_folder (private) oacs_dav::impl::content_folder::delete oacs_dav::impl::content_folder::delete AcsSc.dav.delete.content_folder->oacs_dav::impl::content_folder::delete db_exec_plsql db_exec_plsql (public) oacs_dav::impl::content_folder::delete->db_exec_plsql oacs_dav::children_have_permission_p oacs_dav::children_have_permission_p (public) oacs_dav::impl::content_folder::delete->oacs_dav::children_have_permission_p oacs_dav::conn oacs_dav::conn (public) oacs_dav::impl::content_folder::delete->oacs_dav::conn tdav::check_lock tdav::check_lock oacs_dav::impl::content_folder::delete->tdav::check_lock tdav::delete_props tdav::delete_props oacs_dav::impl::content_folder::delete->tdav::delete_props

Testcases:
No testcase defined.
Source code:
    set package_id [oacs_dav::conn package_id]
    set user_id [oacs_dav::conn user_id]
    set peer_addr [oacs_dav::conn peeraddr]
    set item_id [oacs_dav::conn item_id]
    set uri [oacs_dav::conn uri]

    if {"unlocked" ne [tdav::check_lock $uri] } {
        return [list 423]
    }
    set children_permission_p [oacs_dav::children_have_permission_p -item_id $item_id -user_id $user_id -privilege "delete"]
        if {!$children_permission_p} {
            return [list 403]
        }
    if {[catch {db_exec_plsql delete_folder ""} errmsg]} {
        ns_log error "content_folder::delete $errmsg"
        set response [list 500]
#       ns_log debug "\nCONTEXT IDS [db_list get_ids "select object_id from acs_objects where context_id=:item_id"]"
    } else {
        set response [list 204]
        tdav::delete_props $uri
        tdav::remove_lock $uri
    }

    return $response
Generic XQL file:
packages/oacs-dav/tcl/oacs-dav-procs.xql

PostgreSQL XQL file:
<fullquery name="oacs_dav::impl::content_folder::delete.delete_folder">
    <querytext>
      select content_folder__delete (
      :item_id,
      't'
      )
    </querytext>
</fullquery>
packages/oacs-dav/tcl/oacs-dav-procs-postgresql.xql

Oracle XQL file:
<fullquery name="oacs_dav::impl::content_folder::delete.delete_folder">
    <querytext>
	begin
		content_folder.del (
	              folder_id => :item_id,
        	      cascade_p => 't'
	      );
	end;
    </querytext>
</fullquery>
packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql

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