• Publicity: Public Only All

implementation-procs.tcl

Support library for acs service contracts. Implements the acs_sc::impl namespace.

Location:
packages/acs-service-contract/tcl/implementation-procs.tcl
Created:
2003-01-14
Author:
Lars Pind <lars@collaboraid.biz>
CVS Identification:
$Id: implementation-procs.tcl,v 1.21 2018/10/22 17:35:09 gustafn Exp $

Procedures in this file

Detailed information

acs_sc::impl::alias::new (public)

 acs_sc::impl::alias::new -contract_name contract_name \
    -impl_name impl_name -operation operation -alias alias \
    [ -language language ]

Add new service contract implementation alias (the procedure that implements the operation in a contract).

Switches:
-contract_name (required)
-impl_name (required)
-operation (required)
-alias (required)
-language (optional, defaults to "TCL")
Returns:
the ID of the implementation

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::impl::alias::new acs_sc::impl::alias::new test_acs_sc_impl_new_from_spec->acs_sc::impl::alias::new db_exec_plsql db_exec_plsql (public) acs_sc::impl::alias::new->db_exec_plsql acs_sc::impl::alias::parse_spec acs_sc::impl::alias::parse_spec (private) acs_sc::impl::alias::parse_spec->acs_sc::impl::alias::new auth::after_upgrade auth::after_upgrade (private) auth::after_upgrade->acs_sc::impl::alias::new category::after_install category::after_install (private) category::after_install->acs_sc::impl::alias::new

Testcases:
acs_sc_impl_new_from_spec

acs_sc::impl::binding::new (public)

 acs_sc::impl::binding::new -contract_name contract_name \
    -impl_name impl_name

Bind implementation to the contract. Bombs if not all operations have aliases.

Switches:
-contract_name (required)
-impl_name (required)

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::impl::binding::new acs_sc::impl::binding::new test_acs_sc_impl_new_from_spec->acs_sc::impl::binding::new db_exec_plsql db_exec_plsql (public) acs_sc::impl::binding::new->db_exec_plsql acs_sc::impl::new_from_spec acs_sc::impl::new_from_spec (public) acs_sc::impl::new_from_spec->acs_sc::impl::binding::new category::after_install category::after_install (private) category::after_install->acs_sc::impl::binding::new

Testcases:
acs_sc_impl_new_from_spec

acs_sc::impl::delete (public)

 acs_sc::impl::delete -contract_name contract_name -impl_name impl_name

Delete a service contract implementation

Switches:
-contract_name (required)
-impl_name (required)

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::impl::delete acs_sc::impl::delete test_acs_sc_impl_new_from_spec->acs_sc::impl::delete db_exec_plsql db_exec_plsql (public) acs_sc::impl::delete->db_exec_plsql auth::after_upgrade auth::after_upgrade (private) auth::after_upgrade->acs_sc::impl::delete auth::local::authentication::unregister_impl auth::local::authentication::unregister_impl (private) auth::local::authentication::unregister_impl->acs_sc::impl::delete auth::local::password::unregister_impl auth::local::password::unregister_impl (private) auth::local::password::unregister_impl->acs_sc::impl::delete auth::local::registration::unregister_impl auth::local::registration::unregister_impl (private) auth::local::registration::unregister_impl->acs_sc::impl::delete auth::local::user_info::unregister_impl auth::local::user_info::unregister_impl (private) auth::local::user_info::unregister_impl->acs_sc::impl::delete

Testcases:
acs_sc_impl_new_from_spec

acs_sc::impl::get (public)

 acs_sc::impl::get -impl_id impl_id -array array

Get information about a service contract implementation.

Switches:
-impl_id (required)
-array (required)
Name of an array into which you want the info. Available columns are: impl_name, impl_owner_name, impl_contract_name.
Author:
Lars Pind <lars@collaboraid.biz>

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::impl::get acs_sc::impl::get test_acs_sc_impl_new_from_spec->acs_sc::impl::get db_1row db_1row (public) acs_sc::impl::get->db_1row acs_sc::invoke acs_sc::invoke (public) acs_sc::invoke->acs_sc::impl::get

Testcases:
acs_sc_impl_new_from_spec

acs_sc::impl::get_id (public)

 acs_sc::impl::get_id -owner owner -name name [ -contract contract ]

Retrieves the ID for a service contract. If the contract is specified then the ID is retrieved for the specified contract, otherwise all service contract IDs will be retrieved that match the specified owner and implementation name. If nothing is found, the functions returns empty.

Switches:
-owner (required)
Owner of the service contract.
-name (required)
Implementation name.
-contract (optional)
Implementation contract name.
Returns:
Returns the ID for a specified service contract, or all IDs for service contracts that match the owner and implementation name of a service contract, if the contract is not specified. If there is no such service contract, the function returns empty.

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_driver_get_parameter_values auth_driver_get_parameter_values (test acs-authentication) acs_sc::impl::get_id acs_sc::impl::get_id test_auth_driver_get_parameter_values->acs_sc::impl::get_id test_sync_batch_ims_example_doc sync_batch_ims_example_doc (test acs-authentication) test_sync_batch_ims_example_doc->acs_sc::impl::get_id test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->acs_sc::impl::get_id db_string db_string (public) acs_sc::impl::get_id->db_string acs::test::auth::install acs::test::auth::install (private) acs::test::auth::install->acs_sc::impl::get_id auth::after_upgrade auth::after_upgrade (private) auth::after_upgrade->acs_sc::impl::get_id packages/file-storage/www/admin/rss-subscr-ae.tcl packages/file-storage/ www/admin/rss-subscr-ae.tcl packages/file-storage/www/admin/rss-subscr-ae.tcl->acs_sc::impl::get_id workflow::install::register_notification_types workflow::install::register_notification_types (public) workflow::install::register_notification_types->acs_sc::impl::get_id workflow::service_contract::get_impl_id workflow::service_contract::get_impl_id (public) workflow::service_contract::get_impl_id->acs_sc::impl::get_id

