Add defined and required attributes.
authorGunnar Wrobel <p@rdus.de>
Mon, 6 Apr 2009 05:20:56 +0000 (07:20 +0200)
committerGunnar Wrobel <p@rdus.de>
Mon, 6 Apr 2009 10:25:59 +0000 (12:25 +0200)
framework/Kolab_Server/lib/Horde/Kolab/Server/Object.php
framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Inetorgperson.php
framework/Kolab_Server/lib/Horde/Kolab/Server/Object/Person.php

index cbe6bc7..52206e8 100644 (file)
@@ -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,
         ),
     );
 
index 8514a2e..5392b18 100644 (file)
@@ -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.
          */
index fe4f28c..c9a2e0b 100644 (file)
@@ -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
         ),