You are on page 1of 16

Oracle WebCenter Content

11g: Content Server


Customization
Student Guide - Volume I

D69235GC10
Edition 1.0
May 2012
D77125

Author

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Saskia Nehls

Disclaimer

Technical Contributors
and Reviewers
Marsha Hancock
Kyle Hatlestad
Samuel Hoareau
Heike Hundt
Lee Klement
Jeff Marshall
Kent Rupiper
Glenn Stokol
Graphic Designer
Rajiv Chandrabhanu
Editors
Vijayalakshmi Narasimhan
Rashmi Rajagopal
Richard Wallis
Publisher
Giri Venugopal

This document contains proprietary information and is protected by copyright and


other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.
The information contained in this document is subject to change without notice. If you
find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is
applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners.

Contents

Course Overview
Course Objectives 1-2
Types of Users 1-4
Target Audience 1-5
Course Units 1-6
Course Schedule 1-7
Classroom Guidelines 1-10
Course Practices 1-11
For Further Information 1-12
Finding the Documentation for Oracle WebCenter Content 1-13
Oracle Learning Library (OLL) 1-14
Related Training 1-15

Customization Overview
Objectives 2-2
Terminology: Before and After Rebranding 2-3
Rebranding Impact 2-4
Oracle WebCenter 2-5
Customization Types 2-6
User Interface 2-7
Functionality 2-8
Functionality: Quota Example 2-9
Layout: Top Menus Versus Trays 2-10
Summary 2-11
Practice 2: Overview 2-12

Customization Overview
Objectives 3-2
Oracle WebCenter Content Architecture 3-3
Fusion Architecture and the Oracle WebCenter Content Server 3-5
Content Server Behavior 3-6
Oracle WebCenter Content Server Startup 3-7
Caching by Reference and by Definition 3-8
WebCenter Content and Service-Oriented Architecture 3-9
Parameters in the URL 3-10

iii

Services: Usage and Concepts 3-12


DataBinder 3-13
DataBinder: Services 3-14
DataBinder: Service Call 3-15
DataBinder: Service Execution 3-17
DataBinder: Service Return 3-18
Directory Structure 3-19
Directory Structure: Terminology for Content Server Directories 3-20
Directory Structure <IdcHomeDir> 3-21
Directory Structure <IntradocDir> 3-22
Resource Types Used in Oracle WebCenter Content 3-23
Server Components: Location in the File System 3-24
Custom Components: Location in the File System 3-25
Summary 3-26
Practice 3: Overview 3-27
4

Using the Component Wizard


Objectives 4-2
Oracle WebCenter Content Server: Customization Capabilities 4-3
What Is a Component? 4-4
Advantages of Components 4-5
Component Wizard: Overview 4-6
Component Wizard: Advantages 4-7
Component Wizard: Component List 4-8
Component Wizard: Installation Components 4-9
Component Wizard: Defining a Default HTML Editor 4-12
Launch Editor Buttons 4-13
Component Wizard: Editing the Readme File 4-14
Packaging (Building) a Component 4-15
Package Components: Build Settings (manifest.hda) 4-16
Package Components: Build (ComponentName.zip) 4-19
Tag Filtering 4-21
File Location of Custom Components 4-22
Subdirectories of /custom /ComponentName 4-23
Subdirectories of /custom /ComponentName/resources 4-24
Subdirectories of /custom /ComponentName/templates 4-25
Components Files 4-26
Components Files: Resource Files 4-27
File Types 4-29
HDA and HTM File Types 4-30
HDA File Structure 4-32

iv

HDA File Structure: Sections 4-33


HDA File Structure Section: @Properties LocalData 4-34
HDA File Structure Section: @ResultSet 4-35
HDA File Structure Section: @ResultSet Example 4-36
HDA File Structure: @ResultSet Scores Example 4-37
Summary 4-38
Practice 4: Overview 4-39
5

Using Idoc Script


Objectives 5-2
Idoc Script: Overview 5-3
Idoc Script: Elements 5-4
Idoc Script Syntax: Code 5-5
Idoc Script Syntax: Comments 5-6
Variables 5-7
Defining Variables 5-8
Variables 5-9
Referencing Variables 5-10
Variables 5-11
Predefined Variables 5-12
Predefined Variables: Common Metadata Fields 5-13
Referencing a Variable 5-14
Idoc Script Elements 5-15
Functions 5-16
Functions and Parameters 5-17
Examples of Commonly Used Functions 5-18
Functions: Example 5-20
Idoc Script Elements 5-21
Conditionals 5-22
Conditional Statements: if Statement 5-23
Conditional Statements: if...else Statement 5-24
Conditional Statements: if...elseif...else Statement 5-25
Conditional Statements: Example 5-26
Operators and Wildcards 5-27
Operators and Wildcards: Using Operators to Compare Integers 5-28
Operators and Wildcards 5-29
Operators and Wildcards: Special String Operators 5-30
Operators and Wildcards 5-31
Operators and Wildcards: Binary (Numeric) Operators 5-32
Operators and Wildcards 5-33
Operators and Wildcards: Boolean Operators 5-34

Idoc Script Elements 5-35


Looping 5-36
ResultSet Looping 5-37
ResultSet Looping: Special Considerations 5-38
ResultSet Looping: Example 5-39
While Looping 5-40
Idoc Script Elements 5-41
HTML Includes 5-42
HTML Includes: Characteristics 5-43
HTML Includes: Defining an HTML Include 5-44
Calling an HTML Include: include Keyword 5-45
Calling an HTML Include from an HTM Template File: Example 5-46
HTML Includes: super Tag 5-47
Summary 5-49
Practice 5: Overview 5-50
6

Building a Component
Objectives 6-2
Glue File 6-3
Understanding the Glue File: ComponentName.hda 6-4
Understanding the Glue File: @ResultSet ResourceDefinition 6-5
Resource Type: Environment 6-6
Environment Resource: componentname_environment.cfg 6-7
Environment Resource: forcechoice_environment.cfg 6-9
Summary 6-13
Practice 6: Overview 6-14

Building a Component
Objectives 7-2
Resource Type: Resource Overview 7-3
Resource Type: Resource 7-4
Resource Types: Categories 7-5
Resource Type Resource: HTML Includes 7-6
Modifying an HTML Include: Adding Information to the Footer 7-7
Resource Type Resource: Localization Strings 7-11
Localization Strings 7-12
Localization Strings: Defining a String 7-14
Localization Strings: Workflow Applet 7-15
Quiz 7-16
Localization Strings 7-17
Localization Strings Example: Workflow Applet 7-18

vi

Summary 7-21
Practice 7 Overview

7-22

Building a Component
Objectives 8-2
Resource Type: Query 8-3
Query Resource 8-4
Query Resource: Query Definition Table 8-5
QdocInfo Query 8-7
Database Tables: Creating a Database Connection 8-8
Use Case: Retrieving Content Types 8-11
Quiz 8-15
Summary 8-16
Practice 8: Overview 8-17

Building a Component
Objectives 9-2
Resource Type: Service 9-3
Service Resource 9-4
Requests and Responses Between Content Management System Elements 9-5
Service Resource: Service Definition Table 9-6
Investigating an Existing Service: CHECKIN_LIST 9-7
Service Example: CHECKIN_LIST Name 9-8
Service Example: CHECKIN_LIST Attributes 9-9
Service Example: CHECKIN_LIST Attributes (Access Levels) 9-10
Service Example: CHECKIN_LIST Attributes 9-12
Service Example: CHECKIN_LIST Actions 9-14
Service Example: CHECKIN_LIST Actions (Action Types) 9-15
Service Example: CHECKIN_LIST Actions (Action) 9-17
Service Example: CHECKIN_LIST Actions (Parameters) 9-18
Service Example: CHECKIN_LIST Actions (Control Mask) 9-19
Service Example: CHECKIN_LIST Actions (Error Message) 9-21
Use Case: Retrieving Content Types 9-22
Quiz 9-25
Use Case: Retrieving Content Types 9-26
Use Case: Retrieving Content Types (Test I) 9-28
Use Case: Retrieving Content Types (Test II) 9-29
Use Case: Retrieving Content Types (Test III) 9-30
Summary 9-31
Practice 9: Overview 9-32

vii

10 Building a Component
Objectives 10-2
Resource Type: Templates 10-3
Resource Type: Templates componentname_templates.hda 10-4
Resource Type: Templates new_template_page1.htm 10-5
Template Resource Definition File: templates.hda 10-6
Understanding the Template Resource File: @ResultSet IntradocTemplates 10-7
Investigating the Displayed Template Page 10-8
Template Page File Example: Check In Page 10-12
Example: Check In Page <$include std_doctype_html_decl$> <$include
checkin_body_def$> 10-13
Example: Check In Page <$include std_checkin_html_head_declarations$> 10-14
Example: Check In Page <$include checkin_page_content$> 10-15
Use Case: Displaying Content Types 10-16
Use Case: Displaying Content Types: Edit Query 10-17
Use Case: Retrieving Content Types: Add Template 10-18
Use Case: Displaying Content Types: Edit Template 10-22
Use Case: Displaying Content Types: Edit Service 10-24
Use Case: Displaying Content Types: Idoc Script Code 10-25
MergeRules 10-27
MergeRules: Link to Component Wizard 10-30
Quiz 10-31
Summary 10-32
Practice 10 Overview 10-33
11 Building a Component
Objectives 11-2
Overview 11-3
Use Case: Modifying the Actions Menu 11-4
Determining the Resources to Change 11-6
Determining the Code to Modify 11-10
Solutions to the Use Case 11-15
Determining the Resources to Change 11-16
Determining the Code to Modify 11-20
Summary 11-25
Practice 11 Overview 11-26
12 Customizing the Interface
Objectives 12-2
Navigation Concepts: Differences Between 10g and 11g Menus 12-3

viii

Navigation Widget Naming 12-4


Writing Components That Are Compatible with Both 10g and 11g
Content Server 12-5
11g Navigation Engine Reference 12-6
DynamicData Tables: CoreMenuItems 12-7
DynamicData Tables: CoreMenuItemRelationships 12-9
DynamicData Tables: CoreMenuItemsFlags 12-11
List of Flags 12-12
DynamicData Tables: CoreMenuItemsFlags 12-15
DynamicData Tables: CoreMenuItemsImages 12-16
DynamicData Tables: CoreMenuItemsDynamicLoadCallbacks 12-18
DynamicData Tables: CoreMenuItemsExitLinks 12-19
DynamicData Tables: CoreMenuItemsTrayDocLinks 12-20
LinkType 12-21
Global JavaScript Vars 12-22
Navigation Widget Naming During and After Rendering 12-23
Navbuilder Backward Compatibility 12-24
NewLayout Component 12-27
Outline for the Layout Customization Procedure 12-28
Installing and Enabling the NewLayout Component 12-29
Outline for the Layout Customization Procedure 12-30
NewLayout Component: Modifying the Navigation 12-31
Creating a New Page Template 12-32
Adding a New Node to the My Content Server Tray 12-34
Moving an Existing Navigation Link 12-36
Changing the Criteria a Navigation Link 12-37
Changing the Icon for a Navigation Link in Tree Display 12-38
Outline for the Layout Customization Procedure 12-39
Summary 12-40
Practice 12: Overview 12-41
13 Customizing the Interface
Objectives 13-2
Layouts and Skins: User Interface Purpose and Benefits 13-3
Directory Structure 13-4
Out-of-Box Files Associated with Layouts 13-5
Customizing Layouts: new_layout.js 13-7
Content Server Layouts 13-9
Content Server Skins 13-10
Content Server Layout-Skin Combinations 13-11
Customizing the User Interface of Oracle WebCenter Content 13-15

ix

Outline for the Layout Customization Procedure 13-16


