Editing Page Properties Oracle Fusion Middleware Online Documentation Library

11-4 Oracle Fusion Middleware Developers Guide for Oracle Portal ALLOW_PAGE_ACL NUMBER For templates, indicates if pages have different access settings. Valid values: ■ 1 - allow pages to have different access settings INIT_JSPFILE VARCHAR2256 For JSP pages, initial JSP file if the JSP source of the page is a JAR or WAR file. UI_TEMPLATE_ID NUMBER38 ID of HTML page skin. TEMPLATE_ISPUBLIC NUMBER1 Indicates if the template is ready to use. Valid values: ■ 1 - template is ready to use CONTAINER_ID NUMBER ID of the container page. DEFAULT_ITEM_REGION_ ID NUMBER ID of the default item region for the page. DEFAULT_PORTLET_ REGION_ID NUMBER ID of the default portlet region for the page. ITEMTYPE_INHERIT_FLAGS NUMBER1 For WebDAV, indicates if default item types are inherited from parent page. Valid values: ■ 7 - inherit all item types from parent page ■ 0 - specify all types on this page REGFILE_ITEMTYPE RAW32 For WebDAV, GUID of default item type for regular files. ZIPFILE_ITEMTYPE RAW32 For WebDAV, GUID of default item type for zip files. IMAGEFILE_ITEMTYPE RAW32 For WebDAV, GUID of default item type for image files. DISPLAYINPARENT NUMBER1 Indicates if the page is displayed in its parent pages sub page region. Valid values: ■ 1 - display page in parents sub page region SEQ NUMBER The sequence order of the page in its parent pages sub page region. ALPHABETICAL_SORT NUMBER1 Indicates that sub pages are displayed in alphabetical order. Valid values: ■ 1 - display sub pages in alphabetical order ITEM_PAGE_ID NUMBER38 ID of the item template. Table 11–1 Cont. Editable Page Record Properties Property Data Type Description Performing Simple Content Management Tasks 11-5 Users need to have Manage privileges on a page to edit its properties. When updating translatable page attributes, modify_folder updates the translation determined by the session language setting. Therefore to make sure you update the translation with the correct values for all the translatable attributes, you must query the page attributes of the same language first. Example 11–1 shows how to use the modify_folder API to edit the English translation of the display name of a page. Example 11–1 Editing Page Properties declare l_page wwsbr_api.page_record; begin wwctx_api.set_nls_language p_nls_language = wwnls_api.AMERICAN ; select into l_page from schema.wwsbr_user_pages where siteid = 33 and id = 1 and language = wwnls_api.AMERICAN; l_page.title := New Page Display Name; wwsbr_api.modify_folder p_page = l_page ITEM_PAGE_SITE_ID NUMBER28 Page group ID of the item template. ITEM_PAGE_TABSTRING VARCHAR2512 Tab strings of the item template. Use the following format: tab name:sub tab name:...:sub tab name INHERIT_ITEM_PAGE NUMBER1 For item template only, indicates that items inherit the parent pages item template. Valid values: ■ 1 - inherit parent pages item template ALLOW_ITEM_PAGE_ OVERRIDE NUMBER1 For item template only, indicates that items can have their own item template. Valid values: ■ 1 - allow items on the page to have their own item template HAS_INPLACE_ITEM NUMBER1 Indicates if the page or tab has a placeholder item. Valid values: ■ 1 - has a placeholder item TIMEOUT NUMBER Limit time, in seconds, used to fetch portlets. Table 11–1 Cont. Editable Page Record Properties Property Data Type Description 11-6 Oracle Fusion Middleware Developers Guide for Oracle Portal ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; p_page is the page record for the page you want to modify. schema is the portal schema that is, the schema in which Oracle Portal is installed.

11.2 Editing Content

This section contains the following examples: ■ Section 11.2.1, Setting Item Attributes ■ Section 11.2.2, Editing an Item ■ Section 11.2.3, Checking Items Out and In ■ Section 11.2.4, Using Version Control

11.2.1 Setting Item Attributes

