Setting Item Attributes Editing Content
11.2.2 Editing an Item
To edit an existing item, use the modify_item API. This API enables you to set the properties of an item and also enables you to perform the following: ■ Add new versions of the item if item version is enabled for the page. See Section 11.2.4, Using Version Control . ■ Enable item level security for the item if item level security ILS is enabled for the page. See Section 15.3, Setting Item Level Privileges for an alternative way of doing this. ■ Upload files that are associated with the item. If the file that you want to associate with the item has already been uploaded, use the modify_item_post_upload API instead. You should use this API to edit only those items with an ACTIVE value of 1. That is, do not use it to edit pending, rejected, or deleted items. You must pass both the items master ID to identify the item and its ID to identify the specific version of the item that you want to update. The specified ID does not have to be the current version of the item. For information about obtaining an object ID, refer to Section 10.3, Finding an Object ID . The modify_item 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 the 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 ■ 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 Section 15.3, Setting Item Level Privileges for more information on using this API. Example 11–3 updates the display name and text of a text item. Example 11–3 Editing an Item modify_item API declare l_item_master_id number; begin l_item_master_id := wwsbr_api.modify_item Version Number wwsbr_api.ATTRIBUTE_ VERSION_NUMBER Any positive number. The number does not have to be an integer. Specify a version number that is unique, that is, it should not be the same as any existing version of the item. If you supply a value that is the same as an existing version number for the item, then it will be set to one more than the highest version number for the item. Table 11–2 Cont. Attribute Values for Base Attributes Attribute Constant Value p_attribute_value 11-12 Oracle Fusion Middleware Developers Guide for Oracle Portal p_master_item_id = 453, p_item_id = 454, p_caid = 33, p_folder_id = 45, p_display_name = Movie Review, p_text = This is the text of the review. ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_master_item_id is the master ID of the item. You can look up this value in the MASTERID column of the WWSBR_ALL_ITEMS view. ■ p_item_id is the ID of the item. This identifies the version of the item and does not have to be the items current version. ■ p_caid is the ID of the page group to which the item belongs. ■ p_folder_id is the ID of the page on which the item appears. ■ p_display_name is the display name title of the item. ■ p_text is the text for the item the item in this example is a text item.11.2.3 Checking Items Out and In
If an item is enabled for check-out, before editing it, you should check the item out so that other users cannot make changes at the same time Example 11–4 . Example 11–4 Checking an Item Out and In check_out_item and check_in_item begin -- Check out the item. wwsbr_api.check_out_item p_master_item_id = 12345, -- Master ID is the same for all versions. p_caid = 33 ; -- Update the display name of the item. wwsbr_api.set_attribute p_site_id = 33, p_thing_id = 8056, -- Unique item ID. p_attribute_site_id = wwsbr_api.SHARED_OBJECTS, p_attribute_id = wwsbr_api.ATTRIBUTE_TITLE, p_attribute_value = New Display Name ; -- Check the item back in. wwsbr_api.check_in_item p_master_item_id = 12345, -- Master ID is the same for all versions. p_caid = 33 ; Tip: To identify the items current version, use the following query: select id from wwsbr_all_items where master_id = 453 and is_current_version = 1; Performing Simple Content Management Tasks 11-13 -- Process cache invalidation messages. wwpro_api_invalidation.execute_ache_invalidation; exception ... end; ■ p_master_item_id is the master ID of the item being checked out or in. ■ p_caid is the ID of the page group to which the item belongs. For information about the set_attribute API used in Example 11–4 , refer to Section 11.2.1, Setting Item Attributes .11.2.4 Using Version Control
When you edit an item using the modify_item API, if you set p_addnewversion = TRUE, a new version is created for the item. The new version is given a new ID the master ID stays the same. If you do not want the new version of the item to be immediately published as the current version, set p_add_as_current_version = FALSE. Example 11–5 shows how you can use the modify_item API to create a new version of an item. Example 11–5 Creating a New Version of an Item modify_item API 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_text = This is the text of the review., p_addnewversion = true ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; For a description of the parameters used here, see Example 11–3 .11.3 Reorganizing Content
Content is very rarely static, so you may find that you need to move content around within your portal. This section contains the following examples: Note: To check whether an item is already checked out, query the IS_ITEM_CHECKEDOUT column of the WWSBR_ALL_ITEMS view. For more information about this view, refer to Section F.2.5, WWSBR_ ALL_ITEMS . 11-14 Oracle Fusion Middleware Developers Guide for Oracle Portal ■ Section 11.3.1, Moving an Item to a Different Page ■ Section 11.3.2, Moving Pages11.3.1 Moving an Item to a Different Page
You can use the move_item API to move an item to a different page in the same page group or to a page in a different page group. Moving an item preserves the items metadata. To move an item to a different page group, the item must not be: ■ based on a local item type. ■ associated with a local category. ■ associated with any local perspectives. Example 11–6 moves an item from one page group to a page in a different page group. Example 11–6 Moving an Item to a Different Page Group move_item API begin wwsbr_api.move_item p_caid = 33, p_master_item_id = 12345, p_dest_caid = 53, p_dest_page_id = 1, p_dest_region_id = 5 ; -- Process cache invalidation messages. wwpro_api_invalidation.execute_cache_invalidation; exception ... end; ■ p_caid is the ID of the page group to which the item currently belongs. ■ p_master_item_id is the master ID of the item that you want to move. ■ p_dest_caid is the ID of the page group to which you want to move the item. ■ p_dest_page_id is the ID of the page to which you want to move the item. ■ p_dest_region_id is the ID of the item region of the page in which you want to move the item. If you do not specify a region ID, the item is moved to the pages default item region, which may not be desirable.11.3.2 Moving Pages
You can use the move_folder API to move a page within the same page group. You cannot move a page to a different page group. To move a page, users must have Manage privileges on the page being moved and the page under which the page is being moved. Example 11–7 shows how to move a page. Example 11–7 Moving a Page move_folder API begin wwsbr_api.move_folder p_id = 12345, p_siteid = 33,Parts
» Oracle Fusion Middleware Online Documentation Library
» Introduction to Portal Development Understanding Portlets
» Portlet Anatomy Oracle Fusion Middleware Online Documentation Library
» Out-of-the-Box Portlets Portlet Resources
» Other Sources of Prebuilt Portlets Web Clipping
» Portlet Builder Portlet Resources
» JSF Portlets Portlet Resources
» Programmatic Portlets Portlet Resources
» The Portlet Technologies Matrix
» Web Clipping OmniPortlet General Suitability
» Java Portlets Portlet Builder
» PLSQL Portlets General Suitability
» Java Portlets Expertise Required
» Web Providers Deployment Type
» WSRP Producers Deployment Type
» The user requests a portal page from the Web browser by entering a URL in the
» The Parallel Page Engine PPE, which resides in the Oracle Application Servers
» Database Providers Provider Registration
» PLSQL Portlets Development Tool
» OmniPortlet and Web Clipping Java Portlets Portlet Builder PLSQL Portlets
» Web Clipping OmniPortlet User Interface Flexibility
» Java Portlets and PLSQL Portlets
» Web Clipping OmniPortlet Java Portlets
» PLSQL Portlets Ability to Capture Content from Web Sites
» Web Clipping OmniPortlet Java Portlets Portlet Builder
» Public Portlet Parameters Support
» OmniPortlet, Web Clipping, and Portlet Builder
» Web Clipping and OmniPortlet Java Portlets Portlet Builder PLSQL Portlets
» Web Clipping OmniPortlet Java Portlets PLSQL Portlets
» Introduction to OmniPortlet Oracle Fusion Middleware Online Documentation Library
» Source The OmniPortlet Wizard
» Filter The OmniPortlet Wizard
» View Layout The OmniPortlet Wizard
» Edit Defaults mode The OmniPortlet Wizard
» Portlet Parameters and Events
» Adding an OmniPortlet Instance to a Portal Page Building an OmniPortlet Based on a Web Service
» Building an OmniPortlet Based on a Spreadsheet CSV
» Building an OmniPortlet Based on an XML Data Source
» Building an OmniPortlet Based on a Web Page Data Source
» Under New Page Parameter, in the Parameter Name field, enter zip, then click
» For the fourth OmniPortlet in the list, follow the same steps to set Param1 to the
» Set the Page Input as shown in Click OK.
» Building an OmniPortlet Using the HTML Layout
» Above the Web Clipping portlet, click the Edit Defaults icon, as shown in
» In the URL Location field, enter the location of the starting Web page that links to Click Start.
» At the top left of the section of the Web content you want to clip, click Choose.
» In the Find a Web Clipping page, click OK to display the selected Web clipping in
» In the Default Value field, enter a value to use by default for the parameter.
» Select Basic Authentication as the authentication method.
» In the Additional Fields section, you can enter names and values of any Click OK.
» At the top left of the section of the Web content you want to clip, click Choos
» Click Select to confirm that the search result section is the one you want to clip.
» Because the content displayed in the portlet was reached by entering information
» In the parameters table, make the following changes:
» Click OK to display the default search results in the Web Clipping portlet on your
» In the Editing Views section, click View Page.
» In the Web Clipping portlet header, click Personalize, as shown in
» In the page that displays, scroll down to the Inputs section. Notice that the
» Click OK. Personalizing a Web Clipping Portlet
» Verify that the Web provider that contains the URL-based portlets you want to
» Find existing URL-based portlets.
» Performing the Migration Migrating from URL-Based Portlets
» Post-Migration Configuration Migrating from URL-Based Portlets
» Maintaining Migrated Portlets Migrating from URL-Based Portlets
» Current Limitations for Web Clipping
» User preference: Guidelines for Show Modes
» Instance defaults: Guidelines for Show Modes
» Guidelines for Edit Defaults Mode Options The following guidelines should
» Guidelines for Buttons in Edit Defaults Mode For consistency and user
» Preview Mode JPS and PDK-Java Full Screen Mode PDK-Java
» Help Mode JPS and Oracle Portal
» Link Mode PDK-Java Portlet defaults
» Guidelines for Navigation within a Portlet
» Guidelines for JavaScript Guidelines for Writing Java Portlets
» Guidelines for Mobile Portlets
» Introduction to Java Portlet Specification JPS and WSRP
» Click Next. Creating a JSR 168 Portlet
» Click OK. Repeat the preceding steps if you want to add more customization
» In the Description field, enter a description for the security role, explaining the Click OK.
» Initialization parameters provide the Web application developer, who decides
» In the Name field, enter a unique name for the initialization parameter. Use only
» In the Value field, enter a default value for the parameter.
» In the Description field, enter a description for the parameter.
» To delete an initialization parameter, select it in the table and click Remove.
» Click Next to display the Finish page.
» Click Finish to generate the files for your portlet. The following files should be
» Adding Portlet Logic to Your JSR 168 Portlet
» In the Application Navigator, right-click the project that contains your portlet and
» In the Deployment Profile Name field, enter a meaningful name for the
» Click OK. Deploying Your JSR 168 Portlet to the Oracle WebLogic Server
» When the Deployment Finished message displays in the Deployment Log at the
» Click Next to display the Portal Registration Property Values page
» Click Finish. You should see a Registration Confirmation page similar to the one
» Registering WSRP Producers in Enterprise Configurations
» Introduction to Oracle PDK-Java
» Click Next to display the General Portlet Information Page.
» Click Next to display the Public Portlet Events page
» Click the link underneath Service Name.
» In the New Gallery, expand the General category and select Deployment Profiles.
» In the Items list, select WAR File and click OK. The Create Deployment Profile --
» Click OK. The WAR Deployment Profile Properties dialog box opens.
» Under Web Application’s Context Root, select Specify Java EE Web Context Root
» Select the Contributors node under WEB-INFlib.
» Select Portlet Development. Deploying Your Oracle PDK-Java Portlet to an Application Server
» Click OK. The Project Properties dialog opens.
» Click OK. Deploying Your Oracle PDK-Java Portlet to an Application Server
» In the Application Navigator, right-click your project and select Deploy, then
» If you are not already on the Portal Builder page, click the Builder link in the
» In the Remote Providers portlet, click Register a Provider to display the Register
» In the Name field, enter the name of the provider. The name must not be more
» In the Display Name field, enter a name to display for the provider when it is
» In the Timeout field, enter the number of seconds Oracle Portal should try to
» In the Timeout Message field, enter the message to display when Oracle Portal
» From the Implementation Style list, select Web.
» Click Next to display the Define Connection page
» In the Domain Structure tree, select Deployments.
» Click the Targets tab, and select AdminServer and WLS_WSRP from the Servers Click Save.
» In Oracle JDeveloper, double-click the view.jsp file for your JPS-Standard
» Add the code that is indicated in bold in the following snippet:
» Open edit.jsp in the visual designer and click the Design tab. Notice that the
» Click the Design tab to see the new form field that you just added
» Updating the XML Provider Definition
» Viewing the Portlet Under Web Content, htdocs\myportlet, create an HTML page called
» Click the magnifying glass icon next to the portlet and a preview window similar
» Reviewing the Generated Code The wizard creates the following code for you by
» Modifying the Generated Code The JSP contains an input field for the portlet
» Implementing Personalization for Show Pages
» Edit your Show page and import NameValuePersonalizationObject and
» Preference Information Within the XML Provider Definition
» Portlet URL Types Intraportlet links refer to the Oracle Portal page on which
» Building Links with the Portlet URL Types To build links with the URL
» Building Forms with the Portlet URL Types Use of portlet parameters in forms is
» Implementing Navigation within a Portlet You can implement navigation within a
» Submitting Events Go to the Parameter tab of the page properties. Note that parameters should be
» You can append a parameter value to the URL and the portlet displays the value
» When you click the link, that value is passed to the Parameter portlet on its page
» Go to the provider deployment in the Oracle WebLogic Administration Console,
» Creating Private Events Enhancing PDK-Java Portlets
» Ensure you are logged in to an Oracle Portal instance with privileges to create
» Create a new portal page, ensuring it is visible to PUBLIC.
» Add your Java portlet to the page.
» Make a note of the direct URL to your new Portal page.
» Now log out of the Portal instance by clicking the Logout link.
» Oracle Portal Server Security
» HTTPS Communication Directly access the Portal page by entering the URL noted in Step 4 into your
» Implementing Oracle Internet Directory Security PDK-Java provides a set of
» Viewing Your Portlets After you secure your provider with Oracle Internet
» Ensure you are logged in to an Oracle Portal instance as a user who is a member of
» Use an existing page or create a new one, ensuring it is visible to PUBLIC.
» Make a note of the direct URL to your new page.
» Click Logout. Implementing Portlet Security
» The portlet instance is the portlet on a page with the default personalizations made
» Create a stock portlet and implement the Show mode with the following
» Create two regions on a sample page and add My Stock Portlet to the first region.
» Securing Provider Communications If the security of exportingimporting
» Disabling ExportImport of Personalizations The JNDI variable,
» Obfuscating Data for Transport Automatic By default, personalization data is
» Exporting by Reference Example To export by reference rather than exporting
» Expiry-based Caching Enhancing Portlet Performance with Caching
» Invalidation-based Caching: Enhancing Portlet Performance with Caching
» You have followed through and understood
» Activating Caching You built a portlet using the wizard and successfully added it to a page.
» Configuring the Provider Servlet To enable invalidation-based caching, you must
» Defining the Oracle Web Cache Invalidation Port If you are using an Oracle
» Configuring the XML Provider Definition Using a combination of tags in
» Manually Invalidating the Cache You may want the cached version of the portlet
» Enhancing Portlets for Mobile Devices
» Writing Multilingual Portlets Enhancing PDK-Java Portlets
» Oracle Portal and the Apache Struts Framework
» Creating an Oracle Application Development Framework ADF Portlet
» Portlet Show Modes Guidelines for Creating PLSQL Portlets
» Recommended Portlet Procedures and Functions
» Implementing the Portlet Package
» Open starter_provider2.pks in an editor.
» Save and close starter_provider2.pkb.
» Creating and Accessing a Preference Store
» Implementing a Session Store
» Passing Private Parameters Passing Page Parameters and Mapping Public Portlet Parameters
» Retrieving Parameter Values Using Parameters
» Identify the piece of information you require for your functionality.
» Use the appropriate method from wwctx_api to get and optionally set this value.
» Open the services_portlet.pkb file in an editor.
» Find the get_portlet_info function.
» Notice the usage of wwctx_api.get_user to derive the user information and set
» wwctx_api.get_user is used similarly in various places throughout
» Another example of getting context information occurs in the is_runnable
» Using Security Implementing Portlet Security
» Coding Security Implementing Portlet Security
» Indicate to Oracle Portal that it must generate specific headers for Oracle Web
» Determine whether you want to use system or user level caching. Set the
» Optionally, set up validation- or expiry-based caching as well.
» Add invalidation logic to your portlet where needed for example, when the
» Configuring and Monitoring the Cache
» Implementing Validation-Based Caching Improving Portlet Performance with Caching
» Implementing Expiry-Based Caching Improving Portlet Performance with Caching
» Implementing Invalidation-Based Caching Improving Portlet Performance with Caching
» Using Error Handling Implementing Error Handling
» Adding Error Handling Implementing Error Handling
» Add the event object, with an appropriate domain and subdomain combination,
» Register the log event record by using wwlog_api_admin.add_log_registry.
» Use start_log and stop_log to mark the events you want to log in your code.
» Adding Event Logging Implementing Event Logging
» Using Multilingual Support Writing Multilingual Portlets
» Adding Multilingual Support Writing Multilingual Portlets
» Registration Prerequisites Provider Record Input Registration Example
» Overview Oracle Fusion Middleware Online Documentation Library
» Secure Content Repository Views
» Terminology Content Management APIs
» Providing Access to the APIs and Secure Views
» Using Constants Guidelines for Using the APIs
» Resetting CMEF Global Variables
» Code Samples Oracle Fusion Middleware Online Documentation Library
» Setting the Session Context API Parameters
» Editing Page Properties Oracle Fusion Middleware Online Documentation Library
» Setting Item Attributes Editing Content
» Editing an Item Editing Content
» Moving an Item to a Different Page Moving Pages
» Moving Categories and Perspectives
» Deleting Items Deleting Content
» Deleting Pages Deleting Content
» Creating Pages Oracle Fusion Middleware Online Documentation Library
» Creating Categories and Perspectives
» Creating Items Oracle Fusion Middleware Online Documentation Library
» Setting Perspectives Attributes of Pages and Items
» Approving and Rejecting Items
» Searching For Items Across All Page Groups
» Searching For Pages in Specific Page Groups
» Searching For Items By Attribute
» Creating a Directory for the XML File
» Creating an XML File from a CLOB
» Generating Search Results in XML Workaround for get_item_xml
» Click Next. On the View page, select Tabular for the Layout Style, then click Next.
» Introduction to Multi-Lingual Support
» Querying the Default Language
» Setting the Session Language Modifying an Existing Translation Creating a Translation for an Item
» Translations and Item Versioning
» Retrieving Object Privileges Oracle Fusion Middleware Online Documentation Library
» Granting Page Level Privileges
» Removing Page Level Privileges
» Granting Item Level Privileges
» Removing Item Level Privileges
» Inheriting Item Level Privileges from the Page
» Enqueuing Messages How Does the Content Management Event Framework Work?
» Subscribers and Dequeuing Messages
» Exception Handling Listening for Messages
» Creating Subscriber Code Using the Content Management Event Framework
» In the toolbar at the top of the page, click the Properties link next to Page Group.
» Click the Configure tab to bring it forward.
» To enable CMEF, select the Enable Content Management Event Framework check
» Click OK to save your changes.
» Click Close to return to the page.
» Adding a Subscriber to WWSBR_EVENT_Q Running a CMEF Subscriber
» CMEF Message Payload Using the Content Management Event Framework
» Oracle Portal Actions and CMEF Events
» What Is the Content Management Event Framework? Installing the Examples
» Example: Portal Object Event Logging
» Example: Item Validation Oracle Fusion Middleware Online Documentation Library
» Integrating Workflow with Oracle Portal
» Example Overview Example: Integrating External Workflow
» Section 16.8.3.2, Grant Users the Manage Items With Approval Privileges
» Section 16.8.3, Run Scripts Required for the CMEF Workflow Integration
» Section 16.8.3.4, Create Subscriber and Check Procedures
» Section 16.8.3.5, Register the WF_CHECKURL Process with Oracle Workflow
» Enable Approvals and Notifications in Oracle Portal
» To enable approvals and notifications, select the Enable Approvals and
» Grant Users the Manage Items With Approval Privileges
» Go to any page in the page group and switch to Edit mode.
» Click the Approval tab to bring it forward.
» Select the Require Approval for All Users check box
» Create Subscriber and Check Procedures
» Log in to the CMEFSAMPLES schema and run the following: Start a new workflow project.
» Add the CMEF_WORKFLOW Subscriber to the WWSBR_EVENT_Q Queue
» Set the definition value in the provider_name.properties file that is
» From the WebLogic Server menu, choose Application Deployment, and then
» Click Continue. The URL mapping for Web Modules displays. The mappings will
» Click Next. Detailed Example Description
» In the Application Attributes section, for Application Name, enter the application
» Expand Deployment Plan. Detailed Example Description
» Click Deploy. Detailed Example Description
Show more