| add_folder function

Related topics
Contained in package wwsbr_api. Call this function to create a new folder within a content area and return a folder ID. Note: The folder will be created in the default language of the content area into which it is added. function add_folder ( p_caid number, p_parent_id number default 1, p_name varchar2, p_display_name varchar2, p_type_id number default FOLDER_TYPE_CONTAINER, p_type_caid number default SHARED_OBJECTS, p_value varchar2 default null, p_plsql_execute_mode varchar2 default null, p_plsql_execute_user varchar2 default null, p_category_id number default GENERAL_CATEGORY, p_category_caid number default SHARED_OBJECTS, p_isportlet number default NO, p_portlet_use_page_style number default YES, p_perspectives g_perspectiveidarray default g_perspectiveidemptyarray, p_perspectives_caid g_caid_array default g_empty_caid_array, 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 ) return number;

Version: Oracle Portal 3.0.8 (Not available Oracle9iAS Portal 9.0.2)
Parameters:
p_caid | The ID of the content area into which the folder is to be added. Datatype: in number
p_parent_ID | The ID of the parent folder for this new folder. The default value is 1 which always corresponds to the root folder of a content area. Note: The parent folder specified here must be in the same content area as the new folder. Datatype: in number Default: 1
p_name | Internal reference name for the folder. This name must be: unique within the parent folder into which the new folder is to be added less than 60 characters not contain spaces or other special characters. Datatype: in varchar2
p_display_name | The display name (or title) of the folder. This name is displayed in many places, including the content area navigator and content area map. Datatype: in varchar2
p_type_id | The folder type ID for this folder. The default value is 1, which corresponds to the base container type. This value can be found in WWSBR_FOLDER_TYPES.ID. Note: Only folder types from content area 0 (shared objects), or the content area this folder is being added to are valid. Folder type constants can be used. Datatype: in number Default: 1
p_type_caid | The content area ID for the folder type. The default is SHARED_OBJECTS, which corresponds to the shared objects content area. This value can be found in WWSBR_FOLDER_TYPES.CAID. Note: This value must either be 0 (shared objects) or the same as the value passed for p_caid. Datatype: in number Default: SHARED_OBJECTS
p_value | This parameter need only be used for those folders which are not container folders. For URL, PL/SQL or Search folders the p_value attribute has special meaning: URL folder - Pass URL value for folder to p_value PL/SQL folder - Pass PL/SQL code for folder to p_value Search folder - Pass search terms for folder to p_value Note: Search folders are currently not implemented for creation via the API Datatype: in varchar2 Default: null
p_plsql_execute_mode | The execute mode for PL/SQL folders. Valid values are: PUBLIC_SCHEMA, DB_USER, CREATOR_SCHEMA Datatype: in varchar2 Default: null
p_plsql_execute_user | The user for DB_USER PL/SQL execute mode. Datatype: in varchar2 Default: null
p_category_id | The ID for the category to be assigned to the new folder. This 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 folder. Datatype: in number Default: GENERAL_CATEGORY
p_category_caid | The content area ID for the category to be assigned to the folder. Note: This value must either be 0 (shared objects) or the same as the value of p_caid. Datatype: in number Default: SHARED_OBJECTS
p_isportlet | Specifies whether to publish this folder as a portlet. The default is No. Datatype: in number Default: NO
p_portlet_use_page_style | If the folder is to be published as a portlet, this specifies whether the folder portlet should use the page style. Datatype: in number Default: YES
p_perspectives | An array of perspective IDs which correspond to the perspectives to be assigned to the folder. Values for 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 new folder. Datatype: in 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: in g_caid_array Default: g_empty_caid_array
p_attribute_id | An array of attribute IDs (for folders based on custom type which has attributes). Datatype: in wwsbr_type.array Default: wwsbr_type.empty
p_attribute_caid | An array of attribute content area IDs (for folders based on custom type 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: in wwsbr_type.array Default: wwsbr_type.empty
p_attribute_value | An array of attribute values. All values are passed as varchar2. Datatype: in wwsbr_type.array Default: wwsbr_type.empty
Returns: This function returns a folder ID. Exceptions: If the name of the folder already exists in the selected parent folder ID, i.e. p_name value, DUPLICATE_NAME exception is raised. If the specified combination of category ID and category content area ID does not exist, INVALID_CATEGORY exception is raised. If no value is specified for the folder name, (i.e. p_name), MISSING_NAME exception is raised. If a display name is required but not specified, i.e. p_display_name, MISSING_DISPLAY_NAME exception is raised. If the base type of the folder is URL, a URL is required. If a URL is not passed to the p_value parameter, URL_REQUIRED exception is raised. If the base type of the folder is PLSQL, PL/SQL code is required. It no code is passed to the p_value parameter, PLSQL_REQUIRED exception is raised. If p_plsql_execute_user is invalid, INVALID_PLSQL_EXECUTE_USER exception is raised. p_plsql_execute_user requires a value for plsql_execute_mode DB_USER, if missing MISSING_PLSQL_EXECUTE_USER exception is raised. If an invalid parent folder ID is specified, INVALID_FOLDER exception is raised. Example: New_Folder_Id := wwsbr_api.add_folder ( p_caid => 44, p_name => 'ENTERTAINMENT', p_display_name => 'Entertainment Site', p_type_id => 1, p_type_caid => 0 );

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