Index: openacs-4/packages/acs-content-repository/www/doc/api/item.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/api/item.adp,v diff -u -N -r1.2.2.10 -r1.2.2.11 --- openacs-4/packages/acs-content-repository/www/doc/api/item.adp 9 Jun 2016 13:03:11 -0000 1.2.2.10 +++ openacs-4/packages/acs-content-repository/www/doc/api/item.adp 1 Jul 2016 09:17:33 -0000 1.2.2.11 @@ -16,11 +16,11 @@ website. The actual content is stored in content revisions. It is implemented this way so that there can be mulitple versions of the actual content while the main idea remains constant. For example: -If there is a review for the movie "Terminator," there will exist a -content item by the name "terminator" with all the right parameters -(supertype, parent, etc), there will also exist at least one -content revision pointing to this item with the actual review -content.

+If there is a review for the movie "Terminator," there +will exist a content item by the name "terminator" with +all the right parameters (supertype, parent, etc), there will also +exist at least one content revision pointing to this item with the +actual review content.

 

Related Objects

@@ -38,12 +38,12 @@ Returns:The content type of the item Parameters:
-
item_id:  The item for which the content type is to be retrieved
Declaration:

+Declaration:

 function get_content_type (
   item_id     in cr_items.item_id%TYPE
 ) return cr_items.content_type%TYPE;
 
