%3 ::xotcl::Object ::xotcl::Object → getExitHandler → setExitHandler → unsetExitHandler __object_configureparameter __timediff abstract ad_doc ad_forward ad_proc asHTML check class db_0or1row db_1row debug destroy_on_cleanup ds extractConfigureArg filter filtersearch forward hasclass init invar isclass ismetaclass ismixin isobject istype log method mixin mset msg parametercmd proc procsearch qn self serialize set_instance_vars_defaults unknown vwait www-show-object ::xotcl::Class ::xotcl::Class → __unknown __class_configureparameter ad_instforward ad_instproc allinstances extend_slot extend_slot_default instfilter instforward instinvar instmixin instparametercmd instproc method parameter slots superclass unknown uses ::xotcl::Class->::xotcl::Object ::xo::ChatClass ::xo::ChatClass → is_chat_p flush_messages get_mode init initialize_nsvs login sweep_all_chats ::xo::ChatClass->::xotcl::Class ::xowiki::TreeRenderer ::xowiki::TreeRenderer get_property include_head_entries render ::xowiki::TreeRenderer->::xotcl::Class ::xowiki::IncludeletClass ::xowiki::IncludeletClass ::xowiki::IncludeletClass->::xotcl::Class ::xo::db::Class ::xo::db::Class → class_to_object_type → create_all_functions → delete → delete_all_acs_objects → drop_type → exists_in_db → get_class_from_db → get_instance_from_db → get_object_type → get_table_name → object_type_exists_in_db → object_type_to_class check_default_values check_table_atts collect_constraints create_object_type db_slots dbproc_nonposargs drop_object_type fetch_query get_context get_instances_from_db init init_type_hierarchy initialize_acs_object instance_select_query instantiate_objects mk_insert_method mk_update_method new_acs_object new_persistent_object object_types object_types_query require_constraints table_definition unknown ::xo::db::Class->::xotcl::Class ::xo::tdom::Class ::xo::tdom::Class incr_level unknown ::xo::tdom::Class->::xotcl::Class ::xotcl::RecreationClass ::xotcl::RecreationClass → recreate recreate ::xotcl::RecreationClass->::xotcl::Class ::xo::db::CrClass ::xo::db::CrClass → delete → ensure_item_ids_instantiated → get_child_item_ids → get_instance_from_db → get_name → get_object_type → get_parent_id → id_belongs_to_package → lookup create_object_type delete drop_object_type edit_atts fetch_object folder_type folder_type_unregister_all getFormClass get_instance_from_db get_instances_from_db init insert_statement instance_select_query lock mk_insert_method mk_save_method new_persistent_object remember_long_text_slots type_selection_clause unknown ::xo::db::CrClass->::xo::db::Class ::xo::db::CrCache::Class ::xo::db::CrCache::Class ::xo::db::CrClass->::xo::db::CrCache::Class ::xo::db::CrCache ::xo::db::CrCache ::xo::db::CrClass->::xo::db::CrCache instmixin ::xo::PackageMgr ::xo::PackageMgr → get_package_class_from_package_key configure_fresh_instance first_instance fix_site_wide_package_ids form_unify form_usages get_nls_language_from_lang get_site_wide_page import_prototype_page initialize instances lookup_side_wide_page prototype_page_file_name require require_site_wide_info require_site_wide_pages ::xo::PackageMgr->::xo::db::Class

Class ::xotcl::Class

::xotcl::Class[i] create ...

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xotcl::Object[i]
  • subclass: ::xo::ChatClass[i], ::xowiki::TreeRenderer[i], ::xowiki::IncludeletClass[i], ::xo::db::Class[i], ::xo::tdom::Class[i], ::xotcl::RecreationClass[i]
::xotcl::Class create ::xotcl::Class \
     -superclass ::xotcl::Object

Methods (to be applied on the object)

  • __unknown (scripted)

