Attention

You are looking at outdated documentation for version 2.x. A newer version is available.

wsgidav.samples.virtual_dav_provider.VirtualArtifact.setPropertyValue

VirtualArtifact.setPropertyValue(propname, value, dryRun=False)

Set a property value or remove a property.

value == None means ‘remove property’. Raise HTTP_FORBIDDEN if property is read-only, or not supported.

When dryRun is True, this function should raise errors, as in a real run, but MUST NOT change any data.

This default implementation

  • raises HTTP_FORBIDDEN, if trying to modify a locking property
  • raises HTTP_FORBIDDEN, if trying to modify an immutable {DAV:} property
  • stores everything else as dead property, if a property manager is present.
  • raises HTTP_FORBIDDEN, else

Removing a non-existing prop is NOT an error.

Note: RFC 4918 states that {DAV:}displayname ‘SHOULD NOT be protected’

A resource provider may override this method, to update supported custom live properties.