-
+

 

  • Function: content_item.get_context @@ -54,19 +54,20 @@ Returns:The id of the parent for this item Parameters:
    -
    item_id:  The item for which the parent is to be retrieved
    Declaration:
    
    +Declaration:
    
     function get_context (
       item_id       in cr_items.item_id%TYPE
     ) return acs_objects.context_id%TYPE;
     
    -
    +

     

  • Function: content_item.get_id -

    Takes in a path, such as "/tv/programs/star_trek/episode_203" -and returns the id of the item with this path. Note: URLs are -abstract (no extensions are allowed in content item names and -extensions are stripped when looking up content items)

    +

    Takes in a path, such as +"/tv/programs/star_trek/episode_203" and returns the id +of the item with this path. Note: URLs are abstract (no extensions +are allowed in content item names and extensions are stripped when +looking up content items)

    @@ -79,13 +80,13 @@ -
    Author:Karl Goldstein
    root_folder_id:  Starts path resolution from this folder. Defaults to the root of the sitemap
    Declaration:
    
    +Declaration:
    
     function get_id (
       item_path   in varchar2,
       root_folder_id in cr_items.item_id%TYPE default c_root_folder_id
     ) return cr_items.item_id%TYPE;
     
    -
    +
    See Also:content_item.get_path

     

    @@ -101,12 +102,12 @@ null if no revisions exist Parameters:
    -
    item_id:  The item for which the latest revision is to be retrieved
    Declaration:
    
    +Declaration:
    
     function get_latest_revision (
       item_id    in cr_items.item_id%TYPE
     ) return cr_revisions.revision_id%TYPE;
     
    -
    +
    See Also:content_item.get_live_revision

     

    @@ -121,12 +122,12 @@ if no live revision exists Parameters:
    -
    item_id:  The item for which the live revision is to be retrieved
    Declaration:
    
    +Declaration:
    
     function get_live_revision (
       item_id   in cr_items.item_id%TYPE
     ) return cr_revisions.revision_id%TYPE;
     
    -
    +
    See Also:content_item.set_live_revision, content_item.get_latest_revision @@ -141,12 +142,12 @@ otherwise Parameters:
    -
    item_id:  The item id
    Declaration:
    
    +Declaration:
    
     function get_parent_folder (
       item_id       in cr_items.item_id%TYPE
     ) return cr_folders.folder_id%TYPE;
     
    -
    +

     

  • Function: content_item.get_path @@ -163,13 +164,13 @@ root_folder_id:  Starts path resolution from this folder. Defaults to the root of the sitemap -Declaration:
    
    +Declaration:
    
     function get_path (
       item_id        in cr_items.item_id%TYPE,
       root_folder_id in cr_items.item_id%TYPE default c_root_folder_id
     ) return varchar2;
     
    -
    +
    See Also:content_item.get_id, content_item.write_to_file

     

    @@ -185,16 +186,16 @@ item_id:  The item for which the publish date is to be retrieved -is_live:  If 't', use the live revision for the item. Otherwise, use the -latest revision. The default is 'f' +is_live:  If 't', use the live revision for the item. Otherwise, +use the latest revision. The default is 'f' -Declaration:
    
    +Declaration:
    
     function get_publish_date (
       item_id    in cr_items.item_id%TYPE,
       is_live    in char default 'f'
     ) return cr_revisions.publish_date%TYPE;
     
    -
    +
    See Also:content_item.get_live_revision, content_item.get_latest_revision, @@ -209,28 +210,28 @@ Returns:The number of revisions for this item Parameters:
    -
    item_id:  The id the item
    Declaration:
    
    +Declaration:
    
     function get_revision_count (
       item_id   in cr_items.item_id%TYPE
     ) return number;
     
    -
    +
    See Also:content_revision.new

     

  • Function: content_item.get_root_folder - +
    Parameters:
    Not yet documented
    Declaration:
    
    +
    Parameters:
    Not yet documented
    Declaration:
    
     function get_root_folder return cr_folders.folder_id%TYPE;
     
    -

     

  • Function: content_item.get_template

    Retrieves the template which should be used to render this item. If no template is registered to specifically render the item in the -given context, the default template for the item's type is +given context, the default template for the item's type is returned.

    @@ -241,16 +242,16 @@ - + -
    Author:Karl Goldstein
    item_id:  The item for which the template will be unregistered
    use_context:  The context in the item is to be rendered, such as 'admin' or -'public'use_context:  The context in the item is to be rendered, such as +'admin' or 'public'
    Declaration:
    
    +Declaration:
    
     function get_template (
       item_id     in cr_items.item_id%TYPE,
       use_context in cr_item_template_map.use_context%TYPE
     ) return cr_templates.template_id%TYPE;
     
    -
    +
    See Also:content_type.register_template, content_item.register_template, @@ -259,8 +260,8 @@ Function: content_item.get_title

    Retrieves the title for the item, using either the latest or the live revision. If the specified item is in fact a folder, return -the folder's label. In addition, this function will automatically -resolve symlinks.

    +the folder's label. In addition, this function will +automatically resolve symlinks.

    @@ -269,16 +270,16 @@ - + -
    Author:Karl Goldstein
    item_id:  The item for which the title is to be retrieved
    is_live:  If 't', use the live revision to get the title. Otherwise, use -the latest revision. The default is 'f'is_live:  If 't', use the live revision to get the title. +Otherwise, use the latest revision. The default is 'f'
    Declaration:
    
    +Declaration:
    
     function get_title (
       item_id    in cr_items.item_id%TYPE,
       is_live    in char default 'f'
     ) return cr_revisions.title%TYPE;
     
    -
    +
    See Also:content_item.get_live_revision, content_item.get_latest_revision, content_symlink.resolve @@ -298,13 +299,13 @@ root_folder_id:  Starts path resolution from this folder. Defaults to the root of the sitemap -Declaration:
    
    +Declaration:
    
     function get_virtual_path (
       item_id        in cr_items.item_id%TYPE,
       root_folder_id in cr_items.item_id%TYPE default c_root_folder_id
     ) return varchar2;
     
    -
    +
    See Also:content_item.get_id, content_item.write_to_file, content_item.get_path @@ -317,21 +318,21 @@ Author:Karl Goldstein -Returns:'t' if the item is an index page for the specified -folder, 'f' otherwise +Returns:'t' if the item is an index page for the +specified folder, 'f' otherwise Parameters:
    -
    item_id:  The item id
    folder_id:  The folder id
    Declaration:
    
    +Declaration:
    
     function is_index_page (
       item_id   in cr_items.item_id%TYPE,
       folder_id in cr_folders.folder_id%TYPE
     ) return varchar2;
     
    -
    +
    See Also:content_folder.get_index_page

     

    @@ -345,16 +346,16 @@ Author:Michael Pih -Returns:'t' if the item is publishable in it's present -state, Otherwise, returns 'f' +Returns:'t' if the item is publishable in it's +present state, Otherwise, returns 'f' Parameters:
    -
    item_id The:  item ID of the potential parent
    Declaration:
    
    +Declaration:
    
     function is_publishable (
       item_id               in cr_items.item_id%TYPE
     ) return char;
     
    -
    +

     

  • Function: content_item.is_subclass @@ -363,54 +364,54 @@ Author:Karl Goldstein -Returns:'t' if the child class is a subclass of the -superclass, 'f' otherwise +Returns:'t' if the child class is a subclass of +the superclass, 'f' otherwise Parameters:
    -
    object_type:  The child class
    supertype:  The superclass
    Declaration:
    
    +Declaration:
    
     function is_subclass (
       object_type in acs_object_types.object_type%TYPE,
       supertype     in acs_object_types.supertype%TYPE
     ) return char;
     
    -
    +
    See Also:acs_object_type.create_type

     

  • Function: content_item.is_valid_child

    Determines if an item would be a valid child of another item by -checking if the parent allows children of the would-be child's +checking if the parent allows children of the would-be child's content type and if the parent already has n_max children of that content type.

    - +
    Author:Michael Pih
    Returns:'t' if the item would be a valid child, 'f' -otherwiseReturns:'t' if the item would be a valid child, +'f' otherwise
    Parameters:
    -
    item_id The:  item ID of the potential parent
    content_type The:  content type of the potential child item
    Declaration:
    
    +
    Declaration:
    
     function is_valid_child (
       item_id       in cr_items.item_id%TYPE,
       content_type  in acs_object_types.object_type%TYPE
     ) return char;
     
    -
    +

     

  • Function: content_item.new -

    Creates a new content item. If the data, title -or text parameters are specified, also creates a revision -for the item.

    +

    Creates a new content item. If the data, +title or text parameters are specified, also +creates a revision for the item.

    @@ -428,47 +429,49 @@ - - + - + - + +simultaneously with the text parameter +Defaults to 'parent content type'-'child content +type' - - - -
    Author:Karl Goldstein
    locale:  The locale for this item, for use with Intermedia search
    item_subtype:  The type of the new item, defaults to 'content_item' This -parameter is used to support inheritance, so that subclasses of -content_item can call this function to initialize the +item_subtype:  The type of the new item, defaults to 'content_item' +This parameter is used to support inheritance, so that subclasses +of content_item can call this function to initialize the parent class
    content_type:  The content type for the item, defaults to 'content_revision'. -Only objects of this type may be used as revisions for the -itemcontent_type:  The content type for the item, defaults to +'content_revision'. Only objects of this type may be used +as revisions for the item
    title:  The user-readable title for the item, defaults to the item's -nametitle:  The user-readable title for the item, defaults to the +item's name
    description:  A short description for the item (4000 characters maximum)
    mime_type:  The file type of the item, defaults to 'text/plain'mime_type:  The file type of the item, defaults to +'text/plain'
    nls_language:  The language for the item, used for Intermedia search
    text:  The text content of the new revision, 4000 charcters maximum. -Cannot be specified simultaneously with the data +Cannot be specified simultaneously with the data parameter
    data:  The blob content of the new revison. Cannot be specified -simultaneously with the text parameter
    relation_tag:  If a parent-child relationship is registered for these content types, use this tag to describe the parent-child relationship. -Defaults to 'parent content type'-'child content type'
    is_live:  If 't', the new revision will become live
    creation_date:  As in acs_object.new +creation_date:  As in acs_object.new
    creation_ip:  As in acs_object.new +creation_ip:  As in acs_object.new
    creation_user:  As in acs_object.new +creation_user:  As in acs_object.new
    Declaration:
    
    +Declaration:
    
     function new (
       name          in cr_items.name%TYPE,
       parent_id     in acs_objects.context_id%TYPE default null,
    @@ -493,14 +496,14 @@
       is_live       in char default 'f'
     ) return cr_items.item_id%TYPE;
     
    -
    +
    See Also:acs_object.new

     

  • Function: content_item.relate - +
    Parameters:
    Not yet documented
    Declaration:
    
    +
    Parameters:
    Not yet documented
    Declaration:
    
     function relate (
       item_id       in cr_items.item_id%TYPE,
       object_id     in acs_objects.object_id%TYPE,
    @@ -509,7 +512,7 @@
       relation_type in acs_object_types.object_type%TYPE default 'cr_item_rel'
     ) return cr_item_rels.rel_id%TYPE;
     
    -

     

  • Procedure: content_item.copy @@ -525,13 +528,13 @@ target_folder_id:  The folder where the item is to be copied -Declaration:
    
    +Declaration:
    
     procedure copy (
       item_id               in cr_items.item_id%TYPE,
       target_folder_id      in cr_folders.folder_id%TYPE
     );
     
    -
    +
    See Also:content_item.new, content_folder.new, content_item.move

     

    @@ -544,12 +547,12 @@ Author:Karl Goldstein Parameters:
    -
    item_id:  The id of the item to delete
    Declaration:
    
    +Declaration:
    
     procedure delete (
       item_id       in cr_items.item_id%TYPE
     );
     
    -
    +
    See Also:acs_object.delete

     

    @@ -566,13 +569,13 @@ target_folder_id:  The new folder for the item -Declaration:
    
    +Declaration:
    
     procedure move (
       item_id               in cr_items.item_id%TYPE,
       target_folder_id      in cr_folders.folder_id%TYPE
     );
     
    -
    +
    See Also:content_item.new, content_folder.new, content_item.copy

     

    @@ -591,22 +594,22 @@ use_context:  The context in which the template is appropriate, such as 'admin' or 'public' -Declaration:
    
    +Declaration:
    
     procedure register_template (
       item_id      in cr_items.item_id%TYPE,
       template_id  in cr_templates.template_id%TYPE,
       use_context  in cr_item_template_map.use_context%TYPE
     );
     
    -
    +
    See Also:content_type.register_template, content_item.unregister_template, content_item.get_template

     

  • Procedure: content_item.edit_name

    Renames the item. If an item with the specified name already -exists under this item's parent, an error is thrown

    +exists under this item's parent, an error is thrown

    Author:Karl Goldstein
    Parameters:
    @@ -615,13 +618,13 @@ -
    name:  The new name for the item, must be URL-encoded
    Declaration:
    
    +
    Declaration:
    
     procedure rename (
       item_id        in cr_items.item_id%TYPE,
       name           in cr_items.name%TYPE
     );
     
    -
    + See Also:content_item.new

     

    @@ -634,13 +637,13 @@ Parameters:
    -
    revision_id:  The id of the revision which is to become live for its corresponding item
    Declaration:
    
    +Declaration:
    
     procedure set_live_revision (
       revision_id   in cr_revisions.revision_id%TYPE,
       publish_status in cr_items.publish_status%TYPE default 'ready'
     );
     
    -
    +
    See Also:content_item.get_live_revision

     

    @@ -660,14 +663,14 @@ end_when:  The time and date when the item should be expired. -Declaration:
    
    +Declaration:
    
     procedure set_release_period (
       item_id    in cr_items.item_id%TYPE,
       start_when date default null,
       end_when   date default null
     );
     
    -
    +

     

  • Procedure: @@ -685,14 +688,14 @@ use_context:  The context in which the template is appropriate, such as 'admin' or 'public' -Declaration:
    
    +Declaration:
    
     procedure unregister_template (
       item_id      in cr_items.item_id%TYPE,
       template_id  in cr_templates.template_id%TYPE default null,
       use_context  in cr_item_template_map.use_context%TYPE default null
     );
     
    -
    +
    See Also:content_type.register_template, content_item.register_template, content_item.get_template @@ -701,7 +704,7 @@ Procedure: content_item.unset_live_revision - +
    Parameters:
    Not yet documented
    Declaration:
    
    +
    Parameters:
    Not yet documented
    Declaration:
    
     procedure unset_live_revision (
       --/** Set the live revision to null for the item
       --    \@author Michael Pih
    @@ -710,7 +713,7 @@
       item_id      in cr_items.item_id%TYPE
     );
     
    -

     

  • Procedure: content_item.write_to_file @@ -725,19 +728,19 @@ root_path:  The path in the filesystem to which the root of the sitemap corresponds -Declaration:
    
    +Declaration:
    
     procedure write_to_file (
       item_id     in cr_items.item_id%TYPE,
       root_path   in varchar2
     );
     
    -
    +
    See Also:content_item.get_path
  •  

    -Last Modified: $‌Id: item.html,v 1.3.18.1 2016/06/09 08:21:01 +Last Modified: $‌Id: item.html,v 1.3.18.2 2016/06/22 07:40:41 gustafn Exp $