Methods (to be applied on instances)

  • __class_configureparameter (scripted)

    set slotObjects [nsf::directdispatch [self] ::nsf::methods::class::info::slotobjects -closure -type ::nx::Slot]
    set parameterDefinitions [::nsf::parameter::specs $slotObjects]
    lappend parameterDefinitions args:alias,method=residualargs,args
  • __default_metaclass (setter)

  • __default_superclass (setter)

  • ad_instforward (scripted)

    set flags [::xo::api get_proc_definition_flags $debug $deprecated]
    uplevel [self] instforward {*}$flags $method_name $args
    ::xo::api update_method_doc  -protection [expr {$private ? "private" : "public"}]  -deprecated=$deprecated  -debug=$debug  [::xo::api scope] [self]  "inst" $method_name $doc
  • ad_instproc (scripted)

    set flags [::xo::api get_proc_definition_flags $debug $deprecated]
    set returnSpec [::xo::api get_returns_spec $returns]
    uplevel [list [self] instproc {*}$flags $proc_name $arguments {*}$returnSpec $body]
    ::xo::api update_method_doc  -protection [expr {$private ? "private" : "public"}]  -deprecated=$deprecated  -debug=$debug  [::xo::api scope] [self]  inst $proc_name $doc
  • allinstances (scripted)

    # TODO: mark it deprecated
    return [:info instances -closure]
  • alloc (alias)

  • create (alias)

  • dealloc (alias)

  • extend_slot (scripted)

    
    # The argument list is e.g. "foo -name x -title y"
    #
    # It is placed into one argument to avoid interference with the "-"
    # argument parsing since it will always start with a non-dashed
    # value.
    #
    set name [lindex $arg 0]
    set config [lrange $arg 1 end]
    
    # search for slot
    foreach c [:info heritage] {
      if {[nsf::is object ${c}::slot::$name]} {
        set slot ${c}::slot::$name
        break
      }
    }
    if {![info exists slot]} {error "can't find slot $name"}
    
    # copy slot and configure it
    set newSlot [self]::slot::$name
    
    $slot copy $newSlot
    $newSlot configure  -domain [self]  -manager $newSlot  -create_acs_attribute false  -create_table_attribute false  {*}$config
    #
    # Changing the domain is necessary for "update_attribute_from_slot"
    # for the extended slots like "title", "description" etc. But then
    # the accessor methods (for "title", "description") have to be
    # installed manually for the classes, on which the extension
    # happens.
    #
    ::nsf::method::setter [$newSlot domain] $name
    ns_log notice "=== change domain of $name from [$newSlot domain] to [$slot domain]"
    $newSlot domain [$slot domain]
    
    #
    set :db_slot($name$newSlot
  • extend_slot_default (scripted)

    # Search for the slot. If the slot exists, extend its default
    # value with the new value
    foreach c [:info heritage] {
      if {[nsf::is object ${c}::slot::$name]} {
        set value [list $value {*}[${c}::slot::$name default]]
        break
      }
    }
    # create a mirroring slot with the maybe extended default
    :slots [list Attribute create $name -default $value]
  • info (alias)

  • instfilter (forward)

  • instfilterguard (alias)

  • instforward (scripted)

    set arglist [list]
    if {[info exists target] && [string index $target 0] eq "-"} {
      error "target '$target' must not start with a dash"
    }
    if {[info exists default]} {lappend arglist -default $default}
    if {$earlybinding} {lappend arglist -earlybinding}
    if {[info exists methodprefix]} {lappend arglist -prefix $methodprefix}
    if {$objscope} {lappend arglist -frame object}
    if {[info exists onerror]} {lappend arglist -onerror $onerror}
    if {$verbose} {lappend arglist -verbose}
    if {[info exists target]} {lappend arglist $target}
    if {[llength $args] > 0} {lappend arglist {*}$args}
    set r [::nsf::method::forward [self$method {*}$arglist]
    if {$debug} {::nsf::method::property [self$r debug true}
    if {$deprecated} {::nsf::method::property [self$r deprecated true}
    return $r
  • instinvar (forward)

  • instmixin (forward)

     <instance of xotcl::Class[i]> instmixin

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_folder_with_page create_folder_with_page (test ) xotcl::Class instproc instmixin xotcl::Class instproc instmixin test_create_folder_with_page->xotcl::Class instproc instmixin test_create_workflow_with_instance create_workflow_with_instance (test xowf) test_create_workflow_with_instance->xotcl::Class instproc instmixin test_xowf xowf (test ) test_xowf->xotcl::Class instproc instmixin

    Testcases:
    create_folder_with_page, xowf, create_workflow_with_instance
  • instmixinguard (alias)

  • instparametercmd (forward)

  • instproc (scripted)

    set conditions [list]
    if {[info exists precondition]}  {lappend conditions -precondition  $precondition}
    if {[info exists postcondition]} {lappend conditions -postcondition $postcondition}
    set r [::nsf::method::create [self$name $arguments $body {*}$conditions]
    if {$debug} {::nsf::method::property [self$r debug true}
    if {$deprecated} {::nsf::method::property [self$r deprecated true}
    if {[info exists returns]} {::nsf::method::property [self$r returns $returns}
    return $r
  • method (scripted)

    set returns_flag [expr {[info exists returns] ? [list -returns $returns] : {}}]
    if {${per-object}} {
      :proc -debug=$debug -deprecated=$deprecated $name $arguments {*}$returns_flag $body
    } else {
      :instproc -debug=$debug -deprecated=$deprecated $name $arguments {*}$returns_flag $body
    }
  • new (alias)

  • parameter (scripted)

    set slotContainer [::nx::slotObj [::nsf::self]]
    foreach arg $arglist {
      #puts stderr "PARAMETER: [self] ::nsf::classes::nx::Class::property -accessor public $arg"
      [self] ::nsf::classes::nx::Class::property -class ::xotcl::Attribute -accessor public $arg
      ::nsf::method:::setter [self] [lindex $arg 0]
    }
    ::nsf::var::set $slotContainer __parameter $arglist
  • recreate (alias)

  • slots (scripted)

    set slotContainer [::nx::slotObj [self]]
    ::uplevel [list [self] contains -object $slotContainer $cmd]
  • superclass (forward)

  • unknown (scripted)

    # puts stderr "use '[self] create $args', not '[self] $args'"
    set lvl 1
    if {[::nsf::current isnextcall]} {
      set lvl [::nsf::current callinglevel]
    }
    ::uplevel $lvl [list [self] create {*}$args]
  • uses (scripted)

    foreach package $list {
      ::xotcl::package import -into [::xotcl::self$package
      puts stderr "*** using ${package}::* in [::xotcl::self]"
    }