If you want to set a particular attribute for an item, use the set_attribute API. This API updates the value of an attribute for a particular version of an item. The values provided are validated against the data type of the attribute. You can use this API to set the value of a base attribute see Table 11–2 or a custom attribute. You cannot use this API to edit rejected items, items marked for deletion, and rejected items that have been marked for deletion. Example 11–2 shows how you can use the set_attribute API to set a particular attribute for an item. Example 11–2 Setting the Display Name of an Item set_attribute API begin wwsbr_api.set_attribute p_site_id = 37, p_thing_id = 8056, p_attribute_site_id = wwsbr_api.SHARED_OBJECTS, p_attribute_id = wwsbr_api.ATTRIBUTE_TITLE, p_attribute_value = New Display Name ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception Note: When editing an item, it is good practice to check the item out first to ensure that any changes made by your code are not overwritten by other users. Dont forget to check the item back in after you have completed your edits. For information about checking items out and in, refer to Section 11.2.3, Checking Items Out and In . Tip: Use the set_attribute API when you want to set a single item attribute. If you want to set multiple item attributes, use the modify_item API described in Section 11.2.2, Editing an Item . Performing Simple Content Management Tasks 11-7 ... end; ■ p_site_id is the ID of the page group to which the item belongs. ■ p_thing_id is the unique item ID. The item ID identifies the particular version of the item that you want to edit. ■ p_attribute_site_id is the ID of the page group to which the attribute belongs. For base attributes, use the wwsbr_api.SHARED_OBJECTS constant. ■ p_attribute_id is the ID of the attribute. For base attributes, use the constants from the WWSBR_API package as shown in Table 11–2 . ■ p_attribute_value is the new value that you want to assign to the attribute. For base attributes, see Table 11–2 . For information about how to obtain an object ID, for example a page group ID or item ID, refer to Section 10.3, Finding an Object ID . Table 11–2 provides guidelines for setting the values of base attributes. Table 11–2 Attribute Values for Base Attributes Attribute Constant Value p_attribute_value Author wwsbr_api.ATTRIBUTE_ AUTHOR Any varchar250 value Category wwsbr_api.ATTRIBUTE_ CATEGORY pagegroupid_categoryid Character Set wwsbr_api.ATTRIBUTE_ CHARSET ■ wwsbr_api.VALUE_BIG5 ■ wwsbr_api.VALUE_EUC_JP ■ wwsbr_api.VALUE_GBK ■ wwsbr_api.VALUE_ISO_8859 ■ wwsbr_api.VALUE_SHIFT_JIS ■ wwsbr_api.VALUE_US_ASCII ■ wwsbr_api.VALUE_UTF8 ■ wwsbr_api.VALUE_WINDOWS_ 1252 Description wwsbr_api.ATTRIBUTE_ DESCRIPTION Any varchar22000 value Display Name wwsbr_api.ATTRIBUTE_ TITLE Any varchar2256 value Display Option wwsbr_api.ATTRIBUTE_ DISPLAYOPTION ■ wwsbr_api.IN_PLACE to display the item directly in place ■ wwsbr_api.FULL_SCREEN to display the item in the full browser window ■ wwsbr_api.NEW_WINDOW to display the item in a new browser window Enable Item Check-out wwsbr_api.ATTRIBUTE_ ITEMCHECKOUT ■ wwsbr_api.ENABLE_ITEM_FOR_ CHECK_OUT ■ wwsbr_api.DISABLE_ITEM_FOR_ CHECK_OUT 11-8 Oracle Fusion Middleware Developers Guide for Oracle Portal Expiration Period wwsbr_api.ATTRIBUTE_ EXPIRATIONPER ■ wwsbr_api.PERMANENT to un-expire the item ■ Any numeric value to set the expire mode to NUMBER ■ Any date value greater than the publish date to set the expire date to the value passed and the expire mode to DATE File wwsbr_api.ATTRIBUTE_ FILE The path and file name of the file that you want to upload Image wwsbr_api.ATTRIBUTE_ IMAGE The path and file name of the image that you want to upload ImageMap wwsbr_api.ATTRIBUTE_ IMAGEMAP Any varchar24000 value Image Alignment wwsbr_api.ATTRIBUTE_ IMAGEALIGN ■ wwsbr_api.ALIGN_TEXT_TOP ■ wwsbr_api.ALIGN_ABSOLUTE_ BOTTOM ■ wwsbr_api.ALIGN_ABSOLUTE_ MIDDLE ■ wwsbr_api.ALIGN_BOTTOM ■ wwsbr_api.ALIGN_RIGHT ■ wwsbr_api.ALIGN_TOP ■ wwsbr_api.ALIGN_LEFT ■ wwsbr_api.ALIGN_MIDDLE ■ wwsbr_api.ALIGN_BASELINE ■ wwsbr_api.ALIGN_IMAGE_ ABOVE_LINK Item Link wwsbr_api.ATTRIBUTE_ ITEM_LINK pagegroupid_itemid Item Template wwsbr_api.ATTRIBUTE_ ITEM_TEMPLATE pagegroupid_itemtemplateid Keywords wwsbr_api.ATTRIBUTE_ KEYWORDS Any varchar22000 value Mime Type wwsbr_api.ATTRIBUTE_ MIME_TYPE Any of the mime type constants in the WWSBR_API package. For example: ■ wwsbr_api.VALUE_TEXT_HTML ■ wwsbr_api.VALUE_TEXT_PLAIN ■ wwsbr_api.VALUE_IMAGE_GIF For a list of the available mime type constants, refer to the Oracle Portal PLSQL API Reference on Portal Center: http:portalcenter.oracle.com In the Portal Focus Areas section, click Portlet Development , then in the APIs and References section, click PLSQL API Reference . Table 11–2 Cont. Attribute Values for Base Attributes Attribute Constant Value p_attribute_value Performing Simple Content Management Tasks 11-9 Name wwsbr_api.ATTRIBUTE_ NAME Any varchar2256 value Specify a name that is unique within the page and all its tabs and sub-pages Page Link wwsbr_api.ATTRIBUTE_ PAGE_LINK pagegroupid_pageid Perspectives wwsbr_api.ATTRIBUTE_ PERSPECTIVES pagegroupid_perspectiveid Separate multiple perspectives with commas. Non-existing perspective IDs are identified by the API. Only those perspectives that are available to the page group are added to the item. PLSQL wwsbr_api.ATTRIBUTE_ PLSQL Any varchar22000 value Publish Date wwsbr_api.ATTRIBUTE_ PUBLISHDATE Any date value This is a required attribute. Rollover Image wwsbr_api.ATTRIBUTE_ ROLLOVERIMAGE The path and file name of the image file that you want to upload Table 11–2 Cont. Attribute Values for Base Attributes Attribute Constant Value p_attribute_value