- Content Platforms
- Content Services
- About TEAM
By: Dwayne Parkinson - Solution Architect
In the previous blog entry on customizing WebCenter Content Server we covered the basic content server architecture. With that architecture in mind we can discuss how customization is done on the content server.
Customizing the content server involves creating custom “components” that run on top of the base architecture. Components are made up of five types of resources. The resources provide specific functionality and are each managed differently. The table below describes each of the resources.
Types of Component Resources
|Environment||This resource defines variables. The variables can overwrite existing or create new variables for the component.|
|Resource||This resource defines custom content. The resource can create page sections or strings to be used on pages.|
|Template||This resource manages and defines page layout templates. The custom templates can be used with services and override existing templates.|
|Query||This resource defines SQL queries that can be used against Content Servers database. The SQL queries are defined by name, which allows them to be referenced throughout Content Server’s architecture.|
|Service||This resource defines functionality for Content Server. The resource can override core services or add new capabilities to Content Server.|
Each type of resource is used differently. These resources and the code contained within them can be part of custom components, but each resource type also has a counterpart within Content Server core files.
The core Content Server files contain the same types of resources as are contained in components. For that reason, it is often very useful to look at the core files as examples when creating custom components. Creating your own custom components allows for customizations to be separated from the core, which is especially handy during the installation of a Content Server update because your customizations will not be lost.
Note: The core files should not be modified to create customizations for Content Server.
The core files are available in the <install_dir>/ucm/idc/info/core directory.
Covered Core Content Server Files
|idoc/std_page.htm||Contains Content Server’s core includes. The file is a good reference when trying to modify Content Server’s interface.|
|idoc/std_services.htm||Contains Content Server’s core services. The file is used to learn more about a specific service.|
|tables/query.htm||Contains Content Server’s core queries. The file can be referenced to find existing queries to use in components.|
|lang/cs_string.htm||Contains Content Server’s system strings. The strings contained in this file are system and errors messages.|
|lang/ww_strings.htm||Contains Content Server’s interface strings. The strings contained in this file are displayed on the web interface.|
The table above lists a few of the important files that you will find useful when creating custom components. The core folder contains many more files that can be used as references in the development of custom components as well, but they won’t be covered here.
Now that we have an understanding of some of the types of resources a component contains, let’s look at the component itself. A “component” is a predefined folder structure that contains many different files that define and are used by the component. The content server expects this folder structure to be in place when a component is installed and it will look inside the folder for specific files and expect certain files in certain locations based on how the component is built. The diagram below depicts some of the most common files that you will find in a component folder structure.
You can use the above diagram to help identify different types of files as it specifies the naming convention for each type of file under the name of the file. The following table shows some of the most common files that a component will contain and a brief description of what they are used for.
Component File Locations and Descriptions
|Component File||components.hda||Specifies the components that are enabled and the location of the corresponding Component Definition File. It is located in the /config directory.|
|Component Definition File (Glue File)||*.hda||A glue file or component definition file. Points to custom resources defined for a file. The glue file for a component is typically named ComponentName.hda. It is located in the root component directory.|
|Manifest File||manifest.hda||This lists the files that make up the component and specifies their locations. It points to resources through the Glue File. The file is always located in the root directory when present, but does not appear until the Component is built. This is because this file is used for installation of the component.|
|Environment Resource||*_environment.cfg||File defines configuration setting for Content Server. Located in the root component directory.|
|Resource Resource||*_resource.htm||Resource file contains includes, strings, static tables, and dynamic tables. It is located in the resources directory.|
|Template Resource||*_template.hda||A template definition file that points to the custom template resource files defined for a component. Typically located in the templates directory.|
|Template Page||*_template.htm||A resource file that defines a function or procedure that is performed by the content server. Typically located in the resources directory.|
|Service Resource||*_service.htm||Defines a function or procedure that is performed by the content server.|
|Query Resource||*_query.htm||Defines SQL queries. These can be specified in a service resource directly but this allows for reusability.|
Now that we know a little about the component, let’s look at the folder structure for a component and see what it looks like.
You may notice some variability in the file structure for different components, however, when using the Component Wizard to create a custom component, there are three directories that are typically created.
The <ComponentName> directory contains the glue file and environment resource. It also contains the resources and templates subdirectory.
The Resources folder contains the component’s resource definitions such as queries, page resources, and services.
The Templates folder contains the template definition file for that component and the template pages.
As you can see from the screenshot, there are often other directories as well including classes, images, publish, etc. A manifest file lists the files that make up the component and specifies their locations. The file is always located in the /ComponentName directory.
When you create or load a custom component you will find the component files by navigating to the following location on your server:
From there you will see a folder structure similar to the one shown above. Exploring this folder structure and reviewing the files will provide a good basis for understanding the next steps in component creation.
When components are moved from system to system, the entire component folder structure is “zipped” up using standard compression programs. The zipped files can then be transferred between the systems and installed using either Configuration Manager or the Component Manager (see Oracle Documentation for these products).
Understanding and creating custom components provides tremendous opportunity to leverage your WebCenter Content server in new and exciting ways. For more information on how to create custom components, please contact TEAM Informatics and ask about our training options, including classes customized to meet your specific needs.