• Publicity: Public Only All

acs-service-contract-procs.tcl

Support library for acs service contracts.

Location:
packages/acs-service-contract/tcl/acs-service-contract-procs.tcl
Created:
2001-09-01
Author:
Neophytos Demetriou
CVS Identification:
$Id: acs-service-contract-procs.tcl,v 1.33.2.7 2023/01/04 16:33:03 antoniop Exp $

Procedures in this file

Detailed information

acs_sc::invoke (public)

 acs_sc::invoke [ -contract contract ] -operation operation \
    [ -impl impl ] [ -impl_id impl_id ] [ -call_args call_args ] \
    [ -error ]

A replacement of the former acs_sc_call procedure. One must supply either contract and impl, or just impl_id. If you supply impl_id and contract, we throw an error if the impl_id's contract doesn't match the contract you passed in. If you supply both impl_id and impl, we throw an error. Additional documentation and commentary at http://openacs.org/forums/message-view?message_id=108614.

Switches:
-contract (optional)
The name of the contract you wish to use.
-operation (required)
The name of the operation in the contract you wish to call.
-impl (optional)
The name of the implementation you wish to use.
-impl_id (optional)
The ID of the implementation you wish to use.
-call_args (optional)
The arguments you want to pass to the proc.
-error (optional, boolean)
If specified, will throw an error if the operation isn't implemented.
Author:
Lars Pind <lars@collaboraid.biz>
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_file_get_document sync_file_get_document (test acs-authentication) acs_sc::invoke acs_sc::invoke test_sync_file_get_document->acs_sc::invoke test_sync_http_get_document sync_http_get_document (test acs-authentication) test_sync_http_get_document->acs_sc::invoke acs_sc::impl::get acs_sc::impl::get (public) acs_sc::invoke->acs_sc::impl::get acs_sc_generate_name acs_sc_generate_name (private) acs_sc::invoke->acs_sc_generate_name acs_sc_call acs_sc_call (private, deprecated) acs_sc_call->acs_sc::invoke acs_user_extension::dispatch acs_user_extension::dispatch (private) acs_user_extension::dispatch->acs_sc::invoke auth::authentication::authenticate auth::authentication::authenticate (public) auth::authentication::authenticate->acs_sc::invoke auth::driver::GetParameters auth::driver::GetParameters (public, deprecated) auth::driver::GetParameters->acs_sc::invoke auth::driver::get_parameters auth::driver::get_parameters (public) auth::driver::get_parameters->acs_sc::invoke

Testcases:
sync_http_get_document, sync_file_get_document

acs_sc_binding_exists_p (public)

 acs_sc_binding_exists_p contract impl

Returns a boolean depending on whether or not the binding between the contract and implementation exists.

Parameters:
contract (required)
the contract name
impl (required)
the implementation name
Returns:
boolean
Author:
Neophytos Demetriou

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_sc_impl_new_from_spec acs_sc_impl_new_from_spec (test acs-service-contract) acs_sc_binding_exists_p acs_sc_binding_exists_p test_acs_sc_impl_new_from_spec->acs_sc_binding_exists_p db_string db_string (public) acs_sc_binding_exists_p->db_string acs_sc_get_alias acs_sc_get_alias (private) acs_sc_get_alias->acs_sc_binding_exists_p etp::create_search_impl etp::create_search_impl (public) etp::create_search_impl->acs_sc_binding_exists_p etp::search_impl_exists_p etp::search_impl_exists_p (public) etp::search_impl_exists_p->acs_sc_binding_exists_p oacs_dav::handle_request oacs_dav::handle_request (public) oacs_dav::handle_request->acs_sc_binding_exists_p search::indexer search::indexer (private) search::indexer->acs_sc_binding_exists_p

Testcases:
acs_sc_impl_new_from_spec

acs_sc_call (private, deprecated)

 acs_sc_call [ -error ] contract operation [ arguments ] [ impl ]
Deprecated. Invoking this procedure generates a warning.

Additional documentation and commentary at http://openacs.org/forums/message-view?message_id=108614.

Switches:
-error (optional, boolean)
If specified, will throw an error if the operation isn't implemented.
Parameters:
contract (required)
the contract name
operation (required)
the method to invoke
arguments (optional)
list of arguments to pass to the method
impl (optional)
the implementation name.
Author:
Neophytos Demetriou
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) acs_sc_call acs_sc_call acs_sc_call->acs_sc::invoke acs_sc_call->ad_log_deprecated

Testcases:
No testcase defined.

