oacs_dav::impl::content_folder::mkcol (private)
oacs_dav::impl::content_folder::mkcol
Defined in packages/oacs-dav/tcl/oacs-dav-procs.tcl
MKCOL DAV method for generic content folder
- Author:
- Dave Bauer
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- oacs_dav_mkcol
Source code: set uri [oacs_dav::conn uri] set user_id [oacs_dav::conn user_id] set peer_addr [oacs_dav::conn peeraddr] set item_id [oacs_dav::conn item_id] set fname [oacs_dav::conn item_name] set parent_id [oacs_dav::item_parent_folder_id $uri] if {$parent_id eq ""} { return [list 409] } if { $item_id ne ""} { return [list 405] } # probably have to revisit setting content_types allowed # and permissions, but inheriting from the parent seems # reasonable db_transaction { set new_folder_name $fname set label $fname set description $fname set new_folder_id [db_exec_plsql create_folder ""] set response [list 201] } on_error { set response [list 500] } return $responseGeneric XQL file: packages/oacs-dav/tcl/oacs-dav-procs.xql
PostgreSQL XQL file: <fullquery name="oacs_dav::impl::content_folder::mkcol.create_folder"> <querytext> select content_folder__new( :new_folder_name, :label, :description, :parent_id, :parent_id, NULL, current_timestamp, :user_id, :peer_addr ) </querytext> </fullquery>packages/oacs-dav/tcl/oacs-dav-procs-postgresql.xql
Oracle XQL file: <fullquery name="oacs_dav::impl::content_folder::mkcol.create_folder"> <querytext> begin :1 := content_folder.new( name => :new_folder_name, label => :label, description => :description, parent_id => :parent_id, context_id => :parent_id, folder_id => NULL, creation_date => sysdate, creation_user => :user_id, creation_ip => :peer_addr ); end; </querytext> </fullquery>packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql