oacs_dav::item_parent_folder_id (public)
oacs_dav::item_parent_folder_id uri
Defined in packages/oacs-dav/tcl/oacs-dav-procs.tcl
get the folder_id of the parent of an item from the uri
- Parameters:
- uri (required)
- Returns:
- parent_folder_id or empty string if folder does not exist
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: array set sn [oacs_dav::request_site_node $uri] set node_id $sn(node_id) set root_folder_id [oacs_dav::request_folder_id $node_id] set urlv [split [string trimright [string range $uri [string length $sn(url)] end] "/"] "/"] if {[llength $urlv] >1} { set parent_name [join [lrange $urlv 0 [llength $urlv]-2] "/" ] } else { set parent_name "/" } ns_log debug "\nparent_folder_id urlv $urlv parent_name $parent_name uri $uri" if {[string trimright $parent_name "/"] eq [string trimright $sn(url) "/"]} { # content_item__get_id can't resolve "/" # because it strips the leading and trailing / # from the url you pass in, and cr_items.name of the folder # is not and empty string set parent_id $root_folder_id } else { set parent_id [db_exec_plsql get_parent_folder_id ""] } return $parent_idGeneric XQL file: packages/oacs-dav/tcl/oacs-dav-procs.xql
PostgreSQL XQL file: <fullquery name="oacs_dav::item_parent_folder_id.get_parent_folder_id"> <querytext> select content_item__get_id(:parent_name,:root_folder_id,'f') </querytext> </fullquery>packages/oacs-dav/tcl/oacs-dav-procs-postgresql.xql
Oracle XQL file: <fullquery name="oacs_dav::item_parent_folder_id.get_parent_folder_id"> <querytext> begin :1 := content_item.get_id( item_path => :parent_name, root_folder_id => :root_folder_id, resolve_index => 'f'); end; </querytext> </fullquery>packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql