Module: Tilia::Dav::PropertyStorage::Backend::BackendInterface
- Included in:
- Sequel
- Defined in:
- lib/tilia/dav/property_storage/backend/backend_interface.rb
Overview
Propertystorage backend interface.
Propertystorage backends must implement this interface to be used by the propertystorage plugin.
Instance Method Summary collapse
-
#delete(_path) ⇒ Object
This method is called after a node is deleted.
-
#move(_source, _destination) ⇒ Object
This method is called after a successful MOVE.
-
#prop_find(_path, _prop_find) ⇒ Object
Fetches properties for a path.
-
#prop_patch(_path, _prop_patch) ⇒ Object
Updates properties for a path.
Instance Method Details
#delete(_path) ⇒ Object
This method is called after a node is deleted.
This allows a backend to clean up all associated properties.
The delete method will get called once for the deletion of an entire tree.
51 52 |
# File 'lib/tilia/dav/property_storage/backend/backend_interface.rb', line 51 def delete(_path) end |
#move(_source, _destination) ⇒ Object
This method is called after a successful MOVE
This should be used to migrate all properties from one path to another. Note that entire collections may be moved, so ensure that all properties for children are also moved along.
63 64 |
# File 'lib/tilia/dav/property_storage/backend/backend_interface.rb', line 63 def move(_source, _destination) end |
#prop_find(_path, _prop_find) ⇒ Object
Fetches properties for a path.
This method received a PropFind object, which contains all the information about the properties that need to be fetched.
Ususually you would just want to call ‘get404Properties’ on this object, as this will give you the exact list of properties that need to be fetched, and haven’t yet.
However, you can also support the ‘allprops’ property here. In that case, you should check for prop_find.all_props?.
25 26 |
# File 'lib/tilia/dav/property_storage/backend/backend_interface.rb', line 25 def prop_find(_path, _prop_find) end |
#prop_patch(_path, _prop_patch) ⇒ Object
Updates properties for a path
This method received a PropPatch object, which contains all the information about the update.
Usually you would want to call ‘handleRemaining’ on this object, to get a list of all properties that need to be stored.
39 40 |
# File 'lib/tilia/dav/property_storage/backend/backend_interface.rb', line 39 def prop_patch(_path, _prop_patch) end |