auth::sync::get_doc::file::GetDocument (private)

 auth::sync::get_doc::file::GetDocument parameters

Defined in packages/acs-authentication/tcl/sync-procs.tcl

Retrieve the document from local filesystem

Parameters:
parameters (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_file_get_document sync_file_get_document (test acs-authentication) auth::sync::get_doc::file::GetDocument auth::sync::get_doc::file::GetDocument test_sync_file_get_document->auth::sync::get_doc::file::GetDocument template::util::read_file template::util::read_file (public) auth::sync::get_doc::file::GetDocument->template::util::read_file AcsSc.auth_sync_retrieve.getdocument.localfilesystem AcsSc.auth_sync_retrieve.getdocument.localfilesystem (private) AcsSc.auth_sync_retrieve.getdocument.localfilesystem->auth::sync::get_doc::file::GetDocument auth::sync::get_doc::file::register_impl auth::sync::get_doc::file::register_impl (private) auth::sync::get_doc::file::register_impl->auth::sync::get_doc::file::GetDocument

Testcases:
sync_file_get_document
Source code:
    array set result {
        doc_status failed_to_conntect
        doc_message {}
        document {}
        snapshot_p f
    }

    array set param $parameters

    if { ($param(SnapshotPath) ne "" && [clock format [clock seconds] -format "%d"] eq "01")
         || $param(IncrementalPath) eq ""
     } {
        # On the first day of the month, we get a snapshot
        set path $param(SnapshotPath)
        set result(snapshot_p) "t"
    } else {
        # All the other days of the month, we get the incremental
        set path $param(IncrementalPath)
    }

    if { $path eq "" } {
        error "You must specify at least one path to get."
    }

    set result(document) [template::util::read_file $path]

    set result(doc_status) "ok"

    return [array get result]
Generic XQL file:
packages/acs-authentication/tcl/sync-procs.xql

PostgreSQL XQL file:
packages/acs-authentication/tcl/sync-procs-postgresql.xql

Oracle XQL file:
packages/acs-authentication/tcl/sync-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: