From 90f90fd6f22db412277faa2e3a9b613f8b955058 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Mon, 6 Apr 2009 07:20:56 +0200 Subject: [PATCH] Add defined and required attributes. --- .../Kolab_Server/lib/Horde/Kolab/Server/Object.php | 21 ++++++++++++++++++--- .../Horde/Kolab/Server/Object/Inetorgperson.php | 5 +++++ .../lib/Horde/Kolab/Server/Object/Person.php | 22 ++++------------------ 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php index cbe6bc750..52206e83d 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php @@ -101,11 +101,26 @@ class Horde_Kolab_Server_Object */ static public $init_attributes = array( /** + * Attributes that are defined for this object type. It is not + * guaranteed that this setting takes effect as this module can be + * configured to only trust the schema returned from the server. + */ + 'defined' => array( + self::ATTRIBUTE_OC, + ), + /** * Derived attributes are calculated based on other attribute values. */ 'derived' => array( - self::ATTRIBUTE_ID => array( - ), + self::ATTRIBUTE_ID => array(), + ), + /** + * Attributes that are required for this object type. It is not + * guaranteed that this setting takes effect as this module can be + * configured to only trust the schema returned from the server. + */ + 'required' => array( + self::ATTRIBUTE_OC, ), /** * Default values for attributes without a value. @@ -124,7 +139,7 @@ class Horde_Kolab_Server_Object * The object classes representing this object. */ 'object_classes' => array( - self::OBJECTCLASS_TOP + self::OBJECTCLASS_TOP, ), ); diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Inetorgperson.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Inetorgperson.php index 8514a2e73..5392b1889 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Inetorgperson.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Inetorgperson.php @@ -46,6 +46,11 @@ class Horde_Kolab_Server_Object_Inetorgperson extends Horde_Kolab_Server_Object_ * @var array */ static public $init_attributes = array( + 'defined' => array( + self::ATTRIBUTE_SID, + self::ATTRIBUTE_GIVENNAME, + self::ATTRIBUTE_MAIL, + ), /** * Derived attributes are calculated based on other attribute values. */ diff --git a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Person.php b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Person.php index fe4f28cb0..c9a2e0b52 100644 --- a/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Person.php +++ b/framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Person.php @@ -40,25 +40,11 @@ class Horde_Kolab_Server_Object_Person extends Horde_Kolab_Server_Object * @var array */ static public $init_attributes = array( - /** - * Derived attributes are calculated based on other attribute values. - */ - 'derived' => array( + 'defined' => array( + self::ATTRIBUTE_CN, + self::ATTRIBUTE_SN, + self::ATTRIBUTE_USERPASSWORD, ), - /** - * Default values for attributes without a value. - */ - 'defaults' => array( - ), - /** - * Locked attributes. These are fixed after the object has been stored - * once. They may not be modified again. - */ - 'locked' => array( - ), - /** - * The object classes representing this object. - */ 'object_classes' => array( self::OBJECTCLASS_PERSON ), -- 2.11.0