site_node::mount (public)

 site_node::mount -node_id node_id -object_id object_id \
    [ -context_id context_id ]

Defined in packages/acs-tcl/tcl/site-nodes-procs.tcl

mount object at site node

Switches:
-node_id (required)
-object_id (required)
-context_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_context_bar ad_context_bar (test acs-tcl) site_node::mount site_node::mount test_ad_context_bar->site_node::mount apm_invoke_callback_proc apm_invoke_callback_proc (public) site_node::mount->apm_invoke_callback_proc apm_package_key_from_id apm_package_key_from_id (public) site_node::mount->apm_package_key_from_id db_dml db_dml (public) site_node::mount->db_dml site_node::get_parent_id site_node::get_parent_id (public) site_node::mount->site_node::get_parent_id site_node::get_url site_node::get_url (public) site_node::mount->site_node::get_url install::xml::action::mount-existing install::xml::action::mount-existing (public) install::xml::action::mount-existing->site_node::mount packages/acs-subsite/www/admin/site-map/mount-2.tcl packages/acs-subsite/ www/admin/site-map/mount-2.tcl packages/acs-subsite/www/admin/site-map/mount-2.tcl->site_node::mount site_node::instantiate_and_mount site_node::instantiate_and_mount (public) site_node::instantiate_and_mount->site_node::mount subsite::pivot_root subsite::pivot_root (public) subsite::pivot_root->site_node::mount template::apm::after_upgrade template::apm::after_upgrade (private) template::apm::after_upgrade->site_node::mount

Testcases:
ad_context_bar
Source code:

    db_dml mount_object {}
    db_dml update_object_package_id {}

    #
    # We have to flush from the parent_url (which might be a leaf
    # turning into an inner node)
    #
    set parent_node_id [site_node::get_parent_id -node_id $node_id]
    set url [site_node::get_url -node_id $parent_node_id]

    site_node::update_cache -sync_children -node_id $node_id -url $url -object_id $object_id
    #
    # The parent_node_id should in a mount operation never be
    # empty.
    #
    ::acs::site_nodes_cache flush_pattern  -partition_key $parent_node_id  get_children-$parent_node_id-*
    ::acs::site_nodes_children_cache flush  -partition_key $parent_node_id has_children-$parent_node_id
    #
    # This may be the first instance of this particular package.
    #
    ::acs::site_nodes_cache flush  -partition_key 0  package_url-[apm_package_key_from_id $object_id]


    #
    # DAVEB: update context_id if it is passed in some code relies
    # on context_id to be set by instantiate_and_mount so we can't
    # assume anything at this point. Callers that need to set
    # context_id for example, when an unmounted package is
    # mounted, should pass in the correct context_id.
    #
    if {[info exists context_id]} {
        db_dml update_package_context_id {
            update acs_objects
            set context_id = :context_id
            where object_id = :object_id
        }
    }

    set package_key [apm_package_key_from_id $object_id]
    foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] {
        apm_invoke_callback_proc  -package_key $inherited_package_key  -type after-mount  -arg_list [list package_id $object_id node_id $node_id]
    }
Generic XQL file:
<fullquery name="site_node::mount.mount_object">
    <querytext>
            update site_nodes
            set object_id = :object_id
            where node_id = :node_id
        </querytext>
</fullquery>

<fullquery name="site_node::mount.update_object_package_id">
    <querytext>
            update acs_objects
            set package_id = :object_id
            where object_id = :node_id
        </querytext>
</fullquery>
packages/acs-tcl/tcl/site-nodes-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/site-nodes-procs-oracle.xql

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