Skip to content

PropertiesRouter

addCustomProperty(id, value, label, uid, type) Adds a new property to the / of the tree
deleteZenProperty() Removes the local instance of the each property in properties. Note
that the property will only be deleted if a hasProperty is true
* also used on custom properties or cProperties
@type uid: String
@param uid: unique identifier of an object
@type properties: String
@param properties: zenproperty identifier
update(uid, id, value, select_variable=None)

Updates an existing custom property.

setZenProperty() Sets the zProperty value.

@type uid: string
@param uid: unique identifier of an object
@type zProperty: string or dictionary
@param zProperty: either a string that represents which zproperty
we are changing or key value pair dictionary that is the list
of zproperties we wish to change.
@type value: anything
@param value: if we are modifying a single zproperty then it is the
value, it is not used if a dictionary is passed in for zProperty
add() Adds a new property to uid.
remove() Removes the local instance of the each property in properties.
Note that the property will only be deleted if a hasProperty is true

@param uid {str} Path to the object owning the properties.
@param id {str} The ID of the property to delete.
@param properties {list[str]} List of property IDs to delete.

Note that specifying both 'id' and 'properties' is valid.
Duplicate property IDs skipped.
query(uid, **params, **constraints) Returns a list of properties matching the given constraints
and parameters.

There are two constraints that can be specified: idPrefix and type

idPrefix: Should be 'c' to return only cProperties or 'z' to
return only zProperties. If not specified, then both cProperties
and zProperties are returned.

type: Is a string naming the property type that returned properties
should have. If multiple types are desired, this value can be
a list of strings.

@param uid {str} From properties from this object path
@param params {dict} Return properties matching the given fields.
@param fields {list} List of fields to return for each property.
@param kw {dict} The 'limit', 'sort', 'page', and 'dir' parameters
are extracted from here.
getZenProperties(uid, **sort, **start, **params, **limit, **page, **dir) Returns the definition and values of all
the zen properties for this context
@type uid: string
@param uid: unique identifier of an object
getCustomProperties(uid, **sort, **start, **params, **limit, **page, **dir) Returns the definition and values of all
the zen properties for this context
@type uid: string
@param uid: unique identifier of an object
getZenProperty(uid, zProperty) Returns information about a zproperty for a given context,
including its value.

@rtype: Dictionary
@return: B{Properties}:
- path: (string) where the property is defined
- type: (string) type of zproperty it is
- options: (Array) available options for the zproperty
- value (Array) value of the zproperty
- valueAsString (string)