| modify_item_post_upload function

Related topics
Contained in package wwsbr_api. Call this function to update an existing item within a content area. The API can be used to add new versions to the item and set item level security. However, these features require that the folder/content area allows versioning (simple or audit) and that the folder allows item level security. This function assumes that all files and images have been uploaded to the WWDOC_DOCUMENT$ table in the repository and that all file names are actually the value in the wwdoc_document$.name column of that table. function modify_item ( p_master_item_id number, p_item_id number, p_caid number, p_folder_id number, p_display_name varchar2, p_region_id number, p_display_option in varchar2 default FULL_SCREEN, p_category_id number default GENERAL_CATEGORY, p_category_caid number default SHARED_OBJECTS, p_perspectives g_perspectiveidarray default g_perspectiveidemptyarray, p_perspectives_caid g_caid_array default g_empty_caid_array, p_author varchar2 default wwctx_api.get_user, p_image_name varchar2 default null, p_image_alignment varchar2 default ALIGN_BOTTOM, p_description varchar2 default null, p_keywords varchar2 default null, p_file_name varchar2 default null, p_text varchar2 default null, p_url varchar2 default null, p_plsql varchar2 default null, p_plsql_execute_mode varchar2 default null, p_plsql_execute_user varchar2 default null, p_app_component varchar2 default null, p_app_param_screen number default NO, p_folderlink_id number default null, p_folderlink_caid number default null, p_jarfile_name varchar2 default null, p_initial_page_name varchar2 default null, p_java_app_type varchar2 default APP_TYPE_JSP, p_publish_date varchar2 default null, p_expire_mode varchar2 default PERMANENT, p_expiration varchar2 default null, p_hide_in_browse number default NO, p_checkable in number default NO, p_attribute_id wwsbr_type.array default wwsbr_type.empty, p_attribute_caid wwsbr_type.array default wwsbr_type.empty, p_attribute_data_type wwsbr_type.array default wwsbr_type.empty, p_attribute_value wwsbr_type.array default wwsbr_type.empty, p_addnewversion boolean default false, p_access_level 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;

Version: Oracle Portal 3.0.9 (Not available Oracle9iAS Portal 9.0.2)
Parameters:
p_master_item_id | The master item ID of the item to be updated. Datatype: number
p_item_id | The ID of the item to be updated. Datatype: number
p_caid number | The content area ID into which this item belongs. Datatype: number
p_folder_id | The folder ID into which this item is to be added. Datatype: number
p_display_name | The display name for the item. This name is displayed in many places, including in the content area navigator and content area map. Datatype: varchar2
p_region_id | The ID of a region within the folder where this item is to be updated. This value can be found in WWSBR_ALL_FOLDER_REGIONS.ID Datatype: number
p_display_option | The display option for the item. The default value is FULL_SCREEN. Datatype: varchar2 Default: FULL_SCREEN
p_category_id number | The ID for the category to be assigned to the item. The value can be found in WWSBR_ALL_CATEGORIES.ID. The category selected must either belong to content area 0 (shared objects) or the same content area as the new item. Datatype: number Default: GENERAL_CATEGORY
p_category_caid | The content area ID for the category to be assigned to the item. Note: This value must either be 0 (shared objects) or the same as the value of p_caid. Datatype: number Default: SHARED_OBJECTS
p_perspectives | An array of perspective IDs which correspond to the perspectives to be assigned to the item. Values or this can be found in WWSBR_ALL_PERSPECTIVES.ID. Note: The perspectives selected must either belong to content area 0 (shared objects) or the same content area as the item. Datatype: g_perspectiveidarray Default: g_perspectiveidemptyarray
p_perspectives_caid | An array of content area IDs for the perspectives in p_perspectives. Values can be found in WWSBR_ALL_PERSPECTIVES.CAID. Note: The value must either be 0 (shared objects) or the same as the value of p_caid. Datatype: g_caid_array Default: g_empty_caid_array
p_author | The author of the item. If left null, the user who created the item is listed as the author. Datatype: varchar2 Default: wwctx_api.get_user
p_image_name | The document name stored in the wwdoc_document$Name column. Datatype: varchar2 Default: null
p_image_alignment | Alignment options for the item's image, with relationship to the rest of the displayed attributes. Valid values for this parameter are: ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, ALIGN_BOTTOM, ALIGN_ABSOLUTE_MIDDLE, ALIGN_ABSOLUTE_BOTTOM, ALIGN_TEXT_TOP, ALIGN_MIDDLE, ALIGN_BASELINE Datatype: varchar2 Default: ALIGN_BOTTOM
p_description | Description of the item. Datatype: varchar2 Default: null
p_keywords | Keywords for the item. Datatype: varchar2 Default: null
p_file_name | The document name for a file item, stored in the wwdoc_document$Name column. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_FILE, ITEM_TYPE_ZIP_FILE,or is a custom item type based on one of these two item types. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: in varchar2 Default: null
p_text | Text to be inserted for the text item. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_TEXT,or is a custom item type based on this type. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_url | A URL for the item. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_URL is a custom item type based on this type. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_plsql | PL/SQL code for the PL/SQL item. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_PLSQL. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_plsql_execute_mode | The execution mode for PL/SQL items folders. Valid values are PUBLIC_SCHEMA, DB_USER, CREATOR_SCHEMA. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_PLSQL. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_plsql_execute_user | The user for DB_USER in PL/SQL execute mode. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_PLSQL. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_app_component | The PROVIDER_ID.PORTLET_ID identifier for the application component to be used for this application component item. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_COMP,or is a custom item type based on this type. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_app_param_screen | Specifies whether the application component item displays the component parameter screen. The default value is No. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_COMP,or is a custom item type based on this type. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: number Default: NO
p_folderlink_id | The folder_id for the folder that this folder link item points to. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_FOLDER_LINK,or is a custom item type based on this type. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: number Default: null
p_folderlink_caid | The content area ID for the folder that this folder link item points to. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_FOLDER_LINK. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: number Default: null
p_jarfile_name | The document name of a JAR file stored in the wwdoc_document$Name column. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_JAVA_APP. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_initial_page_name | The name of the initial page for the Java application item. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_JAVA_APP. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: null
p_java_app_type | The type of Java application. Currently, JSP only. Note: This parameter is only applicable if the item type of the item (i.e. p_type_id) is ITEM_TYPE_JAVA_APP. Refer to the base_item_type column of WWSBR_ITEM_TYPES, to determine the item type. Datatype: varchar2 Default: APP_TYPE_JSP
p_publish_date | The date to publish the item. If no value is specified, the item is published immediately. Datatype: varchar2 Default: null
p_expire_mode | The expiration mode. Valid values are PERMANENT, EXP_NUMBER and EXP_DATE. The value specified here determines what is passed to p_expiration. Datatype: varchar2 Default: PERMANENT
p_expiration | If p_expire_mode is defined as: PERMANENT, this should be null. EXP_NUMBER, this value specifies the number of days. EXP_DATE, this value specifies the expiration date. Note: For dates, the format should match the NLS_DATE format. For example, for 'us' this is 'DD-MON-YYYY'. Datatype: varchar2 Default: null
p_hide_in_browse | Specifies whether the item is hidden in View or Browse mode. Datatype: number Default: NO
p_checkable | Specifies whether this item can be checked out by users with appropriate modify item privileges. Valid values for this parameter are YES or NO. Datatype: number Default: NO
p_attribute_id | An array of attributes ids (for items based on custom types which has attributes). Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_attribute_caid | An array of attribute content area IDs (for items based on custom types which has attributes). Note: The values must either match p_caid or be 0. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_attribute_data_type | An array of attribute type values (such as 'url','text' etc.) Values for this can be found in WWSBR_ATTRIBUTES.DATA_TYPE Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_attribute_value | An array of attribute values. All values are passed as varchar2. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_addnewversion | Add a new version of the item, or update the current version. Datatype: Boolean Default: FALSE
p_access_level | Update the item level access. Datatype: varchar2 Default: NULL
p_userlist | An array of user IDs. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_grouplist | An array of group IDs. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_itemown_user | An array of user IDs to whom 'own' privileges need to be granted. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_itemmanage_user | An array of user IDs to whom 'manage' privileges need to be granted. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_itemview_user | An array of user IDs to whom 'view' privileges need to be granted. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_itemown_group | An array of group IDs to whom 'own' privileges need to be granted. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_itemmanage_group | An array of group IDs to whom 'manage' privileges need to be granted. Datatype: wwsbr_type.array Default: wwsbr_type.empty
p_p_itemview_group | An array of group IDs to whom 'view' privileges need to be granted. Datatype: wwsbr_type.array Default: wwsbr_type.empty
Returns: This function returns a master item ID. Exceptions: If the item with the given master item ID does not exist, ITEM_NOT_FOUND_ERROR exception is raised. If an unknown error occurs, UNKNOWN_ERROR exception is raised. If a new version cannot be added because folder versioning is set to 'None', FOLDER_VERSIONING_IS_NONE exception is raised. If a new version cannot be updated because folder versioning is set to 'Audit', FOLDER_VERSIONING_IS_AUDIT exception is raised. If item specific privileges cannot be added because a folder does not allow item level security, ILS_DISABLED exception is raised. If no value was passed for p_type_id, MISSING_ITEM_TYPE exception is raised. When an uploaded file exceeds quota, QUOTA_EXCEEDED exception is raised. If the date format specified for the publish date is invalid, INVALID_PUBLISH_DATE_FORMAT exception is raised. The publish date specified must be today's date or later. It must also be earlier than the expire date, otherwise INVALID_PUBLISH_DATE_VALUE exception is raised. If the value for p_expire_mode is EXP_NUMBER but no value is specified for p_expiration, NULL_EXPIRE_NUMBER exception is raised. If an invalid number is specified for p_expiration, INVALID_EXPIRE_NUMBER exception is raised. (Only applicable when p_expire_mode = EXP_NUMBER). If the value for p_expire_mode is EXP_DATE but no value is specified for p_expiration, NULL_EXPIRE_DATE exception is raised. If some other error occurs while attempting to update an item, ITEM_UPDATE_ERROR exception is raised. Example: Master_Item_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 => 'Movie Review', p_region_id => 5, p_text => 'This is the text of the review.' );

Related topics
Content area API package | PDK PL/SQL API Reference - Home

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