In this part of the tutorial we are back in my territory: integration with UCM or as Oracle calls it these days: WebCenter Content.
This part of the tutorial will teach you how to create a connection to UCM from within JDeveloper. We will be using the Document Manager taskflow to manage our documents in our portal and use the content presenter to show and create documents that will be stored in UCM.
This is just the introduction part of the integration. I estimate that we will have 3 or 4 parts dedicated to integrating content. This tells you how important UCM is for WebCenter. Especially now, in the new landscape of WebCenter. I will also try to add some multilingual sections to the tutorial so that you know how to implement a multilingual portal by using UCM and WebCenter.
The only additional requirement for this tutorial is a working version of UCM 11g. This tutorial does not cover the installation process of UCM. If you have issues for getting UCM up and running, please leave a comment and if there are enough people asking for help, I will write a step by step guide on how to install and configure UCM. Just like I did for the WebCenter installation guide.
As a starter you should also download the start project. You can also use your own project if you have done each part until now.
From WebCenter we connect to UCM by using a socket connection. By default UCM 11g does not allow a socket connection so we need to enable this first. If you have installed UCM 10g or earlier versions, this will be done automatically during install but since 11g, you need to do this after the installation.
We can enable the socket connection by using the Enterprise Manager. Browse to your Enterprise Manager. On a default domain this is on http://localhost:7001/em
Open the Content Management node and select Configuration from the UCM menu as shown in following image:
On the configuration page, you will need to provide an Intradoc ServerPort. This is the port that will be used for a socket connection. By default this is left empty so we need to provide the port. In previous versions of UCM this was set by the installation to 4444 so we are going to use the same value.
The IP Address Filter is also a very important parameter. With this filter, you can grant specific IP addresses to connect to UCM. If an IP is not listed, it will not be able to create a socket connection to the server. You can also use wildcards as shown in the image below:
After saving these setting, you are required to reboot the UCM server before the changes will be applied.
That's it. We can now create a connection to the server in JDeveloper.
In JDeveloper right click on the connection folder and select New Connection and then Content Repository:
Specify a name for the connection.
Check the Set as primary connection for Document service checkbox. This is important because if you don't have a connection that has been set as primary, you will have issues when dropping taskflows to your pages. You will always have to specify the connection manually. By setting this checkbox, each document service taskflow will use the primary connection if you don't specify a connection as a parameter.
Select Oracle Content Server as the Repository Type
By select Content Server as the repository type, you will see some configuration parameter that need to filled in for the connection:
There are more parameters but for the socket connection that's enough. Press Test Connection to see if everything is ok:
Press OK to save the connection.
Now let's create some content!
In most cases, we as developers will not provide content. We will only provide our users with a way to easily add the content they want on the pages they want.
Here's some good news. We already have done that! You only need a working UCM connection and that's it. All the rest is out of the box. I'll show you how.
In this part we will add a basic document that will be displayed in the About Us page.
Let's run the portal and login with the Weblogic user.
Go to the administration section and open the Services tab. In this tab we will have some basic features to manage the configured services.
The first service is the Content service. This service is enabled by default and requires a connection to a content repository which we just created.
You will see the Document Manager taskflow. What do you think this taskflows does? Yes... Managing documents.
It provides a folder view of your content server. You can browse it, create documents, download, edit, and so on.
In my screenshot you see two folders. The "Bijdragemappen" is the default folder created by UCM. I have installed my UCM in Dutch so that's why the folder name has such a strange name (unless you are Belgian or Dutch). In most cases this folder will be called "Contribution folders". This just as a side note.
It is common practice to save all your document in these folders. WebCenter however, has created another root folder (PersonalSpaces) which is used in WebCenter Spaces. For this portal we will store all the documents in the Contribution folders.
Click on the Contribution folder to open it. You now will see all its content. If you already have used UCM and you have stored content in folders than you will see these document in this taskflow.
From the File menu select New Folder
Specify ViePortal as the folder name and press Create
Once the folder has been created, open it. We will store all our portal documents in this folder.
Click on the New Wiki Document. To be honest, I find the name "Wiki document" a bit of a bad choice from Oracle. We will not create just a Wiki document. This button will just create an HTML document in the content server that we can edit by using a rich text editor. These documents are more than just Wiki documents. You will use this feature to create document that can be managed at runtime.
Specify a title for the document: About Us
Provide the content by using the rich text editor. Use your imagination for the About Us page. I'll show what I have:
Press the Create button in order to create the document. That's it. Our first document has been created.
Let's add it to the About Us page.
This section is a bit "out of section" which means that it's more a general topic and not bound to this part of the tutorial.
Before we can edit a page at runtime, we first need to add the Oracle Composer to our page. This is done by adding the pageCustomizable component to the page. We'll do this now for the About Us page.
Open up the aboutUs.jspx page in JDeveloper. From the component palette, drag an drop the pageCustomizable component on the content facet:
The Content facet should contain following code:
Save and run the portal again. That's it. We now have enabled runtime editing of the page.
In the world of WebCenter, the Content Presenter is king. Especially if we are talking about Content Integration and now since UCM is called WebCenter Content, the Content Presenter has gained even more power! So don't let me see you write Content Presenter without capitals. That blasphemy!
Alright, bad joke, I know but nevertheless, the Content Presenter is very important and powerful. Therefore I will dedicate a complete part of the tutorial to it. In this section I just give a brief introduction. The next part of the tutorial will be dedicated to the CP.
Return to your portal and open the About Us page.
In order to edit the page, we can use a shortcut. Just press CTRL+SHIFT+E. This will bring up the Composer:
Press the Add Content button to open the Resource Catalog. In the default resource catalog, we can browse the Content Server and select a document that we want to display.
Open the Content Management folder and the All Content folder.
You will now see a list of all the connections to a content server. In our case, we only have a single connection so open its folder and browse to the document we just created.
If you have followed the previous steps, you should browse thru:
Contribution Folders => ViePortal and then you see the About Us.htm:
Press the Add button and select Content Presenter from the context menu:
As you can see, there are plenty of options to display a document in the portal. Just play around with them to see the difference.
Close the catalog and close the composer so we return to view mode. This should be the result:
One more cool feature of the CP is that we can edit this document inline without needing to go to the Document Manager.
If you want to make changes to the document we can do them on the About Us page without needing to go to the Document Manager. There is also a shortcut available for this: CTRL+SHIFT+C. Press the shortcut and you should see a blue dashed line around the content. On the right you have a View and Managethis document icon. Press it. This will open the Contribution popup. In this popup we can see the and modify the properties of the document:
Press the Edit button so we can make some changes to the text. This will show up the same rich text editor as when we created the document:
Press Save while editing to store the changes and press Save and Close to return to the page. On the page we can exit the contribution mode by pressing the shortcut CTRL+SHIFT+C again.
Important notice: remember from the first part of the tutorial that we lose runtime customizations when we rerun the portal so don't be surprised if you rerun the portal and the AboutUs page is suddenly empty. In the next part of the tutorial, we will add the content presenter from within JDeveloper instead.
That's it for now. This part of the tutorial is an introduction to content integration. In the following 2 or 3 section, we will take a closer look at the features of content integration. Meanwhile i recommend that you play a bit with what you have learned. Explore the possibilities of the rich text editor. Take a look at all the features. See if you can find create links to other pages by selecting them, add images and so on. If you have any problems or question, please leave a comment.
The next part will take a closer look at the Content Presenter. I will show you how templates work and how to create them. We will also take a look at how to integrate regions from SiteStudio in our portal.
In my WebCenter 11g PS3 Administration Cookbook you can also find more information about the Content Presenter. The book covers more the runtime capabilities of the Content Presneter while this tutorial will cover the design time capabilities.
The part after that will take a closer look at the navigation model features for content integration and additional taskflows. I will also try to see if I can manage to write a part about multilingual content because that seems to be an issue with a lot of people.