application_group::contains_relation_p (public)

 application_group::contains_relation_p [ -package_id package_id ] \
    [ -rel_id rel_id ]

Defined in packages/acs-subsite/tcl/application-group-procs.tcl

Determines whether the relation in question (identified by rel_id) is contained by the application group identified by package_id. If package_id is not specified, and we have a connection, then the proc will grab the package_id of the current package (i.e., [ad_conn package_id]).

Switches:
-package_id (optional)
-rel_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/admin/rel-segments/new-2.tcl packages/acs-subsite/ www/admin/rel-segments/new-2.tcl application_group::contains_relation_p application_group::contains_relation_p packages/acs-subsite/www/admin/rel-segments/new-2.tcl->application_group::contains_relation_p packages/acs-subsite/www/admin/rel-segments/new-3.tcl packages/acs-subsite/ www/admin/rel-segments/new-3.tcl packages/acs-subsite/www/admin/rel-segments/new-3.tcl->application_group::contains_relation_p packages/acs-subsite/www/admin/relations/change-member-state.tcl packages/acs-subsite/ www/admin/relations/change-member-state.tcl packages/acs-subsite/www/admin/relations/change-member-state.tcl->application_group::contains_relation_p packages/acs-subsite/www/admin/relations/one.tcl packages/acs-subsite/ www/admin/relations/one.tcl packages/acs-subsite/www/admin/relations/one.tcl->application_group::contains_relation_p packages/acs-subsite/www/admin/relations/remove.tcl packages/acs-subsite/ www/admin/relations/remove.tcl packages/acs-subsite/www/admin/relations/remove.tcl->application_group::contains_relation_p ad_conn ad_conn (public) application_group::contains_relation_p->ad_conn db_string db_string (public) application_group::contains_relation_p->db_string

Testcases:
No testcase defined.
Source code:

    if {$package_id eq "" && [ns_conn isconnected]} {
        set package_id [ad_conn package_id]
    }

    if {$package_id eq ""} {
        error "application_group::contains_party_p - package_id not specified"
    }

    # Check if the rel belongs to the application group, OR
    # the party *is* the application group.  This proc considers the
    # application group to contain itself.
    set found_p [db_string app_group_contains_rel_p {
        select case when exists (
            select 1
            from application_group_element_map
            where package_id = :package_id
              and rel_id = :rel_id
        ) then 1 else 0 end
        from dual
    }]

    return $found_p
XQL Not present:
Generic
PostgreSQL XQL file:
packages/acs-subsite/tcl/application-group-procs-postgresql.xql

Oracle XQL file:
packages/acs-subsite/tcl/application-group-procs-oracle.xql

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