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::db::Class[i] ::xo::db::sql::content_item

Class Hierarchy of ::xo::db::sql::content_item

Class Relations

  • superclass: ::xotcl::Object[i]
::xo::db::Class create ::xo::db::sql::content_item \
     -superclass ::xotcl::Object

Methods

  • proc copy (public)

    ::xo::db::sql::content_item[i] copy [ -dbn dbn ] -item_id item_id  \
        -target_folder_id target_folder_id  -creation_user creation_user  \
        -creation_ip creation_ip  -name name 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -target_folder_id (required)
    -creation_user (required)
    -creation_ip (required)
    -name (required)
    ::1852652 proc copy {{-dbn {}} -item_id:required -target_folder_id:required -creation_user:required -creation_ip:required -name:required} {
            #function_args: {ITEM_ID {}} {TARGET_FOLDER_ID {}} {CREATION_USER {}} {CREATION_IP {}} {NAME {}}
            foreach var [list ITEM_ID TARGET_FOLDER_ID CREATION_USER CREATION_IP NAME]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__copy($_ITEM_ID, $_TARGET_FOLDER_ID, $_CREATION_USER, $_CREATION_IP, $_NAME)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc copy2 (public)

    ::xo::db::sql::content_item[i] copy2 [ -dbn dbn ] -item_id item_id  \
        -target_folder_id target_folder_id  -creation_user creation_user  \
        [ -creation_ip creation_ip ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -target_folder_id (required)
    -creation_user (required)
    -creation_ip (optional)
    ::1852652 proc copy2 {{-dbn {}} -item_id:required -target_folder_id:required -creation_user:required -creation_ip} {
            #function_args: {ITEM_ID {}} {TARGET_FOLDER_ID {}} {CREATION_USER {}} {CREATION_IP null}
            foreach var [list ITEM_ID TARGET_FOLDER_ID CREATION_USER CREATION_IP]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__copy2($_ITEM_ID, $_TARGET_FOLDER_ID, $_CREATION_USER, $_CREATION_IP)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc del (public)

    ::xo::db::sql::content_item[i] del [ -dbn dbn ] -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc del {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__del($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc delete (public)

    ::xo::db::sql::content_item[i] delete [ -dbn dbn ] -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc delete {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__delete($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc edit_name (public)

    ::xo::db::sql::content_item[i] edit_name [ -dbn dbn ] -item_id item_id  \
        -name name 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -name (required)
    ::1852652 proc edit_name {{-dbn {}} -item_id:required -name:required} {
            #function_args: {ITEM_ID {}} {NAME {}}
            foreach var [list ITEM_ID NAME]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__edit_name($_ITEM_ID, $_NAME)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_best_revision (public)

    ::xo::db::sql::content_item[i] get_best_revision [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_best_revision {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_best_revision($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_content_type (public)

    ::xo::db::sql::content_item[i] get_content_type [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_content_type {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_content_type($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_context (public)

    ::xo::db::sql::content_item[i] get_context [ -dbn dbn ] -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_context {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_context($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_id (public)

    ::xo::db::sql::content_item[i] get_id [ -dbn dbn ] -item_path item_path  \
        -root_folder_id root_folder_id  [ -resolve_index resolve_index ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_path (required)
    -root_folder_id (required)
    -resolve_index (defaults to "f") (optional)
    ::1852652 proc get_id {{-dbn {}} -item_path:required -root_folder_id:required {-resolve_index f}} {
            #function_args: {ITEM_PATH {}} {ROOT_FOLDER_ID {}} {RESOLVE_INDEX f}
            foreach var [list ITEM_PATH ROOT_FOLDER_ID RESOLVE_INDEX]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_id($_ITEM_PATH, $_ROOT_FOLDER_ID, $_RESOLVE_INDEX)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_latest_revision (public)

    ::xo::db::sql::content_item[i] get_latest_revision [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_latest_revision {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_latest_revision($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_live_revision (public)

    ::xo::db::sql::content_item[i] get_live_revision [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_live_revision {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_live_revision($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_parent_folder (public)

    ::xo::db::sql::content_item[i] get_parent_folder [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_parent_folder {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_parent_folder($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_path (public)

    ::xo::db::sql::content_item[i] get_path [ -dbn dbn ] -item_id item_id  \
        -root_folder_id root_folder_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -root_folder_id (required)
    ::1852652 proc get_path {{-dbn {}} -item_id:required -root_folder_id:required} {
            #function_args: {ITEM_ID {}} {ROOT_FOLDER_ID {}}
            foreach var [list ITEM_ID ROOT_FOLDER_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_path($_ITEM_ID, $_ROOT_FOLDER_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_publish_date (public)

    ::xo::db::sql::content_item[i] get_publish_date [ -dbn dbn ] \
        -item_id item_id  [ -is_live is_live ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -is_live (defaults to "f") (optional)
    ::1852652 proc get_publish_date {{-dbn {}} -item_id:required {-is_live f}} {
            #function_args: {ITEM_ID {}} {IS_LIVE f}
            foreach var [list ITEM_ID IS_LIVE]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_publish_date($_ITEM_ID, $_IS_LIVE)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_revision_count (public)

    ::xo::db::sql::content_item[i] get_revision_count [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_revision_count {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_revision_count($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_root_folder (public)

    ::xo::db::sql::content_item[i] get_root_folder [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc get_root_folder {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_root_folder($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_template (public)

    ::xo::db::sql::content_item[i] get_template [ -dbn dbn ] \
        -item_id item_id  -use_context use_context 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -use_context (required)
    ::1852652 proc get_template {{-dbn {}} -item_id:required -use_context:required} {
            #function_args: {ITEM_ID {}} {USE_CONTEXT {}}
            foreach var [list ITEM_ID USE_CONTEXT]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_template($_ITEM_ID, $_USE_CONTEXT)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_title (public)

    ::xo::db::sql::content_item[i] get_title [ -dbn dbn ] -item_id item_id  \
        [ -is_live is_live ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -is_live (defaults to "f") (optional)
    ::1852652 proc get_title {{-dbn {}} -item_id:required {-is_live f}} {
            #function_args: {ITEM_ID {}} {IS_LIVE f}
            foreach var [list ITEM_ID IS_LIVE]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_title($_ITEM_ID, $_IS_LIVE)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc get_virtual_path (public)

    ::xo::db::sql::content_item[i] get_virtual_path [ -dbn dbn ] \
        -item_id item_id  [ -root_folder_id root_folder_id ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -root_folder_id (defaults to "-100") (optional)
    ::1852652 proc get_virtual_path {{-dbn {}} -item_id:required {-root_folder_id -100}} {
            #function_args: {ITEM_ID {}} {ROOT_FOLDER_ID -100}
            foreach var [list ITEM_ID ROOT_FOLDER_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__get_virtual_path($_ITEM_ID, $_ROOT_FOLDER_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc is_index_page (public)

    ::xo::db::sql::content_item[i] is_index_page [ -dbn dbn ] \
        -item_id item_id  -folder_id folder_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -folder_id (required)
    ::1852652 proc is_index_page {{-dbn {}} -item_id:required -folder_id:required} {
            #function_args: {ITEM_ID {}} {FOLDER_ID {}}
            foreach var [list ITEM_ID FOLDER_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__is_index_page($_ITEM_ID, $_FOLDER_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc is_publishable (public)

    ::xo::db::sql::content_item[i] is_publishable [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc is_publishable {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__is_publishable($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc is_published (public)

    ::xo::db::sql::content_item[i] is_published [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc is_published {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__is_published($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc is_subclass (public)

    ::xo::db::sql::content_item[i] is_subclass [ -dbn dbn ] \
        -object_type object_type  -supertype supertype 
    Automatically generated method

    Switches:
    -dbn (optional)
    -object_type (required)
    -supertype (required)
    ::1852652 proc is_subclass {{-dbn {}} -object_type:required -supertype:required} {
            #function_args: {OBJECT_TYPE {}} {SUPERTYPE {}}
            foreach var [list OBJECT_TYPE SUPERTYPE]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__is_subclass($_OBJECT_TYPE, $_SUPERTYPE)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc is_valid_child (public)

    ::xo::db::sql::content_item[i] is_valid_child [ -dbn dbn ] \
        -item_id item_id  -content_type content_type  \
        -relation_tag relation_tag 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -content_type (required)
    -relation_tag (required)
    ::1852652 proc is_valid_child {{-dbn {}} -item_id:required -content_type:required -relation_tag:required} {
            #function_args: {ITEM_ID {}} {CONTENT_TYPE {}} {RELATION_TAG {}}
            foreach var [list ITEM_ID CONTENT_TYPE RELATION_TAG]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__is_valid_child($_ITEM_ID, $_CONTENT_TYPE, $_RELATION_TAG)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc move (public)

    ::xo::db::sql::content_item[i] move [ -dbn dbn ] -item_id item_id  \
        -target_folder_id target_folder_id  -name name 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -target_folder_id (required)
    -name (required)
    ::1852652 proc move {{-dbn {}} -item_id:required -target_folder_id:required -name:required} {
            #function_args: {ITEM_ID {}} {TARGET_FOLDER_ID {}} {NAME {}}
            foreach var [list ITEM_ID TARGET_FOLDER_ID NAME]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__move($_ITEM_ID, $_TARGET_FOLDER_ID, $_NAME)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc new (public)

    ::xo::db::sql::content_item[i] new [ -dbn dbn ] -name name  \
        -parent_id parent_id  [ -item_id item_id ] [ -locale locale ] \
        [ -creation_date creation_date ] -creation_user creation_user  \
        [ -context_id context_id ] [ -creation_ip creation_ip ] \
        [ -item_subtype item_subtype ] [ -content_type content_type ] \
        [ -title title ] [ -description description ] \
        [ -mime_type mime_type ] [ -nls_language nls_language ] \
        [ -text text ] [ -data data ] [ -relation_tag relation_tag ] \
        [ -is_live is_live ] [ -storage_type storage_type ] \
        -package_id package_id  [ -childof childof ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -name (required)
    -parent_id (required)
    -item_id (optional)
    -locale (optional)
    -creation_date (defaults to "now") (optional)
    -creation_user (required)
    -context_id (optional)
    -creation_ip (optional)
    -item_subtype (defaults to "content_item") (optional)
    -content_type (defaults to "content_revision") (optional)
    -title (optional)
    -description (optional)
    -mime_type (defaults to "text/plain") (optional)
    -nls_language (optional)
    -text (optional)
    -data (optional)
    -relation_tag (optional)
    -is_live (defaults to "f") (optional)
    -storage_type (optional)
    -package_id (required)
    -childof (optional)
    ::1852652 proc new {{-dbn {}} -name:required -parent_id:required -item_id -locale {-creation_date now} -creation_user:required -context_id -creation_ip {-item_subtype content_item} {-content_type content_revision} -title -description {-mime_type text/plain} -nls_language -text -data -relation_tag {-is_live f} -storage_type -package_id:required -childof} {
            #function_args: {NAME {}} {PARENT_ID {}} {ITEM_ID null} {LOCALE null} {CREATION_DATE now} {CREATION_USER {}} {CONTEXT_ID null} {CREATION_IP null} {ITEM_SUBTYPE content_item} {CONTENT_TYPE content_revision} {TITLE null} {DESCRIPTION null} {MIME_TYPE text/plain} {NLS_LANGUAGE null} {TEXT null} {DATA null} {RELATION_TAG null} {IS_LIVE f} {STORAGE_TYPE null} {PACKAGE_ID {}}
            foreach var [list NAME PARENT_ID ITEM_ID LOCALE CREATION_DATE CREATION_USER CONTEXT_ID CREATION_IP ITEM_SUBTYPE CONTENT_TYPE TITLE DESCRIPTION MIME_TYPE NLS_LANGUAGE TEXT DATA RELATION_TAG IS_LIVE STORAGE_TYPE PACKAGE_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__new($_NAME, $_PARENT_ID, $_ITEM_ID, $_LOCALE, $_CREATION_DATE, $_CREATION_USER, $_CONTEXT_ID, $_CREATION_IP, $_ITEM_SUBTYPE, $_CONTENT_TYPE, $_TITLE, $_DESCRIPTION, $_MIME_TYPE, $_NLS_LANGUAGE, $_TEXT, $_DATA, $_RELATION_TAG, $_IS_LIVE, $_STORAGE_TYPE, $_PACKAGE_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc register_template (public)

    ::xo::db::sql::content_item[i] register_template [ -dbn dbn ] \
        -item_id item_id  -template_id template_id  \
        -use_context use_context 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -template_id (required)
    -use_context (required)
    ::1852652 proc register_template {{-dbn {}} -item_id:required -template_id:required -use_context:required} {
            #function_args: {ITEM_ID {}} {TEMPLATE_ID {}} {USE_CONTEXT {}}
            foreach var [list ITEM_ID TEMPLATE_ID USE_CONTEXT]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__register_template($_ITEM_ID, $_TEMPLATE_ID, $_USE_CONTEXT)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc relate (public)

    ::xo::db::sql::content_item[i] relate [ -dbn dbn ] -item_id item_id  \
        -object_id object_id  [ -relation_tag relation_tag ] \
        -order_n order_n  [ -relation_type relation_type ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -object_id (required)
    -relation_tag (defaults to "generic") (optional)
    -order_n (required)
    -relation_type (defaults to "cr_item_rel") (optional)
    ::1852652 proc relate {{-dbn {}} -item_id:required -object_id:required {-relation_tag generic} -order_n:required {-relation_type cr_item_rel}} {
            #function_args: {ITEM_ID {}} {OBJECT_ID {}} {RELATION_TAG generic} {ORDER_N {}} {RELATION_TYPE cr_item_rel}
            foreach var [list ITEM_ID OBJECT_ID RELATION_TAG ORDER_N RELATION_TYPE]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__relate($_ITEM_ID, $_OBJECT_ID, $_RELATION_TAG, $_ORDER_N, $_RELATION_TYPE)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc set_live_revision (public)

    ::xo::db::sql::content_item[i] set_live_revision [ -dbn dbn ] \
        -revision_id revision_id  [ -publish_status publish_status ]
    Automatically generated method

    Switches:
    -dbn (optional)
    -revision_id (required)
    -publish_status (defaults to "ready") (optional)
    ::1852652 proc set_live_revision {{-dbn {}} -revision_id:required {-publish_status ready}} {
            #function_args: {REVISION_ID {}} {PUBLISH_STATUS ready}
            foreach var [list REVISION_ID PUBLISH_STATUS]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__set_live_revision($_REVISION_ID, $_PUBLISH_STATUS)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc set_release_period (public)

    ::xo::db::sql::content_item[i] set_release_period [ -dbn dbn ] \
        -item_id item_id  -start_when start_when  -end_when end_when 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -start_when (required)
    -end_when (required)
    ::1852652 proc set_release_period {{-dbn {}} -item_id:required -start_when:required -end_when:required} {
            #function_args: {ITEM_ID {}} {START_WHEN {}} {END_WHEN {}}
            foreach var [list ITEM_ID START_WHEN END_WHEN]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__set_release_period($_ITEM_ID, $_START_WHEN, $_END_WHEN)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc unregister_template (public)

    ::xo::db::sql::content_item[i] unregister_template [ -dbn dbn ] \
        -item_id item_id  -template_id template_id  \
        -use_context use_context 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -template_id (required)
    -use_context (required)
    ::1852652 proc unregister_template {{-dbn {}} -item_id:required -template_id:required -use_context:required} {
            #function_args: {ITEM_ID {}} {TEMPLATE_ID {}} {USE_CONTEXT {}}
            foreach var [list ITEM_ID TEMPLATE_ID USE_CONTEXT]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__unregister_template($_ITEM_ID, $_TEMPLATE_ID, $_USE_CONTEXT)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc unrelate (public)

    ::xo::db::sql::content_item[i] unrelate [ -dbn dbn ] -rel_id rel_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -rel_id (required)
    ::1852652 proc unrelate {{-dbn {}} -rel_id:required} {
            #function_args: {REL_ID {}}
            foreach var [list REL_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__unrelate($_REL_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc unset_live_revision (public)

    ::xo::db::sql::content_item[i] unset_live_revision [ -dbn dbn ] \
        -item_id item_id 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    ::1852652 proc unset_live_revision {{-dbn {}} -item_id:required} {
            #function_args: {ITEM_ID {}}
            foreach var [list ITEM_ID]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__unset_live_revision($_ITEM_ID)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    
  • proc write_to_file (public)

    ::xo::db::sql::content_item[i] write_to_file [ -dbn dbn ] \
        -item_id item_id  -root_path root_path 
    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)
    -root_path (required)
    ::1852652 proc write_to_file {{-dbn {}} -item_id:required -root_path:required} {
            #function_args: {ITEM_ID {}} {ROOT_PATH {}}
            foreach var [list ITEM_ID ROOT_PATH]  {
              set varname [string tolower $var]
              if {[info exists $varname]} {
                set $var [set $varname]
                set _$var :$var
              } else {
                set _$var null
              }
            }
            set sql "
            select content_item__write_to_file($_ITEM_ID, $_ROOT_PATH)
          "
            db_with_handle -dbn $dbn db {
              #ns_log notice "--sql=$sql"
              return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
            }
          }
    

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