apm_parameter_unregister (public)

 apm_parameter_unregister [ -callback callback ] \
    [ -package_key package_key ] [ -parameter parameter ] \
    [ -parameter_id parameter_id ] [ parameter_id_legacy ]

Defined in packages/acs-tcl/tcl/apm-procs.tcl

Unregisters a parameter from the system.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-package_key (optional)
-parameter (optional)
-parameter_id (optional)
Parameters:
parameter_id_legacy (optional)
DEPRECATED: previous versions of this proc would specify parameter_id as an unnamed argument. This has now be changed to a flag, but the old syntax is still tolerated in old code. This will generate a warning though and will be dropped in future versions.

Partial Call Graph (max 5 caller/called nodes):
%3 test_parameter__check_procs parameter__check_procs (test acs-tcl) apm_parameter_unregister apm_parameter_unregister test_parameter__check_procs->apm_parameter_unregister test_parameter_register_test parameter_register_test (test acs-tcl) test_parameter_register_test->apm_parameter_unregister ad_parameter_cache ad_parameter_cache (public) apm_parameter_unregister->ad_parameter_cache db_1row db_1row (public) apm_parameter_unregister->db_1row db_exec_plsql db_exec_plsql (public) apm_parameter_unregister->db_exec_plsql db_foreach db_foreach (public) apm_parameter_unregister->db_foreach db_string db_string (public) apm_parameter_unregister->db_string apm_unregister_disinherited_params apm_unregister_disinherited_params (public) apm_unregister_disinherited_params->apm_parameter_unregister boomerang::before-uninstall boomerang::before-uninstall (private) boomerang::before-uninstall->apm_parameter_unregister chat::apm::after_upgrade chat::apm::after_upgrade (private) chat::apm::after_upgrade->apm_parameter_unregister cookieconsent::before-uninstall cookieconsent::before-uninstall (private) cookieconsent::before-uninstall->apm_parameter_unregister packages/acs-admin/www/apm/parameter-delete.tcl packages/acs-admin/ www/apm/parameter-delete.tcl packages/acs-admin/www/apm/parameter-delete.tcl->apm_parameter_unregister

Testcases:
parameter_register_test, parameter__check_procs
Source code:
    # Transitional code to support legacy definition of parameter_id
    # specified as an unnamed argument.
    if {$parameter_id_legacy ne "" &&
        $parameter_id eq ""
    } {
        set parameter_id $parameter_id_legacy
        ns_log warning "apm_parameter_unregister: use of unnamed argument is deprecated for this proc, please use -parameter_id flag"
    }

    if { $parameter_id eq "" } {
        set parameter_id [db_string select_parameter_id {
            select parameter_id
            from apm_parameters
            where package_key = :package_key
            and parameter_name = :parameter
        }]
    }

    db_1row get_scope_and_name {
        select scope, parameter_name
        from apm_parameters
        where parameter_id = :parameter_id
    }

    ns_log Debug "apm_parameter_unregister: Unregistering parameter $parameter_id."

    if { $scope eq "global" } {
        ad_parameter_cache -delete $package_key $parameter_name
    } else {
        db_foreach all_parameters_packages {} {
            ad_parameter_cache -delete $package_id $parameter_name
        }
    }
    db_exec_plsql unregister {}
Generic XQL file:
<fullquery name="apm_parameter_unregister.all_parameters_packages">
    <querytext>
      select package_id, parameter_id, parameter_name
      from apm_packages p, apm_parameters ap
      where p.package_key = ap.package_key
      and ap.parameter_id = :parameter_id
    </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-procs.xql

PostgreSQL XQL file:
<fullquery name="apm_parameter_unregister.unregister">
    <querytext>
    select apm__unregister_parameter(:parameter_id)
  </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-procs-postgresql.xql

Oracle XQL file:
<fullquery name="apm_parameter_unregister.unregister">
    <querytext>
    begin
      apm.unregister_parameter(:parameter_id);
    end;
  </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: