Oracle Fusion Middleware Developer’s Guide For Universal Content Management Web Center CMS Dev
User Manual: Pdf
Open the PDF directly: View PDF .
Page Count: 392
Download | ![]() |
Open PDF In Browser | View PDF |
Oracle® WebCenter Content Developer’s Guide for Content Server 11g Release 1 (11.1.1) E10807-04 November 2011 Oracle WebCenter Content Developer's Guide for Content Server, 11g Release 1 (11.1.1) E10807-04 Copyright © 1994, 2011, Oracle and/or its affiliates. All rights reserved. Primary Author: Bonnie Vaughan Contributing Authors: Contributors: Sean Cearley, Sandra Christiansen, Will Harris, Karen Johnson, Jean Wilson Sharmarke Aden, Scott Nelson, Rick Petty, David Truckenmiller, Ron van de Crommert This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services. Contents Preface .............................................................................................................................................................. xvii Audience.................................................................................................................................................... xvii Documentation Accessibility .................................................................................................................. xvii Related Documents .................................................................................................................................. xvii Conventions ............................................................................................................................................. xviii New and Changed Features.................................................................................................................. xix New Features for 11g Release 1 (11.1.1) ................................................................................................. Changed Features for 11g Release 1 (11.1.1).......................................................................................... Part I xix xx Getting Started with Customizing Oracle WebCenter Content Server 1 Introduction to Oracle WebCenter Content Server 1.1 1.1.1 1.1.1.1 1.1.1.2 1.1.1.3 1.1.1.4 1.1.1.5 1.1.1.6 1.1.2 1.2 1.3 1.4 1.5 1.5.1 1.5.1.1 1.5.1.2 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 Overview of Content Server Architecture............................................................................... 1-1 WebCenter Content Directories and Files........................................................................ 1-1 Terminology for WebCenter Content Directories ................................................... 1-2 The bin Directory.......................................................................................................... 1-2 The config Directory..................................................................................................... 1-3 The components Directory .......................................................................................... 1-5 The resources Directory............................................................................................... 1-5 The weblayout Directory............................................................................................. 1-6 Resources .............................................................................................................................. 1-6 Customization Types.................................................................................................................. 1-7 Customization Planning ............................................................................................................ 1-8 Recommended Skills and Tools for Customizing Content Server ...................................... 1-9 Content Server Behavior ......................................................................................................... 1-10 Startup Behavior ............................................................................................................... 1-11 Startup Steps............................................................................................................... 1-11 Effects of Configuration Loading ............................................................................ 1-12 Resource Caching ............................................................................................................. 1-13 Page Assembly .................................................................................................................. 1-13 Database Interaction......................................................................................................... 1-14 Localized String Resolution ............................................................................................ 1-14 Application Integrations.................................................................................................. 1-14 iii 2 Introduction to the Oracle Fusion Order Demo Sample Application 2.1 2.2 2.3 2.3.1 2.3.2 About Fusion Order Demo and the Suppliers Module......................................................... Setting Up the Fusion Order Demo Application.................................................................... Running the Suppliers Module................................................................................................. Suppliers Module Code ...................................................................................................... Suppliers Module Pages ..................................................................................................... 2-1 2-2 2-2 2-3 2-5 Part II Changing the Look and Feel of the Content Server Interface 3 Customizing the Content Server Interface 3.1 3.1.1 3.1.2 3.1.3 3.2 3.2.1 3.2.2 3.3 3.4 3.4.1 3.5 3.5.1 3.5.2 3.6 3.7 3.8 3.8.1 3.8.2 About Customizing the Content Server Interface.................................................................. Types of Skins and Layouts................................................................................................ Skins....................................................................................................................................... Layouts .................................................................................................................................. Choosing a Different Skin or Layout ....................................................................................... How to Choose a Different Skin or Layout...................................................................... What Happens at Runtime ................................................................................................. Configuring a Default Skin and Layout for New Users and Guests................................... Modifying the Template for a Skin or Layout ........................................................................ About Dynamic Publishing................................................................................................ Altering the Anonymous User Interface ................................................................................. How to Alter the Anonymous User Interface.................................................................. What Happens at Runtime ................................................................................................. Changing the URL of the Login Page ...................................................................................... Creating and Publishing a New Layout .................................................................................. Optimizing the Use of Published Files .................................................................................... Bundling Files....................................................................................................................... Referencing Published Files ............................................................................................... 3-1 3-1 3-2 3-2 3-2 3-2 3-2 3-3 3-3 3-3 3-4 3-4 3-4 3-5 3-7 3-7 3-7 3-9 4 Creating Dynamic Server Pages 4.1 About Dynamic Server Pages.................................................................................................... 4.1.1 Page Types ............................................................................................................................ 4.1.1.1 IDOC File ....................................................................................................................... 4.1.1.2 HCST File....................................................................................................................... 4.1.1.3 HCSP File ....................................................................................................................... 4.1.1.4 HCSF File ....................................................................................................................... 4.2 Altering the Appearance and Navigation of Web Pages ...................................................... 4.2.1 Syntax .................................................................................................................................... 4.2.1.1 Idoc Script Expressions................................................................................................ 4.2.1.2 Comparison Operators ................................................................................................ 4.2.1.3 Special Characters......................................................................................................... 4.2.1.4 Referencing Metadata .................................................................................................. 4.2.2 Idoc Script Functions........................................................................................................... 4.2.2.1 docLoadResourceIncludes Function.......................................................................... 4.2.2.1.1 Requirements for Calling the docLoadResourceIncludes Function .............. 4.2.2.1.2 Parameters .............................................................................................................. iv 4-1 4-3 4-3 4-3 4-4 4-4 4-4 4-4 4-5 4-6 4-6 4-7 4-7 4-7 4-7 4-8 4.2.2.2 executeService Function .............................................................................................. 4-8 4.2.3 Development Recommendations ...................................................................................... 4-9 4.2.3.1 General Guidelines....................................................................................................... 4-9 4.2.3.2 HCSF Guidelines ....................................................................................................... 4-10 4.2.4 HCSF Pages........................................................................................................................ 4-10 4.2.4.1 Load Section ............................................................................................................... 4-10 4.2.4.1.1 HTML Declaration ............................................................................................. 4-11 4.2.4.1.2 The docLoadResourceIncludes Function........................................................ 4-11 4.2.4.1.3 Meta Element ...................................................................................................... 4-11 4.2.4.1.4 Variables and Includes ...................................................................................... 4-11 4.2.4.2 Data Section................................................................................................................ 4-11 4.2.4.2.1 Data Section Structure ....................................................................................... 4-11 4.2.4.2.2 The idcformrules Element................................................................................. 4-12 4.2.4.2.3 Metadata Elements............................................................................................. 4-13 4.2.4.2.4 Nested Elements ................................................................................................. 4-13 4.2.4.2.5 Referencing XML Elements............................................................................... 4-13 4.2.4.2.6 Form Elements .................................................................................................... 4-14 4.2.4.2.7 ResultSets............................................................................................................. 4-14 4.2.4.3 Form Section............................................................................................................... 4-17 4.2.4.3.1 Form Begin .......................................................................................................... 4-17 4.2.4.3.2 Form Properties .................................................................................................. 4-17 4.2.4.3.3 Form Fields.......................................................................................................... 4-17 4.2.4.3.4 Form Buttons....................................................................................................... 4-18 4.2.4.3.5 Form End ............................................................................................................. 4-18 4.3 Creating an IDOC File with Custom Includes for Dynamic Server Pages ...................... 4-19 4.4 Creating an HCST Page........................................................................................................... 4-19 4.5 Creating an HCSP Page........................................................................................................... 4-20 4.6 Creating an HCSF Page........................................................................................................... 4-20 4.6.1 Common Code for Forms ................................................................................................ 4-25 4.6.1.1 Retrieving File Information...................................................................................... 4-25 4.6.1.2 Referencing a File Extension .................................................................................... 4-25 4.6.1.3 Defining Form Information...................................................................................... 4-26 4.6.1.4 Defining Form Fields ................................................................................................ 4-26 4.6.1.5 Defining Hidden Fields ............................................................................................ 4-26 4.6.1.6 Submitting a Form..................................................................................................... 4-27 4.7 Verifying the Display of an HCST, HCSP, or HCSF Page in a Web Browser ................. 4-27 Part III Modifying the Functionality of Content Server 5 Changing System Settings 5.1 5.2 5.3 5.4 5.5 About Changing System Settings ............................................................................................. Changing System Settings Through the Admin Server ........................................................ Changing System Settings Through the System Properties Application ........................... Customizing the Library and System Home Page with the Web Layout Editor .............. Defining Security and Accounts for Users with the User Admin Application ................. 5-1 5-2 5-2 5-3 5-3 v 6 Changing Configuration Information 6.1 6.2 6.3 About Changing Configuration Information ......................................................................... 6-1 Changing Configurations with the Idoc Script Custom Scripting Language .................... 6-1 Changing Configurations with Development Tools and Technologies ............................. 6-2 7 Customizing Services 7.1 7.2 7.3 About Customizing Services ..................................................................................................... 7-1 Customizing Services for Communicating with Content Server......................................... 7-2 Customizing Services for Accessing the Database................................................................. 7-2 8 Generating Actions Menus 8.1 8.2 8.2.1 8.2.2 8.3 About Generating Actions Menus............................................................................................ Creating Display Tables ............................................................................................................. Headline View Tables ......................................................................................................... Thumbnail View Tables ...................................................................................................... Customizing Actions Menus ..................................................................................................... 8-1 8-2 8-2 8-4 8-4 Part IV Customizing Content Server with Components 9 Getting Started with Content Server Components 9.1 About Standard, System, and Custom Components............................................................. 9-1 9.1.1 Component Files Overview................................................................................................ 9-1 9.1.2 Using Components .............................................................................................................. 9-2 9.1.3 About Directories and Files................................................................................................ 9-4 9.1.3.1 HDA Files ...................................................................................................................... 9-4 9.1.3.1.1 Elements in HDA Files ......................................................................................... 9-5 9.1.3.1.2 The idccs_components.hda, idcibr_components.hda, or idcurm_components.hda File .............................................................................. 9-7 9.1.3.1.3 Component Definition Files................................................................................. 9-8 9.1.3.2 Custom Resource Files................................................................................................. 9-8 9.1.3.3 Data Binder.................................................................................................................... 9-9 9.1.3.3.1 LocalData ................................................................................................................ 9-9 9.1.3.3.2 ResultSets................................................................................................................ 9-9 9.1.3.3.3 Environment .......................................................................................................... 9-9 9.1.3.4 Manifest File .................................................................................................................. 9-9 9.1.3.5 Other Files................................................................................................................... 9-11 9.1.3.5.1 Customized Site Files......................................................................................... 9-11 9.1.3.5.2 Component ZIP File ........................................................................................... 9-11 9.1.3.5.3 Custom Installation Parameter Files................................................................ 9-12 9.1.3.6 Typical Directory Structure...................................................................................... 9-12 9.1.4 Development Recommendations ................................................................................... 9-12 9.1.4.1 Creating a Component.............................................................................................. 9-12 9.1.4.1.1 How to Create a Custom Component ............................................................. 9-12 9.1.4.2 Working with Component Files .............................................................................. 9-13 9.1.4.3 Using a Development Content Server .................................................................... 9-13 vi 9.1.4.4 Component File Organization ................................................................................. 9.1.4.5 Naming Conventions ................................................................................................ 9.2 Tools for Managing Components .......................................................................................... 9.2.1 Component Wizard .......................................................................................................... 9.2.2 Advanced Component Manager .................................................................................... 9.2.3 ComponentTool ................................................................................................................ 9.3 Component Files ...................................................................................................................... 9.3.1 The idc Product _components.hda File ......................................................................... 9.3.2 Components ResultSet ..................................................................................................... 9.3.3 Component Definition (Glue) File.................................................................................. 9.3.3.1 ResourceDefinition ResultSet .................................................................................. 9.3.3.1.1 ResourceDefinition ResultSet Columns .......................................................... 9.3.3.2 MergeRules ResultSet ............................................................................................... 9.3.3.2.1 MergeRules ResultSet Columns ....................................................................... 9.3.3.3 Filters ResultSet.......................................................................................................... 9.3.3.4 ClassAliases ResultSet .............................................................................................. 9.4 Resources for Assembling Web Pages .................................................................................. 9-14 9-15 9-15 9-15 9-16 9-18 9-18 9-18 9-19 9-19 9-20 9-21 9-22 9-22 9-23 9-23 9-24 10 Enabling and Disabling Components for Content Server 10.1 10.2 10.3 About Enabling and Disabling Components....................................................................... 10-1 Enabling a Component............................................................................................................ 10-1 Disabling a Component .......................................................................................................... 10-2 11 Updating Component Configurations 11.1 11.2 11.3 About Updating Component Configurations...................................................................... 11-1 Updating a Component Configuration with the Advanced Component Manager....... 11-2 Updating a Component Configuration Through the Configuration for instance Screen ......................................................................................................................................... 11-2 12 Customizing Content Tracker 12.1 About Content Tracker............................................................................................................ 12.1.1 Content Tracker and Content Tracker Reports ............................................................ 12.2 Content Tracker Components and Functions...................................................................... 12.2.1 DataBinder Dump Facility............................................................................................... 12.2.1.1 Values for the DataBinder Dump Facility.............................................................. 12.2.1.2 Location of the DataBinder Object Dump Files .................................................... 12.2.1.3 Names of the DataBinder Object Dump Files ....................................................... 12.2.2 Performance Optimization .............................................................................................. 12.2.3 Installation Considerations ............................................................................................. 12.3 Configuration and Customization......................................................................................... 12.3.1 Configuration Variables................................................................................................... 12.3.1.1 Access Control Lists and Content Tracker Reports Secure Mode ...................... 12.3.1.2 Values for the Security Checks Preference Variable ............................................ 12.3.1.3 File Types for Entries in the SctAccessLog ............................................................ 12.3.2 Manually Setting Content Tracker Configuration Variables ..................................... 12.3.3 External Users and Content Item Tracking................................................................... 12-1 12-2 12-2 12-2 12-3 12-3 12-3 12-4 12-4 12-4 12-4 12-7 12-8 12-8 12-8 12-9 vii 12.4 Service Call Configuration...................................................................................................... 12.4.1 About the Service Call Configuration File .................................................................... 12.4.1.1 General Service Call Logging ................................................................................ 12.4.1.2 Extended Service Call Tracking Function............................................................ 12.4.1.2.1 Service Call ResultSet Combinations............................................................. 12.4.1.2.2 General Purpose Columns in the Output Table .......................................... 12.4.1.3 Service Call Configuration File Contents............................................................. 12.4.1.4 ResultSet Examples ................................................................................................. 12.4.1.4.1 ServiceExtraInfo ResultSet Entries................................................................. 12.4.1.4.2 Linked Service Entries and Field Map ResultSets ....................................... 12.4.2 About the Content Tracker Logging Service .............................................................. 12.4.3 Managing Service Call Information ............................................................................. 12.4.3.1 Manually Editing the SctServiceFilter.hda File................................................... 12.4.3.2 Setting Required DataBinder Fields to Call the Content Tracker Logging Service ....................................................................................................................... 12.4.3.3 Calling the Content Tracker Logging Service from an Application ................ 12.4.3.4 Calling the Content Tracker Logging Service from Idoc Script........................ 12.4.4 Service Call Management and the User Interface ...................................................... 12.4.4.1 Adding, Editing, or Deleting Service Entries ...................................................... 12.4.4.2 Adding, Editing, or Deleting Field Map ResultSets ........................................... 12.5 Customizing Content Tracker .............................................................................................. 12.5.1 Activity Metrics SQL Queries ....................................................................................... 12.5.1.1 Customizing the Activity Metrics SQL Queries.................................................. 12.5.2 External Users and Content Item Tracking................................................................. 12.6 Web Beacon Functionality .................................................................................................... 12.6.1 Web Beacon Use Cases................................................................................................... 12.6.2 Web Beacon Overview ................................................................................................... 12.6.3 Web Beacon Object ......................................................................................................... 12.6.4 Web Beacon References ................................................................................................. 12.6.4.1 Format Structure for URL References .................................................................. 12.6.4.2 Placement and Retrieval Scheme .......................................................................... 12.6.4.3 Data Capture and Storage ...................................................................................... 12.6.5 Reduction Processing for Web Beacon References ................................................... 12.6.6 Limitations and Guidelines ........................................................................................... 12.6.6.1 Limitations................................................................................................................ 12.6.6.2 Guidelines................................................................................................................. 12.6.7 Examples of Web Beacon Embedding ......................................................................... 12.6.7.1 Embedded HTML Example ................................................................................... 12.6.7.2 Embedded JavaScript Example ............................................................................. 12.6.7.3 Served JavaScript Example .................................................................................... 12-9 12-9 12-10 12-10 12-11 12-11 12-12 12-13 12-14 12-14 12-15 12-16 12-16 12-17 12-18 12-18 12-18 12-19 12-19 12-21 12-21 12-21 12-22 12-22 12-23 12-23 12-24 12-25 12-25 12-26 12-26 12-27 12-27 12-28 12-28 12-29 12-29 12-30 12-32 13 Customizing Content Categorizer 13.1 13.2 viii About Content Categorizer .................................................................................................... 13-1 Customizing Content Categorizer......................................................................................... 13-1 14 Downloading Custom Components 14.1 14.2 14.3 About Downloading Custom Components ......................................................................... 14-1 Downloading a Component with the Advanced Component Manager ......................... 14-1 Downloading a Component from Oracle Technology Network ...................................... 14-2 15 Creating Custom Components 15.1 About Creating Custom Components .................................................................................. 15.2 Creating Resources for a Component ................................................................................... 15.2.1 HTML Includes ................................................................................................................. 15.2.1.1 The Super Tag ............................................................................................................ 15.2.1.2 Editing an HTML Include Resource ....................................................................... 15.2.2 Dynamic Data Tables ....................................................................................................... 15.2.2.1 Specifying Table Formats ......................................................................................... 15.2.2.2 Editing a Dynamic Data Table Resource................................................................ 15.2.2.3 Specifying Table Properties...................................................................................... 15.2.2.3.1 Merge Properties ................................................................................................ 15.2.2.3.2 Assembly Properties .......................................................................................... 15.2.2.3.3 Sort Properties..................................................................................................... 15.2.2.3.4 Filter and Include Properties ............................................................................ 15.2.2.4 Using Dynamicdata Idoc Script Functions .......................................................... 15.2.3 String Resources.............................................................................................................. 15.2.3.1 String Parameters .................................................................................................... 15.2.3.2 Editing a String Resource ....................................................................................... 15.2.4 Dynamic Tables............................................................................................................... 15.2.4.1 Merge Rules for Dynamic Tables .......................................................................... 15.2.4.2 Editing a Dynamic Table Resource ....................................................................... 15.2.5 Static Tables ..................................................................................................................... 15.2.5.1 Merge Rules for Static Tables................................................................................. 15.2.5.2 Editing a Static Table Resource ............................................................................. 15.2.6 Queries ............................................................................................................................. 15.2.6.1 Query Example ........................................................................................................ 15.2.6.2 Editing a Query Resource....................................................................................... 15.2.7 Services............................................................................................................................. 15.2.7.1 Service Example....................................................................................................... 15.2.7.1.1 Attributes........................................................................................................... 15.2.7.1.2 Actions ............................................................................................................... 15.2.7.2 Editing a Service Resource ..................................................................................... 15.2.8 Templates......................................................................................................................... 15.2.8.1 Template and Report Pages ................................................................................... 15.2.8.1.1 Template Page Example .................................................................................. 15.2.8.1.2 Report Page Example....................................................................................... 15.2.8.2 Editing a Template Resource ................................................................................. 15.2.9 Environment Resources ................................................................................................. 15.2.9.1 Environment Resource Example ........................................................................... 15.2.9.2 Editing an Environment Resource ........................................................................ 15-1 15-1 15-2 15-2 15-3 15-3 15-3 15-5 15-5 15-6 15-7 15-8 15-9 15-10 15-10 15-12 15-13 15-13 15-14 15-14 15-14 15-14 15-14 15-14 15-15 15-16 15-16 15-19 15-20 15-21 15-24 15-24 15-27 15-27 15-28 15-30 15-31 15-31 15-32 ix 15.3 15.4 Creating a Component Definition File................................................................................ 15-32 Restarting Content Server to Apply a Component ........................................................... 15-33 16 Installing Components 16.1 16.2 16.3 16.4 16.5 About Installing Components................................................................................................ Packaging a Component for Installation .............................................................................. Installing a Component with the Advanced Component Manager ................................. Installing a Component with the Component Wizard....................................................... Installing a Component with the ComponentTool Utility................................................. 16-1 16-2 16-2 16-3 16-3 17 Uninstalling a Component 17.1 17.2 About Uninstalling a Component ......................................................................................... 17-1 How to Uninstall a Component............................................................................................. 17-1 Part V Integrating WebCenter Content into Your Environment 18 Getting Started with Integrating WebCenter Content into Your Environment 18.1 About Integration Methods .................................................................................................... 18.2 Overview of Web Services...................................................................................................... 18.3 Virtual Folders and WebDAV Integration ........................................................................... 18.3.1 Virtual Folders................................................................................................................... 18.3.2 WebDAV Integration ....................................................................................................... 18.3.2.1 WebDAV Clients ....................................................................................................... 18.3.2.2 WebDAV Servers....................................................................................................... 18.3.2.3 WebDAV Architecture.............................................................................................. 18-1 18-2 18-3 18-3 18-4 18-4 18-4 18-5 19 Configuring WebCenter Content Web Services for Integration 19.1 About Configuring WebCenter Content Web Services for Integration ........................... 19.1.1 WebCenter Content Web Services.................................................................................. 19.2 Configuring Web Service Security Through Web Service Policies................................... 19.2.1 Configuring WS-Security through WS-Policy.............................................................. 19.3 Configuring SAML Support................................................................................................... 19.3.1 Configuring a Keystore.................................................................................................... 19.3.2 Configuring JPS for WebCenter Content to Use the Keystore................................... 19.3.3 Creating a Client CSF ....................................................................................................... 19.3.4 Configuring a Java Client to Use the Keystore and CSF............................................. 19-1 19-3 19-4 19-4 19-5 19-5 19-5 19-6 19-7 20 Integrating JavaServer Pages with Content Server 20.1 About JSP Integration.............................................................................................................. 20-1 20.1.1 JSP Execution..................................................................................................................... 20-1 20.1.2 Tomcat ................................................................................................................................ 20-2 20.1.3 Features .............................................................................................................................. 20-2 20.2 Configuring JSP Support ........................................................................................................ 20-3 20.3 Loading Example Pages .......................................................................................................... 20-3 x 21 Using the IdcCommand Utility to Access Content Server 21.1 About the IdcCommand Utility............................................................................................. 21.2 Setting Up IdcCommand ........................................................................................................ 21.2.1 Specifying a Command File ............................................................................................ 21.2.1.1 Command File Syntax............................................................................................... 21.2.1.2 Precedence .................................................................................................................. 21.2.1.3 Special Tags and Characters .................................................................................... 21.2.2 Specifying Configuration Options ................................................................................. 21.2.2.1 Command File............................................................................................................ 21.2.2.2 User.............................................................................................................................. 21.2.2.3 Log File........................................................................................................................ 21.2.2.4 Connection Mode ...................................................................................................... 21.3 Running IdcCommand............................................................................................................ 21.4 Using the Launcher.................................................................................................................. 21.4.1 Quotation Rules ................................................................................................................ 21.4.2 Computed Settings ........................................................................................................... 21.4.3 Launcher Environment Variables ................................................................................ 21.4.4 User Interface .................................................................................................................. 21.4.5 Configuring the Launcher ............................................................................................. 21.4.6 Configuration File Example .......................................................................................... 21.5 Calling Services Remotely .................................................................................................... 21-1 21-2 21-2 21-2 21-3 21-4 21-4 21-4 21-4 21-5 21-5 21-5 21-6 21-7 21-7 21-10 21-11 21-11 21-11 21-14 22 Using the COM API for Integration 22.1 About the COM API ................................................................................................................ 22.2 Calling Content Server Services with the IntradocClient OCX component.................... 22.2.1 OCX Interface .................................................................................................................... 22.2.2 IdcClient OCX Description.............................................................................................. 22.2.2.1 OCX Events ................................................................................................................ 22.2.2.2 OCX Methods............................................................................................................. 22.2.2.3 OCX Properties .......................................................................................................... 22.2.2.4 IdcClient OCX Interface............................................................................................ 22.2.3 IdcClient OCX Control Setup.......................................................................................... 22.2.3.1 Setting Up the IdcClient OCX Component............................................................ 22.2.3.2 Creating a Visual Interface....................................................................................... 22.2.4 IdcClient Events .............................................................................................................. 22.2.4.1 IntradocBeforeDownload ....................................................................................... 22.2.4.2 IntradocBrowserPost............................................................................................... 22.2.4.3 IntradocBrowserStateChange ................................................................................ 22.2.4.4 IntradocRequestProgress........................................................................................ 22.2.4.5 IntradocServerResponse ......................................................................................... 22.2.5 IdcClient OCX Methods................................................................................................. 22.2.5.1 AboutBox .................................................................................................................. 22.2.5.2 Back............................................................................................................................ 22.2.5.3 CancelRequest.......................................................................................................... 22.2.5.4 DoCheckoutLatestRev ............................................................................................ 22.2.5.5 DownloadFile........................................................................................................... 22-1 22-1 22-2 22-2 22-3 22-3 22-3 22-4 22-4 22-4 22-4 22-13 22-13 22-14 22-14 22-14 22-14 22-15 22-16 22-16 22-16 22-16 22-17 xi 22.2.5.6 DownloadNativeFile............................................................................................... 22.2.5.7 Drag ........................................................................................................................... 22.2.5.8 EditDocInfoLatestRev ............................................................................................. 22.2.5.9 Forward..................................................................................................................... 22.2.5.10 GoCheckinPage........................................................................................................ 22.2.5.11 Home ......................................................................................................................... 22.2.5.12 InitiateFileDownload .............................................................................................. 22.2.5.13 InitiatePostCommand ............................................................................................. 22.2.5.14 Move .......................................................................................................................... 22.2.5.15 Navigate.................................................................................................................... 22.2.5.16 NavigateCgiPage ..................................................................................................... 22.2.5.17 Refresh Browser....................................................................................................... 22.2.5.18 SendCommand ........................................................................................................ 22.2.5.19 SendPostCommand................................................................................................. 22.2.5.20 SetFocus .................................................................................................................... 22.2.5.21 ShowDMS ................................................................................................................. 22.2.5.22 ShowDocInfoLatestRev .......................................................................................... 22.2.5.23 ShowWhatsThis ....................................................................................................... 22.2.5.24 StartSearch ................................................................................................................ 22.2.5.25 Stop ............................................................................................................................ 22.2.5.26 UndoCheckout ......................................................................................................... 22.2.5.27 ViewDocInfo............................................................................................................. 22.2.5.28 ViewDocInfoLatestRev ........................................................................................... 22.2.5.29 ZOrder....................................................................................................................... 22.2.6 IdcClient Properties........................................................................................................ 22.2.6.1 ClientControlledContextValue .............................................................................. 22.2.6.2 HostCgiUrl ............................................................................................................... 22.2.6.3 Password................................................................................................................... 22.2.6.4 UseBrowserLoginPrompt....................................................................................... 22.2.6.5 UseProgressDialog .................................................................................................. 22.2.6.6 UserName ................................................................................................................. 22.2.6.7 Working Directory................................................................................................... 22.3 Using the ODMA API to Access Content Server from a Desktop Application ............ 22.3.1 ODMA Client .................................................................................................................. 22.3.2 ODMA Interfaces ............................................................................................................ 22-17 22-18 22-18 22-19 22-19 22-20 22-20 22-21 22-21 22-21 22-22 22-22 22-22 22-23 22-23 22-23 22-24 22-24 22-24 22-24 22-25 22-25 22-25 22-26 22-26 22-26 22-27 22-27 22-27 22-27 22-27 22-27 22-28 22-28 22-28 23 Using RIDC to Access Content Server 23.1 23.1.1 23.2 23.3 23.4 23.5 23.6 23.7 23.8 xii About Remote Intradoc Client (RIDC) ................................................................................. Using HttpClient Library Version 4............................................................................... Initializing Connections .......................................................................................................... Configuring Clients ................................................................................................................. Authenticating Users............................................................................................................... Using Services......................................................................................................................... Understanding Connection Pooling.................................................................................... Understanding Streams ........................................................................................................ Understanding Binders ......................................................................................................... 23-1 23-3 23-4 23-5 23-9 23-10 23-11 23-11 23-12 23.9 Understanding Convenience Classes.................................................................................. 23.9.1 Setting User Security ...................................................................................................... 23.9.2 Setting the ADF Connection Facade ............................................................................ 23.10 Understanding RIDC Filters................................................................................................. 23.11 Using the RIDC JDeveloper Extension ............................................................................... 23.11.1 Deploying the RIDC Extension..................................................................................... 23.11.2 Creating a New Application and Project with RIDC Technologies ........................ 23.11.3 Working with Connections ........................................................................................... 23.11.4 Example Service Call...................................................................................................... 23-13 23-13 23-15 23-17 23-18 23-18 23-19 23-20 23-21 24 Using the Content Server JCR Adapter 24.1 24.1.1 24.1.2 24.2 24.2.1 24.2.2 24.2.3 24.2.4 24.2.5 24.3 24.4 24.4.1 24.4.2 24.4.3 24.4.4 24.4.5 24.4.6 24.5 24.6 24.7 About the Java Content Repository Adapter....................................................................... JCR Data Model................................................................................................................. JCR Adapter Data Model for Content Server .............................................................. Installing Required APIs and Runtime Libraries ................................................................ Installing ADF Runtime Libraries .................................................................................. Deploying Remote Intradoc Client (RIDC)................................................................... Deploying the JCR API .................................................................................................... Installing the JCR Integration Libraries......................................................................... Installing the XML Integration Files .............................................................................. Deploying the JCR Adapter.................................................................................................... Configuring Communication with Content Server ............................................................ Supplying a Communication Method ........................................................................... Configuring Socket Communication (Listener Port)................................................... Configuring Secure Socket Communication (SSL) ...................................................... Configuring Web Communication (Web Server Filter) .............................................. Configuring the User Agent............................................................................................ Supplying Cache Settings ................................................................................................ Finding Information About a Content Item......................................................................... Using a Search Index ............................................................................................................... Using the File Store Provider ................................................................................................. 24-1 24-2 24-2 24-4 24-4 24-4 24-4 24-5 24-5 24-5 24-5 24-6 24-6 24-6 24-7 24-7 24-7 24-7 24-9 24-9 25 Configuring Web Services with WSDL, SOAP, and the WSDL Generator 25.1 About Configuring Web Services with WSDL, SOAP, and the WSDL Generator......... 25.1.1 Web Services Framework ................................................................................................ 25.1.1.1 XML Data.................................................................................................................... 25.1.1.2 WSDL Interface .......................................................................................................... 25.1.1.3 SOAP Communication.............................................................................................. 25.1.1.4 UDDI Registry............................................................................................................ 25.1.1.5 DIME Message Format ............................................................................................. 25.1.1.6 How the Enabling Technologies Work Together.................................................. 25.1.1.7 Implementation Architecture .................................................................................. 25.1.1.8 Implementation on .NET .......................................................................................... 25.1.1.9 The SOAP Protocol.................................................................................................... 25.2 Accessing Content Server with a SOAP Client.................................................................... 25.2.1 Using a Java SOAP Client................................................................................................ 25-1 25-2 25-2 25-2 25-3 25-3 25-3 25-3 25-4 25-4 25-5 25-5 25-5 xiii 25.3 Calling Content Server Services with SOAP........................................................................ 25.3.1 SOAP Packet Format ........................................................................................................ 25.3.1.1 HTTP Headers............................................................................................................ 25.3.1.2 Namespaces................................................................................................................ 25.3.1.3 Nodes........................................................................................................................... 25.3.1.3.1 Service Node ....................................................................................................... 25.3.1.3.2 Document Node ................................................................................................. 25.3.1.3.3 User Node............................................................................................................ 25.3.1.3.4 Optionlist Node .................................................................................................. 25.3.1.3.5 Option Subnode in an IDC Optionlist Node .................................................. 25.3.1.3.6 Resultset Subnode .............................................................................................. 25.3.1.3.7 Row Subnode ...................................................................................................... 25.3.1.3.8 Field Subnode ..................................................................................................... 25.3.2 Special Characters........................................................................................................... 25.3.3 Sample Service Calls with SOAP Response/Request ............................................... 25.3.3.1 Ping the Server ......................................................................................................... 25.3.3.1.1 Required Parameters........................................................................................ 25.3.3.1.2 SOAP Request ................................................................................................... 25.3.3.1.3 Response ............................................................................................................ 25.3.3.2 Add a New User ...................................................................................................... 25.3.3.2.1 Required Parameters........................................................................................ 25.3.3.2.2 Optional Parameters ........................................................................................ 25.3.3.2.3 Optional Attribute Information...................................................................... 25.3.3.2.4 SOAP Request ................................................................................................... 25.3.3.2.5 Response ............................................................................................................ 25.3.3.3 Edit Existing User .................................................................................................... 25.3.3.3.1 Required Parameters........................................................................................ 25.3.3.3.2 Optional Parameters ........................................................................................ 25.3.3.3.3 Optional Attribute Information...................................................................... 25.3.3.3.4 SOAP Request ................................................................................................... 25.3.3.3.5 Response ............................................................................................................ 25.3.3.4 Get User Information .............................................................................................. 25.3.3.4.1 Required Parameters........................................................................................ 25.3.3.4.2 SOAP Request ................................................................................................... 25.3.3.4.3 Response ............................................................................................................ 25.3.3.5 Delete User ............................................................................................................... 25.3.3.5.1 Required Parameters........................................................................................ 25.3.3.5.2 SOAP Request ................................................................................................... 25.3.3.5.3 Response ............................................................................................................ 25.3.3.6 Check In Content Item ............................................................................................ 25.3.3.6.1 Required Parameters........................................................................................ 25.3.3.6.2 Additional Parameters..................................................................................... 25.3.3.6.3 Optional Parameters ........................................................................................ 25.3.3.6.4 SOAP Request ................................................................................................... 25.3.3.6.5 Response ............................................................................................................ xiv 25-6 25-6 25-6 25-6 25-7 25-7 25-8 25-8 25-8 25-9 25-9 25-9 25-9 25-10 25-11 25-11 25-12 25-12 25-12 25-12 25-13 25-13 25-13 25-14 25-14 25-15 25-16 25-16 25-16 25-17 25-17 25-18 25-18 25-18 25-19 25-20 25-20 25-20 25-20 25-21 25-22 25-22 25-23 25-23 25-24 25.3.3.7 Check out Content Item.......................................................................................... 25.3.3.7.1 Required Parameters........................................................................................ 25.3.3.7.2 Optional Parameters ........................................................................................ 25.3.3.7.3 SOAP Request ................................................................................................... 25.3.3.7.4 Response ............................................................................................................ 25.3.3.8 Undo Content Item Checkout................................................................................ 25.3.3.8.1 Required Parameters........................................................................................ 25.3.3.8.2 Optional Parameters ........................................................................................ 25.3.3.8.3 SOAP Request ................................................................................................... 25.3.3.8.4 Response ............................................................................................................ 25.3.3.9 Get Content Item Information ............................................................................... 25.3.3.9.1 Required Parameters........................................................................................ 25.3.3.9.2 SOAP Request ................................................................................................... 25.3.3.9.3 Response ............................................................................................................ 25.3.3.10 Get File ...................................................................................................................... 25.3.3.10.1 Required Parameters........................................................................................ 25.3.3.10.2 Optional Parameter .......................................................................................... 25.3.3.10.3 SOAP Request ................................................................................................... 25.3.3.10.4 Response ............................................................................................................ 25.3.3.11 Get Search Results ................................................................................................... 25.3.3.11.1 Required Parameters........................................................................................ 25.3.3.11.2 Optional Parameters ........................................................................................ 25.3.3.11.3 SOAP Request ................................................................................................... 25.3.3.11.4 Response ............................................................................................................ 25.3.3.12 Get Table Data.......................................................................................................... 25.3.3.12.1 Required Parameters........................................................................................ 25.3.3.12.2 SOAP Request ................................................................................................... 25.3.3.12.3 Response ............................................................................................................ 25.3.3.13 Get Criteria Workflow Information ...................................................................... 25.3.3.13.1 Required Parameters........................................................................................ 25.3.3.13.2 SOAP Request ................................................................................................... 25.3.3.13.3 Response ............................................................................................................ 25.4 Using SOAP Packets in Active Server Pages ..................................................................... 25.4.1 Sample SOAP Request ................................................................................................... 25.4.2 Sample Active Server Page............................................................................................ 25.5 Generating WSDL Files to Access WebCenter Content ................................................... 25.5.1 Understanding WSDL Files........................................................................................... 25.5.1.1 WSDL File Structure................................................................................................ 25.5.1.1.1 Data Type .......................................................................................................... 25.5.1.1.2 Message.............................................................................................................. 25.5.1.1.3 Port Type ........................................................................................................... 25.5.1.1.4 Binding............................................................................................................... 25.5.1.1.5 Service and Port................................................................................................ 25.5.2 Sample WSDL File .......................................................................................................... 25.5.3 Generating WSDL Files.................................................................................................. 25.5.4 Generating Proxy Class from WSDL Files .................................................................. 25.6 Customizing WSDL Files...................................................................................................... 25-25 25-25 25-25 25-26 25-26 25-27 25-27 25-27 25-28 25-28 25-29 25-29 25-29 25-29 25-30 25-31 25-32 25-32 25-32 25-34 25-34 25-34 25-35 25-35 25-37 25-37 25-37 25-37 25-38 25-38 25-39 25-39 25-40 25-40 25-41 25-44 25-44 25-44 25-45 25-45 25-45 25-45 25-46 25-46 25-49 25-50 25-50 xv 26 Customizing the DesktopTag Component 26.1 About the DesktopTag Component ...................................................................................... 26.2 Enabling the DesktopTag and OracleCleanContent Components ................................... 26.3 Checking Out and Checking In Content Items with DesktopTag .................................... 26.3.1 File Get Operation............................................................................................................. 26.3.2 File Check-In Operation................................................................................................... 26.4 Adding Properties to Checked-Out Content Items ............................................................ 26.4.1 Viewing Custom Properties ............................................................................................ 26.4.2 Checking In Documents from Outside Content Server .............................................. 26.5 Configuring the DesktopTag Component............................................................................ 26.5.1 DesktopTagFormats Property......................................................................................... 26.5.2 DesktopTagPrefix Property............................................................................................. 26.5.3 DesktopTagFields Property............................................................................................. 26.5.4 DesktopTagPrefixCustom Property............................................................................... 26.5.5 DesktopTagFieldsCustom Property............................................................................... 26.5.6 DesktopTagPrefixExtended Property............................................................................ 26.5.7 DesktopTagFieldsExtended Property............................................................................ 26.5.8 DefaultTaskPaneUrl Property......................................................................................... 26.5.9 DesktopTagLog Property ................................................................................................ 26.5.10 DesktopTagFormatsExclude Property .......................................................................... Part VI 26-1 26-2 26-2 26-2 26-2 26-3 26-4 26-5 26-6 26-6 26-6 26-7 26-7 26-7 26-8 26-8 26-8 26-9 26-9 Appendices A Troubleshooting A.1 A.2 A.3 A.4 Index xvi About Troubleshooting Aids.................................................................................................... Viewing Server Errors ............................................................................................................... Viewing Page Data .................................................................................................................... Monitoring Resource Loading ................................................................................................. A-1 A-1 A-1 A-2 Preface Oracle WebCenter Content Server is highly functional out of the box, but you can tailor it to your site requirements in many different ways. This developer’s guide provides information to help you customize your Content Server instance. Audience This guide is intended for developers and administrators who want to customize Oracle WebCenter Content Server software to suit content management needs that are specific to their business or organization. Documentation Accessibility For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc. Access to Oracle Support Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired. Related Documents For more information, see the following Oracle WebCenter Content 11g Release 1 (11.1.1) documents, which are part of the Oracle Fusion Middleware documentation set: ■ Oracle WebCenter Content Application Administrator's Guide for Content Server ■ Oracle WebCenter Content Idoc Script Reference Guide ■ Oracle WebCenter Content Remote Intradoc Client (RIDC) Java API Reference ■ Oracle WebCenter Content Services Reference Guide ■ Oracle WebCenter Content System Administrator's Guide for Content Server xvii For additional information, also see the following Oracle Fusion Middleware 11g Release 1 (11.1.1) documents: ■ ■ ■ ■ Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework Oracle Fusion Middleware Getting Started With JAX-WS Web Services for Oracle WebLogic Server Oracle Fusion Middleware Interoperability Guide for Oracle Web Services Manager Oracle Fusion Middleware Programming Advanced Features of JAX-WS Web Services for Oracle WebLogic Server ■ Oracle Fusion Middleware Security and Administrator's Guide for Web Services ■ Oracle Fusion Middleware Third-Party Application Server Guide Conventions This document uses the following text conventions. xviii Convention Meaning boldface Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary. italic Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values. monospace Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter. New and Changed Features This section introduces the new and changed features of Oracle WebCenter Content that are covered in this guide for Oracle WebCenter Content Server developers. New Features for 11g Release 1 (11.1.1) 11g Release 1 (11.1.1) includes the following new features: ■ ■ This guide combines information that was previously contained in the following documents: – Dynamic Server Pages Guide – Getting Started with the Stellent Developer’s Kit (SDK) – Idc Command Reference Guide – Modifying the Content Server Interface – Oracle Fusion Middleware JCR Adapter Guide for Content Server – Oracle Fusion Middleware Developer's Guide for Remote Intradoc Client (RIDC) – Using WSDL Generator and SOAP – Working with Components Web services WebCenter Content uses Oracle WebLogic Server web services. For more information, see Chapter 19, "Configuring WebCenter Content Web Services for Integration." ■ ComponentTool The ComponentTool utility has been added to provide a command-line tool for installing, enabling, and disabling components. For more information, see Chapter 9, "Getting Started with Content Server Components." ■ Oracle WebCenter Content Server deployment: Content Server is deployed with WebCenter Content to an Oracle WebLogic Server domain, which means changes in configuring and administering Content Server. For more information, see the Oracle WebCenter Content System Administrator's Guide for Content Server. xix Changed Features for 11g Release 1 (11.1.1) 11g Release 1 (11.1.1) includes the following changes: ■ ■ ■ ■ ■ xx Oracle WebCenter Content directories and files: WebCenter Content 11g Release 1 (11.1.1) is provided as part of a full media installation of Oracle WebCenter Content, with the WebCenter Content directories and files. The directory structure for a WebCenter Content 11g instance is different from an Oracle Universal Content Management 10g instance. For a description of terms and path names that are important for understanding and working with the WebCenter Content structure, see Section 1.1.1.1, "Terminology for WebCenter Content Directories." SOAP: SOAP is provided with Oracle WebLogic Server, not in Oracle WebCenter Content. Web Form Editor: The Web Form Editor user interface and FCKEditor are not supported. CIS deprecated: Content Integration Suite (CIS) has been deprecated. Developers and system integrators are directed to use Remote Intradoc Client (RIDC), which provides a thin communication API for communication with Oracle WebCenter Content Server. For details, see the Oracle WebCenter Content Remote Intradoc Client (RIDC) Java API Reference. For more information, see Section 23, "Using RIDC to Access Content Server." Oracle Enterprise Content Management Suite (Oracle ECM) is now part of the Oracle WebCenter product stack to provide the most complete, open, and unified enterprise content management platform. The Oracle WebCenter Content Server software and documentation have been rebranded accordingly. Part I Part I Getting Started with Customizing Oracle WebCenter Content Server This part provides an overview of customizing Oracle WebCenter Content Server customization and describes the tools and resources that are available for customization. This part also describes the Oracle Fusion Order Demo sample application. Part I contains the following chapters: ■ Chapter 1, "Introduction to Oracle WebCenter Content Server" ■ Chapter 2, "Introduction to the Oracle Fusion Order Demo Sample Application" 1 Introduction to Oracle WebCenter Content Server 1 This chapter provides an overview of Oracle WebCenter Content Server and describes the tools you need and the resources available for customization. This chapter includes the following sections: ■ Section 1.1, "Overview of Content Server Architecture" ■ Section 1.2, "Customization Types" ■ Section 1.3, "Customization Planning" ■ Section 1.4, "Recommended Skills and Tools for Customizing Content Server" ■ Section 1.5, "Content Server Behavior" For information about troubleshooting aids, see Appendix A, "Troubleshooting." 1.1 Overview of Content Server Architecture Before beginning a customization project, you need to understand the architecture of Content Server and how it works. To create a customization efficiently and effectively, you should have an understanding of the Oracle WebCenter Content directories and files, available resources, and Content Server behavior. The web user interface for WebCenter Content, Content Server is deployed as an application to an Oracle WebLogic Server domain. For information about how Content Server works, see Section 1.5, "Content Server Behavior." Content Server can also be deployed to an IBM WebSphere Application Server. For more information, see "Managing Oracle WebCenter Content on IBM WebSphere" in the Oracle Fusion Middleware Third-Party Application Server Guide. 1.1.1 WebCenter Content Directories and Files When you create custom components or dynamic server pages, you work primarily with WebCenter Content files in these directories: ■ bin ■ config ■ components ■ resources ■ weblayout Introduction to Oracle WebCenter Content Server 1-1 Overview of Content Server Architecture Caution: Modifying the default variables in these files can cause WebCenter Content to malfunction. For more information about configuration variables, see the Oracle WebCenter Content Idoc Script Reference Guide. 1.1.1.1 Terminology for WebCenter Content Directories Oracle WebCenter Content documentation uses the following terms when referring to variables in the directories associated with the Oracle WebCenter Content installation, configuration, and deployment: ■ ■ ■ ■ IdcHomeDir: This variable refers to the ucm/idc directory in the WebCenter Content Oracle home, where the WebCenter Content server media is located. The server media can run Oracle WebCenter Content Server, Oracle WebCenter Content: Inbound Refinery, or Oracle WebCenter Content: Records. This is essentially a read-only directory. The default location is WC_CONTENT_ORACLE_ HOME/ucm/idc. The variable portion of the default location can be changed, but the path cannot be changed from ucm/idc. DomainHome: The user-specified directory where an Oracle WebCenter Content application is deployed to run on an application server. The DomainHome/ucm/short-product-id/bin directory contains the intradoc.cfg file and executables. The default location for DomainHome is MW_ HOME/user_projects/domains/base_domain, but you can change the path and domain name (base_domain) during the deployment of an Oracle WebCenter Content application to an application server. short-product-id: An abbreviated name for the type of Oracle WebCenter Content application deployed to an application server. This name is used as the context root (default HttpRelativeWebRoot configuration value). Possible values follow: ■ cs (Content Server) ■ ibr (Inbound Refinery) ■ urm (Records) IntradocDir: The root directory for configuration and data files specific to a Content Server instance that is part of an Oracle WebCenter Content application deployed to an application server. This Idoc Script variable is configured for one type of Content Server instance: Content Server (cs), Inbound Refinery (ibr), or Records (urm). The default location of IntradocDir is DomainHome/ucm/short-product-id, but the IntradocDir directory can be located elsewhere (as defined in the intradoc.cfg file). The specified directory must be an absolute path to the instance directory and must be unique to a particular server or node. The directory files include startup files (intradoc.cfg and executables). 1.1.1.2 The bin Directory The bin directory is the root directory for Content Server startup files. It contains the intradoc.cfg file and the executable files that run Content Server services, applets, and utilities. It is located at DomainHome/ucm/short-product-id/bin, in which short-product-id specifies whether it is for Content Server (cs), Inbound Refinery (ibr), or Records (urm). Table 1–1 describes the contents of the bin directory. 1-2 Oracle WebCenter Content Developer's Guide for Content Server Overview of Content Server Architecture Table 1–1 Contents of the bin Directory for Startup Files Element Description Executables Services ■ IdcServer ■ IdcServerNT Applet ■ IntradocApp (launches all Admin tools) Utilities intradoc.cfg file ■ BatchLoader ■ Installer ■ IdcAnalyze ■ ComponentWizard ■ SystemProperties ■ IdcCommand Configuration file that contains the settings for Content Server services, applets, and utilities If Content Server is set up as an automatic service and you attempt to start a Content Server service (IdcServer or IdcServerNT) from the command line, you will receive an error message: The port could not be listened to and is already is use. Note: The intradoc.cfg file is used to define system variables for Content Server, including directory, Internet, and Inbound Refinery settings. Several of these variables can be set using the WebCenter Content System Properties utility. Example 1–1 shows a typical intradoc.cfg file. Example 1–1 intradoc.cfg File #Content Server Directory Variables IntradocDir=C:/oracle/idcm1/ WebBrowserPath=C:/Program Files/Internet Explorer/iexplore.exe CLASSPATH=$COMPUTEDCLASSPATH;$SHAREDDIR/classes/jtds.jar #Additional Variables HTMLEditorPath=C:/Program Files/Windows XP/Accessories/wordpad.exe JAVA_SERVICE_EXTRA_OPTIONS=-Xrs 1.1.1.3 The config Directory The config directory is located at IntradocDir/config. The default location of IntradocDir is DomainHome/ucm/short-product-id, but the IntradocDir directory can be located elsewhere (as defined in the intradoc.cfg file). Table 1–2 describes the contents of the config directory. Table 1–2 Contents of the config Directory File Description config.cfg Defines system configuration variables. Introduction to Oracle WebCenter Content Server 1-3 Overview of Content Server Architecture The config.cfg file is used to define global variables for the Content Server system. Several of these variables can be set using the WebCenter Content System Properties utility or by modifying the variables on the Admin Server General Configuration page. Example 1–2 shows a typical config.cfg file. Example 1–2 config.cfg File #Content Server System Properties IDC_Name=idcm1 SystemLocale=English-US InstanceMenuLabel=JeanWTestSystem InstanceDescription=idcm1 SocketHostAddressSecurityFilter=127.0.0.1|10.10.1.14 #Database Variables IsJdbc=true JdbcDriver=com.internetcds.jdbc.tds.Driver JdbcConnectionString=jdbc:freetds:sqlserver://jwilsonnote:1433/oracle1;charset=UTF 8;TDS=7.0 JdbcUser=sa JdbcPassword=UADle/+jRz7Fi8D/VzTDaGUCwUaQgQjKOQQEtI0PAqA= JdbcPasswordEncoding=Intradoc DatabasePreserveCase=0 #Internet Variables HttpServerAddress=jwilsonnote MailServer=mail.example.com SysAdminAddress=sysadmin@example.com SmtpPort=25 HttpRelativeWebRoot=/oracle/ CgiFileName=idcplg UseSSL=No WebProxyAdminServer=true NtlmSecurityEnabled=No UseNtlm=Yes #General Option Variables EnableDocumentHighlight=true EnterpriseSearchAsDefault=0 IsDynamicConverterEnabled=0 IsJspServerEnabled=0 JspEnabledGroups= #IdcRefinery Variables #Additional Variables WebServer=iis UseAccounts=true IdcAdminServerPort=4440 SearchIndexerEngineName=DATABASE VIPApproval:isRepromptLogin=true Vdk4AppSignature=SF37-432B-222T-EE65-DKST Vdk4AppName=INTRANET INTEGRATION GROUP IntradocServerPort=4444 1-4 Oracle WebCenter Content Developer's Guide for Content Server Overview of Content Server Architecture 1.1.1.4 The components Directory The IntradocDir/data/components directory contains the files that Content Server uses to configure system components. Table 1–3 describes the contents of the components directory. Table 1–3 Contents of the data/components Directory File Description idcshort-product-id_ components.hda Identifies components that have been added to the Content Server system and whether they are enabled or disabled. Example: idccs_components.hda. component.hda Identifies the configuration status for a component. Example 1–3 shows a component.hda file that defines the configuration status for a component called help. Example 1–3 component.hda File @Properties LocalData blDateFormat=M/d{/yy} {h:mm[:ss] {aa}[zzz]}!tAmerica/Chicago!mAM,PM @end @ResultSet Components 2 name location help components/help/help.hda @end 1.1.1.5 The resources Directory The IdcHomeDir/resources directory contains two directories: admin and core. The resources/core directory contains files that Content Server uses to assemble web pages. Table 1–4 describes the subdirectories of the resources/core directory. Table 1–4 Contents of the resources/core Directory Subdirectory Description config Holds base configuration files for Content Server. idoc Holds IdocScript dynamichtml and dynamicdata definitions. install Holds files that are used by the installer and related applications. javascript Holds files that are processed by the publishing engine and end up in the weblayout directory as raw JavaScript files. jspserver Holds jspserver XML files. lang Holds localized string definitions for Content Server. reports Holds templates for Content Server reports. resources Holds resource definitions (queries, page resources, services, and other resource data) for Content Server. tables Holds IdocScript resource table definitions. templates Holds templates for all Content Server pages (except reports). Introduction to Oracle WebCenter Content Server 1-5 Overview of Content Server Architecture Table 1–5 describes the subdirectories of the resources/admin directory. Table 1–5 Contents of the resources/admin Directory Subdirectory Description idoc Holds IdocScript dynamichtml and dynamicdata definitions. tables Holds IdocScript resource table definitions. templates Holds templates for all Content Server pages (except reports). 1.1.1.6 The weblayout Directory The DomainHome/ucm/short-product-id/weblayout directory contains the files that are available to the web server for display on the various pages of the Content Server web site. Table 1–6 describes the subdirectories of the weblayout directory. Table 1–6 Contents of the weblayout Directory Subdirectory Description groups Holds the web-viewable content items and dynamic server pages. images Holds images, such as icons and home page graphics. resources Holds layouts, skins, and schema information. 1.1.2 Resources Resources are files that define and implement the actual customization you make to Content Server. They can be pieces of HTML code, dynamic page elements, queries that gather data from the database, services that perform Content Server actions, or special code to conditionally format information. Resources are a critical part of the Content Server software, so you must be familiar with them before you attempt to create a custom component or dynamic server page. You can create, edit, or remove a resource file by using the Component Wizard. You also can use the Component Wizard as a starting point for creating custom resources. Resources fall into distinct categories, which table describes. The first five types listed in the table are also called resource-type resources. Table 1–7 describes these resource types. 1-6 Oracle WebCenter Content Developer's Guide for Content Server Customization Types Table 1–7 Resource Types Resource Type Description Example of Standard Resource HTML Include Defines pieces of HTML markup and Idoc Script code that are used on multiple Content Server web pages. IdcHomeDir/resources/core/idoc/std_ page.idoc Dynamic Data Table Defines a table of data in a IdcHomeDir/resources/core/idoc/std_ dynamicdata include from within data.idoc IdocScript to load an HTML table definition, interface menu actions, or information about metadata fields or from within Java code as an alternative to static tables loaded into SharedObjects. String Defines localized strings for the user interface and error messages. IdcHomeDir/resources/core/lang/cs_ strings.htm Dynamic Table (HDA format) Provides dynamic (frequently changed) content in table format to Content Server. IdcHomeDir/resources/core/templates/templat es.hda Static Table (HTML format) Provides static (seldom changed) content in table format to Content Server. IdcHomeDir/resources/core/tables/std_ locale.htm Query Defines database queries. IdcHomeDir/resources/core/tables/query.htm Service Defines scripts for services that can be performed by Content Server. IdcHomeDir/resources/core/tables/std_ services.htm Template IdcHomeDir/resources/core/templates/checkin Defines templates, which contain the code that Content Server uses to _new.htm assemble a particular web page. Environment Defines configuration settings for Content Server. IntradocDir/config/config.cfg 1.2 Customization Types Three major types of alterations can be made to Content Server: ■ Altering the look and feel of the product You can customize the look and feel of the Content Server interface to meet your organization's specifications. Interface modifications can be as simple as replacing the icons that appear on the standard Content Server web pages or as complex as a complete redesign of the interface. ■ Modifying the functionality of the product By changing how the product functions, you can tailor Content Server to the way your business or organization functions. For example, you can change the default date and time stamp, or change aspects of check-in behavior. ■ Integrating the product into your environment You can use shell scripts, SOAP, J2EE, JSP, and clusters to more fully integrate Content Server into your site's current environment. Introduction to Oracle WebCenter Content Server 1-7 Customization Planning 1.3 Customization Planning Before approaching customization, it is important to clarify exactly why the customization is being undertaken. For example, to add corporate branding, you can use the Modify Layout Samples to do so. Or to change security features, you can use components to modify the default security settings. Customization often occurs to make Content Server match the business practices of an organization. Often, after evaluating your business processes, you may find that sometimes it is more efficient to slightly alter your procedures before customizing Content Server. There are six major stages in customization: 1. Determine why you want to customize. Is there corporate personalization to be done? Is there a better way to present navigation options or material? Depending on what type of need you find, you can determine which tools are best to use. Oftentimes the cosmetic details that you change are the ones that can most satisfy your users; changing items such as layout, colors, and images often provide the effect that users are looking for. 2. Plan the customization carefully. Take into account those aspects of the Content Server environment that might be changed even peripherally by the customization. All customization should be done in a test environment, separate from the site's production environment. 3. Check to see if a solution may be available. The samples on the Support web site contain many types of customizations. You might be able to use an existing component with just a little editing. A number of samples are provided on an as-is basis. These are components or files that demonstrate, enhance, or extend the functionality of WebCenter Content. 4. Evaluate the problem and how essential it is to solve. Some problems might require more effort to fix than the resulting payback. Perhaps customization is not needed, but simply a minor change in business practices. 5. Test the customization thoroughly in a separate environment. If possible, have end users assist with the testing. When the testing has passed all criteria for release, inform users about the changes and how to implement them. 6. Document the customization that you create. All alterations should be documented as completely as possible, both within the actual customization (for example, as a comment in a dynamic server page or in a component) and as a separate README document. This documentation provides a historical audit trail for others who might need to add to the customization later. 1-8 Oracle WebCenter Content Developer's Guide for Content Server Recommended Skills and Tools for Customizing Content Server 1.4 Recommended Skills and Tools for Customizing Content Server Content Server brings together a wide variety of technologies to deliver advanced functionality. To modify Content Server, certain experience and skills with some or all of these technologies are required. The technical skills required to customize Content Server can vary depending on the complexity of the customization. For example, much customization can be accomplished with knowledge of HTML and Idoc Script. This list describes, in descending order of importance, the technologies and experience you might need to modify Content Server: ■ Content Server architecture You should thoroughly understand how Content Server works and how components and dynamic server pages function before you begin customizing your system. ■ HTML and cascading style sheets (CSS) You will need a good understanding of HTML and CSS to make changes to the Content Server web page templates. The templates are not complex in their use of HTML, but they make constant use of HTML tables and frequent use of forms. The std_page.idoc and std_css.idoc files include cascading style sheets to control the look and feel of the default templates, including fonts and layouts. ■ Idoc Script Idoc Script is the custom, server-side scripting language for Content Server. Almost every Content Server web page includes some Idoc Script code, which provides the methods for processing various page elements. ■ JavaScript The internal content of most Content Server pages do not use JavaScript, but the Search, Check-In, and Update pages are notable exceptions. You must have an understanding of JavaScript before you create a customization that is called in place of these pages. Also, you must understand JavaScript to alter layouts. Changing layouts relies heavily on JavaScript and cascading style sheets for design and navigation. ■ Structured Query Language (SQL) Content Server uses SQL to perform queries on the database. Knowledge of SQL can help you understand the standard queries and create your own custom queries. ■ Java programming Content Server is implemented with Java classes. You should have a thorough understanding of Java and the Content Server Java class files before attempting to make any changes to the underlying functionality. However, you can customize the product extensively without working with Java. ■ Other programming Experience with other tools, such as Visual Basic, COM, .Net, C++, or VBScript, might be helpful if you are doing complex customization or integrating WebCenter Content with other systems. Introduction to Oracle WebCenter Content Server 1-9 Content Server Behavior You may find the following tools useful when customizing Content Server: ■ Text editor Most product customizing can be done with a normal text editor, such as Microsoft WordPad or vi. ■ HTML editor Caution: Graphical HTML editor programs often change the source HTML, which can cause Idoc Script tags to be converted into strings of characters that are no longer recognized by Content Server. If you use a graphical editor, make sure you edit in a nongraphical mode. If you prefer to use a graphical HTML editor to work with HTML pages, use a nongraphical mode for editing. ■ Multiple browsers You should test customization on multiple versions of any web browsers that might be used to interface with the content management system. Internet Explorer, Firefox, and Chrome do not display content in the same manner, and different versions of the same browser may exhibit different behaviors. ■ JavaScript debugger A JavaScript debugger can ease the task of JavaScript development. A number of JavaScript debuggers are available for download from the Internet. ■ Integrated Development Environment (IDE) for Java If your customization requires the development of Java code, you need an appropriate Java development environment. 1.5 Content Server Behavior Before you customize WebCenter Content, you need to understand the behavior of Oracle WebCenter Content Server: ■ Startup behavior ■ Resource caching ■ Page assembly ■ Database interaction ■ Localized string resolution ■ Application integrations For an overview of Content Server, see "Introduction to Content Server Administration" in the Oracle WebCenter Content System Administrator's Guide for Content Server. 1-10 Oracle WebCenter Content Developer's Guide for Content Server Content Server Behavior 1.5.1 Startup Behavior During startup, a Content Server instance performs internal initialization and loads these items: 1. Configuration variables 2. Standard templates, resources, and reports 3. Custom components, including templates, resources, configuration variables, and reports Figure 1–1 illustrates the four steps that Content Server goes through during startup. Section 1.5.1.1, "Startup Steps," describes each step in more detail. Figure 1–1 Content Server Startup Behavior 1.5.1.1 Startup Steps During startup, Content Server goes through these steps: 1. Internal initialization occurs. When Content Server initializes internally, the Java class files from Content Server are read and the Java Virtual Machine (JVM) is invoked. Any variables in the DomainHome/ucm/short-product-id/intradoc.cfg file are initialized as well. 2. Configuration variables load. After initialization, Content Server loads the config.cfg file from the IntradocDir/config directory. This file stores the system properties and configuration variables, which are defined by name/value pairs (such as SystemLocale=English-US). Introduction to Oracle WebCenter Content Server 1-11 Content Server Behavior The default information contained within the configuration file was supplied during the Oracle WebCenter Content installation process, but you can modify this file in several ways: ■ ■ Use the Admin Server General Configuration page, accessible from the Administration menu Run the SystemProperties executable, located in the bin directory of the Oracle WebCenter Content installation (UNIX operating system) ■ Edit the configuration files directly ■ Use a custom component Any time changes are made to the config.cfg file, you must restart Content Server for the changes to take effect. 3. Standard resources, templates, and reports load. For Content Server to function properly, many standard resources, templates, and reports must be loaded. After the configuration settings have been loaded, Content Server reads the entries in the IdcHomeDir/resources/core/templates/templates.hda file and the IdcHomeDir/resources/core/reports/reports.hda file. These files tell Content Server which templates to load, which in turn loads any standard resources referenced in the template and report pages. 4. Custom components load. Content Server loads all of the components listed in IntradocDir/data/components/idcshort_product_id_ components.hda, and in turn that loads system components out of IdcHomeDir/components/ComponentName/ComponentName.hda or, for custom components, out of IntradocDir/custom/ComponentName/ComponentName.hda. 1.5.1.2 Effects of Configuration Loading It is important to understand the effect of the load order for the different configuration files because if a variable is set in more than one file, the last variable loaded takes precedence. For example, the IntradocDir/config/config.cfg file is loaded before the IntradocDir/data/components/component_name/config.cfg file, so the component_name/config.cfg can change the value of a variable that was set by the config/config.cfg file. Files are loaded in this order (not all files exist for each component): 1. DomainHome/ucm/short-product-id/bin/intradoc.cfg 2. IntradocDir/config/config.cfg 3. DomainHome/ucm/short-product-id/custom/component_name/*_ environment.cfg Some components might not have this file, or it might be named environment.cfg. 4. IntradocDir/data/components/component_name/install.cfg 5. IntradocDir/data/components/component_name/config.cfg 6. DomainHome/ucm/short-product-id/bin/intradoc.cfg This file is reread at the end of startup to allow overrides to other settings. 1-12 Oracle WebCenter Content Developer's Guide for Content Server Content Server Behavior If, for example, the same variable was set in each of the files in the list, the variable’s value in intradoc.cfg would take precedence because this file was loaded last. To view the configuration, you can use the GET_SYSTEM_AUDIT_INFO service to show all configuration entries and where they were set. To change a component variable, you can use the Update Component Configuration area in the Advanced Component Manager. This area displays a dropdown list of components that have editable configurations in the component_name/config.cfg file. You can choose a component and click Update to get to the Update Component Configuration page in Content Server. You can also edit the configuration file manually. If a component is not displayed in the Update Component Configuration list in the Advanced Component Manager, you can make your changes directly in one of the configuration files. 1.5.2 Resource Caching Content Server handles caching for template pages and resources as follows: ■ ■ When Content Server loads template pages and resources, they are cached in memory to accelerate page presentation. If you change a template page, report page, or HTML include resource, or you check in a revision to a dynamic server page, your changes go into effect immediately. The next request for the associated web page or refresh of the page reflects the changes, and the new information is cached. This occurs because pages are assembled dynamically for each page request. You can disable this behavior to improve performance by setting the configuration variable DisableSharedCacheChecking. ■ If you change any other component file (including services, queries, environment variables, tables, the idcshort-product-id_components.hda file, and the template.hda file), you must restart Content Server before the changes go into effect. Such changes could cause Content Server to malfunction if they were implemented immediately. You do not need to restart Content Server after changing strings; however, you must republish the ww_strings.js files by clicking publish string and dynamic files or publish string, static, and dynamic files in the Weblayout Publishing area of the Admin Actions page. For more information, see Chapter 9, "Getting Started with Content Server Components." 1.5.3 Page Assembly Content Server uses the following information from the files in the IdcHomeDir/resources directory to assemble dynamic web pages: ■ The structure and format of a web page This structure and format are defined by a particular HTML template file. The template files are primarily in the resources/core/templates directory, and some templates are in the resources/core/reports and resources/admin/templates directories. ■ The templates reference resources These resources are located in .htm and .idoc files in subdirectories of the resources directory. Resources can include HTML and Idoc Script markup, Introduction to Oracle WebCenter Content Server 1-13 Content Server Behavior localized strings, queries to gather information from the database, and special code to conditionally format the information. As a rule, each web page includes the following resources: ■ Standard page header ■ Standard page beginning ■ Standard page ending Because all of the Content Server resources are cached in memory at startup, Content Server has a definition for the standard pieces that appear on the page. Content Server then combines the standard resources with the unique resources specified in the template to create the web page. For dynamic server pages, the template page and custom resource files are checked into Content Server. When one of these pages is requested by a web browser, Content Server recognizes the file extension as a dynamic server page, which enables special processing. At that point, the page assembly process is the essentially the same as the standard process, except that the page can use both the standard resources in the resources directory and the custom resources that are checked in to Content Server. 1.5.4 Database Interaction Some databases, such as Oracle Database, return all column names in uppercase characters. Therefore, when Content Server receives query results from these databases, column names must be mapped from the uppercase characters to the values used in Content Server. Because of this case mapping issue, custom components created for a Content Server instance using one database might not work correctly on a Content Server instance using a different database. To map column names, the IdcHomeDir/resources/core/resources/upper_ clmns_map.htm file contains a mapping table named ColumnTranslation. Add the query values to this file when you create a component that accesses fields that are not WebCenter Content database fields (for example, if you create a component that accesses a custom table within the WebCenter Content database). For information about using the upper_clmns_map.htm file, see Section 5, "Changing System Settings." 1.5.5 Localized String Resolution Localized strings are the means by which the user interface and error messages are presented in the language specified by the user's locale. Content Server loads the string resource files for a base language and also loads resource files for every supported language. Instead of presenting hard-coded text, the template pages, applets, and error messages reference string IDs in these resource files, which are then resolved using the ExecutionContext that contains the locale information for the user. 1.5.6 Application Integrations Content Server not only serves as a content management solution for content-centric web sites, but also provides a scalable content management infrastructure that supports multiple enterprise applications in many diverse environments and platforms. The integration solutions enable other enterprise applications to access content managed by the content management system and provides these applications with critical content management capabilities such as full-text and metadata searching, 1-14 Oracle WebCenter Content Developer's Guide for Content Server Content Server Behavior library services, workflow, subscription notifications, and content conversion capabilities through a wide array of integration methods. For information about integrating Content Server with enterprise applications, see Section 18, "Getting Started with Integrating WebCenter Content into Your Environment." Introduction to Oracle WebCenter Content Server 1-15 Content Server Behavior 1-16 Oracle WebCenter Content Developer's Guide for Content Server 2 Introduction to the Oracle Fusion Order Demo Sample Application 2 This chapter describes the Oracle Fusion Order Demo sample application, how to set it up, and how to run the Suppliers Module. This chapter includes the following sections: ■ Section 2.1, "About Fusion Order Demo and the Suppliers Module" ■ Section 2.2, "Setting Up the Fusion Order Demo Application" ■ Section 2.3, "Running the Suppliers Module" The instructions in this chapter are for setting up and running the sample application on Oracle WebLogic Server. Content Server can also be deployed to an IBM WebSphere Application Server. For more information, see "Managing Oracle WebCenter Content on IBM WebSphere" in the Oracle Fusion Middleware Third-Party Application Server Guide. 2.1 About Fusion Order Demo and the Suppliers Module In the Oracle Fusion Order Demo sample application, electronic devices are sold through a storefront web application. Customers can visit the web site, register, and place orders for products. To view and run the demo, you need to install Oracle JDeveloper 11g. Then you need to download the application for the demonstration. For instructions to complete these tasks, see Section 2.2, "Setting Up the Fusion Order Demo Application." After the application is installed and running, you can view the code using Oracle JDeveloper. You can view the application at runtime by logging in as an existing customer and placing an order. The Suppliers module of Fusion Order Demo demonstrates the use of Java EE to create web applications for a web supplier management system. The demonstration application is used to illustrate points and provide code samples. The Suppliers module consists of a business services project named Model and a web user interface project named ViewController. You run the Suppliers module of the Fusion Order Demo application in JDeveloper by running the ViewController project. The ViewController project uses JavaServer Faces (JSF) as the view technology, and the project relies on the ADF Model layer to interact with the EJBs in the Model project. To learn more about the Suppliers module and to understand its implementation details, see Section 2.3.1, "Suppliers Module Code" and Section 2.3.2, "Suppliers Module Pages." Introduction to the Oracle Fusion Order Demo Sample Application 2-1 Setting Up the Fusion Order Demo Application 2.2 Setting Up the Fusion Order Demo Application The Fusion Order Demo application runs using an Oracle database and Oracle JDeveloper 11g. The platforms supported are the same as those supported by JDeveloper. To set up the Fusion Order Demo application: 1. Install Oracle JDeveloper 11g and meet the installation prerequisites. The Fusion Order Demo application requires an existing Oracle database. 2. Install the Fusion Order Demo application from the Oracle Technology Network. 3. Install Mozilla FireFox, version 2.0 or higher, or Internet Explorer, version 7.0 or higher. 4. Run the application on a monitor that supports a screen resolution of 1024 X 768 or higher. For more information, see "Setting Up the Fusion Order Demo Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. 2.3 Running the Suppliers Module To run the Suppliers module of the Fusion Order Demo application: 1. Download and install the Fusion Order Demo application as described in "Setting Up the Fusion Order Demo Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. 2. Open the application in Oracle JDeveloper: a. From the JDeveloper main menu, choose Open from the File menu. b. Navigate to the location to which you extracted the demo ZIP file, select the SupplierModule_2.0.jws application workspace from the SupplierModule directory, and click Open. Figure 2–1 shows the Application Navigator after you open the file for the application workspace. For a description of each of the projects in the workspace, see Section 2.3.1, "Suppliers Module Code." Figure 2–1 The Suppliers Module Projects in Oracle JDeveloper 2-2 Oracle WebCenter Content Developer's Guide for Content Server Running the Suppliers Module 3. In the Application Navigator, click the Application Resources accordion title to expand the panel. 4. In the Application Resources panel, expand the Connections and Database nodes. 5. Right-click FOD connection and choose Properties. 6. In the Edit Database Connection dialog, modify the connection information shown in Table 2–1 for your environment. Table 2–1 Connection Properties Required to Run the Fusion Order Demo Application Property Description Host Name The host name for your database. For example: localhost JDBC Port The port for your database. For example: 1521 The SID of your database. For example: SID ORCL or XE Do not modify the user name and password fod/fusion. These must remain unchanged. Click OK. 7. In the Application Navigator, right-click Model and choose Rebuild. 8. In the Application Navigator, right-click ViewController and choose Run. The login.jspx page is displayed. Because of the way security is configured in this module, you must first log in. 9. Enter SHEMANT for User Name and welcome1 for Password. Once you log in, the browse page appears, which allows you to search for products. Once you select a product in the results table, you can edit or remove the product information. Using the command links at the top of the page, you can edit the corresponding supplier’s information, or add a new supplier. For more information about the Suppliers module at runtime, see Section 2.3.2, "Suppliers Module Pages." 2.3.1 Suppliers Module Code Once you have opened the projects in Oracle JDeveloper, you can then begin to review the artifacts within each project. The Model project contains the Java classes and metadata files that allow the data to be displayed in the web application. The oracle.fodemo.common project contains components used by multiple classes in the application. The oracle.fodemo.supplier project contains the components used to access the supplier data. Figure 2–2 shows the Model project and its associated directories. Introduction to the Oracle Fusion Order Demo Sample Application 2-3 Running the Suppliers Module Figure 2–2 The Model Project in JDeveloper The ViewController project contains the files for the web interface, including the backing beans, deployment files, and JSPX files. The Application Sources node contains the code used by the web client, including the managed and backing beans, property files used for internationalization, and the metadata used by Oracle ADF to display bound data. The Web Content node contains web files, including the JSP files, images, skin files, deployment descriptors, and libraries. Figure 2–3 shows the ViewController project and its associated directories. 2-4 Oracle WebCenter Content Developer's Guide for Content Server Running the Suppliers Module Figure 2–3 The ViewController Project in JDeveloper 2.3.2 Suppliers Module Pages The Supplier module contains eight main pages that enable a user to perform these tasks: ■ Search for products: The browse.jspx page enables a user to search for products. Search results are displayed in a table. Figure 2–4 shows the search form on the browse page. Figure 2–4 Search Form in Supplier Module Introduction to the Oracle Fusion Order Demo Sample Application 2-5 Running the Suppliers Module ■ Edit row data in a table: From the table on the browse.jspx page, a user can select a product and choose Update to navigate to the productInfo.jspx page (clicking the product link also navigates to this page). From the table, a user can also click Remove, which launches a popup that allows the removal of the selected product. Figure 2–5 shows the table on the browse page. Figure 2–5 Table on the browse Page ■ Edit row data in a form: From the productInfo.jspx page, a user can change the data for a row. A selection list contains valid values for the product status. The Choose File button enables a user to upload a graphic file, which is then displayed below the form. Figure 2–6 shows a productInfo.jspx page. Figure 2–6 Product Details Page ■ The Add Supplier link takes the user to a series of pages contained within the regisrationDetails.jspx page that are used to create a new supplier, as shown in Figure 2–7. 2-6 Oracle WebCenter Content Developer's Guide for Content Server Running the Suppliers Module Figure 2–7 Create a Supplier Train ■ Log in to the application: The login.jspx page allows users to log in to the application. For more information, see "Enabling ADF Security in a Fusion Web Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. Introduction to the Oracle Fusion Order Demo Sample Application 2-7 Running the Suppliers Module 2-8 Oracle WebCenter Content Developer's Guide for Content Server Part II Part II Changing the Look and Feel of the Content Server Interface This part provides information about the several different methods that you can use to change the appearance and navigation of the Oracle WebCenter Content Server interface. Part II contains the following chapters: ■ Chapter 3, "Customizing the Content Server Interface" ■ Chapter 4, "Creating Dynamic Server Pages" 3 Customizing the Content Server Interface 3 This chapter provides information about the several different methods that you can use to customize the look and feel of the Oracle WebCenter Content Server interface. You can use skins and layouts to change the appearance of the user interface and dynamic server pages to change the navigation. This chapter includes the following sections: ■ Section 3.1, "About Customizing the Content Server Interface" ■ Section 3.2, "Choosing a Different Skin or Layout" ■ Section 3.3, "Configuring a Default Skin and Layout for New Users and Guests" ■ Section 3.4, "Modifying the Template for a Skin or Layout" ■ Section 3.5, "Altering the Anonymous User Interface" ■ Section 3.6, "Changing the URL of the Login Page" ■ Section 3.7, "Creating and Publishing a New Layout" ■ Section 3.8, "Optimizing the Use of Published Files" Tip: In addition to using the methods discussed in this chapter, you can alter the metadata fields that are presented to users and modify the types of presentations used for check-in pages, search pages, and other user interfaces. For information about creating and modifying metadata fields and creating content profiles, see "Managing Repository Content" in the Oracle WebCenter Content Application Administrator's Guide for Content Server. 3.1 About Customizing the Content Server Interface Skins and layouts provide alternate color schemes and alternate navigation designs. 3.1.1 Types of Skins and Layouts Some skins and layouts are provided by default with Oracle WebCenter Content Server. In addition, you can design custom skins and layouts. When you change the skin or layout, you change the look and feel of the interface. You can select a skin and layout from the options provided on the User Profile page. The only skills required to create and modify skins or layouts is an understanding of HTML, Cascading Style Sheets, and JavaScript. After altering the appearance, the edited layouts and skins are published so that others in your environment can use them. Customizing the Content Server Interface 3-1 Choosing a Different Skin or Layout Only administrators can make new or custom skins. For more information about setting the default look and feel of the user interface, see Section 3.3, "Configuring a Default Skin and Layout for New Users and Guests." Note: 3.1.2 Skins Skins define the color scheme and other aspects of appearance of the layout such as graphics, fonts, or font size. (the default skin is Oracle). You can design custom skins or modify the existing skins. 3.1.3 Layouts Layouts define the navigation hierarchy display (the default layout is Trays) and custom layouts can be designed. Custom layouts change behavior and the look-and-feel systemwide. If you want your changes to apply only in limited situations, you might want to consider dynamic server pages.These layouts are provided: ■ ■ Trays: This layout with the standard Oracle skin is the default interface. High-level navigation occurs through the navigation trays. Top Menus: This layout provides an alternate look with top menus providing navigation. 3.2 Choosing a Different Skin or Layout You can choose a different skin to provide an alternate color scheme or a different layout to provide an alternate navigation design, or both. 3.2.1 How to Choose a Different Skin or Layout The User Personalization settings available on the User Profile page enable users to change the layout of Content Server or the skin. This personalization functionality works with Internet Explorer 7+ or Mozilla Firefox 3+ and later versions. Important: To choose a different skin or layout: 1. On the Content Server Home page, click your_user_name in the top menu bar. The User Profile page appears. 2. Choose the desired skin and layout. 3. Click Update, and view the changes. 3.2.2 What Happens at Runtime After you choose a different skin or layout, it becomes the user interface for Content Server whenever you log in. 3-2 Oracle WebCenter Content Developer's Guide for Content Server Modifying the Template for a Skin or Layout 3.3 Configuring a Default Skin and Layout for New Users and Guests These values can be placed in the IntradocDir/config/config.cfg file to alter the default behavior for the Content Server instance: ■ ■ LmDefaultSkin: The name of the skin used by guests, and new users. The default is Oracle. LmDefaultLayout: The name of the layout used by guests, and new users. The default is Trays, but it can be set to Top Menus. 3.4 Modifying the Template for a Skin or Layout The Top Menus and Trays layouts are included by default with the system. The two layouts have two skin options (Oracle and Oracle2). The layouts are written in JavaScript, and the look of the skins is created using Cascading Style Sheets. You can modify skins and layouts by altering the template files provided with Content Server or design new skins and layouts by creating components that can be shared with other users. 3.4.1 About Dynamic Publishing When Content Server starts, or when the PUBLISH_WEBLAYOUT_FILES service is run, the PublishedWeblayoutFiles table in the std_resource.htm file is used to publish files to the weblayout directory. To have your custom component use this publishing mechanism, create a template, and then merge a custom row that uses that template into the PublishedWeblayoutFiles table. Other users who want to modify or customize your file can override your template or your row in the PublishedWeblayoutFiles table. If your template uses any resource includes, other users can override any of these includes or insert their own Idoc Script code using the standard super notation. When your component is disabled, the file is no longer published or modified and Content Server returns to its default state. In addition to giving others an easy way to modify and add to your work, you can also construct these former static files using Idoc Script. For example, you can have the files change depending on the value of a custom configuration flag. You can use core Content Server objects and functionality by writing custom Idoc Script functions and referencing them from inside your template. Because this Idoc Script is evaluated once during publishing, you cannot use Idoc Script as you would normally do from the IdcHomeDir/resources/core/idoc/std_page.idoc file. When a user requests that file, it has already been created, so the script that was used to create it did not have any access to the current service’s DataBinder object or to any information about the current user. This does limit the type of Idoc Script you can write in these files. If you are writing CSS or JavaScript that needs information that dynamically changes with users or services, consider having the pages that need this code include the code inline. This increases the size of pages delivered by your web server and so increases the amount of bandwidth used. Customizing the Content Server Interface 3-3 Altering the Anonymous User Interface 3.5 Altering the Anonymous User Interface The ExtranetLook component can be used to change the interface for anonymous, random users. An example of this is when a web site based on Content Server must be available to external customers without a login, but you want employees to be able to contribute content to that web site. When Content Server is running on Oracle WebLogic Server, the ExtranetLook component alters privileges for certain pages so that they require write privilege to access. The component also makes small alterations to the static portal page to remove links that anonymous, random users should not see. The ExtranetLook component does not provide form-based authentication for Oracle WebLogic Server or provide customizable error pages. Note: The ExtranetLook component is installed (disabled) with Content Server. To use the component, you must enable it with the Component Manager. You can customize your web pages to make it easy for customers to search for content, and then give employees a login that permits them to see the interface on login. To do the customization, modify the ExtranetLook.idoc file, which provides dynamic resource includes that can be customized based on user login. The IDOC file is checked in to the Content Server repository so it can be referenced by the Content Server templates. 3.5.1 How to Alter the Anonymous User Interface You can update the look and feel of the anonymous user interface for the Content Server web site by altering the following files in the IntradocDir/data/users directory: ■ prompt_login.htm ■ access_denied.htm ■ report_error.htm To alter the anonymous user interface: 1. Display the Web Layout Editor. 2. From the Options menu, choose Update Portal. 3. Modify the portal page as you want to. You can use dynamic resource includes to customize this page. 4. Click OK. 5. Customize the ExtranetLook.idoc file as you want to. 6. Check out the ExtranetLook content item from Content Server. 7. Check in the revised ExtranetLook.idoc file to Content Server. 3.5.2 What Happens at Runtime After you modify the portal page and customize theExtranetLook.idoc file, your design becomes the user interface for Content Server whenever a user goes to the web site without logging in. 3-4 Oracle WebCenter Content Developer's Guide for Content Server Changing the URL of the Login Page 3.6 Changing the URL of the Login Page You can change the URL of the Login page for Content Server by changing its context root, which is normally /cs/. You cannot change the URL by setting a relative context root with the HttpRelativeWebRoot property because the value of this property does not apply to the Login page. If you need to change the web location where users log in, you can redeploy the WebCenter Content application with a deployment plan. To change the URL of the Login page: 1. Log in to the Oracle WebLogic Server Administration Console as the administrator of the domain where WebCenter Content is deployed. 2. Click Deployments under the name of your domain, in the Domain Structure area on the left. 3. Click Oracle WebCenter Content - Content Server in the Deployments table on the Control tab of the Summary of Deployments page. This application may be on the second or third page of the table. 4. Note the path to the deployment plan. If no plan is specified for your WebCenter Content instance, you can create one: 5. a. Click Configuration on the Settings for Oracle WebCenter Content - Content Server page. b. Change the value of any parameter on the Configuration tab. c. Click Save. d. Confirm the path to the deployment plan on the Save Deployment Plan Assistant page, or change the path. e. Click OK. In a text editor, add lines at two places in the deployment plan: a. Add the original_loginpage_path and original_loginerror_path variables, each in aelement of a element, as in this example: ServletPlugin original_loginpage_path /content/login/login.htm original_loginerror_path /content/login/error.htm Customizing the Content Server Interface 3-5 Changing the URL of the Login Page b. In the SessionDescriptor_timeoutSecs_12996472139160 3600 element of web.xmlin the cs.war file, add two elements that assign the following values to the original_loginpage_path and original_loginerror_path variables, respectively: * /web-app/login-config/form-login-config/form-login-page * /web-app/login-config/form-login-config/form-error-page For example: cs.war war weblogic-web-app WEB-INF/weblogic.xml web-app WEB-INF/web.xml original_loginpage_path /web-app/login-config/form-login-config/form-login-page original_loginerror_path /web-app/login-config/form-login-config/form-error-page 6. Stop the WebCenter Content Managed Server (UCM_server1 by default), with the stopManagedWebLogic script. ■ ■ UNIX script: DomainHome/bin/stopManagedWebLogic.sh UCM_server1 Windows script: DomainHome\bin\stopManagedWebLogic.cmd UCM_server1 7. In the Administration Console, click Deployments under the name of your domain. 8. Select Oracle WebCenter Content - Content Server in the Deployments table, and click Update. 9. Select Redeploy this application using the following deployment files, make sure the path to the deployment plan is correct, and then click Finish. 10. After the redeployment completes successfully, click Apply Changes. 11. Start the WebCenter Content Managed Server with the startManagedWebLogic script. ■ ■ UNIX script: DomainHome/bin/startManagedWebLogic.sh UCM_server1 Windows script: DomainHome\bin\startManagedWebLogic.cmd UCM_server1 3-6 Oracle WebCenter Content Developer's Guide for Content Server Optimizing the Use of Published Files 12. In the Administration Console, click Deployments. 13. Select Oracle WebCenter Content - Content Server in the Deployments table, and from the Start menu, choose Servicing all requests. 14. After the WebCenter Content application is launched, verify that the URL of the login page has changed. 3.7 Creating and Publishing a New Layout The following general steps are necessary to create and publish new layouts: 1. Merge a table into the LmLayouts table in IdcHomeDir/resources/core/tables/std_publishing.htm to define the new layout. Define the layout ID, label, and whether it is enabled (set to 1) or not. 2. Merge a table into the PublishedWeblayoutFiles table in IdcHomeDir/resources/core/tables/std_publishing.htm. This new table describes the files that are created from Content Server templates and then pushed out to the weblayout directory. Specify the necessary skin.css files to push out to each skin directory. 3. Merge a table with the PublishedStaticFiles table in std_ publishing.htm. This lists the directories that contain files, such as images, that should be published to the weblayout directory. 3.8 Optimizing the Use of Published Files You can direct Content Server to bundle published files so that they can be delivered as one, minimizing the number of page requests to the server. In addition, you can optimize file use by referencing published pages using Idoc Script. 3.8.1 Bundling Files Multiple resources may be packaged together into units called bundles. A bundle is a single file containing one or more published resources. Only JavaScript and css resources should be bundled and only with other resources of the same type. Bundling helps reduce the client overhead when pages are loaded but increases client parse, compile, and execute overhead. Generally, it is recommended to bundle resources that have some thematic similarity or are expected to be included at similar times. For example, if you know that resources A, B, and C are needed on every page, and resources D, E, and F are needed rarely but are all needed together, it is recommended to bundle A, B, and C together and to put D, E, and F into a separate bundle. Almost all JavaScript resources for the Content Server core are bundled into one of two bundles: yuiBundle.js, which contains script provided by the third-party Yahoo User Interface library, and bundle.js, which contains the rest of the resources. The PublishedBundles table is used for determining how resources are bundled. Essentially a bundle is identified by its target bundlePath, which is the path name to the bundle (relative to the weblayout directory), and a list of rules detailing which resource classes are included or excluded. A loadOrder value in this table applies only to the order in which the filtering rules are applied, not the order in which the resources appear in the bundle. Customizing the Content Server Interface 3-7 Optimizing the Use of Published Files The bundling has changed since Oracle Universal Content Management 10g, which used a different table and had a loadOrder value that determined the order of resources in each bundle. Note: Static weblayout file contents are cached on client machines and on web proxies, significantly lowering the amount of server bandwidth they use. Therefore, the best practice is to use these types of files wherever possible. However, each static weblayout file requested by the client’s browser requires a round-trip to the server just to verify that the client has the most up-to-date version of the file. This occurs even if the file is cached. As the number of these files grows, so does the number of downloads from the server for each page request. To help minimize the number of round-trips, Content Server can bundle multiple published files so that they are delivered as one. You can disable this feature by setting the following configuration in the server’s IntradocDir/config/config.cfg file: BundlePublishedWeblayoutFiles=false Bundling is accomplished by using the PublishedBundles table in the std_publishing.htm file, which Example 3–1 shows. Example 3–1 PublishedBundles Table in std_publishing.htm File <@table PublishedBundles@> . . . <@end@> The columns in this table are as follows: ■ ■ ■ ■ bundlePath: The eventual location where the bundle is published. This path is relative to the weblayout directory. includeClass: This is used to determine which resources to include in a bundle. excludeClass: This is used to determine which resources to exclude from a bundle. loadOrder: The order in which the includeClass and excludeClass filters are applied. In the previous example, files of the javascript:common class are published to a single bundle located at resources/layouts/commonBundle.js. The contents of all bundled files that match this class are appended to form a single file to be stored at that location. 3-8 Oracle WebCenter Content Developer's Guide for Content Server Optimizing the Use of Published Files 3.8.2 Referencing Published Files Most published files (both bundled and unbundled) must be directly referenced from within HTML to be included in a page. It can therefore be difficult to know exactly which files to include for a given situation, especially when bundling can be enabled or disabled by server administrators. A simple Idoc Script method can be used to easily and transparently include all of the files you need on a given page. For example, if you write a page that includes all files associated with the javascript:common bundle (as described previously), then do not write HTML that includes all of the files mentioned in the first table in addition to the bundle mentioned in the second, the server is asked for each file. This negates the purpose of bundling because the server is pinged for each file whether it actually exists or not. Example 3–2 shows Idoc Script code, within the HEAD section for a page, to correctly include these files on the page. Example 3–2 Idoc Script to Reference a Bundle of Files <$exec createPublishedResourcesList("javascript:common")$> <$loop PublishedResources$> <$endloop$> This code fragment includes all javascript:common files even if bundling is switched off. If javascript instead of javascript:common is passed, all files whose class starts with javascript are included. This PublishedResources result set is sorted by loadOrder, so files and bundles with the lowest loadOrder are included first. Files with a greater loadOrder can override JavaScript methods or CSS styles that were declared earlier. Customizing the Content Server Interface 3-9 Optimizing the Use of Published Files 3-10 Oracle WebCenter Content Developer's Guide for Content Server 4 Creating Dynamic Server Pages 4 This chapter describes how to use the building blocks necessary for creating dynamic server pages to alter the appearance and navigation of web pages. This chapter includes the following sections: ■ Section 4.1, "About Dynamic Server Pages" ■ Section 4.2, "Altering the Appearance and Navigation of Web Pages" ■ Section 4.3, "Creating an IDOC File with Custom Includes for Dynamic Server Pages" ■ Section 4.4, "Creating an HCST Page" ■ Section 4.5, "Creating an HCSP Page" ■ Section 4.6, "Creating an HCSF Page" ■ Section 4.7, "Verifying the Display of an HCST, HCSP, or HCSF Page in a Web Browser" 4.1 About Dynamic Server Pages Dynamic server pages are files that are checked in to Content Server and then used to generate web pages dynamically. Dynamic server pages are typically used to alter the look-and-feel and the navigation of web pages. For example, dynamic server pages can be used to do these tasks: ■ Create web pages to be published through Content Publisher ■ Implement HTML forms ■ Maintain a consistent look-and-feel throughout a web site Dynamic server pages include the following file formats: ■ ■ ■ ■ IDOC: A proprietary scripting language HCST: Hypertext Content Server Template, similar to a standard Content Server template page stored in the IdcHomeDir/resources/core/templates directory. HCSP: Hypertext Content Server Page, an HTML-compliant version of the HCST page, usually used for published content. HCSF: Hypertext Content Server Form, similar to HCSP and HCST pages, but containing HTML form fields that can be filled out and submitted from a web browser Creating Dynamic Server Pages 4-1 About Dynamic Server Pages When you use dynamic server pages, Content Server assembles web pages dynamically using a custom template (HCST, HCSP, or HCSF file) that you have checked in to Content Server. The template calls HTML includes from a text file (IDOC file) that you have also checked in to Content Server. To make changes to the look-and-feel or navigation on a web page, you modify the HCS* template page, or the IDOC file, or both, and then check in the revised files as new revisions. Your changes are available immediately. Using dynamic server pages with Content Server gives you these advantages: ■ ■ ■ ■ You can introduce and test customizations quickly and easily. Simply checking in a revision of a dynamic server page implements the changes immediately—you do not have to restart Content Server. Your web pages can make use of functionality not found in standard HTML. For example, HTML forms can be submitted directly to Content Server without the need for CGI scripts. Also, Idoc Script enables you to work directly with environment and state information about Content Server. You do not have to install or keep track of component files. It can be difficult to maintain and troubleshoot components if they have a lot of files or your system is highly customized. Dynamic server pages are easier to work with because you can check in just a few content items that contain all of your customizations. Customizations can be applied to individual pages. Dynamic server pages enable you to apply customizations to a single page rather than globally, leaving the standard Content Server page coding intact. Keep the following constraints in mind when deciding whether to use dynamic server pages: ■ ■ Dynamic server pages cannot be used to modify core functionality of Content Server. Dynamic server pages are most useful for customizing your web design and form pages. Frequent revisions to dynamic server pages can result in a large number of obsolete content items. You should do as much work on a development system as possible before deploying to a production instance, and you may need to delete out-of-date pages regularly. Figure 4–1 shows the process for generating and using a Dynamic Server Page. 4-2 Oracle WebCenter Content Developer's Guide for Content Server About Dynamic Server Pages Figure 4–1 The Dynamic Server Page Process 4.1.1 Page Types There are four types of dynamic server pages, which are identified in Content Server by their four-character file-name extensions: ■ IDOC ■ HCST ■ HCSP ■ HCSF 4.1.1.1 IDOC File An IDOC file is a text file containing HTML includes that are called by HCST, HCSP, and HCSF pages. For more information about includes, see Chapter 9, "Getting Started with Content Server Components." 4.1.1.2 HCST File A Hypertext Content Server Template (HCST) file is a template page, similar to a standard Content Server template page, that is used as a framework for assembling a web page. ■ ■ HCST pages are typically used when the content of the page itself is dynamic or where Content Server functionality is needed, such as on a search page, search results page, or custom check-in page. Because this type of page consists mostly of dynamically assembled code, HCST files are not indexed in Content Server. Creating Dynamic Server Pages 4-3 Altering the Appearance and Navigation of Web Pages 4.1.1.3 HCSP File A Hypertext Content Server Page (HCSP) file is a published web page that displays actual web site content. ■ ■ HCSP files are typically created either by generating the web page through Content Publisher using an HCST page as a template, or by submittal of a form in Content Server through an HCSF page. Because this type of page contains web-viewable content, HCSP files are indexed in Content Server. 4.1.1.4 HCSF File A Hypertext Content Server Form (HCSF) file is similar to an HCSP file, except that it contains HTML form fields that can be filled out and submitted from a web browser. ■ ■ When a user fills out and submits a form from an HCSF page, an HCSP file is checked in as a separate content item with metadata defined by XML elements for the HCSF page. Because this type of page contains web-viewable content, HCSF files are indexed in Content Server. For more information about HCSF pages, see Section 4.1.1.4, "HCSF File." 4.2 Altering the Appearance and Navigation of Web Pages Although dynamic server pages are implemented in Content Server differently than custom components, you must be familiar with WebCenter Content component architecture concepts, particularly Content Server templates and HTML includes. For more information, see Chapter 9, "Getting Started with Content Server Components." Use the following basic procedure to customize your Content Server instance with dynamic server pages: 1. Create an IDOC file with custom includes. 2. Check in the IDOC file to Content Server. 3. Create an HCST, HCSP, or HCSF file that references the IDOC file. 4. Check in the HCS* file to Content Server. 5. Display the HCS* file in your web browser by searching for it in Content Server or linking to it from a published web page. Tip: Using dynamic server pages with Content Publisher can be a powerful tool for web publishing. For more information, see the Content Publisher documentation. 4.2.1 Syntax Because the different types of dynamic server pages are interpreted and displayed differently, the Idoc Script in the files must be coded differently. The following table summarizes these differences. 4-4 Oracle WebCenter Content Developer's Guide for Content Server Altering the Appearance and Navigation of Web Pages File Type .idoc .hcst .hcsp .hcsf Full Text Indexed? No No Yes Yes Idoc Script Expressions <$ … $> <$ … $> [!--$ … --] [!--$ … --] Comparison Operators Symbols (==) Symbols (==) Special operators (eq) Special operators (eq) Special Characters Symbols (&) Symbols (&) Escape sequence (&) Escape sequence (&) Referencing Metadata Required Required Required Required Notes: Idoc Script uses standard HTML include coding. For more information, see Section 15.2.1, "HTML Includes." HCST uses standard Content Server template coding. For more information, see Section 15.2.8.1, "Template and Report Pages." Special coding is used with HCSP and HCSF to allow the page to be rendered both statically and dynamically, and full-text indexed. 4.2.1.1 Idoc Script Expressions For HCSP and HCSF pages, Idoc Script expressions are generally placed between HTML comment tags. When a page is viewed statically, this placement enables a web browser to present the page content while ignoring any dynamic code that is used to format the content. This also enables the full-text indexing engine to successfully index the contents of these pages. Some examples follow. ■ IDOC or HCST file: <$include MyIdocExpression$> ■ HCSP or HCSF file: In some situations, you might want to control the opening and closing of the HTML comment. In HCSP and HCSF files, this can be done by substituting other characters for the dash (-) in the closing tag after an Idoc Script expression, as Example 4–1 shows. Example 4–1 Pound Sign Delimiter for HTML Comment in HCSP or HCSF File . In Example 4–1, the pound sign (#) is substituted for the dash (-). Another option in HCSP and HCSF files is to substitute brackets ([]) for the opening and closing tags (< >) of the standard HTML comment, as Example 4–2 shows. This substitution enables an XHTML parser to properly identify all the script when viewed statically. Example 4–2 Bracket Delimiters for HTML Comment in HCSP or HCSF File . Creating Dynamic Server Pages 4-5 Altering the Appearance and Navigation of Web Pages 4.2.1.2 Comparison Operators For HCSP and HCSF pages, the standard comparison operators (such as ==) cannot be used because of their special meaning to HTML parsers. Use the following comparison operators in dynamic server pages. IDOC or HCST File HCSP or HCSF File Description == eq Tests for equality. != ne Tests for inequality. < lt Tests if less than. > gt Test if greater than. <= le Tests if less or equal than. >= ge Tests if greater or equal than. For example, the following code evaluates whether or not the value of the variable count is greater than 10. IDOC or HCST File HCSP or HCSF File <$if count > 10$> <$"Count is greater than"$> <$endif$> 4.2.1.3 Special Characters For HCSP and HCSF pages, special characters such as the ampersand (&) cannot used because of their special meaning to HTML parsers. You must use the standard HTML or XML escape format (such as & or &). Note: It is especially important to use the & escape character when you call the docLoadResourceIncludes function from an HCSP or HCSF page. For more information, see Section 4.2.2.1, "docLoadResourceIncludes Function." As the following examples show, in Idoc Script, a quotation mark can be included in a string by preceding it with a backslash escape character, but in an HCSP or HCSF page, the quotation mark character must be represented by an HTML escape character. ■ IDOC or HCST file: "Enter \"None\" in this field." ■ HCSP or HCSF file: "Enter "None" in this field." In an HCST page, a line feed is inserted using \n. In an HCSP page, insert the line feed directly in the file or encode it in the XML using the numeric ASCII number for a line feed. Note: You can now substitute the word join for the & string join operator. For example, you can write [!--$a join b--] instead of [!--$a & b--]. The first is accepted by an XML parser inside an attribute of a element, but the second is not. 4-6 Oracle WebCenter Content Developer's Guide for Content Server Altering the Appearance and Navigation of Web Pages 4.2.1.4 Referencing Metadata For dynamic server pages, several metadata values are stored with a ref: prefix, which makes them available to the page but does not replace ResultSet values. (This prevents pollution of result sets by dynamic server pages.) When you reference any of the following metadata values on a dynamic server page, you must include the ref: prefix: ■ hasDocInfo ■ dDocName ■ dExtension ■ dSecurityGroup ■ isLatestRevision ■ dDocType For example, the following statement determines if the document type is Page: <$if strEquals(ref:dDocType,"Page"))$> 4.2.2 Idoc Script Functions Two special Idoc Script functions are required for dynamic server pages: ■ docLoadResourceIncludes ■ executeService 4.2.2.1 docLoadResourceIncludes Function To be able to use the HTML includes in an IDOC file, an HCS* file must call the docLoadResourceIncludes function, as in the following examples. This function loads all the includes from the specified IDOC file for use in assembling the current page. Example 4–3 shows the format for calling this function from an HCST file. Example 4–3 docLoadResourceIncludes Function Call in HCST File <$docLoadResourceIncludes("dDocName=system_std_ page&RevisionSelectionMethod=Latest")$> Example 4–4 shows the format for calling this function from an HCSP or HCSF file. Example 4–4 docLoadResourceIncludes Function Call in HCSP or HCSF file 4.2.2.1.1 Requirements for Calling the docLoadResourceIncludes Function ■The native file for the specified content item must have a.idoc extension. ■ ■ The docLoadResourceIncludes call must be placed before the first include call in the HCS* file. It is recommended that you place this function within the HEAD section of the page. You must use the correct ampersand character when you call the docLoadResourceIncludes function from an HCS* page. For more information, see Section 4.2.1.3, "Special Characters." Creating Dynamic Server Pages 4-7 Altering the Appearance and Navigation of Web Pages 4.2.2.1.2 Parameters Use the following parameters with the docLoadResourceIncludes function to specify which IDOC file to call. ■ ■ ■ You must define either a dDocName or a dID; do not use both parameters together. If you define a dDocName, you must define RevisionSelectionMethod to be Latest or LatestReleased. If you define a dID, do not define a RevisionSelectionMethod, or define the RevisionSelectionMethod to be Specific. Parameter Description dDocName Specifies the Content ID value of the IDOC file. This parameter should always be present when the Content ID value is known. Error messages are based on the assumption that it is present, as are other features, such as forms. Specifies the unique ID number of a particular revision of the IDOC file. dID RevisionSelectionMetho Specifies which revision of the IDOC file to use: d ■ Latest: The latest checked-in revision of the document is used (including revisions in a workflow). ■ LatestReleased: The latest released revision of the document is used. ■ Specific: Use only with dID. Specifies which rendition of the IDOC file to use: Rendition ■ Primary: The primary (native) file. This is the default value in effect if no Rendition value is specified. ■ Web: The web-viewable file. ■ Alternate: The alternate file. 4.2.2.2 executeService Function The executeService function executes a Content Server service from within a dynamic server page. For example: HCST file: <$executeService("GET_SEARCH_RESULTS")$> HCSP or HCSF file: ■ ■ ■ ■ ■ Services that can be called with the executeService function must be scriptable, meaning that they do not require parameter input. Scriptable services have an access level of 32 or more. For more information, see Chapter 18, "Getting Started with Integrating WebCenter Content into Your Environment." For a list of standard Content Server services, see the IdcHomeDir/resources/core/tables/std_services.htm file. For more information about the executeService function, see the Oracle WebCenter Content Idoc Script Reference Guide. For more information about services, see the Chapter 18, "Getting Started with Integrating WebCenter Content into Your Environment." Performance Tip: Use services sparingly. Too many service calls on a page can affect performance and limit scalability. 4-8 Oracle WebCenter Content Developer's Guide for Content Server Altering the Appearance and Navigation of Web Pages 4.2.3 Development Recommendations The following recommendations to assist you in developing dynamic server pages include general guidelines and HCSF guidelines. 4.2.3.1 General Guidelines The following recommendations apply to the development of all types of dynamic server pages: ■ ■ ■ ■ ■ ■ ■ ■ Keep templates as simple and free of code as possible. Strive to have only HTML includes in your templates, with all code and conditionals in an IDOC file. This is especially helpful for HCSF pages, where submitted forms also reflect changes made to the IDOC file. Whenever you are customizing an Oracle WebCenter Content Server instance, you should isolate your development efforts from your production system. Keep in mind that frequent revisions to dynamic server pages can result in a large number of obsolete content items. You should do as much work on a development system as possible before deploying to a production instance, and you may need to delete out-of-date pages regularly. When you develop a web site using dynamic server pages, think of the development and contribution processes in terms of ownership: – Structure, including site design and navigation, is owned by the webmaster. When you use dynamic server pages, structure is contained in and controlled with includes that are defined in IDOC files. – Content, that is, the actual text of the web pages, is owned by the contributors. When you use dynamic server pages, content is contained primarily in HCSP files that make use of the includes in the IDOC files. Using dynamic server pages with Content Publisher can be a powerful tool for web publishing. You can create content using Word documents or HCSF pages, and then use Content Publisher to convert the documents to published HCSP files. You can also use the "include before" and the "include after" options in the SCP template to insert additional Idoc Script includes. If you publish dynamic server pages with Content Publisher, use the prefix option for easy identification of your documents. Use a consistent naming convention. For example, for "system" level includes, you could name your IDOC file system_std_page, and then name each include in that file with the prefix system_. This makes locating the includes easier. You may want to create a content type for each type of dynamic server page (such as HCSF_templates or submitted_forms). In accordance with good coding practices, you should always put comments in dynamic server pages to document your customizations. Creating Dynamic Server Pages 4-9 Altering the Appearance and Navigation of Web Pages 4.2.3.2 HCSF Guidelines The following recommendations apply specifically to the development of HCSF pages: ■ ■ When designing a form, consider how the template will be used: – Will this template change depending on the role of the user submitting the form? – Will the submitted content enter into a criteria workflow? – What default metadata values should be set? – Does the form contain ResultSets for multiple line entries? To see the form parameters as they are passed from the web browser to the web server, filtered through Oracle WebCenter Content Server, and then passed back to the web browser, change the method attribute in the include code from POST to GET:
bundlePath includeClass excludeClass loadOrder resources/bundle.js javascript:common 128
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : Yes Page Mode : UseOutlines XMP Toolkit : Adobe XMP Core 4.0-c316 44.253921, Sun Oct 01 2006 17:14:39 Format : application/pdf Title : Oracle Fusion Middleware Developer’s Guide for Oracle Universal Content Management Creator : Oracle Corporation Description : Oracle Fusion Middleware Create Date : 2011:11:02 02:31:55Z Creator Tool : FrameMaker 7.2 Modify Date : 2011:11:02 02:31:55Z Producer : Acrobat Distiller 8.1.0 (Windows) Marked : True Document ID : uuid:b74eea56-c3c5-4101-aef7-10f65ca68ec0 Instance ID : uuid:a0e926e8-bf07-4bb8-b70c-5e9afa97afaf Page Count : 392 Subject : Oracle Fusion Middleware Author : Oracle CorporationEXIF Metadata provided by EXIF.tools