My favorites | Sign in
Project Logo
                
Search
for
Updated Nov 30, 2007 by adamtaunowilliams
objectProperty  
The objectProperty entity

The objectProperty entity represents the additional values that can be assigned to any object in OpenGroupware. The objectProperty does not have an "objectId", if you need a primary key for storing objectProperty entities use the "propertyName" attribute.

If the property is an extended attribute such as those used to store extra values for tasks and appointments the additional "label", "type", and "values" will be populated. If the property has a namespace of "http://www.opengroupware.org/properties/ext-attr" it is assumed to be an extended attribute. The values of "label", "type", and "values" are read from the system defaults. If the property is not an extended attribute the "label", "type", and "values" attirbutes are still provided but will have a null value. For a type 2 extended attribute (boolean) property the values array will always be an array of the values "YES" and "NO"; the value of boolean property is stored as a string.

When setting (saving) object properties you must provide a "value" attribute and either a properly formed "propertyName" value or both "namespace" and "attribute". If "propertyName" is not provided the full property name will be constructed from "namespace" and "attribute". When saving properties no other attributes are respected, the other attributes are provided to the client for informational purposes only. The data type of the "value" attribute should be automatically detected.

Example

 {'attribute': 'myIntAttribute',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.whitemiceconsulting.com/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.whitemiceconsulting.com/properties/ext-attr}myIntAttribute',
  'type': '',
  'value': 4,
  'valueType': 'int',
  'values': ''},
 {'attribute': 'foo',
  'entityName': 'objectProperty',
  'label': 'Values Of Foo',
  'namespace': 'http://www.opengroupware.org/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.opengroupware.org/properties/ext-attr}foo',
  'type': '9',
  'value': 'ab',
  'valueType': 'string',
  'values': ['ef', 'cd', 'ab']},
 {'attribute': 'Billable',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.opengroupware.org/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.opengroupware.org/properties/ext-attr}Billable',
  'type': '2',
  'value': 'YES',
  'valueType': 'string',
  'values': ['YES', 'NO']},
 {'attribute': 'myFloatAttribute',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.whitemiceconsulting.com/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.whitemiceconsulting.com/properties/ext-attr}myFloatAttribute',
  'type': '',
  'value': 4,
  'valueType': 'int',
  'values': ''},
 {'attribute': 'myBLOBAttribute',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.whitemiceconsulting.com/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.whitemiceconsulting.com/properties/ext-attr}myBLOBAttribute',
  'type': '',
  'value': <xmlrpclib.Binary instance at 0xb797156c>,
  'valueType': 'data',
  'values': ''},
 {'attribute': 'Color',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.opengroupware.org/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.opengroupware.org/properties/ext-attr}Color',
  'type': '1',
  'value': 'Blyue',
  'valueType': 'string',
  'values': ''},
 {'attribute': 'myDateAttribute',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.whitemiceconsulting.com/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.whitemiceconsulting.com/properties/ext-attr}myDateAttribute',
  'type': '',
  'value': <DateTime '20070203T14:16:45' at b797170c>,
  'valueType': 'timestamp',
  'values': ''},
 {'attribute': 'EMail',
  'entityName': 'objectProperty',
  'label': '',
  'namespace': 'http://www.opengroupware.org/properties/ext-attr',
  'parentObjectId': 478560,
  'propertyName': '{http://www.opengroupware.org/properties/ext-attr}EMail',
  'type': '3',
  'value': 'fred@example.com',
  'valueType': 'string',
  'values': ''}

Home


Sign in to add a comment
Hosted by Google Code