Class ::xo::db::sql::file_storage

::xo::db::sql::file_storage[i] create ...

Defined in

Class Relations

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

Methods (to be applied on the object)

  • copy_file (scripted, public)

     xo::db::sql::file_storage[i] copy_file [ -dbn dbn ] -file_id file_id  \
        -target_folder_id target_folder_id  -creation_user creation_user  \
        -creation_ip creation_ip  [ -name name ] [ -title title ]

    Automatically generated method

    Switches:
    -dbn (optional)
    -file_id (required)
    -target_folder_id (required)
    -creation_user (required)
    -creation_ip (required)
    -name (optional)
    -title (optional)

    Testcases:
    No testcase defined.
    #function_args: {FILE_ID {}} {TARGET_FOLDER_ID {}} {CREATION_USER {}} {CREATION_IP {}} {NAME null} {TITLE null}
    foreach var [list FILE_ID TARGET_FOLDER_ID CREATION_USER CREATION_IP NAME TITLE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select file_storage__copy_file($_FILE_ID$_TARGET_FOLDER_ID$_CREATION_USER$_CREATION_IP$_NAME$_TITLE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • delete_file (scripted, public)

     xo::db::sql::file_storage[i] delete_file [ -dbn dbn ] -file_id file_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -file_id (required)

    Testcases:
    No testcase defined.
    #function_args: {FILE_ID {}}
    foreach var [list FILE_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select file_storage__delete_file($_FILE_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • delete_folder (scripted, public)

     xo::db::sql::file_storage[i] delete_folder [ -dbn dbn ] \
        -folder_id folder_id  -cascade_p cascade_p 

    Automatically generated method

    Switches:
    -dbn (optional)
    -folder_id (required)
    -cascade_p (required)

    Testcases:
    No testcase defined.
    #function_args: {FOLDER_ID {}} {CASCADE_P {}}
    foreach var [list FOLDER_ID CASCADE_P]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select file_storage__delete_folder($_FOLDER_ID$_CASCADE_P) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • delete_version (scripted, public)

     xo::db::sql::file_storage[i] delete_version [ -dbn dbn ] \
        -file_id file_id  -version_id version_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -file_id (required)
    -version_id (required)

    Testcases:
    No testcase defined.
    #function_args: {FILE_ID {}} {VERSION_ID {}}
    foreach var [list FILE_ID VERSION_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select file_storage__delete_version($_FILE_ID$_VERSION_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_content_type (scripted, public)

     xo::db::sql::file_storage[i] get_content_type [ -dbn dbn ] \
        -file_id file_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -file_id (required)

    Testcases:
    No testcase defined.
    #function_args: {FILE_ID {}}
    foreach var [list FILE_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select file_storage__get_content_type($_FILE_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_folder_name (scripted, public)

     xo::db::sql::file_storage[i] get_folder_name [ -dbn dbn ] \
        -folder_id folder_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -folder_id (required)

    Testcases:
    No testcase defined.
    #function_args: {FOLDER_ID {}}
    foreach var [list 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 file_storage__get_folder_name($_FOLDER_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_package_id (scripted, public)

     xo::db::sql::file_storage[i] get_package_id [ -dbn dbn ] \
        -item_id item_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)

    Testcases:
    No testcase defined.
    #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 file_storage__get_package_id($_ITEM_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_parent_id (scripted, public)

     xo::db::sql::file_storage[i] get_parent_id [ -dbn dbn ] -item_id item_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)

    Testcases:
    No testcase defined.
    #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 file_storage__get_parent_id($_ITEM_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_root_folder (scripted, public)

     xo::db::sql::file_storage[i] get_root_folder [ -dbn dbn ] \
        -package_id package_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -package_id (required)

    Testcases:
    No testcase defined.
    #function_args: {PACKAGE_ID {}}
    foreach var [list 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 file_storage__get_root_folder($_PACKAGE_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_title (scripted, public)

     xo::db::sql::file_storage[i] get_title [ -dbn dbn ] -item_id item_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -item_id (required)

    Testcases:
    No testcase defined.
    #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 file_storage__get_title($_ITEM_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • move_file (scripted, public)

     xo::db::sql::file_storage[i] move_file [ -dbn dbn ] -file_id file_id  \
        -target_folder_id target_folder_id  -creation_user creation_user  \
        -creation_ip creation_ip 

    Automatically generated method

    Switches:
    -dbn (optional)
    -file_id (required)
    -target_folder_id (required)
    -creation_user (required)
    -creation_ip (required)

    Testcases:
    No testcase defined.
    #function_args: {FILE_ID {}} {TARGET_FOLDER_ID {}} {CREATION_USER {}} {CREATION_IP {}}
    foreach var [list FILE_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 file_storage__move_file($_FILE_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 ]
    }
  • new_file (scripted, public)

     xo::db::sql::file_storage[i] new_file [ -dbn dbn ] -name name  \
        -folder_id folder_id  -user_id user_id  -creation_ip creation_ip  \
        -indb_p indb_p  -item_id item_id  -package_id package_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -name (required)
    -folder_id (required)
    -user_id (required)
    -creation_ip (required)
    -indb_p (required)
    -item_id (required)
    -package_id (required)

    Testcases:
    No testcase defined.
    #function_args: {NAME {}} {FOLDER_ID {}} {USER_ID {}} {CREATION_IP {}} {INDB_P {}} {ITEM_ID {}} {PACKAGE_ID {}}
    foreach var [list NAME FOLDER_ID USER_ID CREATION_IP INDB_P ITEM_ID 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 file_storage__new_file($_NAME$_FOLDER_ID$_USER_ID$_CREATION_IP$_INDB_P$_ITEM_ID$_PACKAGE_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • new_folder (scripted, public)

     xo::db::sql::file_storage[i] new_folder [ -dbn dbn ] -name name  \
        -folder_name folder_name  -parent_id parent_id  \
        -creation_user creation_user  -creation_ip creation_ip 

    Automatically generated method

    Switches:
    -dbn (optional)
    -name (required)
    -folder_name (required)
    -parent_id (required)
    -creation_user (required)
    -creation_ip (required)

    Testcases:
    No testcase defined.
    #function_args: {NAME {}} {FOLDER_NAME {}} {PARENT_ID {}} {CREATION_USER {}} {CREATION_IP {}}
    foreach var [list NAME FOLDER_NAME PARENT_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 file_storage__new_folder($_NAME$_FOLDER_NAME$_PARENT_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 ]
    }
  • new_root_folder (scripted, public)

     xo::db::sql::file_storage[i] new_root_folder [ -dbn dbn ] \
        -package_id package_id  -folder_name folder_name  -url url  \
        -description description 

    Automatically generated method

    Switches:
    -dbn (optional)
    -package_id (required)
    -folder_name (required)
    -url (required)
    -description (required)

    Testcases:
    No testcase defined.
    #function_args: {PACKAGE_ID {}} {FOLDER_NAME {}} {URL {}} {DESCRIPTION {}}
    foreach var [list PACKAGE_ID FOLDER_NAME URL DESCRIPTION]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select file_storage__new_root_folder($_PACKAGE_ID$_FOLDER_NAME$_URL$_DESCRIPTION) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • new_version (scripted, public)

     xo::db::sql::file_storage[i] new_version [ -dbn dbn ] -filename filename  \
        -description description  -mime_type mime_type  -item_id item_id  \
        -creation_user creation_user  -creation_ip creation_ip 

    Automatically generated method

    Switches:
    -dbn (optional)
    -filename (required)
    -description (required)
    -mime_type (required)
    -item_id (required)
    -creation_user (required)
    -creation_ip (required)

    Testcases:
    No testcase defined.
    #function_args: {FILENAME {}} {DESCRIPTION {}} {MIME_TYPE {}} {ITEM_ID {}} {CREATION_USER {}} {CREATION_IP {}}
    foreach var [list FILENAME DESCRIPTION MIME_TYPE ITEM_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 file_storage__new_version($_FILENAME$_DESCRIPTION$_MIME_TYPE$_ITEM_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 ]
    }
  • rename_file (scripted, public)

     xo::db::sql::file_storage[i] rename_file [ -dbn dbn ] -file_id file_id  \
        -name name 

    Automatically generated method

    Switches:
    -dbn (optional)
    -file_id (required)
    -name (required)

    Testcases:
    No testcase defined.
    #function_args: {FILE_ID {}} {NAME {}}
    foreach var [list FILE_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 file_storage__rename_file($_FILE_ID$_NAME) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }

Variables

::xo::db::sql::file_storage set __default_metaclass ::xotcl::Class
::xo::db::sql::file_storage set __default_superclass ::xotcl::Object
::xo::db::sql::file_storage set abstract_p f
::xo::db::sql::file_storage set auto_save false
::xo::db::sql::file_storage set name_method {}
::xo::db::sql::file_storage set object_type ::xo::db::sql::file_storage
::xo::db::sql::file_storage set security_inherit_p t
::xo::db::sql::file_storage set sql_package_name file_storage
::xo::db::sql::file_storage set supertype acs_object
::xo::db::sql::file_storage set with_table true