%3 ::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::db::Object ::xo::db::Object delete initialize_loaded_object insert save save_new update ::xo::Package->::xo::db::Object ::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 ::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::chat_transcript ::xo::db::chat_transcript insert save_new update ::xo::db::chat_transcript->::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 ::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->::xotcl::Object

Class ::xo::db::chat_transcript

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

Class Relations

  • class: ::xo::db::Class[i]
  • superclass: ::xo::db::Object[i]
::xo::db::Class create ::xo::db::chat_transcript \
     -superclass ::xo::db::Object

Methods (to be applied on instances)

  • contents (setter)

  • description (setter)

  • insert (scripted)

    set __table_name [[self class] table_name]
    set __id [[self class] id_column]
    set :$__id ${:object_id}
    :log "ID insert in $__table_name, id = $__id = [set :$__id]"
    next
    foreach {__slot_name __slot} [[self class] array get db_slot] {
      if {[info exists :$__slot_name]} {
        set $__slot_name [set :$__slot_name]
        lappend __vars $__slot_name
        lappend __atts [$__slot column_name]
      }
    }
    ::xo::dc dml insert_$__table_name "insert into $__table_name
      ([join $__atts ,]) values (:[join $__vars ,:])"
  • pretty_name (setter)

  • room_id (setter)

  • save_new (scripted, public)

     <instance of xo::db::chat_transcript[i]> save_new args [ args... ]

    Save a new transcript, making sure its creator is granted the necessary operative privileges.

    Parameters:
    args
    Returns:
    new transcript id

    Partial Call Graph (max 5 caller/called nodes):
    %3 permission::grant permission::grant (public) xo::db::chat_transcript instproc save_new xo::db::chat_transcript instproc save_new xo::db::chat_transcript instproc save_new->permission::grant

    Testcases:
    No testcase defined.
    if {![info exists :context_id]} {
        set :context_id ${:package_id}
    }
    ::xo::dc transaction {
        set transcript_id [next]
        foreach privilege {edit view delete} {
            permission::grant  -party_id  ${:creation_user}  -object_id ${:transcript_id}  -privilege chat_transcript_${privilege}
        }
    }
    return $transcript_id
  • transcript_id (setter)

  • update (scripted)

    ::xo::dc transaction {
      next
      :instvar object_id pretty_name description room_id contents
      ::xo::dc dml update_chat_transcripts {update chat_transcripts
        set pretty_name = :pretty_name,description = :description,room_id = :room_id,contents = :contents where transcript_id = :object_id
      }
    }