Types of Publishing 13-17
Static Publishing 13-18
Dynamic Publishing 13-19
Examining the NewLayout Component: newlayout_resource.htm 13-20
Static Published Files: DataNewLayout_Layouts 13-21
Static Published Files: NewLayout_LayoutSkinPairs 13-22
Static Published Files: NewLayout_PublishedStaticFiles 13-23
Dynamic Published Files: NewLayout_PublishedWeblayoutFiles 13-24
dynamicdata Resource Include 13-25
Dynamicdata Resource Include Table Formats: htmltable 13-26
dynamicdata Resource Include Table Formats: commatable 13-27
Dynamic Data: LayoutRenderModes 13-28
CSS Implementation 13-29
Dynamic Data: css_metadata 13-30
Dynamic Data: css_new_layout_new_skin 13-31
Dynamic Data: css_vars_new_layout_new_skin 13-32
Localization Strings: newlayout_strings.htm 13-33
Outline for the Layout Customization Procedure 13-34
Modifying the NewLayout Component: Editing the Banner Title Text 13-35
Modifying the NewLayout Component: Modifying the Banner Image 13-36
Outline for the Layout Customization Procedure 13-39
Summary 13-40
Practice 13: Overview 13-41
14 Advanced Customization of the Core Oracle WebCenter Content Server
Objectives 14-2
Troubleshooting 14-3
Viewing Content Server Template Page Data 14-4
Troubleshooting Method Example: &IsPageDebug=1 14-5
Monitoring Resource Loading via Configuration Settings 14-6
Monitoring Resource Loading Example: TraceResourceLoad 14-8
Monitoring Resource Loading Example: TraceResourceLoad 14-11
<$trace("marker code", "#log")$> <$trace("marker code", "#console")$> 14-14
Idoc Script Functions Example: <$trace("marker code", "#log")$> 14-16
DataBinder 14-18
DataBinder: Variable Substitution Order 14-19
Idoc Script Keywords 14-21
Quiz 14-23
Summary 14-24

15 Advanced Customization of the Core Oracle WebCenter Content Server


Objectives 15-2
Overview 15-3
Page Flags 15-4
Attributes 15-5
compute_std_field_overrides Include 15-7
super.compute_std_field_overrides Incorrectly Placed Before Custom Code 15-8
super.compute_std_field_overrides Correctly Placed After Custom Code 15-9
Summary 15-10
16 Advanced Customization of the Core Oracle WebCenter Content Server
Objectives 16-2
The Power of Dynamic Server Pages 16-3
Four Unique File Types: Syntax 16-4
Sample Dynamic Server Pages 16-5
Advantages of Dynamic Server Pages 16-6
*.idoc 16-7
*.hcst 16-8
*.hcsp 16-9
Using Custom Includes from an *.idoc File: docLoadResourceIncludes() 16-10
Using Custom Includes on Dynamic Server Pages:
docLoadResourceIncludes() 16-12
Use Case: Custom Dynamic New Checkin Page 16-14
Use Case: Custom Dynamic New Check-In Page 16-17
Retrieving Database Information on a Page 16-20
Use Case: Content Information 16-22
Quiz 16-25
Summary 16-26
Practice 16: Overview 16-27
17 Advanced Customization of the Core Oracle WebCenter Content Server
Objectives 17-2
Advantages of Using Content Server Forms 17-3
Lifecycle of a Form 17-5
Creating Content Server Forms 17-7
Load Section 17-8
Data Section 17-9
Presentation Section: Body of the HTML Page 17-10
Presentation Section: Initializing the Form and Defining Its Properties 17-11
Presentation Section: Form vs. Submitted File 17-13

xi

Presentation Section: Setting the Attributes for Each Form Field 17-14
Sample Form: std_display_field Include 17-16
A Sample Form: Standard HTML Form Fields 17-17
A Sample Form: HTML Radio Buttons 17-18
A Sample Form: HTML Check Boxes 17-19
A Sample Form: Form Variables 17-20
Recommendations 17-21
Security Token: idc_token_form_field 17-22
Summary 17-23
Practice 17: Overview 17-24
18 Advanced Customization of the Core Oracle WebCenter Content Server
Objectives 18-2
Java Topics Covered in This Course 18-3
Why Do I Need Java Code? 18-4
Four Types of Java Customization 18-5
Your First Java Application: HelloWorld 18-7
Java Source Files 18-8
Compiling and Running a Simple Java Program 18-9
Grouping and Deploying the Class Files 18-10
Starting Oracle JDeveloper 18-11
Overview of Workspaces, Projects, and Files 18-12
Creating an Application 18-13
Creating a Project 18-14
Creating a Java Class 18-15
Implementing and Running the Java Class 18-16
Creating Inheritance: The Superclass 18-17
Creating Inheritance: The Subclass 18-18
Overriding Methods 18-19
Testing Inheritance Behavior 18-20
Summary 18-21
Practice 18 Overview: Creating a Java Application and a Class Hierarchy 18-22
19 Advanced Customization of the Core Oracle WebCenter Content Server
Objectives 19-2
HowTo Component 11g 19-3
Add New Functionality by Creating A Custom Service Class 19-4
Creating a Custom Java Component For a New Service Class 19-5
Key Service Class Objects 19-6
Working with the DataBinder 19-7
Retrieving Service Parameters 19-8

xii

Accessing the Java Class Library 19-9


Creating the Custom Service Java Class 19-10
Viewing the Custom Server Sample Code 19-11
Creating the Deployment Profile 19-12
Specifying the Java Archive Location and Name 19-13
Generating the Java Archive 19-14
Creating the New Component 19-15
Adding a New Service Component 19-16
Adding the Service Table Information and Service 19-17
Adding the Java Method to the Service 19-18
Enabling the Service Component 19-19
Adding the Java Archive to the Service Classpath 19-20
Creating a Folder and Copying the Java Archive 19-21
Testing the New Service Component 19-22
Summary 19-23
Practice 19: Overview 19-24
20 Advanced Customization of the Core Oracle WebCenter Content Server
Objectives 20-2
Uses of Custom Idoc Script 20-3
Viewing the Results of the NewIdocScript Sample Component 20-4
Examining the Component Files 20-5
NewIdocScript.hda LocalData and MergeRules ResultSet 20-6
new_idoc_script_extensions.htm 20-7
NewScriptExtensions.java and NewScriptExtensions.class 20-8
Example: Adding a New Idoc Script Function Reverse() 20-10
Editing the Directory Structure of the NewIdocScript Component 20-11
Loading the NewIdocScript Component in JDeveloper 20-12
Verifying the Source Paths and Default Package 20-16
Loading the Content Server Java Classes 20-17
Editing NewScriptExtensions.java: Adding the Reverse() Function 20-20
Editing the Content Server Template Page: idoc_script_test_page.htm 20-21
Deploying Your Project 20-22
Verifying Your Customization 20-26
Summary 20-27
Practice 20: Overview 20-28
21 Using Java to Customize Oracle WebCenter Content Server
Objectives 21-2
What Is a Filter? 21-3
Filter Events (Triggers) 21-4

xiii

Filter Objects 21-6


FilterImplementor Interface 21-7
doFilter()Return Values 21-8
Sample Component DynamicPrefix 21-9
Examining the Component Files 21-10
DynamicPrefix.hda and dynamic_prefix_environment.cfg files
CheckinFilter.java 21-12
CheckinFilter.java (without comments) 21-13
Summary 21-14
Practice 21: Overview 21-15

21-11

22 Using Java to Customize Oracle WebCenter Content Server


Objectives 22-2
Service Classes Versus Service Handlers 22-3
Important ServiceHandler Objects 22-4
Extending a Custom Service Class Component 22-5
Existing Java Source File 22-6
Create Custom ServiceHandler 22-7
Register the New Class Files 22-8
Merging HelloWorld_ServiceHandlers into ServiceHandlers ResultSet 22-9
HelloWorld_ServiceHandlers 22-10
Cached ServiceHandlers 22-11
Resulting merged ServiceHandlers 22-12
Adding an Existing Service to the Component 22-13
Creating a Custom Java ServiceHandler 22-14
Viewing the Custom Server Sample Code 22-15
Updating the Java Archive 22-16
Editing the HelloWorld Component: Adding a Resource 22-17
Adding the ServiceHandler Table Information 22-18
Updating the ServiceHandler Table 22-19
Editing MergeRules in the Glue File 22-20
Editing an Existing Service 22-21
Adding the Java Method to an Existing Service 22-23
Testing the Results 22-24
Method Search Order 22-25
Improving Forward Compatibility: Chaining Service Handlers 22-26
Updating the ServiceHandler Table 22-27
Summary 22-28
Practice 22: Overview 22-29

xiv

A Continuing Your Education and Further Reading


Where Do You Go from Here? A-2
Continuing Education Resources A-3
Oracle University A-4
Continuing Your Education A-5
Oracle Technology Network A-6
Oracle Learning Library A-7
Oracle Learning Channel A-8
Oracle Magazine A-9
Oracle Technology Network Community A-10
Technical Support: My Oracle Support A-11
Oracle WebCenter Content Product Page A-12
Oracle Certification Program A-13
Thank You! A-14

xv

You might also like