%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 ::xo::db::Object ::xo::db::Object delete initialize_loaded_object insert save save_new update ::xo::db::Object->::xotcl::Object ::xo::Package ::xo::Package exists_form_parameter exists_query_parameter form_parameter get_parameter handle_http_caching init initialize insert instantiate_forms process_init_parameter query_parameter reply_to_user require_root_folder return_page returnredirect set_url update ::xo::Package->::xo::db::Object ::xo::db::chat_transcript ::xo::db::chat_transcript insert save_new update ::xo::db::chat_transcript->::xo::db::Object ::xo::db::chat_room ::xo::db::chat_room ban_user count_messages create_transcript delete delete_messages flush grant_creator grant_moderator grant_user insert post_message revoke_moderator revoke_user save_new transcript_messages unban_user update ::xo::db::chat_room->::xo::db::Object ::xo::db::CrItem ::xo::db::CrItem changed_redirect_url current_user_id delete fix_content initialize_loaded_object is_cached_object is_package_root_folder privilege=creator rename save save_new set_live_revision update update_attribute_from_slot update_content update_item_index update_revision www-revisions ::xo::db::CrItem->::xo::db::Object ::xo::db::CrCache::Item ::xo::db::CrCache::Item ::xo::db::CrItem->::xo::db::CrCache::Item instmixin ::xo::db::apm_parameter ::xo::db::apm_parameter insert update ::xo::db::apm_parameter->::xo::db::Object ::xo::parameter ::xo::parameter ::xo::db::apm_parameter->::xo::parameter instmixin ::xo::oauth::Package ::xo::oauth::Package → fill → reset index init insert ::xo::oauth::Package->::xo::Package ::xowiki::Package ::xowiki::Package → get_package_id_from_page_id → get_url_from_id → google_sitemapindex → instantiate_page_from_id → is_xowiki_p → preferredCSSToolkit → reparent_site_wide_pages call check_permissions clipboard-copy condition=has_class condition=has_name create_new_snippet default_language default_locale delete_revision error_msg external_name flush_name_cache flush_page_fragment_cache flush_references folder_path get_adp_template get_ids_for_bulk_actions get_lang_and_name get_package_id_from_page_name get_page_from_item_or_revision_id get_page_from_item_ref get_page_from_name get_page_from_super get_parameter get_parameter_from_parameter_page get_parent_and_name import init insert invoke item_info_from_id item_info_from_url item_ref join_name lookup make_form_link make_link normalize_name normalize_path package_path prefixed_lookup pretty_link query_parameter_return_url reparent require_folder_object require_root_folder resolve_package_path resolve_page resolve_page_name resolve_page_name_and_init_context show_page_order simple_item_ref split_name validate_tag www-change-page-order www-delete www-edit-category-tree www-edit-new www-google-sitemap www-google-sitemapindex www-import-prototype-page www-manage-categories www-refresh-login www-reindex www-rss www-update-references ::xowiki::Package->::xo::Package ::xowiki::ParameterCache ::xowiki::ParameterCache ::xowiki::Package->::xowiki::ParameterCache ::xo::oauth::ServerMetadata ::xo::oauth::ServerMetadata update ::xo::oauth::ServerMetadata->::xo::db::CrItem ::xo::db::image ::xo::db::image update ::xo::db::image->::xo::db::CrItem ::xo::oauth::ClientMetadata ::xo::oauth::ClientMetadata ::xo::oauth::ClientMetadata->::xo::db::CrItem ::xowiki::Page ::xowiki::Page → container_already_rendered → find_slot → get_tags → import → quoted_html_content → save_tags __debug_known_field_names add_computed_instance_attributes adp_subst anchor anchor_parent_id build_instance_attribute_map build_name can_be_linked can_contain can_link can_save category_export category_import changed_redirect_url check_adp_include_path check_unresolved_references condition=is_folder_page condition=match condition=regexp content_header_append content_header_get copy_content_vars create_form_field create_form_fields create_form_fields_from_form_constraints create_form_page_instance create_link create_raw_form_field css_class_name default_instance_attributes demarshall detail_link div edit_set_default_values edit_set_file_selector_folder error_during_render error_in_includelet evaluate_form_field_condition exists_form_parameter exists_query_parameter field_names find_slot footer form_field_exists form_field_flush_cache form_field_index form_parameter get_anchor_and_query get_content get_description get_folder get_form_data get_html_from_content get_ids_for_bulk_actions get_instance_attributes get_nls_language_from_lang get_parent_object get_property_from_link_page get_query_parameter_return_url get_rich_text_spec get_target_from_link_page htmlFooter include include_content initialize_loaded_object instantiate_includelet is_folder_page is_form is_link_page is_new_entry is_unprefixed item_ref lang lookup_cached_form_field lookup_form_field map_categories map_party marshall mutual_overwrite_occurred new_link normalize_internal_link_name notification_detail_link notification_notify notification_render notification_subject physical_item_id physical_package_id physical_parent_id pretty_link pretty_name query_parameter record_last_visited references references_update regsub_eval rename render render_content render_icon render_includelet reset_resolve_context resolve_included_page_name return_redirect_without_params reverse_map_party reverse_map_party_attribute save save_data save_new search_render self_link_ids serialize_relocatable set_content set_resolve_context show_fields stats_record_count stats_record_detail substitute_markup translate unescape unset_temporary_instance_variables update update_publish_status validate=form_constraints validate=form_input_fields validate=name validate=page_order www-autosave-attribute www-bulk-delete www-clipboard-add www-clipboard-clear www-clipboard-content www-clipboard-copy www-clipboard-export www-create-new www-create-or-use www-csv-dump www-delete www-delete-revision www-diff www-duplicate www-edit www-list www-make-live-revision www-popular-tags www-revisions www-save-attributes www-save-tags www-toggle-publish-status www-validate-attribute www-view ::xowiki::Page->::xo::db::CrItem ::xo::db::CrFolder ::xo::db::CrFolder → delete → fetch_object → get_instance_from_db → instance_select_query → register_content_types delete save save_new update ::xo::db::CrFolder->::xo::db::CrItem ::xo::oauth::Credentials ::xo::oauth::Credentials as_encoded_string update ::xo::oauth::Credentials->::xo::db::CrItem

