Overview | Package | Object Type | Deprecated | Index | Help
| Oracle9iAS Portal PL/SQL API Reference - 9.0.2.6
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE

## Package wwsbr_api

This package contains the supported Content Repository APIs for Oracle9iAS Portal Release 2, version 9.0.2.6. These APIs are backward compatible with the Oracle9iAS Portal 3.0.9 Content Area APIs, except as noted. To maintain compatibility, many of the API signatures (procedure and parameter names) continue to use Release 1 object names: page groups are referred to as content areas, pages are referred to as folders, and navigation pages are referred to as navigation bars. Other than procedure and parameter names, this document employs Release 2 terminology.

Differences Between 3.0.9 and 9.0.2.6 APIs

In this release, these APIs are backwards compatible with the 3.0.9 APIs, with the following exceptions:

- Programs calling the APIs must now process cache invalidations, as described below.
- The p_hide_in_browse parameter for items has been deprecated. The parameter has been retained for backward compatibility with the 3.0.9 API signatures, but its value is ignored. The APIs cannot be used to hide an item. As an alternative, you can set the value of an item's publish date to some date in the future.
- Search folders are no longer supported in Oracle9iAS Portal Release 2. Therefore, the constant FOLDER_TYPE_SEARCH is deprecated and this value can no longer be used in add_folder.
- Application component and Java application item types are no longer supported in Oracle9iAS Portal Release 2. The related constants ITEM_TYPE_APP_COMP, ITEM_TYPE_SIMPLE_APP_COMP, ITEM_TYPE_JAVA_APP, and ITEM_TYPE_SIMPLE_JAVA_APP have been deprecated and these values can no longer be used in the add_item APIs. The parameters p_app_component, p_app_param_screen, p_jarfile_filename, p_initial_page_name, and p_java_app_type in add_item(), add_item_post_upload(), modify_item(), and modify_item_post_upload() have been removed.
- The item region IDs used in 3.0.9 (values 1 - 5) are no longer used. For backward compatibility, an item is added to the default item region on a page if one of these region IDs is used in the add_item APIs.
- Certain constants and exceptions are no longer used. These have been noted in the documentation.
- The parameter p_root_folder_type in the add_content_area() function has been deprecated. The root page of a page group must be a standard page.
- The parameter p_master_item_id in the add_item() and add_item_post_upload() functions has been deprecated. Do not use this parameter. Any value passed to it (other than null) may cause errors.
- The content area search API (WWSBR_SEARCH_API) package has been deprecated.

New functions and new parameters to support the new Release 2 functionality have been added to the API set, as noted in this documentation. For a full description of the new Release 2 functionality and how it compares to the 3.0.9 release, please see the Oracle9iAS Portal Release 2 Upgrade Guide or the tech note "What Happened to Content Areas?", both available on Portal Center at http://portalcenter.oracle.com.

General Rules for all APIs

