Sunday Feb 08, 2015

RIDC using Jython Scripts

Jython is an implementation of Python for the JVM. Jython takes the Python programming language syntax and enables it to run on the Java platform. This allows seamless integration with the use of Java libraries and other Java-based applications. Plus it helps to have a loosely typed interpreted language as it makes writing code much faster.

I have written a set of scripts to execute some core Content Server services to check-in, update, delete content items and to browse, create, delete, link items using FrameworkFolders. You can download the scripts here.

Checkin new Content and a Revision
Update Metadata
Delete a single revision and all revisions
FrameworkFolders: Create Folder
FrameworkFolders: Create Shortcuts
FrameworkFolders: Browse Folders
FrameworkFolders: Copy Items
FrameworkFolders: Move Items
FrameworkFolders: Delete Items
FrameworkFolders: Propagate Metadata
FrameworkFolders: Remove (unfile) content from a folder

NOTE: Please note that these code snippets should be used for development and testing purposes only, as such it is unsupported and should not be used on production environments.

Tuesday Feb 03, 2015

Using Access Control Lists in WebCenter Content

WebCenter Content offers a comprehensive security model using its traditional Security Groups and Account metadata fields. Each content item is assigned to a security group, and if accounts are enabled then content items can also be assigned to an account. Users are assigned a certain level of permission (Read, Write, Delete, or Admin) for each security group and account, which enables them to work with a content item only to the extent that they have permissions to the item's security group and account.

At times, these constructs do not meet the requirements and you have to look at additional security options available within the Content Server. I prefer to choose one or more options in the order listed below. In my opinion, as you start moving down the list, the computational overheard on the Content Server increases (User ACL puts the most overhead).
  1. Security Groups and Roles
  2. Accounts
  3. Supplemental Markings (Records Management)
  4. NeedToKnow Component
  5. Role ACL
  6. Group ACL
  7. Oracle Entitlement Server
  8. User ACL
Follow the instructions below to setup Access Control Lists on your Content Server and configure them.
  1. Login to the Content Server as an Administrator.
  2. Navigate to the Administration -> Admin Server -> General Configuration page.
  3. Under the Additional Configuration Variables section, add the following lines. You can also add the lines directly to the <INSTANCE_HOME>/cs/config/config.cfg file.
    SpecialAuthGroups=<comma separated list of security groups>
    # ZonedSecurityFields=xClbraUserList,xClbraAliasList,xClbraRoleList
    # AccessListPrivilegesGrantedWhenEmpty=true
  4. Restart the Content Server.
  5. Login to the Content Server as an Administrator.
  6. Navigate to the Administration -> Admin Applets -> User Admin applet.
  7. Go to the Aliases tab, and add aliases for the groups that you want to list in the Group Access List metadata. Note that the Group Access List metadata is really a Alias Access List and does NOT correspond to a LDAP group but a Content Server internal Alias.
  8. If you want to use LDAP groups, for your ACLs, you will need to enable the RoleEntityACL component. This component is already installed but needs to be enabled. Restart the Content Server after this change.
  9. Navigate to the Administration -> Admin Applets -> Configuration Manager applet.
  10. Go to the Views tab and locate the ExternalRolesView view. Add the LDAP groups that you want to use for the Role ACL to this list.
NOTE: The User Access List type-ahead field will only display users that have logged into the Content Server at least once. The Group Access List type-ahead field will only display Aliases defined in the Content Server. The Role Access List type-ahead field will only display groups defined in the ExternalRolesView view. You will need to make sure that a corresponding group with the same name exists in LDAP.

Monday Oct 13, 2014

How to: Using the ComponentTool utility to manage Content Server components

I have been asked multiple times, primarily by people who want to implement some sort of a MWaaS for WebCenter Components, how to install and/or enable WebCenter Content Components using a script.

One of the tools you can use to script this activity is the ComponentTool utility, which is installed by default. The executable is located in the <domainhome>/ucm/cs/bin/ directory. The ComponentTool component enables administrators to use a command line to install, enable, and disable components.

I have listed the options and commands available with the ComponentTool utility in the table below:

Activity Command
Enable a Component ComponentTool [-v|-vv] [-t trace_section ] --enable <component_name>

