Package datafinder :: Package script_api :: Package properties :: Module property_support
[hide private]
[frames] | no frames]

Module property_support

This module contains the script API functionalities for property access.


Note: System-specific properties are set via dedicated methods, e.g. during file import. The support package is developed for the user who should not directly set system properties.

Version: $Revision-Id:$

Functions [hide private]
 
validate(properties, path=None)
Validates the given properties.
 
_getPropertyDefinitionRegistry()
 
_getPropertyDefinitionFactory()
PropertyDescription
propertyDescription(propertyIdentifier)
Returns the property description for the given property identifier.
dict of PropertyDescription
availableProperties()
Returns all defined properties, i.e.
 
retrieveProperties(path)
Retrieves the properties and maps them to the correct representation.
 
storeProperties(path, properties)
Adds/Updates the given properties of the item.
 
deleteProperties(path, propertyIdentifiers)
Deletes the given properties from the item properties.
 
registerPropertyDefinition(identifier, type_, displayName=None, description=None)
Creates a user-specific property and registers it.
Variables [hide private]
  __package__ = 'datafinder.script_api.properties'
Function Details [hide private]

validate(properties, path=None)

 

Validates the given properties.

Parameters:
  • properties (dict) - Mapping of property identifiers to values.
  • path (unicode) - Optional item path which ensures that the validation is performed in the correct context.
Raises:

propertyDescription(propertyIdentifier)

 

Returns the property description for the given property identifier.

Parameters:
  • propertyIdentifier (unicode) - property identifier.
Returns: PropertyDescription
property description instance.

availableProperties()

 

Returns all defined properties, i.e. system specific or data model specific properties.

Returns: dict of PropertyDescription
List of property descriptions.

retrieveProperties(path)

 

Retrieves the properties and maps them to the correct representation.

Parameters:
  • path (unicode) - path of the item whose properties should be retrieved.
Raises:

storeProperties(path, properties)

 

Adds/Updates the given properties of the item.

Parameters:
  • path (unicode) - The item whose properties should be updated.
  • properties (dict of unicode, object) - Mapping of property identifiers to values.
Raises:
  • ItemSupportError - Raised when difficulties with the item access occur.
  • PropertySupportError - Raised when values do not conform to the specified restrictions, values of system-specific properties are changed.

deleteProperties(path, propertyIdentifiers)

 

Deletes the given properties from the item properties.

Parameters:
  • path (unicode) - The item where the properties should be deleted.
  • propertyIdentifiers (list of unicode) - List of property identifiers.
Raises:

registerPropertyDefinition(identifier, type_, displayName=None, description=None)

 

Creates a user-specific property and registers it.

Parameters:
  • identifier (unicode) - Unique name.
  • type_ (BasePropertyType @see {properties<datafinder.script_api.properties.__init__>}) - Type of the property.
  • displayName (unicode) - A user-readable name.
  • description (unicode) - A short help test.
Raises: