• Publicity: Public Only All

driver-procs.tcl

Procs for driver parameters service contract implementations.

Location:
packages/acs-authentication/tcl/driver-procs.tcl
Created:
2003-08-27
Author:
Simon Carstensen <simon@collaobraid.biz>
CVS Identification:
$Id: driver-procs.tcl,v 1.13.2.1 2019/09/11 13:10:22 antoniop Exp $

Procedures in this file

Detailed information

auth::driver::GetParameters (public, deprecated)

 auth::driver::GetParameters -impl_id impl_id
Deprecated. Invoking this procedure generates a warning.

Returns a list of names of parameters for the driver This proc duplicates auth::driver::get_parameters

Switches:
-impl_id (required)
Author:
Simon Carstensen <simon@collaboraid.biz>
Created:
2003-08-27
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 acs_sc::invoke acs_sc::invoke (public) ad_log_deprecated ad_log_deprecated (public) auth::driver::GetParameters auth::driver::GetParameters auth::driver::GetParameters->acs_sc::invoke auth::driver::GetParameters->ad_log_deprecated

Testcases:
No testcase defined.

auth::driver::get_parameter_values (public)

 auth::driver::get_parameter_values -authority_id authority_id \
    -impl_id impl_id

Gets a list of parameter values ready to be passed to a service contract implementation. If a parameter doesn't have a value, the value will be the empty string.

Switches:
-authority_id (required)
-impl_id (required)
Author:
Simon Carstensen <simon@collaboraid.biz>
Created:
2003-08-27

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_driver_get_parameter_values auth_driver_get_parameter_values (test acs-authentication) auth::driver::get_parameter_values auth::driver::get_parameter_values test_auth_driver_get_parameter_values->auth::driver::get_parameter_values auth::driver::get_parameters auth::driver::get_parameters (public) auth::driver::get_parameter_values->auth::driver::get_parameters db_foreach db_foreach (public) auth::driver::get_parameter_values->db_foreach auth::authentication::authenticate auth::authentication::authenticate (public) auth::authentication::authenticate->auth::driver::get_parameter_values auth::password::CanChangePassword auth::password::CanChangePassword (private) auth::password::CanChangePassword->auth::driver::get_parameter_values auth::password::CanResetPassword auth::password::CanResetPassword (private) auth::password::CanResetPassword->auth::driver::get_parameter_values auth::password::CanRetrievePassword auth::password::CanRetrievePassword (private) auth::password::CanRetrievePassword->auth::driver::get_parameter_values auth::password::ChangePassword auth::password::ChangePassword (private) auth::password::ChangePassword->auth::driver::get_parameter_values

Testcases:
auth_driver_get_parameter_values

auth::driver::get_parameters (public)

 auth::driver::get_parameters -impl_id impl_id

Returns a list of names of parameters for the driver

Switches:
-impl_id (required)
Author:
Simon Carstensen <simon@collaboraid.biz>
Created:
2003-08-27

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_driver_get_parameter_values auth_driver_get_parameter_values (test acs-authentication) auth::driver::get_parameters auth::driver::get_parameters test_auth_driver_get_parameter_values->auth::driver::get_parameters acs_sc::invoke acs_sc::invoke (public) auth::driver::get_parameters->acs_sc::invoke ad_log ad_log (public) auth::driver::get_parameters->ad_log ad_try ad_try (public) auth::driver::get_parameters->ad_try auth::driver::get_parameter_values auth::driver::get_parameter_values (public) auth::driver::get_parameter_values->auth::driver::get_parameters packages/acs-admin/www/auth/authority-parameters.tcl packages/acs-admin/ www/auth/authority-parameters.tcl packages/acs-admin/www/auth/authority-parameters.tcl->auth::driver::get_parameters packages/acs-admin/www/auth/authority.tcl packages/acs-admin/ www/auth/authority.tcl packages/acs-admin/www/auth/authority.tcl->auth::driver::get_parameters

Testcases:
auth_driver_get_parameter_values

auth::driver::set_parameter_value (public)

 auth::driver::set_parameter_value -authority_id authority_id \
    -impl_id impl_id -parameter parameter -value value

Updates the parameter value in the database.

Switches:
-authority_id (required)
-impl_id (required)
-parameter (required)
-value (required)
Author:
Simon Carstensen <simon@collaboraid.biz>
Created:
2003-08-27

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_driver_get_parameter_values auth_driver_get_parameter_values (test acs-authentication) auth::driver::set_parameter_value auth::driver::set_parameter_value test_auth_driver_get_parameter_values->auth::driver::set_parameter_value test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->auth::driver::set_parameter_value db_dml db_dml (public) auth::driver::set_parameter_value->db_dml db_string db_string (public) auth::driver::set_parameter_value->db_string packages/acs-admin/www/auth/authority-parameters.tcl packages/acs-admin/ www/auth/authority-parameters.tcl packages/acs-admin/www/auth/authority-parameters.tcl->auth::driver::set_parameter_value

Testcases:
auth_driver_get_parameter_values, sync_batch_ims_test
[ hide source ] | [ make this the default ]

Content File Source

ad_library {
    Procs for driver parameters service contract implementations.

    @author Simon Carstensen (simon@collaobraid.biz)
    @creation-date 2003-08-27
    @cvs-id $Id: driver-procs.tcl,v 1.13.2.1 2019/09/11 13:10:22 antoniop Exp $
}

namespace eval auth {}
namespace eval auth::driver {}



#####
#
# auth::driver
#
#####

d_proc -public auth::driver::get_parameters {
    {-impl_id:required}
} {
    Returns a list of names of parameters for the driver

    @author Simon Carstensen (simon@collaboraid.biz)
    @creation-date 2003-08-27
} {
    if { $impl_id eq "" } {
        return {}
    }

    set parameters {}

    ad_try {
        set parameters [acs_sc::invoke \
                            -error \
                            -impl_id $impl_id \
                            -operation GetParameters]
    } on error {errorMsg} {
        ad_log Error "Error getting parameters for impl_id $impl_id: $errorMsg"
    }
    return $parameters
}

d_proc -public auth::driver::get_parameter_values {
    {-authority_id:required}
    {-impl_id:required}
} {
    Gets a list of parameter values ready to be passed to a service contract implementation.
    If a parameter doesn't have a value, the value will be the empty string.

    @author Simon Carstensen (simon@collaboraid.biz)
    @creation-date 2003-08-27
} {
    array set param [list]

    db_foreach select_values {
        select key, value
        from   auth_driver_params
        where  impl_id = :impl_id
        and    authority_id = :authority_id
    } {
        set param($key$value
    }

    # We need to ensure that the driver gets all the parameters it is asking for, and nothing but the ones it is asking for
    set params [list]
    foreach { name desc } [get_parameters -impl_id $impl_id] {
        if { [info exists param($name)] } {
            lappend params $name $param($name)
        } else {
            lappend params $name {}
        }
    }

    return $params
}

d_proc -public auth::driver::set_parameter_value {
    {-authority_id:required}
    {-impl_id:required}
    {-parameter:required}
    {-value:required}
} {
    Updates the parameter value in the database.

    @author Simon Carstensen (simon@collaboraid.biz)
    @creation-date 2003-08-27
} {
    set exists_p [db_string param_exists_p {}]

    if { $exists_p } {
        db_dml update_parameter {} -clobs [list $value]
    } else {
        db_dml insert_parameter {} -clobs [list $value]
    }
}

d_proc -deprecated -public auth::driver::GetParameters {
    {-impl_id:required}
} {
    Returns a list of names of parameters for the driver

    This proc duplicates auth::driver::get_parameters

    @see auth::driver::get_parameters

    @author Simon Carstensen (simon@collaboraid.biz)
    @creation-date 2003-08-27
} {
    return [acs_sc::invoke \
                -error \
                -impl_id $impl_id \
                -operation GetParameters]
}


# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: