From 46e5af15efe76509f4584f2637d458004040238c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 19 Oct 2004 16:37:52 +0000 Subject: [PATCH] added more upload functions, changed type of some functions --- lam/docs/modules-specification.htm | 331 +++++++++++++++++++---------- 1 file changed, 220 insertions(+), 111 deletions(-) diff --git a/lam/docs/modules-specification.htm b/lam/docs/modules-specification.htm index 48537d84..a969a48c 100644 --- a/lam/docs/modules-specification.htm +++ b/lam/docs/modules-specification.htm @@ -301,6 +301,202 @@ Returns the account type (user/group/host) of this module object.
This function is provided by the baseModule and should not be overwritten.

+

2.1.12. get_uploadColumns*

+
+ + + + + + +
function get_uploadColumns()
+
+
+Returns a list of column entries for the upload .csv-file.
+Each column entry is an array containing these values:
+ +
+

2.1.13. get_uploadPreDepends*

+
+ + + + + + +
function get_uploadPreDepends()
+
+
+Returns a list of module names which must be processed before this +module at builing accounts.
+The named modules may not be active, LAM will check this automatically.
+
+

2.1.14. build_uploadAccounts

+
+ + + + + + +
function get_uploadAccounts($rawAccounts, +$ids, $partialAccounts)
+
+
+This function takes the user input and generates the LDAP accounts.
+
+array +$rawAccounts: The user input data, contains one sub array for +each account.
+array +$ids: Maps the column names to keys for the sub arrays.
+array +$partialAccounts: Containing one sub array for each account, +format is the same as used for ldap_add().
+
+Returns an array which contains sub arrays to generate StatusMessages +if any errors occured.
+
+

2.1.15. do_uploadPostActions

+
+ + + + + + +
function do_uploadPostActions($data, $ids, +$failed, &$temp)
+
+
+This function is responsible to do additional tasks after the account +has been created in LDAP.
+E.g. modifying group memberships, adding Quota etc..
+
+This function is called as long as the returned status is 'finished'. Please make sure that +one function call lasts no longer than 3-4 seconds. Otherwise the +upload may fail because the time limit is exceeded. You should not make +more than one LDAP operation in each call.
+
+array +$data: The user input data, contains one sub array for each +account.
+array +$ids: Maps the column names to keys for the sub arrays.
+array +$failed: List of account numbers which could not be successfully +uploaded to LDAP.
+array +&$temp: Pointer to temporary variable which can be used to +save information between two function calls.
+
+return array (
+    'status' => +'finished' | 'inProgress'   // Defines if all +operations are complete
+    'progress' => +0..100   // The progress of the operations in percent
+    'errors' => +array()   // List of arrays which are used to generate +StatusMessages
+    )
+
+

2.1.16. get_profileOptions*

+
+ + + + + + +
function get_profileOptions()
+
+
+This function defines what attributes will be used in the account +profiles and their appearance in the profile editor.
+
+The return value is an array +that contains meta HTML code.
+
+The type "fieldset" is not allowed here.
+The name attributes are used +as keywords to load and save profiles. We recommend to use the module +name as prefix for them (e.g. posixAccount_homeDirectory) to avoid +naming confilcts.
+
+

2.1.17. check_profileOptions*

+
+ + + + + + +
function check_profileOptions($options)
+
+
+This function checks the input for a new or modified account profile.
+
+$options +is an hash array +(option name => value) that contains the input. The option values +are all arrays containing one or more elements.
+If the input data is invalid the return value is an array that contains +arrays to build StatusMessages (0 => message type, 1 => message +head, 2 => message text, 3 => additional variables).
+If no errors occured the function returns an empty array.
+
+


+



2.2. Functions which are called inside of an account container
@@ -388,58 +584,6 @@ It must return the help entry as array for the submitted help identifier. The format of the array to be returned is described in section 4. "Help entry syntax".

-

2.2.5. get_profileOptions*

-
- - - - - - -
function get_profileOptions()
-
-
-This function defines what attributes will be used in the account -profiles and their appearance in the profile editor.
-
-The return value is an array -that contains meta HTML code.
-
-The type "fieldset" is not allowed here.
-The name attributes are used -as keywords to load and save profiles. We recommend to use the module -name as prefix for them (e.g. posixAccount_homeDirectory) to avoid -naming confilcts.
-
-

2.2.6. check_profileOptions*

-
- - - - - - -
function check_profileOptions($options)
-
-
-This function checks the input for a new or modified account profile.
-
-$options -is an hash array -(option name => value) that contains the input. The option values -are all arrays containing one or more elements.
-If the input data is invalid the return value is an array that contains -arrays to build StatusMessages (0 => message type, 1 => message -head, 2 => message text, 3 => additional variables).
-If no errors occured the function returns an empty array.
-

2.2.7. get_pdfEntries



-

2.2.8. get_uploadColumns

-
-
- - - - - -
function get_uploadColumns()
-
-
-Returns a list of column entries for the upload .csv-file.
-Each column entry is an array containing these values:
- -
-

2.2.9. dynamic_Message
+

2.2.8. dynamic_Message



Returnis an array as expected from StatusMessage().

-

2.2.10. load_Messages
+

2.2.9. load_Messages


$this->messages[x][y][z]

-

2.2.11. load_attributes
+

2.2.10. load_attributes


separat.

-

2.2.12. save_attributes
+

2.2.11. save_attributes


itself which should be executed by lamdaemon.

-

2.2.13. delete_attributes
+

2.2.12. delete_attributes


is needed t interact with the user.


-

2.2.14. proccess_attributes
+

2.2.13. proccess_attributes





-

2.2.15. proccess_*
+

2.2.14. proccess_*


is needed t interact with the user.


-

2.2.16. display_html_attributes($post)
+

2.2.15. display_html_attributes($post)


is needed t interact with the user.


-

2.2.17. display_html_*($post)
+

2.2.16. display_html_*($post)




-

2.2.16. display_html_delete($post)
+

2.2.17. display_html_delete($post)



-


-

+

6.11 get_uploadColumns()

+"upload_columns" => array()
+
+Syntax for array is the same as for +the +return value of get_uploadColumns().
+

+

6.12 get_uploadPreDepends()

+"upload_preDepends" => array()
+
+Syntax for array is the same as for +the +return value of get_uploadPreDepends().
+