Oracle9iAS Portal Developer Kit

add_content_area function

Contained in package wwsbr_api.

Call this function to create a content area and return a content area ID.

function add_content_area
(
    p_name varchar2,
    p_display_name varchar2,
    p_versioning varchar2 default VERSIONING_NONE,
    p_default_language varchar2 default 'us',
    p_root_folder_type number default 1,
    p_logo_filename varchar2 default null
)
return number;


Version: Oracle Portal 3.0.8
(Not available Oracle9iAS Portal 9.0.2)

Parameters:

p_name

The internal reference name for the content area. This name must be:

  • unique within the installation of Oracle Portal

  • less than 60 characters

  • not contain spaces or other special characters.

Datatype: in varchar2

p_display_name

The display name or title of the content area. This is displayed in many places including the content area navigator and content area map.

Datatype: in varchar2

p_versioning

The versioning level for items within the content area. There are three options: Audit, Simple and None. Use the constants defined in this package to select the appropriate level of versioning:

  • VERSIONING_AUDIT - Create a new version every time an item is updated in all folders.

  • VERSIONING_SIMPLE - Give the user the option to create a new version when an item is updated. This option permits the folder owner to select either simple, or audit level versioning for their folder.

  • VERSIONING_NONE - Do not automatically turn on versioning in all folders. This option permits the folder owner to select a versioning level (either none, audit or simple) for their folder.

Datatype: in varchar2

p_default_language

The default language for this content area.

Note: This cannot be changed after the content area has been created.

Datatype: in varchar2
Default: us

p_root_folder_type

The FOLDER_TYPE_ID to be used when creating the root folder for the new content area. If left null, the default is 1 and this is the ID for the folder type container.

Datatype: in number
Default: 1

p_logo_filename

The full directory and filename of a content area logo.

Note: Ensure that the file to be uploaded is on the same machine as the database and that the directory and the filename specified have suitable permissions.

Datatype: in varchar2
Default: null

Returns:

This function returns a content area ID.

Exceptions:

  • If the content area name contains spaces or special characters, INVALID_NAME exception is raised.

  • If the content area name specified already exists (i.e. p_name), DUPLICATE_NAME exception is raised.

  • If no content area name is specified, MISSING_NAME exception is raised.

  • If the content area name is more than 60 characters, NAME_TOO_LONG exception is raised.

  • If no display name is specified, MISSING_DISPLAY_NAME exception is raised.

Example:

New_Content_Area_ID := wwsbr_api.add_content_area
(
  p_name => 'ENTERTAINMENT',
  p_display_name => 'Entertainment Site',
  p_versioning => wwsbr_api.VERSIONING_AUDIT,
  p_default_language => 'us',
  p_logo_filename => '\usr\local\tmp\red.gif'
);


Related topics


The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio