|
defaults
The "defaults" entity
IntroductionThe "defaults" entity is a transient entity provided when a call to the getLoginAccount method made. Example{'_DEFAULTS': {'accountObjectId': 10100,
'calendarPanelObjectIds': [180790,
1195580,
970990,
465990,
465970],
'entityName': 'defaults',
'isDST': 0,
'notificationCC': '*********************',
'secondsFromGMT': -18000,
'timeZone': 'EST',
'timeZoneName': 'US/Eastern'},
'entityName': 'Account',
'login': 'adam',
'objectId': 10100,
'version': 592}Obviously not all of a user's many defaults are provided by the defaults entity, only key values critical to the smooth integration of client applications with various functions of the server. Most of the provided default values relate to building calendar applications.
As of r945 (ZideStore r2119) support for the following defaults was added; these attributes are intended primarily to facilitate the use of mobile device's via GroupDAV sync:
Storing a user's defaultsA user can modify the specific defaults supported by the defaults entity via putObject. #!/usr/bin/env python
import xmlrpclib, time, sys, pprint
server = xmlrpclib.Server('http://{USER}:{PASSWORD}@{HOSTNAME}/zidestore/so/{USER}/')
defaults = { }
defaults['entityName'] = 'defaults'
defaults['timeZone'] = 'EST'
defaults['notificationCC'] = '***************'
defaults['calendarPanelObjectIds'] = [ 180790, 1112560, 195180, 1195580,
830020, 970990, 11530, 465950 ]
pprint.pprint(server.zogi.putObject(defaults))Only the defaults: notificationCC, timeZone, and calendarPanelObjectIds can currently be modified via zOGI. The timeZone default MUST be a valid time zone abbreviation as defined by libFoundation. The objects specified in calendarPanelObjectIds will be sorted out by type and applied to appropriate server side defaults so that this value will work in conjunction with the drill down view of WebUI. The result of a successful call to putObject of a defaults entity will be as if the getLoginAccount method was called. |
Sign in to add a comment