Testcases:
auth_driver_get_parameter_values, sync_batch_ims_example_doc, sync_batch_ims_test

acs_sc::impl::get_options (public)

 acs_sc::impl::get_options -contract_name contract_name \
    [ -exclude_names exclude_names ] [ -empty_label empty_label ]

Get a list of service contract implementation options for an HTML multiple choice widget.

Switches:
-contract_name (required)
The name of the service contract to return options for.
-exclude_names (optional)
A list of implementation names to exclude
-empty_label (optional, defaults to "-")
If provided an option with id empty string and the provided label will be added.
Returns:
A list of lists with the inner lists having label in first element and id in second.
Author:
Peter Marklund

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::impl::get_options acs_sc::impl::get_options test_acs_sc_impl_new_from_spec->acs_sc::impl::get_options db_list_of_lists db_list_of_lists (public) acs_sc::impl::get_options->db_list_of_lists packages/acs-admin/www/auth/authority.tcl packages/acs-admin/ www/auth/authority.tcl packages/acs-admin/www/auth/authority.tcl->acs_sc::impl::get_options

Testcases:
acs_sc_impl_new_from_spec

acs_sc::impl::new (public)

 acs_sc::impl::new -contract_name contract_name -name name \
    [ -pretty_name pretty_name ] -owner owner

Add new service contract implementation.

Switches:
-contract_name (required)
-name (required)
The internal name of the implementation. Referred to when invoking the implementation. Alphanumeric characters and underscores only.
-pretty_name (optional)
The name of the implementation when display to users. Defaults to 'name'.
-owner (required)
Returns:
the ID of the new implementation

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::impl::new acs_sc::impl::new test_acs_sc_impl_new_from_spec->acs_sc::impl::new db_exec_plsql db_exec_plsql (public) acs_sc::impl::new->db_exec_plsql acs_sc::impl::new_from_spec acs_sc::impl::new_from_spec (public) acs_sc::impl::new_from_spec->acs_sc::impl::new category::after_install category::after_install (private) category::after_install->acs_sc::impl::new

Testcases:
acs_sc_impl_new_from_spec

acs_sc::impl::new_from_spec (public)

 acs_sc::impl::new_from_spec -spec spec

Add new service contract implementation from an array-list style implementation, and binds it to the specified contract.

The specification takes the following form:

    set spec {
        contract_name "Action_SideEffect"
        owner "bug-tracker"
        name "CaptureResolutionCode"
        pretty_name "Capture Resolution Code"
        aliases {
            GetObjectType bug_tracker::bug::object_type
            GetPrettyName bug_tracker::bug::capture_resolution_code::pretty_name
            DoSideEffect  bug_tracker::bug::capture_resolution_code::do_side_effect
        }
    }
    acs_sc::impl::new_from_spec -spec $spec
    
And here's the explanation:

The spec is an array-list with the following entries:

  • contract_name: The name of the service contract you're implementing.
  • owner: Owner of the implementation, use the package-key.
  • name: Name of your implementation.
  • name: Pretty name of your implementation. You'd typically use this when displaying the service contract implementation through a UI.
  • aliases: Specification of the Tcl procedures for each of the service contract's operations.
The aliases section is itself an array-list. The keys are the operation names from the service contract. The values are the names of Tcl procedures in your package, which implement these operations.

Switches:
-spec (required)
The specification for the new service contract implementation.
Returns:
the impl_id of the newly registered implementation

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::impl::new_from_spec acs_sc::impl::new_from_spec test_acs_sc_impl_new_from_spec->acs_sc::impl::new_from_spec acs_sc::impl::alias::parse_aliases_spec acs_sc::impl::alias::parse_aliases_spec (private) acs_sc::impl::new_from_spec->acs_sc::impl::alias::parse_aliases_spec acs_sc::impl::binding::init_procs acs_sc::impl::binding::init_procs (private) acs_sc::impl::new_from_spec->acs_sc::impl::binding::init_procs acs_sc::impl::binding::new acs_sc::impl::binding::new (public) acs_sc::impl::new_from_spec->acs_sc::impl::binding::new acs_sc::impl::new acs_sc::impl::new (public) acs_sc::impl::new_from_spec->acs_sc::impl::new db_transaction db_transaction (public) acs_sc::impl::new_from_spec->db_transaction acs::test::auth::registration::register_impl acs::test::auth::registration::register_impl (private) acs::test::auth::registration::register_impl->acs_sc::impl::new_from_spec auth::local::authentication::register_impl auth::local::authentication::register_impl (private) auth::local::authentication::register_impl->acs_sc::impl::new_from_spec auth::local::password::register_impl auth::local::password::register_impl (private) auth::local::password::register_impl->acs_sc::impl::new_from_spec auth::local::registration::register_impl auth::local::registration::register_impl (private) auth::local::registration::register_impl->acs_sc::impl::new_from_spec auth::local::user_info::register_impl auth::local::user_info::register_impl (private) auth::local::user_info::register_impl->acs_sc::impl::new_from_spec

Testcases:
acs_sc_impl_new_from_spec
[ show source ]