For example,
   <DomainHome>/ucm/cs/bin/ComponentTool -vv --enable ContentFolios
Disable a Component ComponentTool [-v|-vv] [-t trace_section ] --disable <component_name>

For example,
   <DomainHome>/ucm/cs/bin/ComponentTool -v --disable ContentFolios
List Components ComponentTool [-v|-vv] [-t trace_section ] --list-enabled|--list-disabled|--list
Install a New Component ComponentTool [-v|-vv] [-t trace_section ] --install <component_name>.hda|<component_name>.zip [ --preferences <component_name_prefs>.hda ]

For example,
   <DomainHome>/ucm/cs/bin/ComponentTool -vv --install /tmp/
Help ComponentTool [-v|-vv] [-t trace_section ] --help

Thursday Jul 03, 2014

iOS app for WebCenter Content

I have the habit of browsing through the Apple AppStore on my iPhone to discover new apps and give them a try. I usually look for new games but today I thought I will try the app for WebCenter Content. Finding the app was straight forward; I just needed to search for WebCenter Content and a few apps popped up. The first one from Oracle is what I was looking for.

I open the app to get a login screen. It requires a username, password and the URL of the content server you want to connect to. I used the URL in the format http[s]://hostname[:port]/cs/idcplg and soon enough was connected to it.

The app itself is fairly simple, with basic functions for searching (includes full-text), browsing and viewing documents with native device support. I have compiled a few screenshots of the app.

[Read More]

Monday Jun 16, 2014

How to: Skip the WebCenter Content Post-Installation Configuration page

Ever wondered how to perform the Content Post-Installation Configuration silently. I am referring to the additional configuration step just after completing the WebLogic domain configuration. When you start the Content managed server for the first time, you are required to specify the instance location and several other parameters. After entering these values, the managed servers needs to be restarted.

Post Installation Configuration Page for Content Server

What if there was a way you could start the managed server for the first time and begin using the application? Well there is; just follow the instructions below:

  1. After you have created the domain configuration, with one content managed server in my case, do not start the Content managed server yet.
  2. Create a new file, <DOMAIN_HOME>/ucm/cs/bin/autoinstall.cfg. This is the file that gets created once you submit the Post-Installation Configuration page.
  3. This file contains the configuration entries that you enter on the post install page for your instance. Edit the autoinstall.cfg file to add the following mandatory entries:
    • IDC_Name=<name>
    • IDC_ID=<id>
    • AutoInstallComplete=true
  4. Edit the autoinstall.cfg file to append one or more entries to configure your instance.
    • IntradocDir=<path>
    • VaultDir=<path>/vault
    • WeblayoutDir=<path>/weblayout
  5. Start the Content managed server now and log in.

Refer to the IDOC Script Reference Guide for information on these parameters and to discover other parameters that you can use.

NOTE: Please note that these instructions should be used for development and testing purposes only.

Monday Jun 09, 2014

FrameworkFolders support for WebCenter Portal

Oracle WebCenter Content Server includes components that provide a hierarchical folder interface, similar to a conventional file system, for organizing and managing some or all of the content in the repository. We used Contribution Folders (folders_g) which is being replaced by the new Folders (FrameworkFolders) component. The newer FrameworkFolders component fixes a number of limitations that folders_g had and adds a ton of new features. If you have played with the WebCenter Content mobile app, you will notice that it uses FrameworkFolders too.

WebCenter Portal requires the use of the folders_g component. Given the fact that folders_g and FrameworkFolders component do not go well together and must never be enabled together on any system, you could never use the new features if you planned to use integrate Content with Portal. I still remember presenting a demo with a colleague for a client and he was showing off the mobile capabilities in Portal (which are pretty impressive by the way) and was getting all the glory; while I was sitting back wanting to show off the Content app but could not (no FrameworkFolders).

Not any more; Oracle has released bundle patches for both WebCenter Content and Portal in April 2014 which bring home the support for FrameworkFolders. These patches will bring these products to version

You can enable support for FrameworkFolders on new Content and Portal installations where the folders_g component has never been enabled using the following patches:

  • Download and apply the WebCenter Content MLR05 patch 18448219.
  • Download and apply the WebCenter Portal BP3 patch 18085041.
  • Download and apply the WebCenterConfigure component patch 18387955. Before applying this patch on the Content Server ensure that WebCenter Content MLR03 patch 18448219 has already been applied.

You can find detailed instructions on how to enable FrameworkFolders support in the Oracle® Fusion Middleware Installation Guide for Oracle WebCenter Portal 11g Release 1 (

There may be another bundle patches release (version for many FMW products (including WebCenter Portal) in July 2014 which could further enhance the FrameworkFolders support.

Saturday Jun 07, 2014

A strong component keeps everything together

Most of the times you implement a WebCenter Content based system, you require some sort of customization. Sometimes these customizations need a Java class or two, or libraries (for example, the JavaMail API), or Database Objects (like new tables, views, indexes, etc).

I have seen that libraries and Database Objects are usually put in place using manual steps. This means that the library jar files are copied to one of the common classes directory (set in the Content CLASSPATH variable) and/or the database scripts are executed manually. I have also seen people place the custom Java classes in the common classes directory.

While this may seem like an easy solution, think about a scenario where you need to disable or uninstall the component or if you have to upgrade or migrate the system. You have to keep these manual steps documented and execute them every time you encounter the above scenarios. It is very common that some of these manual steps are missed when you have multiple teams and people working on the system.

Here are a few points to ponder upon:

  • Place all your custom Java classes within your component. Create a new directory, say ${COMPONENT_DIR}/classes, and place your code there. You can choose to bundle all your classes into a jar or you can place the entire class directory structure. Add a path entry to the Build Settings so that it is bundled with the component when you build it. You also need to update the Custom Class Path and the Custom Class Path Load Order under the Advanced Build Settings. This will ensure that the system CLASSPATH is updated to add this new directory.
  • Create a new component for any new library that you want to add. Add the appropriate path entries to the Build Settings so that it is bundled with the component when you build it. You also need to update the Custom Class Path, Custom Class Path Load Order and/or the Custom Library Path under the Advanced Build Settings. Enter a comma separated list of features that this component will provide. When you create other components that will use the features exposed by this component, make sure that you specify a dependency to this library component by specifying the comma separated list of features in the Advanced Build Settings.
  • The component wizard allows you to create custom install/uninstall Java code. The wizard will create a install filter class when you check the “Has Install” checkbox on the “Install/Uninstall Settings” tab. Consider using this filter class to create database objects when you install the component and drop the objects when you uninstall the component. If you do a lot of custom component development, consider creating a install/uninstall Java class, which can execute queries defined within the component.

To sum up, whenever you write a new custom component, make sure that you bundle everything within the component.

Tuesday May 13, 2014

How to: Create a Custom Component to build a new Content Server page and modify the System Menu

The Oracle Content Server provides a framework to create and/or modify functionality through components. Almost everything within the Content Server can be customized using components right from the user interfaces like the checkin screens, to the core content server functionality (involves Java programming).

The best way to create and modify components is to use the Component Wizard utility which is shipped along with the content server. The Component Wizard provides all the tools and resources required to create components as well as bundle them for deployment to different content servers. You may also use Mozilla Firefox with the Web Developer extension, for creating/modifying user interfaces as it is a wonderful tool to check your JavaScripts and CSS. Although, components can be created without the Wizard, I would highly recommend it as it makes the life of the developer easy.

In this post, I will demonstrate how to add a new Navigation Menu item to the content server. The new menu item will display a new content server page that will execute a service to run a query to fetch the list of content types available within the Content Server. After creating and installing the custom component, the Content Server will show additional menus for the new page created (as shown in the screenshot below).

Create a Resource - HTML Include/String to add the new Menu Item

  1. Start the Component Wizard. On the Component List dialog, click on the Add... button.

  2. Name the new component as SampleComponent01 and keep the rest of the values as is.

  3. Click Ok to create the component and open it up in the Component Wizard.
  4. Add a new resource to add the new menu item. Under the Resource Definition tab, click on the Add... button.
  5. In the Add resource dialog, select the Resource - HTML Include/String Type. Accept the defaults for all the other fields.

  6. Click Next.
  7. In the Add HTML Resource Include/String dialog, create a Data Include. This is the new way to edit navigation items in 11g. Please note that prior to 11g, the NavBuilder JavaScript API was used to tweak the navigation items which is now deprecated in 11g. The new method takes advantage of a new data table construct in 11g Idoc Script called Dynamic Data Tables. These allow you to create tables of data in Idoc Script and dynamically change them as opposed to the static table definitions. This is useful for data that changes frequently and may be user specific like the navigation menu.
  8. Select the Data Include checkbox.
  9. Click Finish.
  10. This will create the resource file and will open it up in the Text Editor for editing.
  11. Enter the following code and save the file. The file will look like the image below. Alternatively, you can also use the wizard to create these data includes. The section on the right hand side allows you to create these includes. I prefer the Text Editor method as it is faster.
  12. To view the results, enable the component and restart the Content Server. Go to Options -> Enable and restart the Content Server.
  13. Log in to the Content Server to view the changes.

Create a Query to fetch the list of Content Types

  1. Return to the Component Wizard.
  2. Under the Resource Definition tab, click on the Add... button.
  3. In the Add resource dialog, select the Query Type. Accept the defaults for all the other fields.
  4. Click Next.
  5. In the Add Query Table Information click Next.
  6. In the Add Query dialog, enter the Name and the Query. Here you can also specify parameters for the query just like you would create a PreparedStatement in Java. The query should have "?" for the parameters. Specify the parameters in the Parameters section below. The sequence of the parameters is defined by the order in the Parameters list.
  7. Click Finish.
  8. You can add more queries to the file by directly editing the file or using the wizard options on the right hand side.

Create a Template to display the Resultset

  1. In the Component Wizard, create a template. A template is nothing but a page that will display the final results of a service call. We will create the template before we create the service.
  2. Before starting with the template, we need to layout the page. What we are trying to do here is display the content types as a table. Since we will be executing a query, we need a resultset to loop through the results. Let us say that the resultset name is SC01DOCTYPES for now.
  3. Under the Resource Definition tab, click on the Add... button.
  4. In the Add resource dialog, select the Template Type. Accept the defaults for all the other fields.
  5. In the Add Template Table Information dialog, keep the default details as is and click Next.

  6. In the Add IntradocTemplate dialog, enter the details as given below:
  7. Click Finish.
  8. Click on the Launch Editor... button on the right hand side to open up the newly created template and make the changes shown below.
  9. Save the File and close the external editor. Note that we are looping through the resultset name that we had decided earlier.

Create a Service to execute the query and populate the Resultset

  1. In the Component Wizard, create a new service. This service will execute the query created above and will redirect the results to the new template. The results of the query will be populated into a RESULTSET named above, that is SC01DOCTYPES.
  2. Under the Resource Definition tab, click on the Add... button.
  3. In the Add resource dialog, select the Service Type. Accept the defaults for all the other fields.
  4. In the Add Service Table Information dialog, keep the default data and click Next.
  5. In the Add Service dialog, enter the details as shown below.
  6. In the Actions section, click on the Add... button and fill in the details as shown below. Note that the parameter field has the Resultset name. This will allow the service to populate the query results into a resultset with this name.
  7. Click Ok and Ok again to create the Service.
  8. Restart the Content Server.

Use existing HTML includes to build a standard Content Server page

  1. Return to the Component Wizard and select the template from the Resource Definition list.
  2. Select the SC01_CONTENT_TYPES template from the right hand side box and click on the Launch editor... button at the bottom.
  3. This opens up the template in the text editor. Update the code to include the the following.
  4. What we have done here is include a set to predefined system includes that are used to build any content server page.
  5. Restart the content server.
  6. Log in to the Content Server to view the component in action. Just use the link, http://localhost:16200/cs/idcplg?IdcService=SC01_GET_DOCTYPES(make sure that you replace localhost:16200 with the hostname and port of your instance) and view the page to see the results.

Welcome to the Oracle WebCenter Suite Consulting team blog. We'll use this site for sharing important product information, our experience as well as tips and tricks for the Oracle WebCenter Content, Portal and Sites products.



« March 2015