• Publicity: Public Only All

sync-procs.tcl

API for managing synchronization of user data.

Location:
packages/acs-authentication/tcl/sync-procs.tcl
Created:
2003-09-05
Author:
Lars Pind <lars@collaboraid.biz>
CVS Identification:
$Id: sync-procs.tcl,v 1.44.2.7 2024/08/20 08:58:02 gustafn Exp $

Procedures in this file

Detailed information

auth::sync::job::action (public)

 auth::sync::job::action -job_id job_id -operation operation \
    -username username [ -array array ]

Inserts/updates/deletes a user, depending on the operation.

Switches:
-job_id (required)
The job which this is part of for logging purposes.
-operation (required)
'insert', 'update', 'delete', or 'snapshot'.
-username (required)
The username which this action refers to.
-array (optional)
Name of an array containing the relevant registration elements. Not required if this is a delete operation.
Returns:
entry_id of newly created entry

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_actions sync_actions (test acs-authentication) auth::sync::job::action auth::sync::job::action test_sync_actions->auth::sync::job::action test_sync_snapshot sync_snapshot (test acs-authentication) test_sync_snapshot->auth::sync::job::action acs_user::get acs_user::get (public) auth::sync::job::action->acs_user::get acs_user::get_by_username acs_user::get_by_username (public) auth::sync::job::action->acs_user::get_by_username ad_log ad_log (public) auth::sync::job::action->ad_log ad_try ad_try (public) auth::sync::job::action->ad_try auth::create_local_account auth::create_local_account (public) auth::sync::job::action->auth::create_local_account auth::sync::job::snapshot_delete_remaining auth::sync::job::snapshot_delete_remaining (public) auth::sync::job::snapshot_delete_remaining->auth::sync::job::action auth::sync::process_doc::ims::ProcessDocument auth::sync::process_doc::ims::ProcessDocument (private) auth::sync::process_doc::ims::ProcessDocument->auth::sync::job::action

Testcases:
sync_actions, sync_snapshot

auth::sync::job::create_entry (public)

 auth::sync::job::create_entry -job_id job_id -operation operation \
    -username username [ -user_id user_id ] [ -success ] \
    [ -message message ] [ -element_messages element_messages ]

Record a batch job entry.

Switches:
-job_id (required)
The ID of the batch job you're ending.
-operation (required)
One of 'insert', 'update', or 'delete'.
-username (required)
The username of the user being inserted/updated/deleted.
-user_id (optional)
The user_id of the local user account, if known.
-success (optional, boolean)
Whether or not the operation went well.
-message (optional)
Any error message to stick into the log.
-element_messages (optional)
Returns:
entry_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_sync_process_ims_implementations auth_sync_process_ims_implementations (test acs-authentication) auth::sync::job::create_entry auth::sync::job::create_entry test_auth_sync_process_ims_implementations->auth::sync::job::create_entry test_sync_start_end sync_start_end (test acs-authentication) test_sync_start_end->auth::sync::job::create_entry db_dml db_dml (public) auth::sync::job::create_entry->db_dml db_nextval db_nextval (public) auth::sync::job::create_entry->db_nextval auth::sync::job::action auth::sync::job::action (public) auth::sync::job::action->auth::sync::job::create_entry

Testcases:
sync_start_end, auth_sync_process_ims_implementations

auth::sync::job::end (public)

 auth::sync::job::end -job_id job_id [ -message message ]

Record the end of a batch job. Closes out the transaction log and sends out notifications.

Switches:
-job_id (required)
The ID of the batch job you're ending.
-message (optional)
Returns:
array list with result of auth::sync::job::get.
Author:
Lars Pind <lars@collaboraid.biz>
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_actions sync_actions (test acs-authentication) auth::sync::job::end auth::sync::job::end test_sync_actions->auth::sync::job::end test_sync_snapshot sync_snapshot (test acs-authentication) test_sync_snapshot->auth::sync::job::end test_sync_start_end sync_start_end (test acs-authentication) test_sync_start_end->auth::sync::job::end acs_mail_lite::send acs_mail_lite::send (public) auth::sync::job::end->acs_mail_lite::send ad_log ad_log (public) auth::sync::job::end->ad_log ad_system_owner ad_system_owner (public) auth::sync::job::end->ad_system_owner ad_try ad_try (public) auth::sync::job::end->ad_try auth::sync::job::get auth::sync::job::get (public) auth::sync::job::end->auth::sync::job::get auth::authority::batch_sync auth::authority::batch_sync (public) auth::authority::batch_sync->auth::sync::job::end

Testcases:
sync_start_end, sync_actions, sync_snapshot

auth::sync::job::end_get_document (public)

 auth::sync::job::end_get_document -job_id job_id \
    -doc_status doc_status [ -doc_message doc_message ] \
    [ -document document ] [ -snapshot ]

Record the time that we've finished getting the document, and record the status.

Switches:
-job_id (required)
The ID of the batch job you're ending.
-doc_status (required)
-doc_message (optional)
-document (optional)
-snapshot (optional, boolean)
Set this if this is a snapshot job, as opposed to an incremental ('event driven') job.

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_start_end sync_start_end (test acs-authentication) auth::sync::job::end_get_document auth::sync::job::end_get_document test_sync_start_end->auth::sync::job::end_get_document db_boolean db_boolean (public) auth::sync::job::end_get_document->db_boolean db_dml db_dml (public) auth::sync::job::end_get_document->db_dml auth::authority::batch_sync auth::authority::batch_sync (public) auth::authority::batch_sync->auth::sync::job::end_get_document

Testcases:
sync_start_end

auth::sync::job::get (public)

 auth::sync::job::get -job_id job_id -array array

Get information about a batch job in an array.

Switches:
-job_id (required)
The ID of the batch job you're ending.
-array (required)
Name of an array into which you want the information.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_batch_for_local sync_batch_for_local (test acs-authentication) auth::sync::job::get auth::sync::job::get test_sync_batch_for_local->auth::sync::job::get test_sync_batch_ims_example_doc sync_batch_ims_example_doc (test acs-authentication) test_sync_batch_ims_example_doc->auth::sync::job::get test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->auth::sync::job::get ad_url ad_url (public) auth::sync::job::get->ad_url db_1row db_1row (public) auth::sync::job::get->db_1row export_vars export_vars (public) auth::sync::job::get->export_vars auth::sync::job::end auth::sync::job::end (public) auth::sync::job::end->auth::sync::job::get packages/acs-admin/www/auth/batch-action.tcl packages/acs-admin/ www/auth/batch-action.tcl packages/acs-admin/www/auth/batch-action.tcl->auth::sync::job::get packages/acs-admin/www/auth/batch-job.tcl packages/acs-admin/ www/auth/batch-job.tcl packages/acs-admin/www/auth/batch-job.tcl->auth::sync::job::get

Testcases:
sync_batch_for_local, sync_batch_ims_example_doc, sync_batch_ims_test

auth::sync::job::get_authority_id (public)

 auth::sync::job::get_authority_id -job_id job_id

Get the authority_id from a job_id. Cached.

Switches:
-job_id (required)
The ID of the batch job you're ending.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_start_end sync_start_end (test acs-authentication) auth::sync::job::get_authority_id auth::sync::job::get_authority_id test_sync_start_end->auth::sync::job::get_authority_id auth::sync::job::get_authority_id_not_cached auth::sync::job::get_authority_id_not_cached (private) auth::sync::job::get_authority_id->auth::sync::job::get_authority_id_not_cached util_memoize util_memoize (public) auth::sync::job::get_authority_id->util_memoize auth::sync::job::action auth::sync::job::action (public) auth::sync::job::action->auth::sync::job::get_authority_id auth::sync::job::snapshot_delete_remaining auth::sync::job::snapshot_delete_remaining (public) auth::sync::job::snapshot_delete_remaining->auth::sync::job::get_authority_id

Testcases:
sync_start_end

auth::sync::job::get_entries (public)

 auth::sync::job::get_entries -job_id job_id

Get a list of entry_ids of the job log entries, ordered by entry_time.

Switches:
-job_id (required)
The ID of the batch job you're ending.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_batch_ims_example_doc sync_batch_ims_example_doc (test acs-authentication) auth::sync::job::get_entries auth::sync::job::get_entries test_sync_batch_ims_example_doc->auth::sync::job::get_entries test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->auth::sync::job::get_entries db_list db_list (public) auth::sync::job::get_entries->db_list

Testcases:
sync_batch_ims_example_doc, sync_batch_ims_test

auth::sync::job::get_entry (public)

 auth::sync::job::get_entry -entry_id entry_id -array array

Get information about a log entry

Switches:
-entry_id (required)
-array (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_actions sync_actions (test acs-authentication) auth::sync::job::get_entry auth::sync::job::get_entry test_sync_actions->auth::sync::job::get_entry test_sync_batch_ims_example_doc sync_batch_ims_example_doc (test acs-authentication) test_sync_batch_ims_example_doc->auth::sync::job::get_entry test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->auth::sync::job::get_entry test_sync_snapshot sync_snapshot (test acs-authentication) test_sync_snapshot->auth::sync::job::get_entry db_1row db_1row (public) auth::sync::job::get_entry->db_1row packages/acs-admin/www/auth/batch-action.tcl packages/acs-admin/ www/auth/batch-action.tcl packages/acs-admin/www/auth/batch-action.tcl->auth::sync::job::get_entry

Testcases:
sync_actions, sync_snapshot, sync_batch_ims_example_doc, sync_batch_ims_test

auth::sync::job::snapshot_delete_remaining (public)

 auth::sync::job::snapshot_delete_remaining -job_id job_id

Deletes the users that weren't included in the snapshot.

Switches:
-job_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_snapshot sync_snapshot (test acs-authentication) auth::sync::job::snapshot_delete_remaining auth::sync::job::snapshot_delete_remaining test_sync_snapshot->auth::sync::job::snapshot_delete_remaining auth::sync::job::action auth::sync::job::action (public) auth::sync::job::snapshot_delete_remaining->auth::sync::job::action auth::sync::job::get_authority_id auth::sync::job::get_authority_id (public) auth::sync::job::snapshot_delete_remaining->auth::sync::job::get_authority_id db_list db_list (public) auth::sync::job::snapshot_delete_remaining->db_list auth::authority::batch_sync auth::authority::batch_sync (public) auth::authority::batch_sync->auth::sync::job::snapshot_delete_remaining

Testcases:
sync_snapshot

auth::sync::job::start (public)

 auth::sync::job::start [ -job_id job_id ] -authority_id authority_id \
    [ -interactive ] [ -creation_user creation_user ]

Record the beginning of a job.

Switches:
-job_id (optional)
-authority_id (required)
The ID of the authority you're trying to sync
-interactive (optional, boolean)
Set this if this is an interactive job, i.e. it's initiated by a user.
-creation_user (optional)
Returns:
job_id An ID for the new batch job. Used when calling other procs in this API.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_sync_process_ims_implementations auth_sync_process_ims_implementations (test acs-authentication) auth::sync::job::start auth::sync::job::start test_auth_sync_process_ims_implementations->auth::sync::job::start test_sync_actions sync_actions (test acs-authentication) test_sync_actions->auth::sync::job::start test_sync_snapshot sync_snapshot (test acs-authentication) test_sync_snapshot->auth::sync::job::start test_sync_start_end sync_start_end (test acs-authentication) test_sync_start_end->auth::sync::job::start ad_conn ad_conn (public) auth::sync::job::start->ad_conn auth::sync::job::get_authority_id_seed auth::sync::job::get_authority_id_seed (private) auth::sync::job::start->auth::sync::job::get_authority_id_seed db_boolean db_boolean (public) auth::sync::job::start->db_boolean db_dml db_dml (public) auth::sync::job::start->db_dml db_nextval db_nextval (public) auth::sync::job::start->db_nextval auth::authority::batch_sync auth::authority::batch_sync (public) auth::authority::batch_sync->auth::sync::job::start

Testcases:
sync_start_end, sync_actions, sync_snapshot, auth_sync_process_ims_implementations

auth::sync::job::start_get_document (public)

 auth::sync::job::start_get_document -job_id job_id

Record the time that we're starting to get the document.

Switches:
-job_id (required)
The ID of the batch job you're ending.

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_start_end sync_start_end (test acs-authentication) auth::sync::job::start_get_document auth::sync::job::start_get_document test_sync_start_end->auth::sync::job::start_get_document db_dml db_dml (public) auth::sync::job::start_get_document->db_dml auth::authority::batch_sync auth::authority::batch_sync (public) auth::authority::batch_sync->auth::sync::job::start_get_document

Testcases:
sync_start_end

auth::sync::purge_jobs (public)

 auth::sync::purge_jobs [ -num_days num_days ]

Purge jobs that are older than KeepBatchLogDays days.

Switches:
-num_days (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_start_end sync_start_end (test acs-authentication) auth::sync::purge_jobs auth::sync::purge_jobs test_sync_start_end->auth::sync::purge_jobs db_dml db_dml (public) auth::sync::purge_jobs->db_dml parameter::get_from_package_key parameter::get_from_package_key (public) auth::sync::purge_jobs->parameter::get_from_package_key

Testcases:
sync_start_end
[ show source ]