Class ::xo::db::Object

::xo::db::Object[i] create ...

Defined in

Class Relations

  • class: ::xo::db::Class[i]
  • superclass: ::xotcl::Object[i]
  • subclass: ::xo::Package[i], ::xo::db::chat_transcript[i], ::xo::db::chat_room[i], ::xo::db::CrItem[i], ::xo::db::apm_parameter[i]
::xo::db::Class create ::xo::db::Object \
     -superclass ::xotcl::Object

Methods (to be applied on instances)

  • context_id (setter)

  • creation_date (setter)

  • creation_ip (setter)

  • creation_user (setter)

  • delete (scripted, public)

     <instance of xo::db::Object[i]> delete

    Delete the object from the database and from memory

    Testcases:
    xotcl_core_tutorial_1, test_xo_db_object
    ::acs::dc call acs_object delete -object_id ${:object_id}
    :destroy
  • initialize_loaded_object (scripted)

    #
    # This method is to be called, after an existing
    # object is fetched from the database.
    #
    # empty body, to be refined
  • insert (scripted)

    :log no-insert;
  • last_modified (setter)

  • modifying_ip (setter)

  • modifying_user (setter)

  • object_id (setter)

  • object_title (setter)

  • package_id (setter)

  • save (scripted, public)

     <instance of xo::db::Object[i]> save [ -package_id package_id ] \
        [ -modifying_user modifying_user ] [ -context_id context_id ]

    Save the current object in the database

    Switches:
    -package_id (optional)
    -modifying_user (optional)
    -context_id (optional)

    Testcases:
    xotcl_core_tutorial_2, test_xo_db_object
    set cmd [list :update]
    if {[info exists package_id]} {lappend cmd -package_id $package_id}
    if {[info exists modifying_user]} {lappend cmd -modifying_user $modifying_user}
    if {[info exists context_id]} {lappend cmd -context_id $context_id}
    {*}$cmd
  • save_new (scripted, public)

     <instance of xo::db::Object[i]> save_new [ -package_id package_id ] \
        [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
        [ -context_id context_id ]

    Save the XOTcl Object with a fresh acs_object in the database.

    Switches:
    -package_id (optional)
    -creation_user (optional)
    -creation_ip (optional)
    -context_id (optional)
    Returns:
    new object id

    Testcases:
    test_xo_db_object
    if {![info exists package_id] && [info exists :package_id]} {
      set package_id ${:package_id}
    }
    if {![info exists context_id]} {
      set context_id [expr {[info exists :context_id] ? ${:context_id} : ""}]
    }
    [:info class] get_context package_id creation_user creation_ip
    ::xo::dc transaction {
      set id [[:info class] new_acs_object  -package_id $package_id  -creation_user $creation_user  -creation_ip $creation_ip  -context_id $context_id  ""]
      [:info class] initialize_acs_object [self$id
      :insert
    }
    return $id
  • security_inherit_p (setter)

  • update (scripted, public)

     <instance of xo::db::Object[i]> update [ -package_id package_id ] \
        [ -modifying_user modifying_user ] [ -context_id context_id ]

    Update the current object in the database

    Switches:
    -package_id (optional)
    -modifying_user (optional)
    -context_id (optional)

    Testcases:
    xotcl_core_tutorial_2, test_xo_db_object
    set object_id ${:object_id}
    if {![info exists package_id] && [info exists :package_id]} {
      set package_id ${:package_id}
    }
    if {![info exists context_id]} {
      set context_id [expr {[info exists :context_id] ? ${:context_id} : ""}]
    }
    [:info class] get_context package_id modifying_user modifying_ip
    set title ${:object_title}
    ::xo::dc dml update_object {
      update acs_objects set
         title          = :title,
         modifying_user = :modifying_user,
         modifying_ip   = :modifying_ip,
         context_id     = :context_id
      where object_id = :object_id
    }
    # Make sure object memory image reflects db values
    foreach att {modifying_user modifying_ip context_id} {
      set :${att} [set $att]
    }
    set :last_modified [::xo::dc get_value -prepare integer  get_last_modified {
      select last_modified from acs_objects
      where object_id = :object_id
    }]