Class ::xowf::Package (public)
::xo::PackageMgr ::xowf::Package
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xowf {}
::nsf::object::alloc ::xo::PackageMgr ::xowf::Package {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object
set :abstract_p f
set :auto_save false
array set :db_constraints {}
array set :db_slot {package_id ::xowf::Package::slot::package_id}
set :default_package_parameter_page_info {
name en:xowf-default-parameter
title "Xowf Default Parameter"
instance_attributes {
MenuBar t top_includelet none production_mode f with_user_tracking t with_general_comments f
with_digg f with_tags f
ExtraMenuEntries {{config -use xowf}}
with_delicious f with_notifications f security_policy ::xowiki::policy1
}
}
set :default_package_parameters {
parameter_page en:xowf-default-parameter
}
set :id_column package_id
set :name_method {}
set :object_type ::xowf::Package
set :object_type_key 00000000000001010000001000000001
set :package_key xowf
set :pretty_name {XoWiki Workflow}
set :pretty_plural {XoWiki Workflow}
set :security_inherit_p t
set :site_wide_info {folder_id 5443958 instance_id 5443954}
set :site_wide_package_parameter_page_info {
name en:xowf-site-wide-parameter
title "Xowf Site-wide Parameter"
instance_attributes {
index_page table-of-contents
MenuBar t
top_includelet none
production_mode f
with_user_tracking t with_general_comments f with_digg f with_tags f
with_delicious f with_notifications f
security_policy ::xowiki::policy1
}}
set :site_wide_package_parameters {
parameter_page en:xowf-site-wide-parameter
}
set :site_wide_pages {
Workflow.form
atjob-form
TestItemText.form
TestItemShortText.form
TestItemMC.form
TestItemSC.form
TestItemReorder.form
TestItemUpload.form
TestItemComposite.form
TestItemPoolQuestion.form
ExamFolder
online-exam.wf
inclass-quiz.wf
inclass-exam.wf
inclass-exam-statistics.wf
edit-interaction.wf
edit-grading-scheme.wf
answer-single-question.wf
quiz-select_question.form
select_question.form
select-topics.form
select-group-members.form
}
set :sql_package_name ::xowf::Package
set :supertype acs_object
set :table_name xowf_package
set :with_table true}
::xowf::Package proc create_new_workflow_page {-package_id:required -parent_id:required -name:required -title:required {-instance_attributes ""}} {
xo::Package require $package_id
set item_ref_info [$package_id item_ref -use_site_wide_pages true -default_lang en -parent_id $parent_id en:Workflow.form]
set page_template [dict get $item_ref_info item_id]
if {$page_template != 0} {
set p [::xowiki::FormPage new -name $name -title $title -set text {} -instance_attributes $instance_attributes -page_template $page_template]
} else {
ns_log error "could not load Workflow form, therefore, creation of workflow $name failed as well"
set p ""
}
return $p
}
::xowf::Package instproc call {object method options} {
if {[$object istype ::xowiki::FormPage]} {
if {[$object is_wf_instance]} {
set ctx [::xowf::Context require $object]
} elseif {[$object is_wf]} {
set ctx [::xowf::Context require $object]
}
}
next
}
::xowf::Package instproc insert {} {
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 ,:])"
}
::xowf::Package instproc initialize {} {
next
::xowiki::FormPage instmixin add ::xowf::WorkflowPage
}
::xowf::Package instproc destroy {} {
if {[llength [[self class] allinstances]] == 1} {
::xowiki::FormPage instmixin delete ::xowf::WorkflowPage
}
next
}
::xowf::Package instparametercmd package_id
::nsf::relation::set ::xowf::Package superclass ::xowiki::Package
::nx::slotObj -container slot ::xowf::Package
::nsf::object::alloc ::xo::db::Attribute ::xowf::Package::slot::package_id {set :accessor public
set :column_name package_id
set :configurable true
set :convert false
set :create_acs_attribute false
set :create_table_attribute true
set :datatype integer
set :defaultmethods {}
set :disposition alias
set :domain ::xowf::Package
set :incremental false
set :manager ::xowf::Package::slot::package_id
set :max_n_values 1
set :methodname package_id
set :min_n_values 1
set :multiplicity 1..1
set :name package_id
set :parameterSpec -package_id
set :per-object false
set :position 0
set :pretty_name ID
set :pretty_plural {}
set :references {}
set :required false
set :sqltype integer
set :trace none
: init}
XQL Not present:Generic, PostgreSQL, Oracle
[
hide source ]
| [
make this the default ]