diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc
index 0cdee5d6..fc698fca 100644
--- a/lam/lib/baseModule.inc
+++ b/lam/lib/baseModule.inc
@@ -147,7 +147,194 @@ abstract class baseModule {
}
/**
- * Dummy function, meta data is provided by sub classes.
+ * This function provides meta data which is interpreted by baseModule.
+ * Only subclasses will return real data.
+ *
+ * The aim of the meta data is to reduce the number
+ * of functions in the subclasses. All major data is centralized in one place.
+ *
+ * The returned array contains a list of key-value pairs for the different functions.
+ *
+ *
+ * - {@link can_manage()}
+ *
+ * Key: account_types
+ * Value: array of account types
+ *
+ * Example: "account_types" => array("user", "host")
+ *
+ *
+ *
+ * - {@link is_base_module()}
+ *
+ * Key: is_base
+ * Value: boolean
+ *
+ * Example: "is_base" => true
+ *
+ *
+ *
+ * - {@link get_ldap_filter()}
+ *
+ * Key: ldap_filter
+ * Value: array of filters
+ *
+ * Example: "ldap_filter" => array('or' => 'objectClass=posixAccount', 'and' => '(!(uid=*$))')
+ *
+ *
+ *
+ * - {@link getManagedObjectClasses()}
+ *
+ * Key: objectClasses
+ * Value: array of object classes
+ *
+ * Example: "objectClasses" => array('posixAccount')
+ *
+ *
+ *
+ * - {@link getLDAPAliases()}
+ *
+ * Key: LDAPaliases
+ * Value: array of aliases
+ *
+ * Example: "LDAPaliases" => array('commonName' => 'cn')
+ *
+ *
+ *
+ * - {@link get_RDNAttributes()}
+ *
+ * Key: RDN
+ * Value: array of RDNs
+ *
+ * Example: "RDN" => array('uid' => 'normal', 'cn' => 'low')
+ *
+ *
+ *
+ * - {@link get_dependencies()}
+ *
+ * Key: dependencies
+ * Value: array of dependencies
+ *
+ * Example: "dependencies" => array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" => array("exim"))
+ *
+ *
+ *
+ * - {@link get_profileOptions()}
+ *
+ * Key: profile_options
+ * Value: array of profile options
+ *
+ * The syntax for the value array is the same as for the return value of get_profileOptions().
+ *
+ *
+ *
+ * - {@link check_profileOptions()}
+ *
+ * Key: profile_checks
+ * Value: array of checks (array("optionName" => array()))
+ *
+ * The "optionName" keys of the value array are the names of the option identifiers.
+ * Each array element is an array itself containing these values:
+ *
+ * - type: determines how to check input
+ * Possible values:
+ *
+ * - regex: check with regular expression from regex variable, case sensitive
+ * - regex_i: check with regular expression from regex variable, case insensitive
+ * - int_greater: integer value of cmp_name1 must be greater than the integer value from the option cmp_name2
+ * - int_greaterOrEqual: integer value of cmp_name1 must be greater or equal than the integer value from the option cmp_name2
+ *
+ *
+ * - error_message: message that is displayed if input value was syntactically incorrect
+ * error_message is an array to build StatusMessages (message type, message head, message text, additional variables)
+ * - regex: regular expression string (only if type is regex/regex_i)
+ * - cmp_name1: name of first input variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
+ * - cmp_name2: name of second input variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
+ * - required: true or false, if this input field must be filled set to true (optional)
+ *
- required_message: message that is displayed if no input value was given (only if required == true)
+ * required_message is an array to build StatusMessages (message type, message head, message text, additional variables)
+ *
+ *
+ *
+ *
+ *
+ * - {@link load_profile()}
+ *
+ * Key: profile_mappings
+ * Value: array('profile_identifier1' => 'LDAP_attribute1', 'profile_identifier2' => 'LDAP_attribute2')
+ *
+ * The mapped values are stored directly in $this->attributes.
+ *
+ * Example: "profile_mappings" => array('inetOrgPerson_title' => 'title')
+ *
+ *
+ *
+ * - {@link get_configOptions()}
+ *
+ * Key: config_options
+ * Value: array('user' => array, 'host' => array, 'all' => array)
+ *
+ * The values from 'all' are always returned, the other values only if they are inside the $scopes array.
+ * The syntax for sub arrays is the same as for the return value of {@link get_configOptions()}.
+ *
+ *
+ *
+ * - {@link check_configOptions()}
+ *
+ * Key: config_checks
+ * Value: array('user' => array, 'host' => 'array', 'all' => array)
+ *
+ * The values from 'all' are always used for checking, the other values only if they are inside the $scopes array.
+ * The syntax for sub arrays is the same as for {@link check_configOptions()}.
+ *
+ *
+ *
+ * - {@link get_uploadColumns()}
+ *
+ * Key: upload_columns
+ * Value: array
+ *
+ * The syntax for array is the same as for the return value of {@link get_uploadColumns()}.
+ *
+ *
+ *
+ * - {@link get_uploadPreDepends()}
+ *
+ * Key: upload_preDepends
+ * Value: array
+ *
+ * The syntax for array is the same as for the return value of {@link get_uploadPreDepends()}.
+ *
+ *
+ *
+ * - {@link getRequiredExtensions()}
+ *
+ * Key: extensions
+ * Value: array of extension names
+ *
+ * Example: "extensions" => array('mhash')
+ *
+ *
+ *
+ * - {@link getSelfServiceSearchAttributes()}
+ *
+ * Key: selfServiceSearchAttributes
+ * Value: array of attribute names
+ *
+ * Example: "selfServiceSearchAttributes" => array('uid')
+ *
+ *
+ *
+ * - {@link getSelfServiceFields()}
+ *
+ * Key: selfServiceFieldSettings
+ * Value: array of self service fields
+ *
+ * Example: "selfServiceFieldSettings" => array('pwd' => 'Password')
+ *
+ *
+ *
+ *
*
* @return array empty array
*/
@@ -175,11 +362,10 @@ abstract class baseModule {
}
/**
- * Returns true if this module is enough to provide a sensible account.
+ * Returns true if this module can be used to construct account without additional modules.
+ * Usually, all modules which manage structural object classes are base modules.
*
- * There is no relation to the name of this class.
- *
- * @return boolean true if base module
+ * @return boolean true if base module (defaults to false if no meta data is provided)
*/
function is_base_module() {
if (isset($this->meta['is_base']) && ($this->meta['is_base'] == true)) return true;
diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc
index 29767ffe..df5c4b52 100644
--- a/lam/lib/modules/account.inc
+++ b/lam/lib/modules/account.inc
@@ -42,6 +42,8 @@ class account extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
if ($_SESSION['loggedIn']) {
diff --git a/lam/lib/modules/ieee802device.inc b/lam/lib/modules/ieee802device.inc
index 3fd4c0d2..4f1b40f3 100644
--- a/lam/lib/modules/ieee802device.inc
+++ b/lam/lib/modules/ieee802device.inc
@@ -38,6 +38,8 @@ class ieee802Device extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc
index 3854611e..a88d2472 100644
--- a/lam/lib/modules/inetLocalMailRecipient.inc
+++ b/lam/lib/modules/inetLocalMailRecipient.inc
@@ -38,6 +38,8 @@ class inetLocalMailRecipient extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc
index 63bef52f..0547fce5 100644
--- a/lam/lib/modules/inetOrgPerson.inc
+++ b/lam/lib/modules/inetOrgPerson.inc
@@ -112,6 +112,8 @@ class inetOrgPerson extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc
index 45fa63a0..5aca446b 100644
--- a/lam/lib/modules/kolabUser.inc
+++ b/lam/lib/modules/kolabUser.inc
@@ -59,6 +59,8 @@ class kolabUser extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/ldapPublicKey.inc b/lam/lib/modules/ldapPublicKey.inc
index d6389586..cb1e73bd 100644
--- a/lam/lib/modules/ldapPublicKey.inc
+++ b/lam/lib/modules/ldapPublicKey.inc
@@ -39,6 +39,8 @@ class ldapPublicKey extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/nisMailAlias.inc b/lam/lib/modules/nisMailAlias.inc
index 84d7d23b..d530dea1 100644
--- a/lam/lib/modules/nisMailAlias.inc
+++ b/lam/lib/modules/nisMailAlias.inc
@@ -38,6 +38,8 @@ class nisMailAlias extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc
index 4bf43e24..792f996a 100644
--- a/lam/lib/modules/posixAccount.inc
+++ b/lam/lib/modules/posixAccount.inc
@@ -98,6 +98,8 @@ class posixAccount extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc
index 25b473b2..9f8c9d0a 100644
--- a/lam/lib/modules/posixGroup.inc
+++ b/lam/lib/modules/posixGroup.inc
@@ -148,6 +148,8 @@ class posixGroup extends baseModule {
* Returns the HTML meta data for the main account page.
*
* @return array HTML meta data
+ *
+ * @see baseModule::get_metaData()
*/
function display_html_attributes() {
$return[] = array(
diff --git a/lam/lib/modules/quota.inc b/lam/lib/modules/quota.inc
index bea3bb9b..547a6277 100644
--- a/lam/lib/modules/quota.inc
+++ b/lam/lib/modules/quota.inc
@@ -61,6 +61,8 @@ class quota extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc
index a1dc1f49..d2e8be53 100644
--- a/lam/lib/modules/sambaAccount.inc
+++ b/lam/lib/modules/sambaAccount.inc
@@ -92,6 +92,8 @@ class sambaAccount extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/sambaDomain.inc b/lam/lib/modules/sambaDomain.inc
index 3c0a98fa..7c948765 100644
--- a/lam/lib/modules/sambaDomain.inc
+++ b/lam/lib/modules/sambaDomain.inc
@@ -38,6 +38,8 @@ class sambaDomain extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc
index 7c9a720a..2a8ecc7f 100644
--- a/lam/lib/modules/sambaGroupMapping.inc
+++ b/lam/lib/modules/sambaGroupMapping.inc
@@ -246,6 +246,8 @@ class sambaGroupMapping extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc
index 0e6fb920..fd292b66 100644
--- a/lam/lib/modules/sambaSamAccount.inc
+++ b/lam/lib/modules/sambaSamAccount.inc
@@ -114,6 +114,8 @@ class sambaSamAccount extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();
diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc
index db1ae39a..f3fff470 100644
--- a/lam/lib/modules/shadowAccount.inc
+++ b/lam/lib/modules/shadowAccount.inc
@@ -60,6 +60,8 @@ class shadowAccount extends baseModule {
* Returns meta data that is interpreted by parent class
*
* @return array array with meta data
+ *
+ * @see baseModule::get_metaData()
*/
function get_metaData() {
$return = array();