{/doc/acs-content-repository {Content Repository}} {Package: content_revision} Package: content_revision

content_revision

Content Repository : content_revision


 

Overview

Content revisions contain the data for content items. There is a many to one relationship between content revisions and content items. There is at most one "live" revision for every content item though. For example, there may be 5 revisions of the review for the movie "Terminator," yet only one of these may be live on the website at a given time.

 

Related Objects

See also: {content_item }

 

API

Creates a new copy of an attribute, including all attributes

Author:Karl Goldstein
Parameters:
revision_id:  The id of the revision to copy
Declaration:

function copy (
  revision_id   in cr_revisions.revision_id%TYPE,
  copy_id       in cr_revisions.revision_id%TYPE default null
) return cr_revisions.revision_id%TYPE;

See Also:content_revision.new

 

Parameters:
Not yet documented
Declaration:

function export_xml (
  revision_id IN cr_revisions.revision_id%TYPE
) return cr_xml_docs.doc_id%TYPE;

 

Return the revision number of the specified revision, according to the chronological order in which revisions have been added for this item.

Author:Karl Goldstein
Returns:The number of the revision
Parameters:
revision_id:  The id the revision
Declaration:

function get_number (
  revision_id   in cr_revisions.revision_id%TYPE
) return number;

See Also:content_revision.new

 

Parameters:
Not yet documented
Declaration:

function import_xml (
  item_id IN cr_items.item_id%TYPE,
  revision_id IN cr_revisions.revision_id%TYPE,
  doc_id IN number
) return cr_revisions.revision_id%TYPE;

 

Create a new revision for an item.

Author:Karl Goldstein
Returns:The id of the newly created revision
Parameters:
title:  The revised title for the item
description:  A short description of this revision, 4000 characters maximum
publish_date:  Publication date.
mime_type:  The revised mime type of the item, defaults to 'text/plain'
nls_language:  The revised language of the item, for use with Intermedia searching
data:  The blob which contains the body of the revision
item_id:  The id of the item being revised
revision_id:  The id of the new revision. A new id will be allocated by default
creation_date:  As in acs_object.new
creation_ip:  As in acs_object.new
creation_user:  As in acs_object.new
Declaration:

function new (
  title         in cr_revisions.title%TYPE,
  description   in cr_revisions.description%TYPE default null,
  publish_date  in cr_revisions.publish_date%TYPE default sysdate,
  mime_type     in cr_revisions.mime_type%TYPE default 'text/plain',
  nls_language  in cr_revisions.nls_language%TYPE default null,
  data          in cr_revisions.content%TYPE,
  item_id       in cr_items.item_id%TYPE,
  revision_id   in cr_revisions.revision_id%TYPE default null,
  creation_date in acs_objects.creation_date%TYPE
                           default sysdate,
  creation_user in acs_objects.creation_user%TYPE
                           default null,
  creation_ip   in acs_objects.creation_ip%TYPE default null
) return cr_revisions.revision_id%TYPE;

See Also:acs_object.new, content_item.new

 

Parameters:
Not yet documented
Declaration:

function read_xml (
  item_id IN number,
  revision_id IN number,
  clob_loc IN clob
) return number as language
  java
name
  'com.arsdigita.content.XMLExchange.importRevision(
     java.lang.Integer, java.lang.Integer, oracle.sql.CLOB
  ) return int';

 

Parameters:
Not yet documented
Declaration:

function write_xml (
  revision_id IN number,
  clob_loc IN clob
) return number as language
  java
name
  'com.arsdigita.content.XMLExchange.exportRevision(
     java.lang.Integer, oracle.sql.CLOB
  ) return int';

 

Deletes the revision.

Author:Karl Goldstein
Parameters:
revision_id:  The id of the revision to delete
Declaration:

procedure delete (
  revision_id   in cr_revisions.revision_id%TYPE
);

See Also:content_revision.new, acs_object.delete

 

Generates an XML document for insertion into cr_revision_attributes, which is indexed by Intermedia for searching attributes.

Author:Karl Goldstein
Parameters:
revision_id:  The id of the revision to index
Declaration:

procedure index_attributes(
  revision_id IN cr_revisions.revision_id%TYPE
);

See Also:content_revision.new

 

Parameters:
Not yet documented
Declaration:

procedure replace(
  revision_id number, search varchar2, replace varchar2)
as language
  java
name
  'com.arsdigita.content.Regexp.replace(
    int, java.lang.String, java.lang.String
   )';

 

Converts a revision uploaded as a binary document to html

Author:Karl Goldstein
Parameters:
revision_id:  The id of the revision to index
Declaration:

procedure to_html (
  revision_id IN cr_revisions.revision_id%TYPE
);

 

Last Modified: $Id: revision.html,v 1.1.1.1 2001/03/13 22:59:26 ben Exp $