Package Products :: Package Zuul :: Package routers :: Module properties :: Class PropertiesRouter
[hide private]
[frames] | no frames]

Class PropertiesRouter

source code

ZenUtils.Ext.DirectRouter --+
                            |
                           PropertiesRouter

Instance Methods [hide private]
 
_getFacade(self) source code
 
getZenProperties(self, uid, start=0, params="{}", limit=None, sort=None, page=None, dir='ASC')
Returns the definition and values of all the zen properties for this context
source code
Dictionary
getZenProperty(self, uid, zProperty)
Returns information about a zproperty for a given context, including its value.
source code
 
getCustomProperties(self, uid, start=0, params="{}", limit=None, sort=None, page=None, dir='ASC')
Returns the definition and values of all the zen properties for this context
source code
 
addCustomProperty(self, id, value, label, uid, type)
Adds a new property to the / of the tree
source code
 
setZenProperty(self, uid, zProperty, value=None)
Sets the zProperty value.
source code
 
deleteZenProperty(self, uid, zProperty)
Removes the local instance of the each property in properties.
source code
 
query(self, uid, constraints=None, params=None, **kw)
Returns a list of properties matching the given constraints and parameters.
source code
 
add(self, uid, id, value, label, description, type, select_variable=None)
Adds a new property to uid.
source code
 
update(self, uid, id, value, select_variable=None)
Updates an existing property.
source code
 
remove(self, uid, id=None, properties=None)
Removes the local instance of the each property in properties.
source code
Method Details [hide private]

getZenProperties(self, uid, start=0, params="{}", limit=None, sort=None, page=None, dir='ASC')

source code 

Returns the definition and values of all the zen properties for this context

Parameters:
  • uid (string) - unique identifier of an object
Decorators:
  • @serviceConnectionError

getZenProperty(self, uid, zProperty)

source code 

Returns information about a zproperty for a given context, including its value.

Returns: Dictionary
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)
Decorators:
  • @serviceConnectionError

getCustomProperties(self, uid, start=0, params="{}", limit=None, sort=None, page=None, dir='ASC')

source code 

Returns the definition and values of all the zen properties for this context

Parameters:
  • uid (string) - unique identifier of an object
Decorators:
  • @serviceConnectionError

setZenProperty(self, uid, zProperty, value=None)

source code 

Sets the zProperty value.

Parameters:
  • uid (string) - unique identifier of an object
  • zProperty (string or dictionary) - 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.
  • value (anything) - if we are modifying a single zproperty then it is the value, it is not used if a dictionary is passed in for zProperty
Decorators:
  • @serviceConnectionError
  • @contextRequire(ZEN_ZPROPERTIES_EDIT, 'uid')

deleteZenProperty(self, uid, zProperty)

source code 

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

Parameters:
  • uid (String) - unique identifier of an object
  • properties (String) - zenproperty identifier
Decorators:
  • @serviceConnectionError
  • @contextRequire(ZEN_ZPROPERTIES_EDIT, 'uid')

query(self, uid, constraints=None, params=None, **kw)

source code 
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.

Decorators:
  • @serviceConnectionError

add(self, uid, id, value, label, description, type, select_variable=None)

source code 

Adds a new property to uid.

Decorators:
  • @serviceConnectionError
  • @contextRequire(ZEN_ZPROPERTIES_EDIT, 'uid')

update(self, uid, id, value, select_variable=None)

source code 

Updates an existing property.

Decorators:
  • @serviceConnectionError
  • @contextRequire(ZEN_ZPROPERTIES_EDIT, 'uid')

remove(self, uid, id=None, properties=None)

source code 

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.

Decorators:
  • @serviceConnectionError
  • @contextRequire(ZEN_ZPROPERTIES_EDIT, 'uid')