- 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
- acs_sc::impl::alias::new (public)
- acs_sc::impl::alias::parse_aliases_spec (private)
- acs_sc::impl::alias::parse_spec (private)
- acs_sc::impl::binding::init_procs (private)
- acs_sc::impl::binding::new (public)
- acs_sc::impl::delete (public)
- acs_sc::impl::get (public)
- acs_sc::impl::get_id (public)
- acs_sc::impl::get_options (public)
- acs_sc::impl::new (public)
- acs_sc::impl::new_from_spec (public)
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):
- Testcases:
- acs_sc_impl_new_from_spec
acs_sc::impl::alias::parse_aliases_spec (private)
acs_sc::impl::alias::parse_aliases_spec -contract_name contract_name \ -impl_name impl_name -spec spec
Parse multiple aliases.
- Switches:
- -contract_name (required)
- -impl_name (required)
- -spec (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_sc::impl::alias::parse_spec (private)
acs_sc::impl::alias::parse_spec -contract_name contract_name \ -impl_name impl_name -operation operation -spec spec
Parse the spec for a single alias. The spec can either be just the name of a Tcl procedure, or it can be an array list containing the two keys 'alias' and 'language'.
- Switches:
- -contract_name (required)
- -impl_name (required)
- -operation (required)
- -spec (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_sc::impl::binding::init_procs (private)
acs_sc::impl::binding::init_procs -impl_id impl_id
Initialize the procs so we can call the service contract. Note that this proc doesn't really work, because it doesn't initialize the aliases in all interpreters, only in one.
- Switches:
- -impl_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
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):
- 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):
- 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):
- 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):
- 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):
- 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):
- 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:
And here's the explanation: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 $specThe spec is an array-list with the following entries:
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.
- 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.
- 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):
- Testcases:
- acs_sc_impl_new_from_spec