tdav::update_user_props (public)
tdav::update_user_props uri prop_req
Defined in packages/oacs-dav/tcl/tDAV-procs.tcl
Apply set and remove operations to a resource's stored user properties.
- Parameters:
- uri (required)
- Resource URI.
- prop_req (required)
- Alternating action and property records. Each property record contains a namespace/name key and a value.
- Returns:
- A list of HTTP status and property key pairs.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: array set props [tdav::dbm_read_list $uri] set status [list] foreach {action i} $prop_req { lassign $i k value switch -- $action { set { if {[catch {set props($k) $value} err]} { lappend status [list "HTTP/1.1 409 Conflict" $k] } else { lappend status [list "HTTP/1.1 200 OK" $k] } } remove { #according to WebDAV spec removing a nonexistent # property is not an error, if it's there # remove it, otherwise, continue. if {[info exists props($k)]} { unset props($k) } lappend status [list "HTTP/1.1 200 OK" $k] } } #filter out filesystem sets # DAVEB where is this filtering occurring? #write the props back out to disc: tdav::dbm_write_list $uri [array get props] } return $statusXQL Not present: Generic, PostgreSQL, Oracle