install::xml::action::location (public)

 install::xml::action::location node

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

Creates a URL location object.

Parameters:
node

Partial Call Graph (max 5 caller/called nodes):
%3 install::xml::action::wizard install::xml::action::wizard (public) install::xml::action::location install::xml::action::location install::xml::action::wizard->install::xml::action::location apm_attribute_value apm_attribute_value (public) install::xml::action::location->apm_attribute_value apm_invoke_install_proc apm_invoke_install_proc (public) install::xml::action::location->apm_invoke_install_proc apm_required_attribute_value apm_required_attribute_value (public) install::xml::action::location->apm_required_attribute_value install::xml::util::get_id install::xml::util::get_id (public) install::xml::action::location->install::xml::util::get_id xml_node_get_children xml_node_get_children (public) install::xml::action::location->xml_node_get_children

Testcases:
No testcase defined.
Source code:
    set id [apm_attribute_value -default "" $node id]
    set parent [apm_attribute_value -default "" $node parent]
    set name [apm_attribute_value -default "" $node name]
    set package [apm_attribute_value -default "" $node package]
    set context [apm_attribute_value -default "" $node context]
    set model [apm_attribute_value -default "" $node model]
    set view [apm_attribute_value -default "" $node view]
    set controller [apm_attribute_value -default "" $node controller]
    set path_arg [apm_attribute_value -default "" $node path-arg]
    set child_arg [apm_attribute_value -default "" $node child-arg]
    set directory_p [apm_attribute_value -default "t" $node directory-p]
    set title [apm_attribute_value -default "" $node title]

    if {$parent ne ""} {
        set parent [install::xml::util::get_id $parent]
    }

    if {$context ne ""} {
        set context [install::xml::util::get_id $context]
    }

    if {$package ne ""} {
        set package [install::xml::util::get_id $package]
    }

    if {$model ne ""} {
        set model [install::xml::util::get_id $model]
    }

    if {$view ne ""} {
        set view [install::xml::util::get_id $view]
    }

    set directory_p [string is true -strict $directory_p]

    set location_id [location::create -parent_id $parent  -name $name  -title $title  -model_id $model  -view_id $view  -controller $controller  -path_arg $path_arg  -package_id $package  -context_id $context  -directory_p $directory_p]

    set children [xml_node_get_children [lindex $node 0]]

    foreach child $children {
        switch -exact -- [xml_node_get_name $child] {
            param {
                set name [apm_required_attribute_value $child name]
                set value [apm_attribute_value -default "" $child value]
                set type [apm_attribute_value -default literal $child type]
                set subtree_p [apm_attribute_value -default f $child subtree-p]

                set subtree_p [string is true -strict $subtree_p]

                if {$type eq "id"} {
                    set value [install::xml::util::get_id $value]
                }

                location::parameter::create -location_id $location_id  -name $name  -value $value  -subtree_p $subtree_p
            }
            forward {
                set name [apm_required_attribute_value $child name]
                set url [apm_required_attribute_value $child url]
                set exports [apm_attribute_value -default "" $child exports]
                set subtree_p [apm_attribute_value -default f $child subtree-p]

                set subtree_p [string is true -strict $subtree_p]

                location::parameter::create -location_id $location_id  -name "forward::$name"  -value $url  -subtree_p $subtree_p

                if {$exports ne ""} {
                    location::parameter::create -location_id $location_id  -name "forward::${name}::exports"  -value $exports  -subtree_p $subtree_p
                }
            }
            location {
                xml_node_set_attribute $child parent $location_id

                if {$child_arg ne ""} {
                    xml_node_set_attribute $child path-arg $child_arg
                }

                if {$package ne ""
                    && ![xml_node_has_attribute $child package-id]} {
                    xml_node_set_attribute $child package-id $package
                }

                if {$context ne ""
                    && ![xml_node_has_attribute $child context-id]} {
                    xml_node_set_attribute $child context-id $parent_id
                }

                apm_invoke_install_proc -node $child
            }
            default {
                error "Unknown xml element \"[xml_node_get_name $child]\""
            }
        }
    }

    if {$id ne ""} {
        set ::install::xml::ids($id$location_id
    }

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