acs_sc::impl::new_from_spec (public)

 acs_sc::impl::new_from_spec -spec spec

Defined in packages/acs-service-contract/tcl/implementation-procs.tcl

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 ]
Show another procedure: