ad_page_contract_filter_proc_object_type (public)

 ad_page_contract_filter_proc_object_type name object_id_varname types

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

Checks whether the supplied object_id is an acs_object of one of the types specified in the flag parameters. The check will take the object_type hierarchy into account e.g. will always succeed if one of the types is "acs_object". In this case the filter will just behave as an existence check. Example: some_user_id:object_type(user),notnull

Parameters:
name
object_id_varname
types

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_page_contract_filters ad_page_contract_filters (test acs-tcl) ad_page_contract_filter_proc_object_type ad_page_contract_filter_proc_object_type test_ad_page_contract_filters->ad_page_contract_filter_proc_object_type _ _ (public) ad_page_contract_filter_proc_object_type->_ acs_object::is_type_p acs_object::is_type_p (private) ad_page_contract_filter_proc_object_type->acs_object::is_type_p ad_complain ad_complain (public) ad_page_contract_filter_proc_object_type->ad_complain ad_page_contract_filter_proc_object_id ad_page_contract_filter_proc_object_id (public) ad_page_contract_filter_proc_object_type->ad_page_contract_filter_proc_object_id

Testcases:
ad_page_contract_filters
Source code:
upvar $object_id_varname object_id

    if { $types eq "" } {
        set types acs_object
    }

    # First make sure the object_id is formally correct
    if { ![ad_page_contract_filter_proc_object_id $name object_id] } {
        return 0
    }

    if { ![acs_object::is_type_p  -object_id $object_id  -object_types $types] } {
        ad_complain [_ acs-tcl.lt_invalid_object_type]
        return 0
    }

    return 1
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: