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::CrClass[i] ::xo::db::CrItem

Class Hierarchy of ::xo::db::CrItem

  • ::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::db::CrItem[i]
        Meta-class:
        ::xo::db::CrClass[i]
        Parameter for instances:
        package_id, parent_id (default "-100"), publish_status (default "ready")
        Methods for instances:
        current_user_id, delete, descriptionC, fix_content, initialize_loaded_object, item_idC, mime_typeC, nameC, nls_languageC, privilege=creator, publish_dateC, rename, revision_idC, revisions, save, save_new, set_live_revision, textC, titleC, update_attribute_from_slot, update_content, update_revision
        Methods to be applied on the class:
        Methods provided by the meta-class

Class Relations

  • superclass: ::xo::db::Object[i]
  • instmixin: ::xo::db::CrCache::Item[i]
  • subclass: ::xo::db::CrFolder[i], ::xo::db::image[i], ::xowiki::Page[i]

Methods

  • instproc delete (public)

    <instance of ::xo::db::CrItem[i]> delete
    Delete the item from the content repositiory with the item_id taken from the instance variable.

  • instproc privilege=creator (public)

    <instance of ::xo::db::CrItem[i]> privilege=creator \
        [ -login login ] user_id package_id method
    Define an object specific privilege to be used in the policies. Grant access to a content item for the creator (creation_user) of the item, and for the package admin.

    Switches:
    -login (defaults to "true") (optional)
    Parameters:
    user_id
    package_id
    method
  • instproc rename (public)

    <instance of ::xo::db::CrItem[i]> rename -old_name old_name  \
        -new_name new_name 
    Rename a content item

    Switches:
    -old_name (required)
    -new_name (required)
  • instproc save (public)

    <instance of ::xo::db::CrItem[i]> save \
        [ -modifying_user modifying_user ] [ -live_p on|off ] \
        [ -use_given_publish_date on|off ]
    Updates an item in the content repository. We insert a new revision instead of changing the current revision.

    Switches:
    -modifying_user (optional)
    -live_p (boolean) (defaults to "true") (optional)
    make this revision the live revision
    -use_given_publish_date (boolean) (defaults to "false") (optional)
  • instproc save_new (public)

    <instance of ::xo::db::CrItem[i]> save_new \
        [ -package_id package_id ] [ -creation_user creation_user ] \
        [ -creation_ip creation_ip ] [ -live_p on|off ] \
        [ -use_given_publish_date on|off ]
    Insert a new item to the content repository

    Switches:
    -package_id (optional)
    -creation_user (optional)
    user_id if the creating user
    -creation_ip (optional)
    -live_p (boolean) (defaults to "true") (optional)
    make this revision the live revision
    -use_given_publish_date (boolean) (defaults to "false") (optional)
  • instproc set_live_revision (public)

    <instance of ::xo::db::CrItem[i]> set_live_revision \
        -revision_id revision_id  [ -publish_status publish_status ]

    Switches:
    -revision_id (required)
    -publish_status (defaults to "ready") (optional)
    one of 'live', 'ready' or 'production'

Variables

::xo::db::CrItem set __default_metaclass ::xotcl::Class
::xo::db::CrItem set __default_superclass ::xotcl::Object
::xo::db::CrItem set abstract_p f
::xo::db::CrItem set auto_save false
::xo::db::CrItem set content_item__new_args {
      -name $name -parent_id $parent_id -creation_user $creation_user  -creation_ip $creation_ip  \
       -item_subtype "content_item" -content_type $object_type  -description $description -mime_type \
       $mime_type -nls_language $nls_language  -is_live f -storage_type $storage_type -package_id \
       $package_id
    }
::xo::db::CrItem array set db_slot \
       {nls_language ::xo::db::CrItem::slot::nls_language publish_date \
       ::xo::db::CrItem::slot::publish_date description ::xo::db::CrItem::slot::description \
       object_title ::xo::db::Object::slot::object_title name ::xo::db::CrItem::slot::name text \
       ::xo::db::CrItem::slot::text mime_type ::xo::db::CrItem::slot::mime_type title \
       ::xo::db::CrItem::slot::title item_id ::xo::db::CrItem::slot::item_id revision_id \
       ::xo::db::CrItem::slot::revision_id object_id ::xo::db::Object::slot::object_id}
::xo::db::CrItem set folder_id -100
::xo::db::CrItem set id_column revision_id
::xo::db::CrItem set insert_view_operation db_0or1row
::xo::db::CrItem set mime_type text/plain
::xo::db::CrItem set name_method {}
::xo::db::CrItem set object_type content_revision
::xo::db::CrItem set object_type_key 4105
::xo::db::CrItem set pretty_name CrItem
::xo::db::CrItem set pretty_plural CrItem
::xo::db::CrItem set security_inherit_p t
::xo::db::CrItem set sql_package_name ::xo::db::CrItem
::xo::db::CrItem set storage_type text
::xo::db::CrItem set supertype content_revision
::xo::db::CrItem set table_name cr_revisions
::xo::db::CrItem set with_table true

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