Moving Categories and Perspectives

11-18 Oracle Fusion Middleware Developers Guide for Oracle Portal -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_master_item_id is the master ID of the item that you want to delete. ■ p_caid is the ID of the page group to which the item belongs. ■ p_version_number is the version of the item that you want to delete. If you attempt to delete the current version of the item, the ITEM_ACTIVE_VERSION exception is raised. If you do not specify an item version, all versions of the item are deleted. ■ p_mode is the mode to use when deleting the item. It can take the following values: – wwsbr_api.DELETE_ITEM_DEFAULT uses the page group setting. – wwsbr_api.DELETE_ITEM_PURGE deletes the item immediately, regardless of the page group setting. – wwsbr_api.DELETE_ITEM_LAZYDELETE marks the item as deleted, regardless of the page group setting. To restore a previously deleted item, use the undelete_item API Example 11–13 . If the item had any sub-items, those sub-items are also restored. Example 11–13 Restoring a Previously Deleted Item undelete_item API begin wwsbr_api.undelete_item p_thing_id = 12345, p_caid = 33 ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_thing_id is the unique ID of the deleted item that you want to restore. ■ p_caid is the ID of the page group to which the item belongs. Tip: If you want to delete the current version of the item, you must either delete all versions, or use the Oracle Portal user interface to revert to a previous version. Note: You can restore a deleted item only if the page group that owns the item is set up to retain deleted items, or the item was deleted using the wwsbr_api.DELETE_ITEM_LAZYDELETE mode, and the item has not been purged from the content repository. Performing Simple Content Management Tasks 11-19

11.5.2 Deleting Pages

Use the delete_folder API to delete a page. Users need to have Manage privileges on the page to be able to delete it. Example 11–14 shows how to delete a page. Example 11–14 Deleting a Page delete_folder API begin wwsbr_api.delete_folder p_id = 12345, p_siteid = 33 ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_id is the ID of the page that you want to delete. ■ p_siteid is the ID of the page group to which the page belongs. Note: Deleted pages cannot be restored by another API call.