1. p_name values must not contain spaces or other special characters.
2. p_name values must be less than 60 characters long.
3. The primary key for most objects contains the ID of the object (e.g. item_id, folder_id, etc.) and the object's page group ID (caid). When referencing an existing object in a parameter, you must reference both the object ID and its page group id. The referenced object's page group must either be the same as the page group of the referencing object, or the Shared Objects page group (use the constant SHARED_OBJECTS for the page group ID value). For example, when adding an item you must pass its item type ID (p_type_id) and the ID of the page group which contains the item type (p_type_caid). For the supplied File item type, the values for these parameters would be p_type_id=ITEM_TYPE_FILE (a constant) and p_type_caid=SHARED_OBJECTS.
4. If an object is associated with files (e.g. images, file items, etc.), its APIs will allow you to upload these files when creating or modifying the object. A file location consisting of a directory path and filename can be passed to the file and image parameters for these APIs. The directory in which you place the files must be visible to your database (i.e. local to the database server) and the files themselves must have proper permissions. If you see strange exceptions resulting from API calls in which you are trying to upload files, double check the permissions on the directories and files.
5. If translations are stored for an object, the object is always created in the default language of the page group to which it is added. If the NLS_LANGUAGE for your session is set to a non-default language, and translations have been enabled for that language, a translation in that language is also created for the object . This means that two rows are created for the object in its corresponding table - both rows will have the same object ID but different values for language). Note that translations can be created only if the API is called from a Portal browser session (i.e. a database provider, PL/SQL item, or stored procedure called from the Portal Navigator) - it is not possible in this release to create or modify translations from an external environment such as SQL*Plus or a Web provider.
6. Many of the APIs automatically generate cache invalidation messages for the pages that are affected by the changes. Therefore, you should always call the procedure wwpro_api_invalidation.execute_cache_invalidation() at the end of your routine to process these messages (refer to the documentation on the package WWPRO_API_INVALIDATION in the PDK-PL/SQL for more information). Unless you call this procedure, your changes may not be visible until the affected pages are invalidated through other means. There is no need to call execute_cache_invalidation() more than once; for example, if you are adding or updating multiple items in a loop, call execute_cache_invalidation() when the loop is complete. You should also call the procedure from your exception handler to process any valid messages that were generated before the exception occurred.
7. The APIs do not issue commits. If you are calling the APIs from a browser session via mod_plsql, mod_plsql will perform an automatic commit before returning control to the browser. wwpro_api_invalidation.execute_cache_invalidation() also issues a commit. If you are calling the APIs from an external environment (e.g. SQL*PLus or a Web provider), and you need to commit before processing the cache invalidations, you must issue a commit statement in your code. Similarly, if you need to rollback, do so before calling execute_cache_invalidation().
8. All of the APIs in this package assume that the context has been set for the functions to execute as a specific Oracle9iAS Portal user. If the API is called from a Portal browser session (a database provider, PL/SQL item, or stored procedure called from the Portal Navigator), context is set automatically to the user who is currently logged into the portal and also uses the user's current language setting. If the API is executing in a Web Portlet or an external application (e.g. SQL*Plus), you must set the context to a specific user by using the wwctx_api.set_context() procedure (see the WWCTX_API documentation in the PDK-PL/SQL). For example, to set context to the user "GEORGE" with the password "welcome":

        DECLARE
            p_user_name VARCHAR2(60) := 'GEORGE';
            p_password VARCHAR2(60) := 'welcome';
            p_company VARCHAR2(60) := NULL;
        BEGIN
            wwctx_api.set_context(p_user_name,p_password,p_company);
        EXCEPTION
            WHEN OTHERS THEN
                dbms_output.put_line(SubStr('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM, 1, 255));
                RAISE;
           END;

   It is currently not possible to change the language context in an external environment, where all programs execute with the default language of the portal.

Using sbrapi.sql

The supplied script sbrapi.sql, located in the ORACLE_HOME/portal/admin/plsql/wws directory, can be used to grant access to these APIs. This script takes the name of a database schema as a parameter and grants EXECUTE to that schema on the WWSBR_API package. sbrapi.sql also grants SELECT on the secured content repository views to the passed SCHEMA. sbrapi.sql must be run as the owner of the Portal schema (SCHEMA_OWNER).

See Secure Content Repository Views for more information.

Scope:
  Public

Exception Summary
`CANNOT_INSERT_DOCUMENT` Raised when an attempt to upload a blob to the document table fails.
`DUPLICATE_FOLDER` Raised in currently unsupported routine move_folder
`DUPLICATE_ID` Deprecated
`DUPLICATE_NAME` Raised when an object with the same name already exists.
`FOLDER_VERSIONING_IS_AUDIT` Raised when attempting to update the current version of an item but page versioning is set to AUDIT.
`FOLDER_VERSIONING_IS_NONE` Raised when attempting to add a new version of an item but page versioning is set to NONE.
`ILS_DISABLED` Raised when attempting to set item level access privileges when Item Level Security is not enabled for the page.
`ILS_DISABLED_FOR_ITEM` Raised when attempting to add access privileges to an item but the item is not set up to use ILS privileges.
`INVALID_CAID` Raised in currently unsupported routine move_folder and move_item.
`INVALID_CATEGORY` Raised when the value of p_parent_id for a category is invalid.
`INVALID_EXPIRE_DATE` Raised when the value of p_expire_mode is EXP_DATE and an invalid date is passed for p_expiration.
`INVALID_EXPIRE_DATE_FORMAT` Raised when the value of p_expire_mode is EXP_DATE and an invalid date format is passed for p_expiration.
`INVALID_EXPIRE_NUMBER` Raised when the value of p_expire_mode is EXP_NUMBER and an invalid number is passed for p_expiration.
`INVALID_FOLDER` Raised when the value of p_parent_id for a folder is invalid.
`INVALID_FOLDER_ID` Raised in currently unsupported routine move_folder and move_item.
`INVALID_ITEM_ID` Raised in currently unsupported routine move_item
`INVALID_ITEMTYPE` Deprecated
`INVALID_MOVE` Raised in currently unsupported routine move_folder and move_item
`INVALID_NAME` Raised when a value containing spaces or special characters is passed to p_name.
`INVALID_NUMBER` Raised when an non-numeric value is passed to a NUMBER parameter.
`INVALID_PERSPECTIVE` Raised when the value of p_parent_id for a perspective is invalid.
`INVALID_PLSQL_EXECUTE_USER` Raised when the value for p_plsql_execute_user is invalid.
`INVALID_PUBLISH_DATE_FORMAT` Raised when the date format for p_publish_date is invalid.
`INVALID_PUBLISH_DATE_VALUE` Raised when the date value for publish date is invalid (Publish date must be today or later and publish date must be greater than the expiry date).
`INVALID_USERNAME` Deprecated
`ITEM_CREATION_ERROR` Raised when there is an unspecified error in adding an item.
`ITEM_NOT_FOUND_ERROR` Raised when the value of p_master_item_id for an item is invalid.
`ITEM_UPDATE_ERROR` Raised when there is an unspecified error modifying an item.
`MISSING_DISPLAY_NAME` Raised when the required value p_display_name is not passed.
`MISSING_ITEM_TYPE` Raised when the required value p_type_id is not passed for an item.
`MISSING_NAME` Raised when the required value p_name is not passed.
`MISSING_PLSQL_EXECUTE_USER` Raised when the required value p_plsql_execute_user is not passed.
`NAME_TOO_LONG` Raised when a value exceeding the maximum limit (60 characters) is passed to p_name.
`NO_ITEM_REGION` Raised when an attempt is made to add an item to a page that does not contain an item region.
`NO_MASTER_ITEM_ID` Deprecated
`NOT_ENOUGH_PRIVS` Raised when the calling user does not have the correct authorization.
`NULL_EXPIRE_DATE` Raised when p_expire_mode is EXP_DATE and no value is passed for p_expiration.
`NULL_EXPIRE_NUMBER` Raised when p_expire_mode is EXP_NUMBER and no value is passed for p_expiration.
`PERMISSION_DENIED` Raised when the calling user does not have the correct authorization.
`PLSQL_REQUIRED` Raised when a PLSQL value is not passed to the p_value parameter while creating a page based on the PLSQL base type.
`QUOTA_EXCEEDED` Raised when the added/modified item exceeds the page group quota.
`REQD_ATTR_MISSING` Raised when a required attribute is not passed while adding an item.
`UNKNOWN_ERROR` Raised when an unknown error occurs.
`URL_REQUIRED` Raised when a URL value is not passed to the p_value parameter while creating a page based on the URL base type.

Type Summary
`g_array` | `subtype`
`g_caid_array` | `subtype`
`g_perspectiveidarray` | `subtype`

Constant Summary
`ALIGN_ABSOLUTE_BOTTOM` | `varchar2(30)`
`ALIGN_ABSOLUTE_MIDDLE` | `varchar2(30)`
`ALIGN_BASELINE` | `varchar2(30)`
`ALIGN_BOTTOM` | `varchar2(30)`
`ALIGN_LEFT` | `varchar2(30)`
`ALIGN_MIDDLE` | `varchar2(30)`
`ALIGN_RIGHT` | `varchar2(30)`
`ALIGN_TEXT_TOP` | `varchar2(30)`
`ALIGN_TOP` | `varchar2(30)`
`ATTR_DISPLAY_TYPE` | `number`
`ATTR_ELEMENT_MAP_TYPE` | `number`
`ATTR_FUNCTION_ID` | `number`
`ATTR_LOGIN_IMAGE` | `number`
`ATTR_LOGIN_LINK` | `number`
`ATTR_LOGOUT_IMAGE` | `number`
`ATTR_LOGOUT_LINK` | `number`
`ATTR_OBJECT_LIST` | `number`
`ATTR_OBJECT_TYPE_LIST` | `number`
`ATTR_PATH_DEPTH` | `number`
`ATTR_PATH_SEPARATOR` | `number`
`ATTR_PORTAL_SMART_LINK` | `number`
`ATTR_SEARCH_BOX_WIDTH` | `number`
`ATTR_SEARCH_PAGE_GROUP_ID` | `number`
`ATTR_TEXT_TYPE` | `number`
`CREATOR_SCHEMA` | `varchar2(20)`
`DATA_TYPE_DATE` | `varchar2(30)`
`DATA_TYPE_FILE` | `varchar2(30)`
`DATA_TYPE_NUMBER` | `varchar2(30)`
`DATA_TYPE_OTHER` | `varchar2(30)`
`DATA_TYPE_TEXT` | `varchar2(30)`
`DB_USER` | `varchar(20)`
`EXP_DATE` | `varchar2(20)`
`EXP_NUMBER` | `varchar2(20)`
`FOLDER_ACCESS` | `varchar2(30)`
`FOLDER_TYPE_CONTAINER` | `number`
`FOLDER_TYPE_PLSQL` | `number`
`FOLDER_TYPE_SEARCH` This value is deprecated. | `number`
`FOLDER_TYPE_URL` | `number`
`FULL_SCREEN` | `varchar2(30)`
`GENERAL_CATEGORY` | `number`
`IN_FRAME` | `varchar2(30)`
`IN_PLACE` | `varchar2(30)`
`IS_OFF` | `number`
`IS_ON` | `number`
`ITEM_ACCESS` | `varchar2(30)`
`ITEM_TYPE_APP_COMP` This value is deprecated. | `number`
`ITEM_TYPE_BASIC_SEARCH` | `number`
`ITEM_TYPE_ELEMENT_LIST` | `number`
`ITEM_TYPE_FILE` | `number`
`ITEM_TYPE_FOLDER_LINK` | `number`
`ITEM_TYPE_IMAGE` | `number`
`ITEM_TYPE_IMAGE_MAP` | `number`
`ITEM_TYPE_JAVA_APP` This value is deprecated. | `number`
`ITEM_TYPE_LOGIN_LOGOUT` | `number`
`ITEM_TYPE_MAP_LINK` | `number`
`ITEM_TYPE_PAGE_FUNCTION` | `number`
`ITEM_TYPE_PAGE_PATH` | `number`
`ITEM_TYPE_PLSQL` | `number`
`ITEM_TYPE_PORTLET_INST` | `number`
`ITEM_TYPE_SIMPLE_APP_COMP` This value is deprecated. | `number`
`ITEM_TYPE_SIMPLE_FILE` | `number`
`ITEM_TYPE_SIMPLE_IMAGE` | `number`
`ITEM_TYPE_SIMPLE_JAVA_APP` This value is deprecated. | `number`
`ITEM_TYPE_SIMPLE_PAGE_LINK` | `number`
`ITEM_TYPE_SIMPLE_PLSQL` | `number`
`ITEM_TYPE_SIMPLE_TEXT` | `number`
`ITEM_TYPE_SIMPLE_URL` | `number`
`ITEM_TYPE_SMART_LINK` | `number`
`ITEM_TYPE_SMART_TEXT` | `number`
`ITEM_TYPE_TEXT` | `number`
`ITEM_TYPE_URL` | `number`
`ITEM_TYPE_ZIP_FILE` | `number`
`NEW_WINDOW` | `varchar2(30)`
`NO` | `number`
`PERMANENT` | `varchar2(20)`
`PUBLIC_SCHEMA` | `varchar2(20)`
`SHARED_OBJECTS` | `number`
`VALUE_ACCOUNT_INFO` | `varchar2(30)`
`VALUE_ADVANCED_SEARCH` | `varchar2(30)`
`VALUE_BUILDER` | `varchar2(30)`
`VALUE_COMMUNITY` | `varchar2(30)`
`VALUE_CONTACT` | `varchar2(30)`
`VALUE_CURRENT_DATE` | `varchar2(30)`
`VALUE_CURRENT_PAGE` | `varchar2(30)`
`VALUE_CURRENT_USER` | `varchar2(30)`
`VALUE_CUST_MOBILE_HOME_PAGE` | `varchar2(30)`
`VALUE_CUSTOMIZE_PAGE` | `varchar2(30)`
`VALUE_EDIT_PAGE` | `varchar2(30)`
`VALUE_HELP` | `varchar2(30)`
`VALUE_NAVIGATOR` | `varchar2(30)`
`VALUE_PORTAL_HOME` | `varchar2(30)`
`VALUE_PORTLET_REPOS` | `varchar2(30)`
`VALUE_PROPERTY_SHEET` | `varchar2(30)`
`VALUE_REFRESH_PAGE` | `varchar2(30)`
`VALUE_SUBSCRIBE` | `varchar2(30)`
`VERSIONING_AUDIT` | `varchar2(30)`
`VERSIONING_NONE` | `varchar2(30)`
`VERSIONING_SIMPLE` | `varchar2(30)`
`YES` | `number`

Variable Summary
`g_empty_array` | `g_array`
`g_empty_caid_array` | `g_caid_array`
`g_perspectiveidemptyarray` | `g_perspectiveidarray`

Function/Procedure Summary
`add_category` Creates a new category in a page group. | `number`
`add_content_area` Creates a new page group. | `number`
`add_folder` Creates a new page in a page group. | `number`
`add_item` Creates a new item on a specified page in a page group. | `number`
`add_item_ils_privileges` Adds item level security access privileges for one or more users or groups to a single specified item. | ``
`add_item_post_upload` Creates a new item on a page and links it to existing document(s) in the document table. | `number`
`add_perspective` Creates a new perspective in a page group. | `number`
`delete_ils_privilege` Deletes the item level security access privileges for a user or group on a single specified item. | ``
`enable_ils_for_item` Enables item level security for a specified item. | ``
`inherit_folder_privileges` Causes an item that is enabled for item level security to inherit its privileges from the page on which it resides. | ``
`modify_item` Modifies an existing item. | `number`
`modify_item_post_upload` Modifies an existing item and links it to existing document(s) in the document table. | `number`
`move_folder` This api is not currently supported. | ``
`move_item` This api is not currently supported. | ``
`upload_blob` Uploads document content to the document table. | `varchar2`

Exception Detail

### CANNOT_INSERT_DOCUMENT

    CANNOT_INSERT_DOCUMENT exception

  Raised when an attempt to upload a blob to the document table fails. The following routines raise this exception:
  - upload_blob

### DUPLICATE_FOLDER

    DUPLICATE_FOLDER exception

  Raised in currently unsupported routine move_folder

### DUPLICATE_ID

    DUPLICATE_ID exception

  Deprecated

### DUPLICATE_NAME

    DUPLICATE_NAME exception

  Raised when an object with the same name already exists. The following routines raise this exception:
  - add_content_area
  - add_folder
  - add_category
  - add_perspective

### FOLDER_VERSIONING_IS_AUDIT

    FOLDER_VERSIONING_IS_AUDIT exception

  Raised when attempting to update the current version of an item but page versioning is set to AUDIT. The following routines raise this exception:
  - modify_item
  - modify_item_post_upload

### FOLDER_VERSIONING_IS_NONE

    FOLDER_VERSIONING_IS_NONE exception

  Raised when attempting to add a new version of an item but page versioning is set to NONE. The following routines raise this exception:
  - modify_item
  - modify_item_post_upload

### ILS_DISABLED

    ILS_DISABLED exception

  Raised when attempting to set item level access privileges when Item Level Security is not enabled for the page. The following routines raise this exception:
  - modify_item
  - modify_item_post_upload
  - enable_ils_for_item
  - inherit_folder_privileges
  - add_item_ils_privileges

### ILS_DISABLED_FOR_ITEM

    ILS_DISABLED_FOR_ITEM exception

  Raised when attempting to add access privileges to an item but the item is not set up to use ILS privileges. The following routines raise this exception:
  - add_item_ils_privileges

### INVALID_CAID

    INVALID_CAID exception

  Raised in currently unsupported routine move_folder and move_item.

### INVALID_CATEGORY

    INVALID_CATEGORY exception

  Raised when the value of p_parent_id for a category is invalid. The following routines raise this exception:
  - add_category

### INVALID_EXPIRE_DATE

    INVALID_EXPIRE_DATE exception

  Raised when the value of p_expire_mode is EXP_DATE and an invalid date is passed for p_expiration. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### INVALID_EXPIRE_DATE_FORMAT

    INVALID_EXPIRE_DATE_FORMAT exception

  Raised when the value of p_expire_mode is EXP_DATE and an invalid date format is passed for p_expiration. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### INVALID_EXPIRE_NUMBER

    INVALID_EXPIRE_NUMBER exception

  Raised when the value of p_expire_mode is EXP_NUMBER and an invalid number is passed for p_expiration. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### INVALID_FOLDER

    INVALID_FOLDER exception

  Raised when the value of p_parent_id for a folder is invalid. The following routines raise this exception:
  - add_folder

### INVALID_FOLDER_ID

    INVALID_FOLDER_ID exception

  Raised in currently unsupported routine move_folder and move_item.

### INVALID_ITEM_ID

    INVALID_ITEM_ID exception

  Raised in currently unsupported routine move_item

### INVALID_ITEMTYPE

    INVALID_ITEMTYPE exception

  Deprecated

### INVALID_MOVE

    INVALID_MOVE exception

  Raised in currently unsupported routine move_folder and move_item

### INVALID_NAME

    INVALID_NAME exception

  Raised when a value containing spaces or special characters is passed to p_name. The following routines raise this exception:
  - add_content_area
  - add_folder
  - add_category
  - add_perspective

### INVALID_NUMBER

    INVALID_NUMBER exception

  Raised when an non-numeric value is passed to a NUMBER parameter. The following routines raise this exception:
  - add_item
  - modify_item

### INVALID_PERSPECTIVE

    INVALID_PERSPECTIVE exception

  Raised when the value of p_parent_id for a perspective is invalid. The following routines raise this exception:
  - add_perspective

### INVALID_PLSQL_EXECUTE_USER

    INVALID_PLSQL_EXECUTE_USER exception

  Raised when the value for p_plsql_execute_user is invalid. The following routines raise this exception:
  - add_folder

### INVALID_PUBLISH_DATE_FORMAT

    INVALID_PUBLISH_DATE_FORMAT exception

  Raised when the date format for p_publish_date is invalid. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### INVALID_PUBLISH_DATE_VALUE

    INVALID_PUBLISH_DATE_VALUE exception

  Raised when the date value for publish date is invalid (Publish date must be today or later and publish date must be greater than the expiry date). The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### INVALID_USERNAME

    INVALID_USERNAME exception

  Deprecated

### ITEM_CREATION_ERROR

    ITEM_CREATION_ERROR exception

  Raised when there is an unspecified error in adding an item. The following routines raise this exception:
  - add_item
  - add_item_post_upload

### ITEM_NOT_FOUND_ERROR

    ITEM_NOT_FOUND_ERROR exception

  Raised when the value of p_master_item_id for an item is invalid. The following routines raise this exception:
  - modify_item
  - modify_item_post_upload
  - enable_ils_for_item
  - inherit_folder_privileges
  - add_item_ils_privileges
  - delete_ils_privilege

### ITEM_UPDATE_ERROR

    ITEM_UPDATE_ERROR exception

  Raised when there is an unspecified error modifying an item. The following routines raise this exception:
  - modify_item
  - modify_item_post_upload

### MISSING_DISPLAY_NAME

    MISSING_DISPLAY_NAME exception

  Raised when the required value p_display_name is not passed. The following routines raise this exception:
  - add_content_area
  - add_folder
  - add_category
  - add_perspective

### MISSING_ITEM_TYPE

    MISSING_ITEM_TYPE exception

  Raised when the required value p_type_id is not passed for an item. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### MISSING_NAME

    MISSING_NAME exception

  Raised when the required value p_name is not passed. The following routines raise this exception:
  - add_content_area
  - add_folder
  - add_category
  - add_perspective

### MISSING_PLSQL_EXECUTE_USER

    MISSING_PLSQL_EXECUTE_USER exception

  Raised when the required value p_plsql_execute_user is not passed. The following routines raise this exception:
  - add_folder

### NAME_TOO_LONG

    NAME_TOO_LONG exception

  Raised when a value exceeding the maximum limit (60 characters) is passed to p_name. The following routines raise this exception:
  - add_content_area
  - add_folder

### NO_ITEM_REGION

    NO_ITEM_REGION exception

  Raised when an attempt is made to add an item to a page that does not contain an item region. The following routines raise this exception:
  - add_item
  - add_item_post_upload

### NO_MASTER_ITEM_ID

    NO_MASTER_ITEM_ID exception

  Deprecated

### NOT_ENOUGH_PRIVS

    NOT_ENOUGH_PRIVS exception

  Raised when the calling user does not have the correct authorization. The following routines raise this exception:
  - add_item
  - modify_item
  - enable_ils_for_item
  - inherit_folder_privileges
  - add_item_ils_privileges
  - delete_ils_privilege

### NULL_EXPIRE_DATE

    NULL_EXPIRE_DATE exception

  Raised when p_expire_mode is EXP_DATE and no value is passed for p_expiration. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### NULL_EXPIRE_NUMBER

    NULL_EXPIRE_NUMBER exception

  Raised when p_expire_mode is EXP_NUMBER and no value is passed for p_expiration. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### PERMISSION_DENIED

    PERMISSION_DENIED exception

  Raised when the calling user does not have the correct authorization. Similar to NOT_ENOUGH_PRIVS exception. The following routines raise this exception:
  - add_category
  - add_perspective

### PLSQL_REQUIRED

    PLSQL_REQUIRED exception

  Raised when a PLSQL value is not passed to the p_value parameter while creating a page based on the PLSQL base type. The following routines raise this exception:
  - add_folder

### QUOTA_EXCEEDED

    QUOTA_EXCEEDED exception

  Raised when the added/modified item exceeds the page group quota. The following routines raise this exception:
  - add_item
  - add_item_post_upload
  - modify_item
  - modify_item_post_upload

### REQD_ATTR_MISSING

    REQD_ATTR_MISSING exception

  Raised when a required attribute is not passed while adding an item. The following routines raise this exception:
  - add_item
  - add_item_post_upload

### UNKNOWN_ERROR

    UNKNOWN_ERROR exception

  Raised when an unknown error occurs. The following routines raise this exception:
  - modify_item
  - modify_item_post_upload

### URL_REQUIRED

    URL_REQUIRED exception

  Raised when a URL value is not passed to the p_value parameter while creating a page based on the URL base type. The following routines raise this exception:
  - add_folder

Type Detail

### g_array

    subtype g_array is wwsbr_type.array

### g_caid_array

    subtype g_caid_array is wwsbr_type.array

### g_perspectiveidarray

    subtype g_perspectiveidarray is wwv_perspectivedb.perspectiveidarray

Constant Detail

### ALIGN_ABSOLUTE_BOTTOM

    ALIGN_ABSOLUTE_BOTTOM constant varchar2(30) := 'absbottom'

### ALIGN_ABSOLUTE_MIDDLE

    ALIGN_ABSOLUTE_MIDDLE constant varchar2(30) := 'absmiddle'

### ALIGN_BASELINE

    ALIGN_BASELINE constant varchar2(30) := 'baseline'

### ALIGN_BOTTOM

    ALIGN_BOTTOM constant varchar2(30) := 'bottom'

### ALIGN_LEFT

    ALIGN_LEFT constant varchar2(30) := 'left'

### ALIGN_MIDDLE

    ALIGN_MIDDLE constant varchar2(30) := 'middle'

### ALIGN_RIGHT

    ALIGN_RIGHT constant varchar2(30) := 'right'

### ALIGN_TEXT_TOP

    ALIGN_TEXT_TOP constant varchar2(30) := 'texttop'

### ALIGN_TOP

    ALIGN_TOP constant varchar2(30) := 'top'

### ATTR_DISPLAY_TYPE

    ATTR_DISPLAY_TYPE constant number := 63

### ATTR_ELEMENT_MAP_TYPE

    ATTR_ELEMENT_MAP_TYPE constant number := 67

### ATTR_FUNCTION_ID

    ATTR_FUNCTION_ID constant number := 68

### ATTR_LOGIN_IMAGE

    ATTR_LOGIN_IMAGE constant number := 58

### ATTR_LOGIN_LINK

    ATTR_LOGIN_LINK constant number := 57

### ATTR_LOGOUT_IMAGE

    ATTR_LOGOUT_IMAGE constant number := 60

### ATTR_LOGOUT_LINK

    ATTR_LOGOUT_LINK constant number := 59

### ATTR_OBJECT_LIST

    ATTR_OBJECT_LIST constant number := 65

### ATTR_OBJECT_TYPE_LIST

    ATTR_OBJECT_TYPE_LIST constant number := 64

### ATTR_PATH_DEPTH

    ATTR_PATH_DEPTH constant number := 69

### ATTR_PATH_SEPARATOR

    ATTR_PATH_SEPARATOR constant number := 70

### ATTR_PORTAL_SMART_LINK

    ATTR_PORTAL_SMART_LINK constant number := 56

### ATTR_SEARCH_BOX_WIDTH

    ATTR_SEARCH_BOX_WIDTH constant number := 62

### ATTR_SEARCH_PAGE_GROUP_ID

    ATTR_SEARCH_PAGE_GROUP_ID constant number := 61

### ATTR_TEXT_TYPE

    ATTR_TEXT_TYPE constant number := 66

### CREATOR_SCHEMA

    CREATOR_SCHEMA constant varchar2(20) := '$CREATOR$'

### DATA_TYPE_DATE

    DATA_TYPE_DATE constant varchar2(30) := 'date'

### DATA_TYPE_FILE

    DATA_TYPE_FILE constant varchar2(30) := 'file'

### DATA_TYPE_NUMBER

    DATA_TYPE_NUMBER constant varchar2(30) := 'number'

### DATA_TYPE_OTHER

    DATA_TYPE_OTHER constant varchar2(30) := 'other'

### DATA_TYPE_TEXT

    DATA_TYPE_TEXT constant varchar2(30) := 'text'

### DB_USER

    DB_USER constant varchar(20) := 'db_user'

### EXP_DATE

    EXP_DATE constant varchar2(20) := 'DATE'

### EXP_NUMBER

    EXP_NUMBER constant varchar2(20) := 'NUMBER'

### FOLDER_ACCESS

    FOLDER_ACCESS constant varchar2(30) := 'folder'

### FOLDER_TYPE_CONTAINER

    FOLDER_TYPE_CONTAINER constant number := 1

### FOLDER_TYPE_PLSQL

    FOLDER_TYPE_PLSQL constant number := 4

### FOLDER_TYPE_SEARCH

    FOLDER_TYPE_SEARCH constant number := 3

  This value is deprecated.

### FOLDER_TYPE_URL

    FOLDER_TYPE_URL constant number := 2

### FULL_SCREEN

    FULL_SCREEN constant varchar2(30) := 'fullscreen'

### GENERAL_CATEGORY

    GENERAL_CATEGORY constant number := 30

### IN_FRAME

    IN_FRAME constant varchar2(30) := 'inframe'

### IN_PLACE

    IN_PLACE constant varchar2(30) := 'inplace'

### IS_OFF

    IS_OFF constant number := 0

### IS_ON

    IS_ON constant number := 1

### ITEM_ACCESS

    ITEM_ACCESS constant varchar2(30) := 'item'

### ITEM_TYPE_APP_COMP

    ITEM_TYPE_APP_COMP constant number := 6

  This value is deprecated.

### ITEM_TYPE_BASIC_SEARCH

    ITEM_TYPE_BASIC_SEARCH constant number := 24

### ITEM_TYPE_ELEMENT_LIST

    ITEM_TYPE_ELEMENT_LIST constant number := 25

### ITEM_TYPE_FILE

    ITEM_TYPE_FILE constant number := 1

### ITEM_TYPE_FOLDER_LINK

    ITEM_TYPE_FOLDER_LINK constant number := 4

### ITEM_TYPE_IMAGE

    ITEM_TYPE_IMAGE constant number := 8

### ITEM_TYPE_IMAGE_MAP

    ITEM_TYPE_IMAGE_MAP constant number := 31

### ITEM_TYPE_JAVA_APP

    ITEM_TYPE_JAVA_APP constant number := 11

  This value is deprecated.

### ITEM_TYPE_LOGIN_LOGOUT

    ITEM_TYPE_LOGIN_LOGOUT constant number := 23

### ITEM_TYPE_MAP_LINK

    ITEM_TYPE_MAP_LINK constant number := 27

### ITEM_TYPE_PAGE_FUNCTION

    ITEM_TYPE_PAGE_FUNCTION constant number := 34

### ITEM_TYPE_PAGE_PATH

    ITEM_TYPE_PAGE_PATH constant number := 30

### ITEM_TYPE_PLSQL

    ITEM_TYPE_PLSQL constant number := 5

### ITEM_TYPE_PORTLET_INST

    ITEM_TYPE_PORTLET_INST constant number := 13

### ITEM_TYPE_SIMPLE_APP_COMP

    ITEM_TYPE_SIMPLE_APP_COMP constant number := 18

  This value is deprecated.

### ITEM_TYPE_SIMPLE_FILE

    ITEM_TYPE_SIMPLE_FILE constant number := 14

### ITEM_TYPE_SIMPLE_IMAGE

    ITEM_TYPE_SIMPLE_IMAGE constant number := 20

### ITEM_TYPE_SIMPLE_JAVA_APP

    ITEM_TYPE_SIMPLE_JAVA_APP constant number := 28

  This value is deprecated.

### ITEM_TYPE_SIMPLE_PAGE_LINK

    ITEM_TYPE_SIMPLE_PAGE_LINK constant number := 19

### ITEM_TYPE_SIMPLE_PLSQL

    ITEM_TYPE_SIMPLE_PLSQL constant number := 17

### ITEM_TYPE_SIMPLE_TEXT

    ITEM_TYPE_SIMPLE_TEXT constant number := 16

### ITEM_TYPE_SIMPLE_URL

    ITEM_TYPE_SIMPLE_URL constant number := 15

### ITEM_TYPE_SMART_LINK

    ITEM_TYPE_SMART_LINK constant number := 22

### ITEM_TYPE_SMART_TEXT

    ITEM_TYPE_SMART_TEXT constant number := 26

### ITEM_TYPE_TEXT

    ITEM_TYPE_TEXT constant number := 2

### ITEM_TYPE_URL

    ITEM_TYPE_URL constant number := 3

### ITEM_TYPE_ZIP_FILE

    ITEM_TYPE_ZIP_FILE constant number := 12

### NEW_WINDOW

    NEW_WINDOW constant varchar2(30) := 'newbrowserwindow'

### NO

    NO constant number := 0

### PERMANENT

    PERMANENT constant varchar2(20) := 'PERMANENT'

### PUBLIC_SCHEMA

    PUBLIC_SCHEMA constant varchar2(20) := '$PUBLIC$'

### SHARED_OBJECTS

    SHARED_OBJECTS constant number := 0

### VALUE_ACCOUNT_INFO

    VALUE_ACCOUNT_INFO constant varchar2(30) := 'account'

### VALUE_ADVANCED_SEARCH

    VALUE_ADVANCED_SEARCH constant varchar2(30) := 'advanced_search'

### VALUE_BUILDER

    VALUE_BUILDER constant varchar2(30) := 'builder'

### VALUE_COMMUNITY

    VALUE_COMMUNITY constant varchar2(30) := 'community'

### VALUE_CONTACT

    VALUE_CONTACT constant varchar2(30) := 'contact'

### VALUE_CURRENT_DATE

    VALUE_CURRENT_DATE constant varchar2(30) := 'currentdate'

### VALUE_CURRENT_PAGE

    VALUE_CURRENT_PAGE constant varchar2(30) := 'currentpage'

### VALUE_CURRENT_USER

    VALUE_CURRENT_USER constant varchar2(30) := 'currentuser'

### VALUE_CUST_MOBILE_HOME_PAGE

    VALUE_CUST_MOBILE_HOME_PAGE constant varchar2(30) := 'mobile'

### VALUE_CUSTOMIZE_PAGE

    VALUE_CUSTOMIZE_PAGE constant varchar2(30) := 'customize'

### VALUE_EDIT_PAGE

    VALUE_EDIT_PAGE constant varchar2(30) := 'edit'

### VALUE_HELP

    VALUE_HELP constant varchar2(30) := 'help'

### VALUE_NAVIGATOR

    VALUE_NAVIGATOR constant varchar2(30) := 'navigator'

### VALUE_PORTAL_HOME

    VALUE_PORTAL_HOME constant varchar2(30) := 'home'

### VALUE_PORTLET_REPOS

    VALUE_PORTLET_REPOS constant varchar2(30) := 'portlet_repos'

### VALUE_PROPERTY_SHEET

    VALUE_PROPERTY_SHEET constant varchar2(30) := 'sheet'

### VALUE_REFRESH_PAGE

    VALUE_REFRESH_PAGE constant varchar2(30) := 'refresh'

### VALUE_SUBSCRIBE

    VALUE_SUBSCRIBE constant varchar2(30) := 'subscribe'

### VERSIONING_AUDIT

    VERSIONING_AUDIT constant varchar2(30) := 'versionaudit'

### VERSIONING_NONE

    VERSIONING_NONE constant varchar2(30) := 'versionnone'

### VERSIONING_SIMPLE

    VERSIONING_SIMPLE constant varchar2(30) := 'versionsimple'

### YES

    YES constant number := 1

Variable Detail

### g_empty_array

    g_empty_array g_array

### g_empty_caid_array

    g_empty_caid_array g_caid_array

### g_perspectiveidemptyarray

    g_perspectiveidemptyarray g_perspectiveidarray

Function/Procedure Detail

### add_category

    function add_category(
        p_caid in number,
        p_parent_id in number default 0,
        p_name in varchar2,
        p_display_name in varchar2,
        p_description in varchar2 default null,
        p_is_portlet in number default no,
        p_banner_image in varchar2 default null,
        p_banner_icon in varchar2 default null,
        p_title_image in varchar2 default null,
        p_rollover_image in varchar2 default null
    ) return number

  Creates a new category in a page group. This API is new to version 9.0.2.6.

  To create a new category, the calling user must have the Manage Classifications privilege or higher on the page group.

  Example:

           l_new_category_id := wwsbr_api.add_category(
               p_caid => 33,
               p_parent_id => 0,
               p_name => 'newcategory1',
               p_display_name => 'New Category 1'
           );

  Parameters:
    `p_caid` - Page group ID.
    `p_parent_id` - Parent category ID. If there is no parent, use "0" (zero).
    `p_name` - Internal name of the category. Must be unique within the parent category.
    `p_display_name` - Display name of the category.
    `p_description` - Description of the category.
    `p_is_portlet` - Publish category as a portlet? Use constant values YES or NO.
    `p_banner_image` - File location of the banner image associated with this category. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/banner.gif"). The image is uploaded from this location.
    `p_banner_icon` - File location of the icon image associated with this category. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/bannericon.gif"). The image is uploaded from this location.
    `p_title_image` - File location of the title image associated with this category. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/cattitle.gif"). The image is uploaded from this location.
    `p_rollover_image` - File location of the rollover image associated with this category. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/catrollover.gif"). The image is uploaded from this location.
  Returns:
    number - New category ID.
  Exceptions:
    `MISSING_NAME` - No value passed for p_name
    `MISSING_DISPLAY_NAME` - No value passed for p_display_name
    `INVALID_CATEGORY` - Parent category specified does not exist
    `INVALID_NAME` - Invalid value passed for p_name
    `DUPLICATE_NAME` - Category with same name already exists
    `PERMISSION_DENIED` - Calling user does not have the authorization to create a category
    `OTHERS` - Unexpected error

### add_content_area

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

  Creates a new page group.

  Example:

           declare
               l_new_page_group_id number;
           begin
               l_new_page_group_id := wwsbr_api.add_content_area(
                   p_name => 'ENTERTAINMENT',
                   p_display_name => 'Entertainment Site',
                   p_versioning => wwsbr_api.VERSIONING_AUDIT,
                   p_default_language => 'us');
           end;

  Parameters:
    `p_name` - Internal reference name for the page group. Must be unique.
    `p_display_name` - Display name for the page group.
    `p_versioning` - Versioning level for items. Default is VERSIONING_NONE. Use the following constants:
    - VERSIONING_NONE - default
    - VERSIONING_SIMPLE
    - VERSIONING_AUDIT
    `p_default_language` - Default language for the page group. Default is 'us'.
    `p_root_folder_type` - Deprecated. The root page of a page group is always a standard page.
    `p_logo_filename` - This parameter is DEPRECATED. The parameter has been retained for backward compatibility with the 3.0.9 API signatures, but its value is ignored.
  Returns:
    number - New page group ID.
  Exceptions:
    `INVALID_NAME` - Page group name contains spaces or special characters
    `DUPLICATE_NAME` - A page group with p_name value already exists
    `MISSING_NAME` - No value was passed for the page group name
    `NAME_TOO_LONG` - Name must be less than 60 characters
    `MISSING_DISPLAY_NAME` - No value was passed for the page group display name

### add_folder

    function add_folder(
        p_caid in number,
        p_parent_id in number default 1,
        p_name in varchar2,
        p_display_name in varchar2,
        p_type_id in number default folder_type_container,
        p_type_caid in number default shared_objects,
        p_value in varchar2 default null,
        p_plsql_execute_mode in varchar2 default null,
        p_plsql_execute_user in varchar2 default null,
        p_category_id in number default general_category,
        p_category_caid in number default shared_objects,
        p_isportlet in number default no,
        p_portlet_use_page_style in number default yes,
        p_perspectives in g_perspectiveidarray default g_perspectiveidemptyarray,
        p_perspectives_caid in g_caid_array default g_empty_caid_array,
        p_attribute_id in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_caid in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_data_type in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_value in wwsbr_type.array default wwsbr_type . empty
    ) return number

  Creates a new page in a page group. By default, the page is created with two regions: a portlet region containing the default navigation page of the page group, and an item region which can be used for items added through the add_item APIs. Alternatively, the new page uses the parent page's template if the page group is configured to automatically copy parent page properties and the parent page is based on a template.

  Notes:

  - This API cannot be used to create JSP pages or navigation pages.
  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.
  - Default values defined for page types override the default values declared for parameters in this API.
  - To define privileges for a page, use the APIs in the package WWSEC_API (see the WWSEC_API documentation in the PDK-PL/SQL)
  - In this release of the APIs (9.0.2.6), there is no API for modifying or deleting pages.

  Example:

       declare
           l_new_page_id number;
           l_perspective_ids wwsbr_api.g_perspectiveidarray;
           l_perspective_caids wwsbr_api.g_caid_array;
           l_caid number := 33;
       begin
           select id, caid
           bulk collect into l_perspective_ids, l_perspective_caids
           from wwsbr_all_perspectives
           where caid in (l_caid, wwsbr_api.SHARED_OBJECTS);

           l_new_page_id := wwsbr_api.add_folder(
               p_caid => l_caid,
               p_name => 'ENTERTAINMENT',
               p_display_name => 'Entertainment Site',
               p_type_id => FOLDER_TYPE_CONTAINER,
               p_type_caid => 0
               p_perspectives => l_perspective_ids,
               p_perspectives_caid => l_perspective_caids);
             -- process cache invalidation messages
           wwpro_api_invalidation.execute_cache_invalidation;
       end;

  Parameters:
    `p_caid` - ID of the page group to which the page is added.
    `p_parent_id` - ID of parent page. Default value is 1, which is the root page of the page group.
    `p_name` - Internal reference name for the page. Must be unique within the parent page.
    `p_display_name` - Display name (title) for the page.
    `p_type_id` - ID of the page type for this page. The page type must be available in the page group in which the page is being created. Valid values:
    - FOLDER_TYPE_CONTAINER (constant) - default
    - FOLDER_TYPE_URL (constant)
    - FOLDER_TYPE_PLSQL (constant)
    - A value from column ID of the view WWSBR_FOLDER_TYPES
    `p_type_caid` - Page group ID of the page type. Must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_value` - For URL type pages, the value of the URL. For PL/SQL type pages, a block of PL/SQL code.
    `p_plsql_execute_mode` - Execute mode for a PL/SQL type page. Use the following constants:
    - PUBLIC_SCHEMA
    - DB_USER
    - CREATOR_SCHEMA
    `p_plsql_execute_user` - Database user name. Required when DB_USER execute mode is used for a PL/SQL type page.
    `p_category_caid` - Page group ID of the category for the page. Default is the constant SHARED_OBJECTS.
    `p_isportlet` - Flag that indicates if the page is exposed as a portlet. Use the constants YES or NO. The default value is NO.
    `p_portlet_use_page_style` - Flag that indicates which style to use when the page is exposed as a portlet. Use the constants YES or NO. If YES, the portlet uses the style of the page on which it appears. If NO, the portlet uses its own page style. The default value is YES.
    `p_perspectives` - Array of perspective IDs.
    `p_perspectives_caid` - Array of page group IDs for the perspectives in p_perspectives. The position of each element in this array must match the position of the corresponding perspective ID in p_perspectives. p_perspectives_caid must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_attribute_id` - Array of attribute IDs for the page. Used only when the page is based on a custom page type. The attribute must exist in the custom type definition, as shown in the view WWSBR_FOLDER_TYPE_ATTRIBUTES.
    `p_attribute_caid` - Array of page group IDs for the attributes in p_attribute_id. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id. p_attribute_caid must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_attribute_data_type` - Array of attribute data types for the attributes in p_attribute_id. The value for this parameter can be found in the DATA_TYPE column in the view WWSBR_ATTRIBUTES, for example 'url', 'boolean', 'text', etc. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_attribute_value` - Array of attribute values for the attributes in p_attribute_id. All values are passed as varchar2. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
  Returns:
    number - The new page ID
  Exceptions:
    `DUPLICATE_NAME` - A page with p_name value already exists in selected parent page id
    `INVALID_NAME` - Page name must not contain spaces or special characters
    `MISSING_NAME` - Name is required for the page (p_name)
    `MISSING_DISPLAY_NAME` - Display name is required (p_display_name)
    `NAME_TOO_LONG` - The page name exceeds limit. The maximum is 60 characters
    `URL_REQUIRED` - For a page with a base type of URL, a URL is required. It must be passed to the p_value parameter
    `PLSQL_REQUIRED` - For a page with a base type of PLSQL, plsql code is required. It must be passed to p_value
    `INVALID_PLSQL_EXECUTE_USER` - The value for p_plsql_excute_user is invalid
    `MISSING_PLSQL_EXECUTE_USER` - The value for p_plsql_excute_user is missing when plsql_execute_mode is set to DB_USER
    `INVALID_FOLDER` - Invalid parent page id

### add_item

    function add_item(
        p_caid in number,
        p_folder_id in number,
        p_display_name in varchar2,
        p_type_id in number,
        p_type_caid in number,
        p_region_id in number default null,
        p_display_option in varchar2 default null,
        p_category_id in number default general_category,
        p_category_caid in number default shared_objects,
        p_perspectives in g_perspectiveidarray default g_perspectiveidemptyarray,
        p_perspectives_caid in g_caid_array default g_empty_caid_array,
        p_author in varchar2 default null,
        p_image_filename in varchar2 default null,
        p_image_referenced in boolean default false,
        p_post_upload in boolean default false,
        p_image_alignment in varchar2 default null,
        p_description in varchar2 default null,
        p_keywords in varchar2 default null,
        p_file_filename in varchar2 default null,
        p_text in varchar2 default null,
        p_url in varchar2 default null,
        p_plsql in varchar2 default null,
        p_plsql_execute_mode in varchar2 default null,
        p_plsql_execute_user in varchar2 default null,
        p_folderlink_id in number default null,
        p_folderlink_caid in number default null,
        p_publish_date in varchar2 default null,
        p_expire_mode in varchar2 default permanent,
        p_expiration in varchar2 default null,
        p_master_item_id in number default null,
        p_hide_in_browse in number default no,
        p_checkable in number default null,
        p_parent_item_id in number default 0,
        p_attribute_id in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_caid in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_data_type in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_value in wwsbr_type.array default wwsbr_type . empty
    ) return number

  Creates a new item on a specified page in a page group. The function can also be used to upload files that are associated with the item. If you need to upload files in a separate step, use add_item_post_upload instead of add_item.

  If this API is called from a browser session, the session is using a different language than the default language for the page group, and translations for the session language are enabled for the page group, this API creates a translation for an item when the item is created. For example, if the current language is set to French, the default language for the page group is English, and French translations are enabled, the API adds two rows to the item table: one with a value of 'us' (English) for language, and another with a value of 'f' (French) for language. Other than language, both rows will have identical values for all attributes, including the item ID.

  To add a translation for an existing item, use the modify item APIs (modify_item, modify_item_post_upload). The modify item APIs must also be used to create new versions of existing items.

  This function returns the master ID of the item, which is not the item's unique ID. To look up the ID of the item after it is created, query the view WWSBR_ALL_ITEMS where:

  - MASTERID = the returned masterid
  - LANGUAGE = the current language (wwctx_api.get_nls_language()) or the default language of the page group
  - IS_CURRENT_VERSION = 1
  - ACTIVE=1 (if the calling user does not require approval to add an item) or ACTIVE = 0 (if the calling user requires an approval to add an item)

  For example:

       FUNCTION GET_ITEM_ID( p_caid IN number, p_masterid IN number )
       RETURN  number IS
         -- the current session language
         l_session_language varchar2(10) := wwctx_api.get_nls_language;
         l_current_item_version number;
         l_default_language varchar2(10);
       BEGIN
         -- get default language for page group
         select distinct default_language
         into  l_default_language
         from  wwsbr_all_content_areas
         where id = p_caid;

         -- get the item
         select i.id
         into l_current_item_version
         from  wwsbr_all_items i
         where i.masterid = p_masterid
         and   i.caid = p_caid
         and   i.active = 1
         and   i.is_current_version = 1
         and  (i.language = l_session_language
                 or ( i.language = l_default_language
                      and not exists ( -- a row for the item in the current language
                         select 1
                         from wwsbr_all_items i2
                         where i2.masterid = i.masterid
                         and i2.caid = i.caid
                         and i2.language = l_session_language
                         and i2.is_current_version = i.is_current_version
                         and i2.active = i.active )
                     )
               )
            order by i.id;
            RETURN l_current_item_version ;
       EXCEPTION
           WHEN others THEN
               htp.p('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM);
       END;

  Notes:

  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.
  - Default values defined for item types override the default values declared for parameters in this API.
  - In this release of the APIs (9.0.2.6), there is no API for deleting items.

    See also add_item_post_upload().

  Example:

       declare
           l_new_item_master_id number;
           l_caid number := 33;
           l_folder_id number := 13923;
           l_perspective_ids wwsbr_api.g_perspectiveidarray;
           l_perspective_caids wwsbr_api.g_caid_array;
       begin
           -- Select perspectives with name prefix = 'ENTERTAINMENT'
           select id, caid
           bulk collect into l_perspective_ids, l_perspective_caids
           from wwsbr_all_perspectives
           where caid in (l_caid, wwsbr_api.SHARED_OBJECTS)
           and display_name like 'ENTERTAINMENT%';

           l_new_item_master_id := wwsbr_api.add_item(
               p_caid => l_caid,
               p_folder_id => l_folder_id,
               p_display_name => 'Movie Review',
               p_type_id => wwsbr_api.ITEM_TYPE_TEXT,
               p_type_caid => wwsbr_api.SHARED_OBJECTS,
               p_region_id => 5,
               p_text => 'This is the text of the review.',
               p_perspectives => l_perspective_ids,
               p_perspectives_caid => l_perspective_caids);

           -- process cache invalidation messages
           wwpro_api_invalidation.execute_cache_invalidation;
       end;

  Parameters:
    `p_caid` - ID of the page group to which the item is added.
    `p_folder_id` - ID of the page to which the item is added.
    `p_display_name` - Display name (title) for the item.
    `p_type_id` - ID of the item type for this item. You can use one of the ITEM_TYPE constants for a supplied item type (ITEM_TYPE_FILE, ITEM_TYPE_IMAGE, ITEM_TYPE_TEXT, etc.), or a value from the column ID of the view WWSBR_ITEM_TYPES. The item type must be available in the page group in which the item is being created, and therefore listed in the view WWSBR_CONTENT_AREA_ITEM_TYPES.
    `p_type_caid` - Page group ID for the item type. Must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_region_id` - ID of the region to which the item is added. If no region is specified, or if the region ID is invalid, the item is placed in the default item region defined for the page. Use the view WWSBR_ALL_FOLDER_REGIONS to look up the region id. Note that the valid region IDs used in 3.0.9 (values 1 - 5) are no longer used; for backward compatibility, the item is added to the default item region if one of these region IDs is used.
    `p_display_option` - How the item should be displayed. Used for file, text, url, and pl/sql item types, ignored for others. Use the following constants:
    - FULL_SCREEN (default - link that displays the item in the same browser window)
    - NEW_WINDOW (link that displays the item in a new browser window)
    - IN_PLACE (displays the item in the region - only used for text and pl/sql item types)
    `p_category_id` - ID of category for the item. Default is the constant GENERAL_CATEGORY.
    `p_category_caid` - Page group ID of category for item. Default is the constant SHARED_OBJECTS.
    `p_perspectives` - Array of perspective IDs.
    `p_perspectives_caid` - Array of page group IDs for the perspectives in p_perspectives. The position of each element in this array must match the position of the corresponding perspective ID in p_perspectives.
    `p_author` - Author of the item.
    `p_image_filename` - Location of the image associated with this item or the image itself if this is an image item.
    - If p_image_referenced is FALSE, p_image_filename must be a directory path and filename on the same server on which the Portal database is located. The image is uploaded from this location, unless the value of p_post_upload is TRUE.
    - If p_image_referenced is TRUE, p_image_filename is expected to be a URL to the image (equivalent to the src attribute in an IMG tag) or the internal name of an image in the Portal document table (e.g. 5678.GIF).
    `p_image_referenced` - Boolean flag that indicates if p_image_filename is a reference, or a file location for uploading the item's image. Valid values are TRUE (image is referenced) or FALSE (image is not referenced and is uploaded from the file location specified in p_image_filename).
    `p_post_upload` - Boolean flag that indicates if the documents associated with this item have already been uploaded. Used for file and image attributes, ignored for others. If TRUE, documents will not be uploaded when this function is called.
    `p_image_alignment` - Rendering alignment for the item's image. See the constants prefixed with "ALIGN_" for valid values. Default is ALIGN_LEFT.
    `p_description` - Description of the item.
    `p_keywords` - Keywords for the item.
    `p_file_filename` - Location of the file associated with this item. Used with the file item type, ignored for other item types.
    - If p_post_upload is FALSE, p_file_filename must be a directory path and filename on the same server on which the Portal database is located. The file is uploaded from this location.
    - If p_post_upload is TRUE, p_file_filename is ignored. To associate a new item with a file that already exists in the document table, see add_item_post_upload().
    `p_text` - The text for a text item type.
    `p_url` - The url for a url item type.
    `p_plsql` - The plsql code for a plsql item type.
    `p_plsql_execute_mode` - Execute mode for a PL/SQL type item. Use the following constants:
    - PUBLIC_SCHEMA
    - DB_USER
    - CREATOR_SCHEMA
    `p_plsql_execute_user` - Database user name. Required when DB_USER execute mode is used for a PL/SQL type item.
    `p_folderlink_id` - Page ID for a page link item type.
    `p_folderlink_caid` - Page group ID for a page link item type. May be any valid page group.
    `p_publish_date` - Date on which the item is published. Must be in the format of 'dd-mon-yyyy HH12:MI PM'. If no value is passed, the item is published immediately.
    `p_expire_mode` - Expiration mode for the item. Use the following constants:
    - PERMANENT (default)
    - EXP_NUMBER
    - EXP_DATE
    `p_expiration` - Qualifier for p_expire_mode.
    - If p_expire_mode = PERMANENT, p_expiration must be null.
    - If p_expire_mode = EXP_NUMBER, p_expiration must be set to the number of days until expiry.
    - If p_expire_mode = EXP_DATE, p_expiration must be set to a valid expiration date in the future in the format of 'dd-mon-yyyy HH12:MI PM'.
    `p_master_item_id` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Do not use this parameter. Any value passed to it (other than null) may cause errors.
    `p_hide_in_browse` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature, but its value is ignored.
    `p_checkable` - Flag that determines if the item can be checked out. Valid constant values are YES and NO. Default is NO.
    `p_parent_item_id` - A MASTER item id. If passed, the new item is created as a sub-item of this item.
    `p_attribute_id` - Array of attribute IDs for the item. Used for attributes for which no other parameter exists (e.g. custom attributes). The attribute must exist in the item's type definition, as shown in the view WWSBR_ITEM_TYPE_ATTRIBUTES.
    `p_attribute_caid` - Array of page group IDs for the attributes in p_attribute_id. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id. p_attribute_caid must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS). Must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_attribute_data_type` - Array of attribute data types for the attributes in p_attribute_id. The value for this parameter can be found in the DATA_TYPE column in the view WWSBR_ATTRIBUTES, for example 'url', 'boolean', 'text', etc. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_attribute_value` - Array of attribute values for the attributes in p_attribute_id. All values are passed as varchar2. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
  Returns:
    number - The master item ID.
  Exceptions:
    `MISSING_ITEM_TYPE` - No value was passed for p_type_id
    `QUOTA_EXCEEDED` - The uploaded file exceeds the page group quota
    `NOT_ENOUGH_PRIVS` - Calling user does not have authorization to add an item to the specified page
    `INVALID_PUBLISH_DATE_FORMAT` - Date format for publish date is invalid.
    `INVALID_PUBLISH_DATE_VALUE` - Publish date must be today or later, and publish date must be later than the expire date
    `NULL_EXPIRE_NUMBER` - If value for p_expire_mode is EXP_NUMBER, then a value is required for p_expiration
    `INVALID_EXPIRE_NUMBER` - Invalid number passed for p_expiration (only raised if p_expire_mode = EXP_NUMBER)
    `NULL_EXPIRE_DATE` - If value for p_expire_mode is EXP_DATE, then a value is required for p_expiration
    `INVALID_EXPIRE_DATE` - Invalid expiration date was passed. The expiration date must be later than the current date.
    `INVALID_EXPIRE_DATE_FORMAT` - Date format for expiry date is invalid
    `REQD_ATTR_MISSING` - Required custom attribute was not passed when adding an item for a custom item type
    `NO_ITEM_REGION` - The page does not contain an item region
    `ITEM_CREATION_ERROR` - Some other error occurred

### add_item_ils_privileges

    procedure add_item_ils_privileges(
        p_master_item_id in number,
        p_caid in number,
        p_folder_id in number,
        p_itemown_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemmanage_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemview_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemown_group in wwsbr_type.array default wwsbr_type . empty,
        p_itemmanage_group in wwsbr_type.array default wwsbr_type . empty,
        p_itemview_group in wwsbr_type.array default wwsbr_type . empty
    )

  Adds item level security access privileges for one or more users or groups to a single specified item. This procedure can be used to both add and update item level privileges on a single item. If the same user or group is passed in more than one of the privilege arrays, the user or group is given the highest level privilege specified.

  To retrieve a list of privileges that are currently defined for an item, use the function wwsec_api.grantee_list() (see the WWSEC_API documentation in the PDK-PL/SQL). This function takes three parameters:

  - p_object_type_name - For items, pass the constant WWSEC_API.ITEM_OBJ
  - p_name - For items, pass a value in the form

         '<page group ID>/<master item ID>'; e.g. '53/32919'

  - p_owner - The name of the objects's owner. Do not pass a value for this parameter - it defaults to the Portal schema owner

  wwsec_api.grantee_list() returns an array (WWSEC_API.GRANTEE_ARRAY) with the following columns:

  - grantee_type - Either 'USER' or 'GROUP'
  - grantee_id - Unique ID of the user or group
  - grantee_name - User name or group name
  - privilege - Privilege granted to the user or group

  For example, the following routine prints the values of the grantee array for an item with master ID = 32919 and page group ID = 53:

  >      DECLARE
  >      l_grantees WWSEC_API.GRANTEE_ARRAY;
  >      p_object_type_name VARCHAR2(5) := WWSEC_API.ITEM_OBJ;
  >      p_name VARCHAR2(60) := '53/32919';
  >      BEGIN
  >      -- Call the function

  >        l_grantees := wwsec_api.grantee_list(p_object_type_name,p_name);

  >       -- Output the results
  >      IF l_grantees IS NOT NULL THEN
  >       IF l_grantees.count > 0 THEN
  >         FOR i IN l_grantees.first..l_grantees.last LOOP
  >           IF l_grantees.exists(i) THEN
  >              htp.p('GRANTEE_TYPE ' || TO_CHAR(i) || '= '|| l_grantees(i).GRANTEE_TYPE);
  >              htp.p('GRANTEE_ID ' || TO_CHAR(i) || '= '|| l_grantees(i).GRANTEE_ID);
  >              htp.p('GRANTEE_NAME ' || TO_CHAR(i) || '= '|| l_grantees(i).GRANTEE_NAME);
  >              htp.p('PRIVILEGE ' || TO_CHAR(i) || '= '|| l_grantees(i).PRIVILEGE);
  >            END IF;
  >          END LOOP;
  >        END IF;
  >       END IF;

  >      EXCEPTION
  >      WHEN OTHERS THEN
  >        htp.p('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM);
  >      RAISE;
  >      END;

  Notes:

  - Item level security must be enabled for the item. You can enable item level security with the enable_ils_for_item() procedure in this package.
  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.

    See also delete_ils_privilege(), enable_ils_for_item(), and inherit_folder_privileges(). modify_item() and modify_item_post_upload() can also be used to define ILS access privileges for an item.

  Example:

       declare
           l_itemown_username_array wwsbr_type.array;
           l_itemown_userid_array   wwsbr_type.array;
       begin
            l_itemown_username_array(1) := 'jsmith';
            l_itemown_username_array(2) := 'janesmith';
            l_itemown_username_array(3) := 'joedoe';
            for i in 1 .. l_itemown_username_array.count loop
                -- get the userid from the wwsec_api.id_sso() function
                l_itemown_userid_array(i) := wwsec_api.id_sso(
                    p_username => l_itemown_username_array(i));
            end loop;
            wwsbr_api.add_item_ils_privileges(
                p_master_item_id => 453,
                p_caid => 33,
                p_folder_id => 45,
                p_itemown_user => l_itemown_userid_array);
           -- process cache invalidation messages
           wwpro_api_invalidation.execute_cache_invalidation;
       end;

  Parameters:
    `p_master_item_id` - Master_item_id of the item. This value is found in the column MASTERID in the view WWSBR_ALL_ITEMS.
    `p_caid` - ID of the page group in which the item resides.
    `p_folder_id` - ID of the page on which the item resides.
    `p_itemown_user` - Array of user IDs to which Manage privilege is granted.
    `p_itemmanage_user` - Array of user IDs to which Edit privilege is granted.
    `p_itemview_user` - Array of user IDs to which View privilege is granted.
    `p_itemown_group` - Array of group IDs to which Manage privilege is granted.
    `p_itemmanage_group` - Array of group IDs to which Edit privilege is granted.
    `p_itemview_group` - Array of group IDs to which View privilege is granted.
  Exceptions:
    `ITEM_NOT_FOUND_ERROR` - An item with the given master item ID does not exist
    `ILS_DISABLED` - Page does not allow Item Level Security. Cannot add item specific privileges
    `ILS_DISABLED_FOR_ITEM` - Item not set up to use own ILS privileges. Use enable_ils_for_item() before calling this procedure for this item
    `NOT_ENOUGH_PRIVS` - Calling user does not have the authorization to assign the privileges. Requires Manage privilege or higher on the item or the page.
    `ITEM_UPDATE_ERROR` - Some other error occurred during item update

### add_item_post_upload

    function add_item_post_upload(
        p_caid in number,
        p_folder_id in number,
        p_display_name in varchar2,
        p_type_id in number,
        p_type_caid in number,
        p_region_id in number default null,
        p_display_option in varchar2 default full_screen,
        p_category_id in number default general_category,
        p_category_caid in number default shared_objects,
        p_perspectives in g_perspectiveidarray default g_perspectiveidemptyarray,
        p_perspectives_caid in g_caid_array default g_empty_caid_array,
        p_author in varchar2 default wwctx_api . get_user,
        p_image_name in varchar2 default null,
        p_image_alignment in varchar2 default align_left,
        p_description in varchar2 default null,
        p_keywords in varchar2 default null,
        p_file_name in varchar2 default null,
        p_text in varchar2 default null,
        p_url in varchar2 default null,
        p_plsql in varchar2 default null,
        p_plsql_execute_mode in varchar2 default null,
        p_plsql_execute_user in varchar2 default null,
        p_folderlink_id in number default null,
        p_folderlink_caid in number default null,
        p_publish_date in varchar2 default null,
        p_expire_mode in varchar2 default permanent,
        p_expiration in varchar2 default null,
        p_master_item_id in number default null,
        p_hide_in_browse in number default no,
        p_checkable in number default no,
        p_parent_item_id in number default 0,
        p_attribute_id in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_caid in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_data_type in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_value in wwsbr_type.array default wwsbr_type . empty
    ) return number

  Creates a new item on a page and links it to existing document(s) in the document table. Use this API instead of add_item to create a new item when documents have been uploaded to the repository document table in a separate step. This is usually required when the document must be loaded from a location other than the database server.

  This API requires that all files and images have already been uploaded to the document table in the repository. There are two methods that can be used to upload documents directly to the document table:

  1. The file upload feature in mod_plsql. Please refer to the mod_plsql documentation for instructions on using this feature.
  2. The new upload_blob() function in this package, which allows an application to pass a blob directly. upload_blob() is documented below.

  Both of these methods return a unique name for the uploaded document. This name must be passed to the desired file parameters in add_item_post_upload(), which include p_file_name (for a File type item), p_image_name (for an Image type item or for the image associated with other item types), or p_attribute_value for a custom file attribute. Note that in this release, there is no supported view for querying the document table to obtain the unique file name; therefore, you must call add_item_post_upload() immediately after uploading the document in order to associate it with an item.

  Notes:

  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.
  - Default values defined for item types override the default values declared for parameters in this API.
  - In this release of the APIs (9.0.2.6), there is no API for deleting items.

  See also add_item() and upload_blob().

  Example: see the example under upload_blob().

  Parameters:
    `p_caid` - ID of the page group to which the item is added.
    `p_folder_id` - ID of the page to which the item is added.
    `p_display_name` - Display name (title) for the item.
    `p_type_id` - ID of the item type for this item. You can use one of the ITEM_TYPE constants for a supplied item type (ITEM_TYPE_FILE, ITEM_TYPE_IMAGE, ITEM_TYPE_TEXT, etc.), or a value from the column ID of the view WWSBR_ITEM_TYPES. The item type must be available in the page group in which the item is being created, and therefore listed in the view WWSBR_CONTENT_AREA_ITEM_TYPES.
    `p_type_caid` - Page group ID for the item type. Must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_region_id` - ID of the region to which the item is added. If no region is specified, or if the region ID is invalid, the item is placed in the default item region defined for the page. Use the view WWSBR_ALL_FOLDER_REGIONS to look up the region id. Note that the valid region IDs used in 3.0.9 (values 1 - 5) are no longer used; for backward compatibility, the item is added to the default item region if one of these region IDs is used.
    `p_display_option` - How the item should be displayed. Used for file, text, url, and pl/sql item types, ignored for others. Use the following constants:
    - FULL_SCREEN (default - link that displays the item in the same browser window)
    - NEW_WINDOW (link that displays the item in a new browser window)
    - IN_PLACE (displays the item in the region - only used for text and pl/sql item types)
    `p_category_id` - ID of category for the item. Default is the constant GENERAL_CATEGORY.
    `p_category_caid` - Page group ID of category for item. Default is the constant SHARED_OBJECTS.
    `p_perspectives` - Array of perspective IDs.
    `p_perspectives_caid` - Array of page group IDs for the perspectives in p_perspectives. The position of each element in this array must match the position of the corresponding perspective ID in p_perspectives.
    `p_author` - Author of the item.
    `p_image_name` - Internal document name for the item's image, matching a document in the document table. Pass the value returned from upload_blob() to this parameter to reference the uploaded document as the image for this item.
    `p_image_alignment` - Rendering alignment for the item's image. See the constants prefixed with "ALIGN_" for valid values. Default is ALIGN_LEFT.
    `p_description` - Description of the item.
    `p_keywords` - Keywords for the item.
    `p_file_name` - Internal document name for a file type item, matching a document in the document table. Pass the value returned from upload_blob() to this parameter to reference the uploaded document as the file for this item.
    `p_text` - The text for a text item type.
    `p_url` - The url for a url item type.
    `p_plsql` - The plsql code for a plsql item type.
    `p_plsql_execute_mode` - Execute mode for a PL/SQL type item. Use the following constants:
    - PUBLIC_SCHEMA
    - DB_USER
    - CREATOR_SCHEMA
    `p_plsql_execute_user` - Database user name. Required when DB_USER execute mode is used for a PL/SQL type item.
    `p_folderlink_id` - Page ID for a page link item type.
    `p_folderlink_caid` - Page group ID for a page link item type. May be any valid page group.
    `p_publish_date` - Date on which the item is published. Must be in the format 'dd-mon-yyyy HH12:MI PM'. If no value is passed, the item is published immediately.
    `p_expire_mode` - Expiration mode for the item. Use the following constants:
    - PERMANENT (default)
    - EXP_NUMBER
    - EXP_DATE
    `p_expiration` - Qualifier for p_expire_mode.
    - If p_expire_mode = PERMANENT, p_expiration must be null.
    - If p_expire_mode = EXP_NUMBER, p_expiration must be set to the number of days until expiry.
    - If p_expire_mode = EXP_DATE, p_expiration must be set to a valid expiration date in the future in the format of 'dd-mon-yyyy HH12:MI PM'.
    `p_master_item_id` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Do not use this parameter. Any value passed to it (other than null) may cause errors.
    `p_hide_in_browse` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature, but its value is ignored.
    `p_checkable` - Flag that determines if the item can be checked out. Valid constant values are YES and NO. Default is NO.
    `p_parent_item_id` - A MASTER item id. If passed, the new item is created as a sub-item of this item.
    `p_attribute_id` - Array of attribute IDs for the item. Used for attributes for which no other parameter exists (e.g. custom attributes). The attribute must exist in the item's type definition, as shown in the view WWSBR_ITEM_TYPE_ATTRIBUTES.
    `p_attribute_caid` - Array of page group IDs for the attributes in p_attribute_id. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id. p_attribute_caid must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_attribute_data_type` - Array of attribute data types for the attributes in p_attribute_id. The value for this parameter can be found in the DATA_TYPE column in the view WWSBR_ATTRIBUTES, for example 'url', 'boolean', 'text', etc. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_attribute_value` - Array of attribute values for the attributes in p_attribute_id. All values are passed as varchar2. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
  Returns:
    number - The master item ID.
  Exceptions:
    `MISSING_ITEM_TYPE` - No value was passed for p_type_id
    `QUOTA_EXCEEDED` - The uploaded file exceeds the page group quota
    `INVALID_PUBLISH_DATE_FORMAT` - Date format for publish date is invalid
    `INVALID_PUBLISH_DATE_VALUE` - Publish date must be today or later, and publish date must be later than the expire date
    `NULL_EXPIRE_NUMBER` - If value for p_expire_mode is EXP_NUMBER, then a value is required for p_expiration
    `INVALID_EXPIRE_NUMBER` - Invalid number passed for p_expiration (only raised if p_expire_mode = EXP_NUMBER)
    `NULL_EXPIRE_DATE` - If value for p_expire_mode is EXP_DATE, then a value is required for p_expiration
    `INVALID_EXPIRE_DATE` - Invalid expiration date was passed. The expiration date must be later than the current date.
    `INVALID_EXPIRE_DATE_FORMAT` - Date format for expiry date is invalid
    `REQD_ATTR_MISSING` - Required custom attribute was not passed when adding an item for a custom item type
    `ITEM_CREATION_ERROR` - Some other error occurred

### add_perspective

    function add_perspective(
        p_caid in number,
        p_parent_id in number default 0,
        p_name in varchar2,
        p_display_name in varchar2,
        p_description in varchar2 default null,
        p_is_portlet in number default no,
        p_banner_image in varchar2 default null,
        p_banner_icon in varchar2 default null,
        p_title_image in varchar2 default null,
        p_rollover_image in varchar2 default null
    ) return number

  Creates a new perspective in a page group. This API is new to version 9.0.2.6.

  To create a new perspective, the calling user must have "Manage Classifications" privilege or higher on the page group.

  Example:

           l_new_perspective_id := wwsbr_api.add_perspective(
               p_caid => 33,
               p_parent_id => 0,
               p_name => 'newperspective1',
               p_display_name => 'New Perspective 1'
           );

  Parameters:
    `p_caid` - Page group ID.
    `p_parent_id` - Parent perspective ID. If there is no parent, use "0" (zero).
    `p_name` - Internal name of the perspective. Must be unique within parent perspective.
    `p_display_name` - Display name of the perspective.
    `p_description` - Description of the perspective.
    `p_is_portlet` - Publish perspective as a portlet? Use constant values YES or NO.
    `p_banner_image` - File location of the banner image associated with this perspective. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/banner.gif"). The image is uploaded from this location.
    `p_banner_icon` - File location of the icon image associated with this perspective. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/bannericon.gif"). The image is uploaded from this location.
    `p_title_image` - File location of the title image associated with this perspective. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/perstitle.gif"). The image is uploaded from this location.
    `p_rollover_image` - File location of the rollover image associated with this perspective. This value must be a directory path and filename on the same server on which the Portal database is located (e.g. "/usr/images/persrollover.gif"). The image is uploaded from this location.
  Returns:
    number - The new perspective ID.
  Exceptions:
    `MISSING_NAME` - No value passed for p_name
    `MISSING_DISPLAY_NAME` - No value passed for p_display_name
    `INVALID_PERSPECTIVE` - Parent perspective specified does not exist
    `INVALID_NAME` - Invalid value passed for p_name
    `DUPLICATE_NAME` - Perspective with same name already exists
    `PERMISSION_DENIED` - Calling user does not have the authorization to create a perspective
    `OTHERS` - Unexpected error

### delete_ils_privilege

    procedure delete_ils_privilege(
        p_grantee_type in varchar2 default wwsec_api . grantee_user,
        p_user_or_group_id in number,
        p_master_item_id in number,
        p_folder_id in number,
        p_caid in number
    )

  Deletes the item level security access privileges for a user or group on a single specified item. Using this API is the same as removing a user or a user group from an item's access control list in the browser interface.

  Use the functions in the PDK-PL/SQL package WWSEC_API to retrieve privilege lists, including the user and group IDs associated with an item.

  Notes:

  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.

  See also add_item_ils_privileges(), enable_ils_for_item(), and inherit_folder_privileges().

  Example:

         declare
            l_user_id number := 334;
            l_page_group_id number := 75;
            l_page_id number := 1;
            l_item_id := 74637;

          begin
              wwsbr_api.delete_ils_privilege(
                  p_user_or_group_id => l_user_id,
                  p_caid           => l_page_group_id,
                  p_folder_id      => l_page_id,
                  p_master_item_id => l_item_id);
              -- process cache invalidation messages
              wwpro_api_invalidation.execute_cache_invalidation;
         end;

  Parameters:
    `p_grantee_type` - specifies if privileges are being removed for a user or group. Use the following constants:
    - wwsec_api.GRANTEE_USER (default)
    - wwsec_api.GRANTEE_GROUP
    `p_user_or_group_id` - ID of the user or group.
    `p_master_item_id` - The master_item_id of the item. This value is found in the column MASTERID in the view WWSBR_ALL_ITEMS.
    `p_folder_id` - ID of the page on which the item resides.
    `p_caid` - ID of the page group in which the item resides.
  Exceptions:
    `ITEM_NOT_FOUND_ERROR` - An item with the given master item ID does not exist
    `NOT_ENOUGH_PRIVS` - Calling user does not have the authorization to remove the privileges. Requires Manage privilege or higher on the item or the page.

### enable_ils_for_item

    procedure enable_ils_for_item(
        p_master_item_id in number,
        p_caid in number,
        p_folder_id in number
    )

  Enables item level security for a specified item. This procedure can only be used if the page has been set up to permit ILS (Item Level Security). Using this procedure is the same as selecting the 'Define Item Level Access Privileges' option via the browser interface.

  See also add_item_ils_privileges(), delete_ils_privilege(), and inherit_folder_privileges().

  Example:

         wwsbr_api.enable_ils_for_item(
             p_master_item_id => 453,
             p_caid => 33,
             p_folder_id => 45);

  Parameters:
    `p_master_item_id` - The master_item_id of the item. This value is found in the column MASTERID in the view WWSBR_ALL_ITEMS.
    `p_caid` - ID of the page group in which the item resides.
    `p_folder_id` - ID of the page on which the item resides.
  Exceptions:
    `ITEM_NOT_FOUND_ERROR` - An item with the given master item ID does not exist
    `ILS_DISABLED` - The page does not allow Item Level Security. Cannot add item specific privileges.
    `NOT_ENOUGH_PRIVS` - Calling user does not have the authorization to assign the privileges. Requires Manage privilege on the item or the page.

### inherit_folder_privileges

    procedure inherit_folder_privileges(
        p_master_item_id in number,
        p_caid in number,
        p_folder_id in number
    )

  Causes an item that is enabled for item level security to inherit its privileges from the page on which it resides. This procedure can only be used if the page has been set up to permit ILS (Item Level Security). Using this procedure is the same as selecting the 'Inherit Parent Page Access Privileges' option via the browser interface.

  Notes:

  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.

  See also add_item_ils_privileges(), delete_ils_privilege(), and enable_ils_for_item().

  Example:

         wwsbr_api.inherit_folder_privileges(
             p_master_item_id => 453,
             p_caid => 33,
             p_folder_id => 45);

  Parameters:
    `p_master_item_id` - The master_item_id of the item. This value is found in the column MASTERID in the view WWSBR_ALL_ITEMS.
    `p_caid` - ID of the page group in which the item resides.
    `p_folder_id` - ID of the page on which the item resides.
  Exceptions:
    `ITEM_NOT_FOUND_ERROR` - An item with the given master item ID does not exist
    `ILS_DISABLED` - The page does not allow Item Level Security. Cannot add item specific privileges.
    `NOT_ENOUGH_PRIVS` - Calling user does not have the authorization to assign the privileges. Requires Manage privilege on the item or the page.

### modify_item

    function modify_item(
        p_master_item_id in number,
        p_item_id in number,
        p_caid in number,
        p_folder_id in number,
        p_display_name in varchar2,
        p_region_id in number,
        p_display_option in varchar2 default full_screen,
        p_category_id in number default general_category,
        p_category_caid in number default shared_objects,
        p_perspectives in g_perspectiveidarray default g_perspectiveidemptyarray,
        p_perspectives_caid in g_caid_array default g_empty_caid_array,
        p_author in varchar2 default wwctx_api . get_user,
        p_image_filename in varchar2 default null,
        p_image_referenced in boolean default false,
        p_post_upload in boolean default false,
        p_image_alignment in varchar2 default align_left,
        p_description in varchar2 default null,
        p_keywords in varchar2 default null,
        p_file_filename in varchar2 default null,
        p_text in varchar2 default null,
        p_url in varchar2 default null,
        p_plsql in varchar2 default null,
        p_plsql_execute_mode in varchar2 default null,
        p_plsql_execute_user in varchar2 default null,
        p_folderlink_id in number default null,
        p_folderlink_caid in number default null,
        p_publish_date in varchar2 default null,
        p_expire_mode in varchar2 default permanent,
        p_expiration in varchar2 default null,
        p_hide_in_browse in number default no,
        p_checkable in number default no,
        p_attribute_id in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_caid in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_data_type in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_value in wwsbr_type.array default wwsbr_type . empty,
        p_addnewversion in boolean default false,
        p_access_level in varchar2 default null,
        p_userlist in wwsbr_type.array default wwsbr_type . empty,
        p_grouplist in wwsbr_type.array default wwsbr_type . empty,
        p_itemown_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemmanage_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemview_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemown_group in wwsbr_type.array default wwsbr_type . empty,
        p_itemmanage_group in wwsbr_type.array default wwsbr_type . empty,
        p_itemview_group in wwsbr_type.array default wwsbr_type . empty
    ) return number

  Modifies an existing item. The API allows you to add new versions to the item (requires versioning to be enabled for the page), to set item level access privileges (requires that item level security be enabled for the page), and to upload files that are associated with the item. If you need to upload files in a separate step, use modify_item_post_upload() instead of modify_item().

  Do not use this API to modify any item that does not have an ACTIVE value of 1. In this release, the API cannot be used to modify pending, rejected, or deleted items.

  If this API is called from a browser session, the session is using a different language than the default language for the page group, and translations for the session language are enabled for the page group, this API will update the translation for that language, if it exists. If a translation for a translation-enabled session language does not exist, a new translation is created with the values passed to the function.

  You must pass both the item's MASTERID to identify the item and its ID to identify the specific version of the item that is to be updated. The specified ID does not have to be the current version of the item. If p_addnewversion = TRUE, a new version is created for the item. The new version is given a new ID. New versions created with this API are always immediately published as the current version of the item.

  In this release (9.0.2.6), this API modifies the value of every attribute, even if the attribute is not passed in the parameter list. If an attribute is not passed, its value will revert to the default value of the parameter. If you want to preserve the current value of attributes, you must retrieve those values for the item and pass them to this API. The value of attributes can be retrieved from the following views and APIs:

  - WWSBR_ALL_ITEMS for built-in attributes
  - WWSBR_ITEM_ATTRIBUTES for custom attributes. Join to WWSBR_ITEM_TYPE_ATTRIBUTES for a list of attributes for an item type.
  - WWSBR_ITEM_PERSPECTIVES for perspectives
  - wwsec_api.grantee.list() for a list of privileges on the item type. See add_item_ils_privileges() for more information on using this function.
  Notes:
  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.

  See also add_item(), modify_item_post_upload().

  Example:

       declare
           l_item_master_id number;
       begin
           l_item_master_id := wwsbr_api.modify_item(
               p_master_item_id => 453,
               p_item_id => 454,
               p_caid => 33,
               p_folder_id => 45,
               p_display_name => 'Movie Review',
               p_region_id => 5,
               p_text => 'This is the text of the review.');
           -- process cache invalidation messages
           wwpro_api_invalidation.execute_cache_invalidation;
       end;

  Parameters:
    `p_master_item_id` - Required to identify the item that is modified. You can look up this value in the MASTERID column in the view WWSBR_ALL_ITEMS.
    `p_item_id` - Required to identify the version of the item that is modified. This does not have to be the item's current version.
    `p_caid` - ID of the item's page group.
    `p_folder_id` - ID of the item's page.
    `p_display_name` - Display name (title) for the item.
    `p_region_id` - ID of the region in which the item resides. This parameter cannot be used to move an item to a different region. You must pass the ID of the region that currently contains the item.
    `p_display_option` - How the item should be displayed. Used for file, text, url, and pl/sql item types, ignored for others. Use the following constants:
    - FULL_SCREEN (default - link that displays the item in the same browser window)
    - NEW_WINDOW (link that displays the item in a new browser window)
    - IN_PLACE (displays the item in the region - only used for text and pl/sql item types)
    `p_category_id` - ID of category for the item. Default is the constant GENERAL_CATEGORY.
    `p_category_caid` - Page group ID of category for item. Default is the constant SHARED_OBJECTS.
    `p_perspectives` - Array of perspective IDs.
    `p_perspectives_caid` - Array of page group IDs for the perspectives in p_perspectives. The position of each element in this array must match the position of the corresponding perspective ID in p_perspectives.
    `p_author` - Author of the item.
    `p_image_filename` - Location of the image associated with this item or the image itself if this is an image item.
    - If p_image_referenced is FALSE, p_image_filename must be a directory path and filename on the same server on which the Portal database is located. The image is uploaded from this location, unless the value of p_post_upload is TRUE.
    - If p_image_referenced is TRUE, p_image_filename is expected to be a URL to the image (equivalent to the src attribute in an IMG tag) or the internal name of an image in the Portal document table (e.g. 5678.GIF).
    `p_image_referenced` - Boolean flag that indicates if p_image_filename is a reference, or a file location for uploading the item's image. Valid values are TRUE (image is referenced) or FALSE (image is not referenced and is uploaded from the file location specified in p_image_filename).
    `p_post_upload` - Boolean flag that indicates if the documents associated with this item have already been uploaded. Used for file and image attributes, ignored for others. If TRUE, documents will not be uploaded when this function is called.
    `p_image_alignment` - Rendering alignment for the item's image. See the constants prefixed with "ALIGN_" for valid values. Default is ALIGN_LEFT.
    `p_description` - Description of the item.
    `p_keywords` - Keywords for the item.
    `p_file_filename` - Location of the file associated with this item. Used with the file item type, ignored for other item types.
    - If p_post_upload is FALSE, p_file_filename must be a directory path and filename on the same server on which the Portal database is located. The file is uploaded from this location.
    - If p_post_upload is TRUE, p_file_filename is ignored. To associate a new item with a file that already exists in the document table, see add_item_post_upload().
    `p_text` - The text for a text item type.
    `p_url` - The url for a url item type.
    `p_plsql` - The plsql code for a plsql item type.
    `p_plsql_execute_mode` - Execute mode for a PL/SQL type item. Use the following constants:
    - PUBLIC_SCHEMA
    - DB_USER
    - CREATOR_SCHEMA
    `p_plsql_execute_user` - Database user name. Required when DB_USER execute mode is used for a PL/SQL type item.
    `p_folderlink_id` - Page ID for a page link item type.
    `p_folderlink_caid` - Page group ID for a page link item type. May be any valid page group.
    `p_publish_date` - Date on which the item is published. Must be in the format 'dd-mon-yyyy HH12:MI PM'. If no value is passed, the item is published immediately.
    `p_expire_mode` - Expiration mode for the item. Use the following constants:
    - PERMANENT (default)
    - EXP_NUMBER
    - EXP_DATE
    `p_expiration` - Qualifier for p_expire_mode.
    - If p_expire_mode = PERMANENT, p_expiration must be null.
    - If p_expire_mode = EXP_NUMBER, p_expiration must be set to the number of days until expiry.
    - If p_expire_mode = EXP_DATE, p_expiration must be set to a valid expiration date in the future in the format of 'dd-mon-yyyy HH12:MI PM'.
    `p_hide_in_browse` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Its value is ignored.
    `p_checkable` - Flag that determines if the item can be checked out. Valid constant values are YES and NO. Default is NO.
    `p_attribute_id` - Array of attribute IDs for the item. Used for attributes for which no other parameter exists (e.g. custom attributes). The attribute must exist in the item's type definition, as shown in the view WWSBR_ITEM_TYPE_ATTRIBUTES.
    `p_attribute_caid` - Array of page group IDs for the attributes in p_attribute_id. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id. p_attribute_caid must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_attribute_data_type` - Array of attribute data types for the attributes in p_attribute_id. The value for this parameter can be found in the DATA_TYPE column in the view WWSBR_ATTRIBUTES, for example 'url', 'boolean', 'text', etc. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_attribute_value` - Array of attribute values for the attributes in p_attribute_id. All values are passed as varchar2. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_addnewversion` - Boolean flag. If TRUE, adds a new version of the item. If FALSE, updates the current version. Default is FALSE. Must be set to FALSE when the versioning property for the page is set to NONE. Must be set to TRUE when the versioning property for the page is set to AUDIT.
    `p_access_level` - Determines the access control level for the item. Use the following constant values:
    - ITEM_ACCESS - Enables item level security (ILS) for the item. ITEM_ACCESS has the same effect as using the procedure enable_ils_for_item(), and can be used only if the page has been set up to permit ILS.
    - FOLDER_ACCESS - Disables item level security for the item
    `p_userlist` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Its value is ignored.
    `p_grouplist` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Its value is ignored.
    `p_itemown_user` - Array of user IDs to which Manage privilege is granted
    `p_itemmanage_user` - Array of user IDs to which Edit privilege is granted
    `p_itemview_user` - Array of user IDs to which View privilege is granted
    `p_itemown_group` - Array of group IDs to which Manage privilege is granted
    `p_itemmanage_group` - Array of group IDs to which Edit privilege is granted
    `p_itemview_group` - Array of group IDs to which view privilege is granted
  Returns:
    number - The master item ID
  Exceptions:
    `ITEM_NOT_FOUND_ERROR` - An item with the given master item ID and ID does not exist
    `FOLDER_VERSIONING_IS_NONE` - Attempted to add a new version when page versioning is set to NONE
    `FOLDER_VERSIONING_IS_AUDIT` - Attempted to update the current version when page versioning is set to AUDIT
    `ILS_DISABLED` - Attempted to set item level access privileges when Item Level Security is not enabled for the page
    `QUOTA_EXCEEDED` - Uploaded file exceeds the page group quota
    `INVALID_PUBLISH_DATE_FORMAT` - Date format for publish date is invalid
    `INVALID_PUBLISH_DATE_VALUE` - Publish date must be today or later and publish date must be later than the expire date
    `NULL_EXPIRE_NUMBER` - If value for p_expire_mode is EXP_NUMBER, then a value is required for p_expiration
    `INVALID_EXPIRE_NUMBER` - Invalid number passed for p_expiration (only raised if p_expire_mode = EXP_NUMBER)
    `NULL_EXPIRE_DATE` - If value for p_expire_mode is EXP_DATE, then a value is required for p_expiration
    `INVALID_EXPIRE_DATE` - An invalid expiration date was passed. The expiration date must be later than the current date.
    `INVALID_EXPIRE_DATE_FORMAT` - Date format for expiry date is invalid
    `ITEM_UPDATE_ERROR` - Some other error occurred
    `UNKNOWN_ERROR` - An unknown error occurred

### modify_item_post_upload

    function modify_item_post_upload(
        p_master_item_id in number,
        p_item_id in number,
        p_caid in number,
        p_folder_id in number,
        p_display_name in varchar2,
        p_region_id in number,
        p_display_option in varchar2 default full_screen,
        p_category_id in number default general_category,
        p_category_caid in number default shared_objects,
        p_perspectives in g_perspectiveidarray default g_perspectiveidemptyarray,
        p_perspectives_caid in g_caid_array default g_empty_caid_array,
        p_author in varchar2 default wwctx_api . get_user,
        p_image_name in varchar2 default null,
        p_image_alignment in varchar2 default align_left,
        p_description in varchar2 default null,
        p_keywords in varchar2 default null,
        p_file_name in varchar2 default null,
        p_text in varchar2 default null,
        p_url in varchar2 default null,
        p_plsql in varchar2 default null,
        p_plsql_execute_mode in varchar2 default null,
        p_plsql_execute_user in varchar2 default null,
        p_folderlink_id in number default null,
        p_folderlink_caid in number default null,
        p_publish_date in varchar2 default null,
        p_expire_mode in varchar2 default permanent,
        p_expiration in varchar2 default null,
        p_hide_in_browse in number default no,
        p_checkable in number default no,
        p_attribute_id in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_caid in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_data_type in wwsbr_type.array default wwsbr_type . empty,
        p_attribute_value in wwsbr_type.array default wwsbr_type . empty,
        p_addnewversion in boolean default false,
        p_access_level in varchar2 default null,
        p_userlist in wwsbr_type.array default wwsbr_type . empty,
        p_grouplist in wwsbr_type.array default wwsbr_type . empty,
        p_itemown_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemmanage_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemview_user in wwsbr_type.array default wwsbr_type . empty,
        p_itemown_group in wwsbr_type.array default wwsbr_type . empty,
        p_itemmanage_group in wwsbr_type.array default wwsbr_type . empty,
        p_itemview_group in wwsbr_type.array default wwsbr_type . empty
    ) return number

  Modifies an existing item and links it to existing document(s) in the document table. Use this API instead of modify_item to update an item when documents have been uploaded to the repository document table in a separate step. This is usually required when the document must be loaded from a location other than the database server. After a document has been uploaded to the document table, you can call this API to have an existing item "claim" the document.

  Do not use this API to modify any item that does not have an ACTIVE value of 1. In this release, the API cannot be used to modify pending, rejected, or deleted items.

  This API requires that all files and images have already been uploaded to the document table. using the methods described under add_item_post_upload().

  Notes:

  - You must call wwpro_api_invalidation.execute_cache_invalidation() to process the cache invalidation messages generated by this API, as described in the introduction, above.

  See also modify_item(), add_item_post_upload(), and upload_blob().

  Example:

           declare
               l_blob             blob;
               l_blob_filename    varchar2(250) := 'new doc through blob';
               l_mime_type        varchar2(100) := 'text/plain';
               l_doc_name         varchar2(500);
               l_description      varchar2(1000);
               l_display_name     varchar2(300);
               l_item_masterthing_id  number;

           begin
                -- your calling application must define the get_blob() function
               l_blob := get_blob();

               l_doc_name := wwsbr_api.upload_blob(
                   p_file_name => l_blob_filename,
                   p_blob      => l_blob,
                   p_mime_type => l_mime_type
               );

               l_display_name := l_blob_filename;
               l_description := 'BLOB API File Item internal doc name=' || l_doc_name;

               --
               -- use modify_item_post_upload() to associate the blob with an item.
               --
               l_item_masterthing_id := wwsbr_api.modify_item_post_upload(
                 p_master_item_id => 453,
                 p_item_id => 454,
                 p_caid => 33,
                 p_folder_id => 45,
                 p_display_name => l_display_name,
                 p_region_id => 5,
                 p_file_name => l_doc_name,
                 p_description => l_description
                 );
               -- process cache invalidation messages
               wwpro_api_invalidation.execute_cache_invalidation;
          end;

  Parameters:
    `p_master_item_id` - Required to identify the item that is modified. You can look up this value in the MASTERID column in the view WWSBR_ALL_ITEMS.
    `p_item_id` - Required to identify the version of the item that is modified. This does not have to be the item's current version.
    `p_caid` - ID of the item's page group.
    `p_folder_id` - ID of the item's page.
    `p_display_name` - Display name (title) for the item.
    `p_region_id` - ID of the region in which the item resides. This parameter cannot be used to move an item to a different region. You must pass the ID of the region that currently contains the item.
    `p_display_option` - How the item should be displayed. Used for file, text, url, and pl/sql item types, ignored for others. Use the following constants:
    - FULL_SCREEN (default - link that displays the item in the same browser window)
    - NEW_WINDOW (link that displays the item in a new browser window)
    - IN_PLACE (displays the item in the region - only used for text and pl/sql item types)
    `p_category_id` - ID of category for the item. Default is the constant GENERAL_CATEGORY.
    `p_category_caid` - Page group ID of category for item. Default is the constant SHARED_OBJECTS.
    `p_perspectives` - Array of perspective IDs.
    `p_perspectives_caid` - Array of page group IDs for the perspectives in p_perspectives. The position of each element in this array must match the position of the corresponding perspective ID in p_perspectives.
    `p_author` - Author of the item.
    `p_image_name` - Internal document name for the item's image, matching a document in the document table. Pass the value returned from upload_blob() to this parameter to reference the uploaded document as the image for this item.
    `p_image_alignment` - Rendering alignment for the item's image. See the constants prefixed with "ALIGN_" for valid values. Default is ALIGN_LEFT.
    `p_description` - Description of the item.
    `p_keywords` - Keywords for the item.
    `p_file_name` - Internal document name for a file type item, matching a document in the document table. Pass the value returned from upload_blob() to this parameter to reference the uploaded document as the file for this item.
    `p_text` - The text for a text item type.
    `p_url` - The url for a url item type.
    `p_plsql` - The plsql code for a plsql item type.
    `p_plsql_execute_mode` - Execute mode for a PL/SQL type item. Use the following constants:
    - PUBLIC_SCHEMA
    - DB_USER
    - CREATOR_SCHEMA
    `p_plsql_execute_user` - Database user name. Required when DB_USER execute mode is used for a PL/SQL type item.
    `p_folderlink_id` - Page ID for a page link item type.
    `p_folderlink_caid` - Page group ID for a page link item type. May be any valid page group.
    `p_publish_date` - Date on which the item is published. Must be in the format 'dd-mon-yyyy HH12:MI PM'. If no value is passed, the item is published immediately.
    `p_expire_mode` - Expiration mode for the item. Use the following constants:
    - PERMANENT (default)
    - EXP_NUMBER
    - EXP_DATE
    `p_expiration` - Qualifier for p_expire_mode.
    - If p_expire_mode = PERMANENT, p_expiration must be null.
    - If p_expire_mode = EXP_NUMBER, p_expiration must be set to the number of days until expiry.
    - If p_expire_mode = EXP_DATE, p_expiration must be set to a valid expiration date in the future in the format of 'dd-mon-yyyy HH12:MI PM'.
    `p_hide_in_browse` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Its value is ignored.
    `p_checkable` - Flag that determines if the item can be checked out. Valid constant values are YES and NO. Default is NO.
    `p_attribute_id` - Array of attribute IDs for the item. Used for attributes for which no other parameter exists (e.g. custom attributes). The attribute must exist in the item's type definition, as shown in the view WWSBR_ITEM_TYPE_ATTRIBUTES.
    `p_attribute_caid` - Array of page group IDs for the attributes in p_attribute_id. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id. Must be the same as p_caid or the ID of the Shared Objects page group (use the constant SHARED_OBJECTS).
    `p_attribute_data_type` - Array of attribute data types for the attributes in p_attribute_id. The value for this parameter can be found in the DATA_TYPE column in the view WWSBR_ATTRIBUTES, for example 'url', 'boolean', 'text', etc. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_attribute_value` - Array of attribute values for the attributes in p_attribute_id. All values are passed as varchar2. The position of each element in this array must match the position of the corresponding attribute ID in p_attribute_id.
    `p_addnewversion` - Boolean flag. If TRUE, adds a new version of the item. If FALSE, updates the current version. Default is FALSE. Must be set to FALSE when the versioning property for the page is set to NONE. Must be set to TRUE when the versioning property for the page is set to AUDIT.
    `p_access_level` - Determines the access control level for the item. Use the following constant values:
    - ITEM_ACCESS - Enables item level security (ILS) for the item. ITEM_ACCESS has the same effect as using the procedure enable_ils_for_item(), and can be used only if the page has been set up to permit ILS.
    - FOLDER_ACCESS - Disables item level security for the item
    `p_userlist` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Its value is ignored.
    `p_grouplist` - This parameter is DEPRECATED. It has been retained for backward compatibility with the 3.0.9 API signature. Its value is ignored.
    `p_itemown_user` - Array of user IDs to which Manage privilege is granted
    `p_itemmanage_user` - Array of user IDs to which Edit privilege is granted
    `p_itemview_user` - Array of user IDs to which View privilege is granted
    `p_itemown_group` - Array of group IDs to which Manage privilege is granted
    `p_itemmanage_group` - Array of group IDs to which Edit privilege is granted
    `p_itemview_group` - Array of group IDs to which view privilege is granted
  Returns:
    number - The master item ID
  Exceptions:
    `ITEM_NOT_FOUND_ERROR` - An item with the given master item ID and ID does not exist
    `FOLDER_VERSIONING_IS_NONE` - Attempted to add a new version when page versioning is set to NONE
    `FOLDER_VERSIONING_IS_AUDIT` - Attempted to update the current version when page versioning is set to AUDIT
    `ILS_DISABLED` - Attempted to set item level access privileges when Item Level Security is not enabled for the page
    `QUOTA_EXCEEDED` - Uploaded file exceeds the page group quota
    `INVALID_PUBLISH_DATE_FORMAT` - Date format for publish date is invalid
    `INVALID_PUBLISH_DATE_VALUE` - Publish date must be today or later and publish date must be later than the expire date
    `NULL_EXPIRE_NUMBER` - If value for p_expire_mode is EXP_NUMBER, then a value is required for p_expiration
    `INVALID_EXPIRE_NUMBER` - Invalid number passed for p_expiration (only raised if p_expire_mode = EXP_NUMBER)
    `NULL_EXPIRE_DATE` - If value for p_expire_mode is EXP_DATE, then a value is required for p_expiration
    `INVALID_EXPIRE_DATE` - An invalid expiration date was passed. The expiration date must be later than the current date.
    `INVALID_EXPIRE_DATE_FORMAT` - Date format for expiry date is invalid
    `ITEM_UPDATE_ERROR` - Some other error occurred
    `UNKNOWN_ERROR` - An unknown error occurred

### move_folder

    procedure move_folder(
        p_folder_id in number,
        p_dest_folder_id in number,
        p_caid in number
    )

  This api is not currently supported.

### move_item

    procedure move_item(
        p_master_item_id in number,
        p_dest_page_id in number,
        p_dest_region_id in number default null,
        p_caid in number
    )

  This api is not currently supported.

### upload_blob

    function upload_blob(
        p_file_name in varchar2,
        p_blob in blob,
        p_mime_type in varchar2
    ) return varchar2

  Uploads document content to the document table. This API is new to version 9.0.2.6.

  Uploads document content to the document table as an unclaimed document. This API returns a unique document name that can be used in file name and image name attributes in add_item_post_upload() and modify_item_post_upload().

  To use this function, your calling application must declare a blob and assign it to an object compatible with the database blob data type (see the Application Developer's Guide - Large Objects (LOBS) in the Oracle9i Database documentation set). The object can then be passed to the p_blob parameter of this function.

  Document content can also be loaded through the add_item() and modify_item() APIs. However, these functions require that the document reside on the same server as the database. This limitation does not apply to the upload_blob() function.

  See also add_item_post_upload(), modify_item_post_upload().

  Example:

           declare
               l_blob             blob;
               l_blob_filename    varchar2(250) := 'new doc through blob';
               l_mime_type        varchar2(100) := 'text/plain';
               l_doc_name         varchar2(500);
               l_display_name     varchar2(300);
               l_region_id        number := 605;
               l_file_name        varchar2(100);
               l_image_name       varchar2(100);
               l_site_id          number := 33;
               l_page_id          number := 1;
               l_item_type_id     number := wwsbr_api.ITEM_TYPE_FILE;
               l_item_type_siteid number := wwsbr_api.SHARED_OBJECTS;
               l_region_id        number := 605;
               l_description      varchar2(1000);
               l_display_name     varchar2(300);
               l_item_masterthing_id  number;
           begin
                -- your calling application must define the get_blob() function
               l_blob := get_blob();

               l_doc_name := wwsbr_api.upload_blob(
                   p_file_name => l_blob_filename,
                   p_blob      => l_blob,
                   p_mime_type => l_mime_type
               );

               l_display_name := l_blob_filename;

               if l_item_type_id = wwsbr_api.ITEM_TYPE_FILE then
                   l_image_name := null;
                   l_file_name := l_doc_name;
                   l_description := 'BLOB API File Item internal doc name=' || l_doc_name;
               elsif l_item_type_id = wwsbr_api.ITEM_TYPE_IMAGE then
                   l_image_name := l_doc_name;
                   l_file_name := null;
                   l_description := 'BLOB API Image Item internal doc name=' || l_doc_name;
               end if;

               --
               -- use add_item_post_upload() to add the item to portal.
               --
               l_item_masterthing_id := wwsbr_api.add_item_post_upload(
                   p_caid  => l_site_id,
                   p_folder_id => l_page_id,
                   p_display_name => l_display_name,
                   p_file_name => l_file_name,
                   p_image_name => l_image_name,
                   p_type_id => l_item_type_id,
                   p_type_caid => l_item_type_siteid,
                   p_region_id => l_region_id,
                   p_description => l_description
               );
           -- process cache invalidation messages
           wwpro_api_invalidation.execute_cache_invalidation;

  Parameters:
    `p_file_name` - File name to be assigned to the blob. This is not the value returned by this function. Normally, this value is the file name by which the document is known on the source file system (e.g. "index.htm", "Expense Report.xls", etc.).
    `p_blob` - The blob containing the content.
    `p_mime_type` - The mime_type for the blob.
  Returns:
    varchar2 - A unique, system generated document name in the document table, in the format "NNNNN.<file extension>". For example, if p_file_name = "index.htm", the return value will look like "837569.HTM".
  Exceptions:
    `CANNOT_INSERT_DOCUMENT` - The blob could not be inserted in the document table

Overview | Package | Object Type | Deprecated | Index | Help
| Oracle9iAS Portal PL/SQL API Reference - 9.0.2.6
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES
SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE