xotcl.wu-wien.ac.at
Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xo::PackageMgr[i] ::xo::Package

Class Hierarchy of ::xo::Package

  • ::xotcl::Object[i]
    Meta-class:
    ::xotcl::Class[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xo::db::Object[i]
      Meta-class:
      ::xo::db::Class[i]
      Methods for instances:
      db_1row, delete, initialize_loaded_object, insert, object_idC, object_titleC, save, save_new
      Methods to be applied on the class:
      Methods provided by the meta-class
      • ::xo::Package[i]
        Meta-class:
        ::xo::PackageMgr[i]
        Parameter for instances:
        context (default "::xo::cc"), force_refresh_login (default "false"), id, package_url, url
        Methods for instances:
        default_localeC, exists_form_parameterC, exists_query_parameterC, form_parameterC, get_parameter, init, initialize, insert, instance_nameC, package_idC, package_keyC, query_parameterC, reply_to_user, require_root_folder, return_page, returnredirectC, save, set_url
        Methods to be applied on the class:
        Methods provided by the meta-class

Class Relations

  • superclass: ::xo::db::Object[i]
  • subclass: ::xowiki::Package[i]
::xo::PackageMgr create ::xo::Package \
     -superclass ::xo::db::Object \
     -parameter {{context ::xo::cc} {force_refresh_login false} id package_url url}

Methods

  • instproc require_root_folder (public)

    <instance of ::xo::Package[i]> require_root_folder \
        [ -parent_id parent_id ] [ -content_types content_types ] \
        -name name 
    Make sure, the root folder for the given package exists. If not, create it and register all allowed content types.

    Switches:
    -parent_id (defaults to "-100") (optional)
    -content_types (optional)
    -name (required)
    Returns:
    folder_id
    ::329680 instproc require_root_folder {{-parent_id -100} {-content_types {}} -name:required} {
        my instvar id
    
        set folder_id [ns_cache eval xotcl_object_type_cache root_folder-$id {
          
          set folder_id [::xo::db::CrClass lookup -name $name -parent_id $parent_id]
          if {$folder_id == 0} {
            my log "folder with name '$name' and parent $parent_id does NOT EXIST"
            set folder_id [::xo::db::sql::content_folder new  -name $name -label $name  -parent_id $parent_id  -package_id $id -context_id $id]
            my log "CREATED folder '$name' and parent $parent_id ==> $folder_id"
          }
    
          # register all specified content types
          ::xo::db::CrFolder register_content_types  -folder_id $folder_id  -content_types $content_types
          #my log "returning from cache folder_id $folder_id"
          return $folder_id
        }]
        #my log "returning from require folder_id $folder_id"
        return $folder_id
      }
    

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]