acs_sc_generate_name (private)

 acs_sc_generate_name contract impl operation

generate the internal proc name.

Parameters:
contract (required)
impl (required)
operation (required)
Author:
Neophytos Demetriou

Partial Call Graph (max 5 caller/called nodes):
%3 acs_sc::invoke acs_sc::invoke (public) acs_sc_generate_name acs_sc_generate_name acs_sc::invoke->acs_sc_generate_name acs_sc_proc acs_sc_proc (private) acs_sc_proc->acs_sc_generate_name acs_sc_update_alias_wrappers acs_sc_update_alias_wrappers (public) acs_sc_update_alias_wrappers->acs_sc_generate_name util_text_to_url util_text_to_url (public) acs_sc_generate_name->util_text_to_url

Testcases:
No testcase defined.

acs_sc_get_alias (private)

 acs_sc_get_alias contract operation impl

Returns the implementation alias (the proc defined to handle a given operation for a given implementation).

Parameters:
contract (required)
operation (required)
impl (required)
Author:
Neophytos Demetriou

Partial Call Graph (max 5 caller/called nodes):
%3 acs_sc_proc acs_sc_proc (private) acs_sc_get_alias acs_sc_get_alias acs_sc_proc->acs_sc_get_alias acs_sc_binding_exists_p acs_sc_binding_exists_p (public) acs_sc_get_alias->acs_sc_binding_exists_p db_0or1row db_0or1row (public) acs_sc_get_alias->db_0or1row

Testcases:
No testcase defined.

acs_sc_get_statement (private)

 acs_sc_get_statement impl_alias impl_pl arguments

Builds the statement to call from the provided metadata.

Parameters:
impl_alias (required)
Tcl or plpgsql proc to call
impl_pl (required)
programmimg language of the proc to call (TCL or PLPGSQL)
arguments (required)
list of argument names
Author:
Neophytos Demetriou

Partial Call Graph (max 5 caller/called nodes):
%3 acs_sc_proc acs_sc_proc (private) acs_sc_get_statement acs_sc_get_statement acs_sc_proc->acs_sc_get_statement

Testcases:
No testcase defined.

acs_sc_proc (private)

 acs_sc_proc contract operation impl [ impl_alias ] [ impl_pl ]

Builds the proc used by acs_sc::invoke, generally only called in acs-service-contract-init.tcl at startup.

Parameters:
contract (required)
operation (required)
impl (required)
impl_alias (optional)
impl_pl (optional)
Returns:
0 on failure, 1 on success.
Author:
Neophytos Demetriou

Partial Call Graph (max 5 caller/called nodes):
%3 acs_sc::impl::binding::init_procs acs_sc::impl::binding::init_procs (private) acs_sc_proc acs_sc_proc acs_sc::impl::binding::init_procs->acs_sc_proc acs_sc_update_alias_wrappers acs_sc_update_alias_wrappers (public) acs_sc_update_alias_wrappers->acs_sc_proc acs_sc_generate_name acs_sc_generate_name (private) acs_sc_proc->acs_sc_generate_name acs_sc_get_alias acs_sc_get_alias (private) acs_sc_proc->acs_sc_get_alias acs_sc_get_statement acs_sc_get_statement (private) acs_sc_proc->acs_sc_get_statement acs_sc_log acs_sc_log acs_sc_proc->acs_sc_log db_0or1row db_0or1row (public) acs_sc_proc->db_0or1row

Testcases:
No testcase defined.

acs_sc_update_alias_wrappers (public)

 acs_sc_update_alias_wrappers

Loop over actual bindings, finding every impl alias for each contract operation and call "acs_sc_proc" for all of these.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-automated-testing/tcl/authority-init.tcl packages/acs-automated-testing/ tcl/authority-init.tcl acs_sc_update_alias_wrappers acs_sc_update_alias_wrappers packages/acs-automated-testing/tcl/authority-init.tcl->acs_sc_update_alias_wrappers packages/acs-service-contract/tcl/acs-service-contract-init.tcl packages/acs-service-contract/ tcl/acs-service-contract-init.tcl packages/acs-service-contract/tcl/acs-service-contract-init.tcl->acs_sc_update_alias_wrappers acs_sc_generate_name acs_sc_generate_name (private) acs_sc_update_alias_wrappers->acs_sc_generate_name acs_sc_proc acs_sc_proc (private) acs_sc_update_alias_wrappers->acs_sc_proc db_foreach db_foreach (public) acs_sc_update_alias_wrappers->db_foreach

Testcases:
No testcase defined.
[ show source ]