Class ::xotcl::Object

::xotcl::Object[i] create ...

Defined in

Class Relations

  • class: ::xotcl::Class[i]
  • subclass: ::xo::db::DBI::Profile[i], ::xo::AsyncHttpRequest::SimpleListener[i], ::xowiki::openacspolicy::Package[i], ::xowiki::BootstrapCollapseButton[i], ::xo::db::sql::apm_package_version[i], ::xo::db::sql::acs_sc_impl[i], ::xo::db::sql::timezone[i], ::xowf::test_item::test-item-policy-answer::Package[i], ::xo::db::sql::timespan[i], ::xo::db::sql::notification_delivery_method[i], ::xo::db::sql::acs[i], ::xo::db::sql::acs_privilege[i], ::xowiki::policy1::CrFolder[i], ::xo::db::sql::notification[i], ::xowiki::openacspolicy::Object[i], ::xo::db::sql::person[i], ::xo::db::sql::pa_collection[i], ::xo::db::sql::acs_util[i], ::xo::db::sql::acs_attribute[i], ::xo::db::sql::pinds_blog_category[i], ::xowf::test_item::test-item-policy-publish::Form[i], ::xo::db::sql::membership_rel[i], ::xo::db::sql::bt_bug[i], ::xowiki::policy1::Object[i], ::xo::db::sql::content_folder[i], ::xo::db::sql::acs_object_util[i], ::xo::db::sql::forums_reading_info[i], ::xo::db::sql::rel_segment[i], ::xowiki::policy1::FormPage[i], ::xowiki::policy1::Form[i], ::xo::db::sql::bt_patch[i], ::xowf::test_item::test-item-policy-edit::Form[i], ::xo::db::sql::admin_rel[i], ::xowiki::openacspolicy::File[i], ::xowiki::policy2::Form[i], ::xo::db::sql::acs_group[i], ::xowiki::policy3::Form[i], ::xo::db::sql::acs_mail_nt[i], ::xo::db::sql::workflow_case_pkg[i], ::xo::db::sql::composition_rel[i], ::xowf::test_item::test-item-policy-publish::Page[i], ::xo::db::sql::workflow[i], ::xo::db::sql::acs_user[i], ::xo::db::Object[i], ::xowiki::policy5::Form[i], ::xo::db::sql::acs_sc_contract[i], ::xo::db::sql::acs_sc_operation[i], ::xowf::conf2022policy::Package[i], ::xo::db::sql::acs_mail_queue_message[i], ::xo::db::sql::cal_uid[i], ::xowiki::policy1::Page[i], ::xowf::test_item::test-item-policy-edit::Page[i], ::xowiki::policy2::FormPage[i], ::xo::db::sql::weblogger_blogroll_entry[i], ::xo::db::sql::pa_album[i], ::xowiki::policy2::Page[i], ::xo::db::sql::wp_attachment[i], ::xowf::test_item::test-item-policy-answer::Form[i], ::xowiki::policy3::Page[i], ::xowf::test_item::test-item-policy-edit::Object[i], ::xo::db::sql::time_interval[i], ::xo::db::sql::forums_message[i], ::xo::db::sql::category_tree[i], ::xo::db::sql::acs_rel[i], ::xo::db::sql::bookmark[i], ::xowiki::policy5::Page[i], ::xo::db::sql::subsite_callback[i], ::xowiki::policy2::Object[i], ::xowiki::policy1::Package[i], ::xo::db::sql::bt_version[i], ::xo::db::sql::acs_mail_body[i], ::xo::db::sql::user_profile[i], ::xo::db::sql::apm_parameter_value[i], ::xowf::test_item::test-item-policy-answer::Page[i], ::xo::db::sql::url[i], ::xowf::conf2022policy::Form[i], ::xo::db::sql::weblogger_channel[i], ::xowiki::policy3::FormPage[i], ::xo::db::sql::workflow_case_log_entry[i], ::xo::db::sql::acs_sc_msg_type[i], ::xo::db::sql::fs_url[i], ::xo::db::sql::search[i], ::xo::db::sql::acs_object_type[i], ::xo::db::sql::acs_message[i], ::xowf::test_item::test-item-policy-publish::Object[i], ::xo::db::sql::content_template[i], ::xowf::conf2022policy::CrFolder[i], ::xo::db::sql::content_revision[i], ::xo::db::sql::acs_mail_gc_object[i], ::xo::db::sql::notification_request[i], ::xo::db::sql::workflow_case[i], ::xo::db::sql::acs_object[i], ::xowf::conf2022policy::Page[i], ::xowf::conf2022policy::FormPage[i], ::xowiki::policy3::Object[i], ::xo::db::sql::ec_product[i], ::xo::db::sql::category[i], ::xowiki::TreeRenderer=list[i], ::xo::db::sql::content_type[i], ::xo::db::sql::acs_content[i], ::xo::db::sql::journal_entry[i], ::xo::db::sql::image[i], ::xo::db::sql::search_observer[i], ::xo::db::sql::photo_album[i], ::xo::db::sql::wf_article_callback[i], ::xo::db::sql::cal_item[i], ::xo::db::sql::content_extlink[i], ::xowiki::policy5::FormPage[i], ::xo::db::sql::rel_constraint[i], ::xo::db::sql::acs_datatype[i], ::xo::db::sql::etp[i], ::xo::db::sql::bt_bug_revision[i], ::xo::db::sql::fs_simple_object[i], ::xo::db::sql::download_rep[i], ::xo::db::sql::category_synonym[i], ::xo::db::sql::acs_mail_link[i], ::xowiki::openacspolicy::FormPage[i], ::xo::db::sql::category_link[i], ::xo::db::sql::site_node[i], ::xowiki::openacspolicy::Form[i], ::xo::db::sql::bt_project[i], ::xo::db::sql::views[i], ::xo::db::sql::acs_reference[i], ::xo::db::sql::acs_rel_type[i], ::xowf::test_item::test-item-policy-publish::File[i], ::xo::db::sql::wp_style[i], ::xo::db::sql::forums_forum[i], ::xo::Table::TABLE::HiddenField[i], ::xowiki::policy3::Package[i], ::xo::db::sql::wp_slide[i], ::xo::db::sql::acs_sc_binding[i], ::xowf::test_item::test-item-policy-answer::CrFolder[i], ::xowiki::policy1::File[i], ::xowf::test_item::test-item-policy-edit::File[i], ::xo::db::sql::acs_log[i], ::xo::db::sql::faq[i], ::xowiki::policy2::File[i], ::xo::db::sql::notification_reply[i], ::xowiki::openacspolicy::Page[i], ::xowiki::policy3::File[i], ::xowf::test_item::test-item-policy-edit::Package[i], ::xo::db::sql::doc[i], ::xowiki::policy5::File[i], ::xo::db::sql::notification_interval[i], ::xowf::test_item::test-item-policy-answer::FormPage[i], ::xo::db::sql::wp_presentation[i], ::xo::db::sql::wf_callback[i], ::xo::db::sql::views_by_type[i], ::xo::db::sql::party[i], ::xo::db::sql::acs_activity[i], ::xo::db::sql::party_approved_member[i], ::xo::db::sql::apm_package_type[i], ::xowf::test_item::test-item-policy-answer::File[i], ::xo::db::sql::authority[i], ::xo::db::sql::file_storage[i], ::xo::db::sql::util[i], ::xo::db::sql::pinds_blog_entry[i], ::xo::db::sql::content_item[i], ::xo::db::sql::static_page[i], ::xo::db::sql::acs_mail_multipart[i], ::xowf::test_item::test-item-policy-publish::Package[i], ::xo::db::sql::news[i], ::xo::db::sql::apm_service[i], ::xo::db::sql::sec_session_property[i], ::xo::db::sql::calendar[i], ::xowiki::policy5::Object[i], ::xo::db::sql::apm_application[i], ::xowf::conf2022policy::Object[i], ::xowf::test_item::test-item-policy-edit::CrFolder[i], ::xowf::conf2022policy::File[i], ::xo::db::sql::content_keyword[i], ::xo::db::sql::recurrence[i], ::xo::db::sql::rss_gen_subscr[i], ::xowf::test_item::test-item-policy-publish::CrFolder[i], ::xo::db::sql::acs_permission[i], ::xo::db::sql::apm[i], ::xo::db::sql::template_demo_note[i], ::xowf::test_item::test-item-policy-edit::FormPage[i], ::xo::db::sql::content_symlink[i], ::xo::db::sql::site_node_object_map[i], ::xo::db::sql::pa_photo[i], ::xowf::test_item::test-item-policy-answer::Object[i], ::xo::db::sql::acs_sc_impl_alias[i], ::xo::db::sql::application_group[i], ::xowiki::policy2::Package[i], ::xo::db::sql::acs_event[i], ::xo::db::sql::notification_type[i], ::xowf::test_item::test-item-policy-publish::FormPage[i], ::xo::db::sql::apm_package[i], ::xowiki::TreeRenderer=bootstrap3[i], ::xowiki::policy5::Package[i], ::xowiki::Weblog::EntryRenderer[i], ::xotcl::THREAD::Client[i], ::xo::OrderedComposite::ChildManager[i], ::xowiki::RSS-client::item[i], ::xo::OrderedComposite::MethodCompare[i], ::xo::db::CrCache::Class[i], ::xo::OrderedComposite::IndexCompare[i], ::xowiki::RSS-client::channel[i], ::xo::db::CrCache::Item[i], ::xo::OrderedComposite::Child[i], ::xo::ical::VCALENDAR[i], ::xowiki::Weblog::WeblogRenderer[i], ::xowiki::includelet::PageReorderSupport[i], ::Generic::Form[i], ::xowiki::includelet::decoration=rightbox[i], ::xowiki::ParameterCache[i], ::xowiki::RSS-client[i], ::xowf::WorkflowPage[i], ::xowf::Context[i], ::xo::db::temp_table[i], ::xo::Message[i], ::xowiki::includelet::decoration=edit[i], ::Generic::List[i], ::xo::OrderedComposite[i], ::xowiki::MenuBar[i], ::xo::Context[i], ::xowiki::BaseLink[i], ::RR[i], ::xo::db::Driver[i], ::xo::TRN-Mode[i], ::xowiki::Weblog[i], ::xowiki::includelet::decoration=portlet[i], ::xo::tdom::AttributeManager[i], ::xo::Timestamp[i], ::xo::HttpRequestTrace[i], ::xowiki::Importer[i], ::xowiki::ArchiveFile[i], ::xowiki::includelet::decoration=plain[i], ::xowiki::XMLSyndication[i], ::xowf::atjob[i], ::xo::db::CrCache[i], ::xo::Module[i], ::xowiki::includelet::form-menu-button[i], ::xo::ProtocolHandler[i], ::xo::InstanceManager[i], ::xo::db::SQL[i], ::xotcl::THREAD[i], ::xo::HttpCore[i], ::xo::oauth::Signature[i], ::xowiki::ADP_Generator[i], ::xo::Tls[i], ::xo::Page[i], ::xowiki::includelet::page_fragment_cache[i], ::xo::role::Role[i], ::xowiki::includelet::highcharts[i], ::xo::Policy[i], ::chat::Package[i], ::xowf::WorkflowObject[i], ::xowiki::LinkTemplate[i], ::xo::Localizer[i], ::xo::parameter[i], ::xowiki::Category[i], ::xotcl::Class[i]
::xotcl::Class create ::xotcl::Object

Methods (to be applied on the object)

Methods (to be applied on instances)

  • __object_configureparameter (scripted)

    set slotObjects [nsf::directdispatch [self] ::nsf::methods::object::info::lookupslots -type ::nx::Slot]
    set parameterDefinitions [::nsf::parameter::specs $slotObjects]
    lappend parameterDefinitions args:alias,method=residualargs,args
  • __timediff (scripted)

    set now [ns_time get]
    if {[ns_conn isconnected]} {
      set start_time [ns_conn start]
    } else {
      if {![info exists ::__start_time]} {set ::__start_timestamp $now}
      set start_time $::__start_timestamp
    }
    set t [ns_time diff $now $start_time]
    set ms [expr {[ns_time seconds $t]*1000 + [ns_time microseconds $t]/1000}]
    if {[info exists ::__last_timestamp]} {
      set t [ns_time diff $now $::__last_timestamp]
      set dms [expr {[ns_time seconds $t]*1000 + [ns_time microseconds $t]/1000}]
      set diff ", ${dms}ms"
    } else {
      set diff ""
    }
    set ::__last_timestamp $now
    return "${ms}ms$diff"
  • abstract (scripted)

    if {$methtype ne "proc" && $methtype ne "instproc" && $methtype ne "method"} {
      error "invalid method type '$methtype',  must be either 'proc', 'instproc' or 'method'."
    }
    set arglist2 $arglist
    regsub -all {\"} $arglist {\\"} arglist2
    :$methtype $methname $arglist "
      if {!\[::xotcl::self isnextcall\]} {
        error \"Abstract method $methname $arglist2 called\"
      } else {::xotcl::next}
    "
    # balance " for emacs syntax highlighter
  • ad_doc (scripted)

    ::xo::api update_object_doc [::xo::api scope] [self$doc_string
  • ad_forward (scripted)

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

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

  • array (alias)

  • asHTML (scripted)

    ::xo::require_html_procs
    dom createDocument html doc
    set root [$doc documentElement]
    if {!$page} {
      $root appendFromScript {:render}
      set nodes [$root childNode]
      return [join [lmap n $nodes {$n asHTML}] \n]
    } else {
      set slave [$master decorate $root]
      $slave appendFromScript {:render}
      ns_return 200 text/html [$root asHTML]
    }
  • autoname (alias)

  • check (scripted)

    ::nsf::method::assertion [self] check [::xotcl::checkoption_xotcl1_to_internal $checkoptions]
  • class (forward)

  • cleanup (alias)

  • configure (alias)

  • contains (alias)

  • copy (alias)

  • db_0or1row (forward)

  • db_1row (forward)

  • debug (scripted)

    set msg [join $args { }]
    ns_log debug "[self] [self callingclass]->[self callingproc]: $msg"
  • defaultmethod (alias)

  • destroy (alias)

  • destroy_on_cleanup (scripted)

    #:log "--cleanup adding ::xo::cleanup([self]) [list [self] destroy]"
    set ::xo::cleanup([self]) [list [self] destroy]
  • dict (alias)

  • ds (scripted)

    set msg [join $args { }]
    ds_comment "[self] [self callingclass]->[self callingproc]: $msg ([:__timediff])"
  • eval (alias)

  • exists (alias)

  • extractConfigureArg (scripted)

    set value ""
    ::upvar $al argList
    set largs [llength $argList]
    for {set i 0} {$i < $largs} {incr i} {
      if {[lindex $argList $i] == $name && $i + 1 < $largs} {
        set startIndex $i
        set endIndex [expr {$i + 1}]
        while {$endIndex < $largs &&
               [string first - [lindex $argList $endIndex]] != 0} {
          lappend value [lindex $argList $endIndex]
          incr endIndex
        }
      }
    }
    if {[info exists startIndex] && $cutTheArg != 0} {
      set argList [lreplace $argList $startIndex [expr {$endIndex - 1}]]
    }
    return $value
  • filter (forward)

  • filterguard (alias)

  • filtersearch (scripted)

    set handle [::nsf::directdispatch [::nsf::current object]  ::nsf::methods::object::info::lookupfilter $filter]
    return [method_handle_to_xotcl $handle]
  • forward (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] -per-object $method {*}$arglist]
    if {$debug} {::nsf::method::property [self$r debug true}
    if {$deprecated} {::nsf::method::property [self$r deprecated true}
    return $r
  • hasclass (scripted)

    if {![::nsf::is class $cl]} {return 0}
    if {[::nsf::directdispatch [self] ::nsf::methods::object::info::hasmixin $cl]} {return 1}
    ::nsf::directdispatch [self] ::nsf::methods::object::info::hastype $cl
  • incr (alias)

  • info (alias)

  • init (scripted)

    if {![::nsf::current isnextcall] && [llength $args] > 0 && [::nsf::configure debug] > 0} {
      ::nsf::log Warning "Arguments '$args' to constructor of object [self] are most likely not processed"
    }
  • instvar (alias)

  • invar (forward)

  • isclass (scripted)

    ::nsf::is class $class
  • ismetaclass (scripted)

    ::nsf::is metaclass $class
  • ismixin (scripted)

    return [expr {[::nsf::is class $class] &&
              [my ::nsf::methods::object::info::hasmixin $class]}]
  • isobject (scripted)

    ::nsf::object::exists $object
  • istype (scripted)

    return [expr {[::nsf::is class $class] &&
              [::nsf::directdispatch [self] ::nsf::methods::object::info::hastype $class]}]
  • lappend (alias)

  • log (scripted)

    set msg [join $args { }]
    ns_log notice "[self] [self callingclass]->[self callingproc]: $msg ([:__timediff])"
  • method (scripted)

    set returns_flag [expr {[info exists returns] ? [list -returns $returns] : {}}]
    :proc -debug=$debug -deprecated=$deprecated $name $arguments {*}$returns_flag $body
  • mixin (forward)

  • mixinguard (alias)

  • move (alias)

  • mset (scripted)

    #
    # Import all attribute value pairs into the current XOTcl object.
    #
    if {[llength $pairs] > 0} {
      nsf::directdispatch [self] -frame object ::lassign [dict values $pairs] {*}[dict keys $pairs]
    }
  • msg (scripted)

    set msg [join $args { }]
    if {[ns_conn isconnected]} {
      set msg "[self]: $msg  ([self callingclass]->[self callingproc])"
      if {$html} {
        util_user_message -html -message $msg
      } else {
        util_user_message -message $msg
      }
    }
  • noinit (alias)

  • parametercmd (forward)

  • proc (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] -per-object $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
  • procsearch (scripted)

    set handle [::nsf::directdispatch [::nsf::current object]  ::nsf::methods::object::info::lookupmethod $name]
    return [method_handle_to_xotcl $handle]
  • qn (scripted)

    #set qn "dbqd.[:uplevel [list self class]]-[:uplevel [list self proc]].$query_name"
    set l [info level]
    if {$l < 2} {
      set prefix topLevel
    } else {
      set prefix [lindex [:uplevel {info level 0}] 0]
      #ns_log notice "QN <$query_name> -> PREFIX <$prefix>"
    }
    return "dbqd.$prefix.$query_name"
  • requireNamespace (alias)

  • residualargs (alias)

  • self (scripted)

    ::xotcl::self
  • serialize (scripted)

    set objmap [expr {[info exists target] ? [list [::nsf::current object] $target] : ""}]
    ::Serializer deepSerialize -objmap $objmap [::nsf::current object]
  • set (alias)

  • set_instance_vars_defaults (scripted)

    :configure
  • subst (alias)

  • trace (alias)

  • unknown (scripted)

    if {![self isnext]} {
      error "[self]: unable to dispatch method '$m'"
    }
  • unset (alias)

     <instance of xotcl::Object[i]> unset

    Testcases:
    xowiki_test_cases, xowiki
  • uplevel (alias)

  • upvar (alias)

  • volatile (alias)

  • vwait (scripted)

    if {[regexp {:[^:]*} $varName]} {
      error "invalid varName '$varName'; only plain or fully qualified variable names allowed"
    }
    if {[string match ::* $varName]} {
      ::vwait $varName
    } else {
      ::vwait :$varName
    }
  • www-show-object (scripted)

    #
    # Allow to show an arbitrary object via API-browser.  Per-default,
    # e.g. a site-wide admin can use e.g. /xowiki/index?m=show-object
    #
    if {[ns_conn isconnected]} {
      set form [ns_getform]
      ns_set update $form object [self]
      ns_set update $form show_source    [::xo::cc query_parameter show_source:integer 1]
      ns_set update $form show_methods   [::xo::cc query_parameter show_methods:integer 2]
      ns_set update $form show_variables [::xo::cc query_parameter show_variables:integer 1]
      ns_set update $form as_img 1
      rp_internal_redirect /packages/xotcl-core/www/show-object
    } else {
      ns_log error "show-object can only be called with an active connection"
    }
    ad_script_abort