This tutorial gives you an overview and talks about the fundamentals of Oracle WebCenter.
Oracle WebCenter Suite is a platform for building corporate portals or custom applications that integrate Enterprise 2.0 features, and aims to improve business processes through the integration of business applications and user communities.
This suite allows companies to build corporate portals, social networks, collaborative communities, content managers, composite applications, and intranet and internet sites.
Oracle WebCenter suite has the following key components:
The relationships between these components and the application server are displayed in the following image:
Oracle WebCenter 11g includes components that provide a full range of functionality to develop customer facing internet web sites, intranets, extranets, and social networking applications. These components include:
1) Oracle WebCenter Portal Framework: Speeds development and delivery of portal web applications. This modern portal framework enables embedding of AJAX-based components, portlets, services, and content into context-rich customizable enterprise portals. Portal Framework features include page hierarchies, navigation models, delegated administration, customization, themes and skins, and portal preferences. The Portal Framework is delivered as an extension to Oracle JDeveloper, which provides an integrated development environment for composite J2EE applications, business processes, BI applications, and enterprise portals.
2) Oracle WebCenter Spaces: Furnishes all the tools you require to rapidly create web sites, portals, communities, and social networking sites capable of accommodating thousands of users and encompassing diverse populations with differing languages. WebCenter Spaces empowers teams to quickly and efficiently manage their information, applications, projects, and people. Oracle WebCenter Spaces allows users to work more effectively with project teams and work groups, including teams that span multiple geographies or include external members. It enables sharing and collaboration on team content to focus valuable resources on solving business problems, tapping into new ideas, and reducing time to market.
3) WebCenter Services: Make it easy to integrate new social computing tools with enterprise information and business processes. The list of services includes the most comprehensive catalog of pre-packaged social computing tools available today, including wikis, blogs, RSS, lists, discussions, commenting, sharing, polls, search, and more. Activity Streams channel the actions taking place within the enterprise directly to users, and the Activity Graph feature delivers revolutionary capabilities to recommend valuable relationships based on information access patterns between people, content, and enterprise application activities. Other important services include REST, WSRP, pagelets, and analytics.
4) Oracle Composer: Enables runtime customization and personalization of pages that are created with Oracle WebCenter Portal Framework or Oracle WebCenter Spaces, and includes a set of services to create and manage portal pages at runtime. Runtime customizations are managed by Oracle Metadata Services (MDS).
With the new release of WebCenter, you have the ability to create rich enterprise portals without needing to code a lot.
In this chapter, we will explain how to set up, create, and build such a portal application. You will learn about:
1) Preparing JDeveloper for WebCenter
2) Creating a Webcenter portal
3) Managing pages
4) Changing the look and feel of your portal
5) Editing pages using the composer
An enterprise portal is a framework that allows users to interact with different applications in a secure way. There is a single point of entry and the security to the composite applications is transparent for the user.
Each user should be able to create their own view on the portal. A portal is highly customizable, which means that most of the work will be done at runtime. An administrator should be able to create and manage pages, users, roles, and so on. Users can choose whatever content they want to see on their pages so they can personalize the portal to their needs.
In this chapter, you will learn some basics about the WebCenter Portal application. Later chapters will go into further details on most of the subjects covered in this chapter. It is intended as an introduction to the WebCenter Portal.
Preparing JDeveloper for WebCenter
When you want to build WebCenter portals, JDeveloper is the preferred IDE. JDeveloper has a lot of built-in features that will help us to build rich enterprise applications. It has a lot of wizards that can help in building the complex configuration files.
You will need to install JDeveloper before you can start with this recipe.
JDeveloper is the IDE from Oracle and can be downloaded from the following link:HTTP://WWW.ORACLE.COM/TECHNETWORK/DEVELOPER-TOOLS/JDEV/DOWNLOADS/INDEX.HTML. You will need to download JDeveloper 22.214.171.124 Studio Edition and not JDeveloper 11.1.2 because that version is not compatible with WebCenter yet. This edition is the full-blown edition with all the bells and whistles. It has all the libraries for building an ADF application, which is the basis for a WebCenter application.
How to do it…
1. Open JDeveloper that was installed.
2. Choose Default Role.
3. From JDeveloper, open theHelp menu and select Check for updates.
4. ClickNext on the welcome screen.
5. Make sure all theUpdate Centers are selected and press Next.
6. In the available Updates, enter WebCenter and select all the found updates.
7. PressNext to start the download.
8. After the download is finished, you will need to restart JDeveloper.
You can check if the updates have been installed by opening the About window from the Help menu. Select the Extensions tab and scroll down to the WebCenter extensions. You should be able to see them:
How it works…
When you first open JDeveloper, you first need to select a role. The role determines the functionality you have in JDeveloper. When you select the default role, all the functionality will be available.
By installing the WebCenter extensions, you are installing all the necessary jar files containing the libraries for the WebCenter framework.
JDeveloper will have three additional application templates:
a) Portlet Producer Application: This template allows you to create a producer based upon the new JSR286 standard.
b) WebCenter Portal Application: Template that will create a preconfigured portal with ADF and WebCenter technology.
c) WebCenter Spaces Taskflow Customizations: This application is configured for customizing the applications and services taskflows used with the WebCenter Spaces Application. The extensions also include the taskflows and data controls for each of the WebCenter services that we will be integrating in our portal.
Creating a WebCenter portal
In this release of WebCenter, we can easily build enterprise portals by using the WebCenter Portal application template in JDeveloper. This template contains a preconfigured portal that we can modify to our needs. It has basic administration pages and security.
For this recipe, you need the latest version of JDeveloper with the WebCenter extensions installed, which is described in the previous recipe.
How to do it…
1. Select New from the File menu.
2. Select Application in the General section on the left-hand side.
3. Select WebCenter Portal Application from the list on the right.
4. Press OK.
The Create WebCenter Portal Application dialog will open. In the dialog, you will need to complete a few steps in order to create the portal application:
1. Application Name: Specify the application name, directory, and application package prefix.
2. Project Name: Specify the name and directory of the portal project. At this stage, you can also add additional libraries to the project.
3. Project Java Settings: Specify the default package, java source, and output directory.
4. Project WebCenter settings: With this step, you can request to build a default portal environment. When you disable the Configure the application with standard Portal features checkbox, you will have an empty project with only the reference to the WebCenter libraries, but no default portal will be configured. You can also let JDeveloper create a special test-role, so you can test your application.
5. Press the Finish button to create the application.
You can test the portal without needing to develop anything. Just start the integrated WebLogic server, right-click the portal project, and select Run from the context menu.
When you start the WebLogic server for the first time, it can take a few minutes. This is because JDeveloper will create the WebLogic domain for the integrated WebLogic server. Because we have installed the WebCenter extensions, JDeveloper will also extend the domain with the WebCenter libraries.
How it works…
When the portal has been started, you will see a single page, which is the Home page that contains a login form at the top right corner:
When you log in with the default WebLogic user, you should have complete administration rights.
The default user of the integrated WebLogic server is weblogic with password weblogic1. When logged in, you should see an Administration link. This links to the Administration Console where you can manage the resources of your portal like pages, resource catalogs, navigations, and so on.
In the Administration Console you have five tabs:
1. Resources: In this tab, you manage all the resources of your portal. The resources are divided into three parts:
o Structure: In the structure, you manage the resources about the structure of your portal, such as pages, templates, navigations, and resource catalogs.
o Look and Layout: In the look and layout part, you manage things like skins, styles, templates for the content presenter, and mashup styles.
o Mashups: Mashups are taskflows created during runtime. You can also manage data controls in the mashup section.
2. Services: In the services tab, you can manage the services that are configured for your portal.
3. Security: In the security tab, you can add users or roles and define their access to the portal application.
4. Configuration: In this tab, you can configure default settings for the portal like the default page template, default navigation, default resource catalog, and default skin.
5. Propagation: This tab is only visible when you create a specific URL connection. From this tab, you can propagate changes from your staging environment to your production environment.
The WebCenter Portal application will create a preconfigured portal for us. It has a basic structure and page navigation to build complex portals.
JDeveloper has created a lot of files for us.
Here is an overview of the most important files created for us by JDeveloper:
The default portal has two page templates. They can be found in the Web Content/oracle/Webcenter/portalapp/pagetemplates folder:
a) pageTemplate_globe.jspx: This is the default template used for a page
b) pageTemplate_swooshy.jspx: This is the same template as the globe template, but with another header image
You can of course create your own templates. This will be covered in next chapter.
JDeveloper will create four pages for us. These can be found in the Web Content/oracle/Webcenter/portalapp/pages folder:
a) error.jspx: This page looks like the login page and is designed to show error messages upon login.
b) home.jspx: This is an empty page that uses the globe template.
c) login.jspx: This is the login page. It is also based upon the globe template.
By default, JDeveloper will create a default resource catalog. This can be found in the Web Content/oracle/Webcenter/portalapp/catalogs folder.
In this folder, you will find the default-catalog.xml file which represents the resource catalog. When you open this file, you will notice that JDeveloper has a design view for this file. This way it is easier to manage and edit the catalog without knowing the underlying XML. Another file in the catalogs folder is the catalog-registry.xml. This is the set of components that the user can use when creating a resource catalog at runtime.
By using navigations, you can allow users to find content on different pages, taskflow, or even external pages.
By defining different navigation, you allow users to have a personalized navigation that fits their needs.
By default, you will find one navigation model in the Web content/oracle/Webcenter/portalapp/navigations folder: default-navigation-model.xml. It contains the page hierarchy and a link to the administration page. This model is not used in the template, but it is there as an example. You can of course use this model and modify it, or you can create your own models.
You will also find the navigation-registry.xml. This file contains the items that can be used to create a navigation model at runtime.
With the page hierarchy, you can create parent-child relationships between pages. It allows you to create multi-level navigation of existing pages. Within the page hierarchy, you can set the security of each node. You are able to define if a child node inherits the security from its parent or it has its own security.
By default, JDeveloper will create the pages.xml page hierarchy in the Web Content/oracle/Webcenter/portalapp/pagehierarchy folder. This hierarchy has only one node, being the Home page.
One of the most important features for an administrator of a portal is managing the pages. Without pages, you won’t have any place to put your content on.
This recipe will show you how you can manage the pages of your portal.
For this recipe, you need a WebCenter Portal application. You will also need to start the Portal application.
We will use the default WebCenter Portal Application as an example in this recipe.
How to do it…
1. Go to the administration section on the portal by logging in as an administrator.
2. Select Pages from the Structure section in the Resource tab. You should be able to see a table with the existing pages:
3. Press the Create Page button. This will open the dialog to create a new page.
In the create page popup, you will need to specify the following fields:
a. Page Name: The name of your page. This will be used in the navigation and to list the page in the Pages list.
b. Page Template: You can specify a specific template for your page or use the Application Page Template, which will use a default template.
c. Page Style: The page style specifies how the content will be divided on your page:
When you press the Create button, the popup closes and you see the page in the list.
In the list, there is a Show Page checkbox. When this checkbox is selected for a page, the page will show up in the navigation. If this checkbox is not enabled, you can access the page by linking to the page or specifying the URL of the page in the browser. The page will however not be visible in a navigation model when you add a page hierarchy. You will need to manually create a link from another page to that page.
When you want to secure your page instead of using the visible attribute, you need to specify specific security settings in the page hierarchy, which is described in next chapter.
Move the page
Once the page has been created, you want to put the page in the correct hierarchy of your portal. In WebCenter, you can assign a parent page to each page. By default, the ROOT is the parent of each page. The root is not a real page. It is the parent node for each newly created page:
1. Click on the actions icon on the page you want to move and select Move Page from the context menu.
2. Browse to the location where you want to put the page.
3. Select the node you want as a parent for the page.
4. Press the OK button.
You will see that the column Sub Pages of the parent node will have an icon telling you that there are child nodes. Click on it to see the child pages.
Securing the pages
When you create a page, the security will be inherited from the parent. The inheritance is a property so it means that when you modify the security on the parent, it will be propagated to all of its children who use inheritance.
You can modify this behaviour by setting the security. This can be done by clicking the actions button and selecting the Set Access from the context menu.
At the top of the popup, you can specify the Access Method:
a. Delegate Security: Specify the security on the page yourself
b. Inherit Parent Security: Inherit the security rules from the parent page
When you have specified the delegate security, the list of access rules is populated based upon the rules of the parent. From this point on, you can add your own roles and modify the security:
You can add both users and roles and need to specify what actions they can perform on the page.
Following access rules can be granted:
1. Grant: Allows the user/role to grant access to other users/roles
2. Create: Allows users/roles to create subpages
3. Delete: Allows the user/role to remove the page
4. Edit: Allows the user/role to customize the page
5. Personalize: Allows the user to personalize preferences of the portlet put on the page
6. View: Allows the user/role to view the page
There are some other actions you can perform on the pages from the actions context menu:
1) Edit page: This is a link to the actual page. You will enter the page in edit mode. This will be explained in another recipe.
2) Copy page: This action will copy your page. You will first be asked to enter a name for the new page.
3) Delete page: This will completely removes the pages from the system. No recovery is possible!
4) About this page: This opens a dialog that shows some information about the page such as the name, created by, date created, last modified, and direct URL.
Free Demo for Corporate & Online Trainings.