You’ve installed Oracle Webcenter 11.1.1.8.0 in a previous tutorial published here, but you may or may not be aware of these components that are coming into action with that installation.
When you install Oracle Webcenter Portal, the components that you choose to install are deployed to various default managed servers. Table below lists the managed server and the port number on which Oracle Webcenter Portal components are deployed.
To leverage certain component(s), you should keep Its server up and running and that may affect the productivity of the developers as that will definitely consume a lot of resources on developer machine.
This tutorial is the first one on this series which aimed to discuss the all Oracle Webcenter Portal features and that definitely should be applied through using of Oracle Webcenter JDeveloper & its Integrated Weblogic Server.
Table of Contents[hide]
Oracle WebCenter Portal
Oracle WebCenter provides a ready-made enterprise customizable and configurable application called WebCenter Portal that enables you to work and collaborate effectively.
Accessing of that environment can be done through starting the WC_Spaces – Like you did previously and typing the URL
http://host:port/webcenter
and then log on using domain administrator user like weblogic. In case you specified non default user as domain administrator, you should grant that user the sufficient roles
Both host ad port are referring for the system host and port that WC_Spaces is running on, by default the port number is 8888.
If you were accessing that above URL, you will certainly be standing on the Oracle WebCenter Home Portal. Also, deploying your custom Portal Framework Application and accessing it after then from the same URL will be possible if you’re considering new context root and that was so clear in the Oracle WebCenter Installation tutorial.
Actually, this is not only way that you may use for doing that; you may use JDeveloper Integrated Server as well. JDeveloper Integrated server is just a runtime service that references instance of WebLogic server that allows you to run, test, and debug WebCenter Portal Framework applications from within JDeveloper IDE.
As simple as that, instead of getting your node manager up and running as well as your WC_Spaces and may other servers – It depends on the features you’re using – with a huge consuming for memory and processor performance, single instance would be fair enough for that.
Configuring JDeveloper Integrated Server
Oracle JDeveloper 11.1.1.7.0 is only release that you may use Its integrated server to run Oracle Portal Framework Applications. We’re already clarified you how this can be installed in the Oracle WebCenter Installation Tutorial but that won’t be enough for you to get started your development tasks.
Steps below would help you install, extend and configure JDeveloper Integrated Instance:
- After JDeveloper get installed as you see in the Oracle WebCenter Tutorial.
- Make sure you have the latest update of Oracle WebCenter Extensions. From Help menu choose, Check for updates.
- Click finish and restart the JDeveloper once the below image got seen.
- From view menu, select Application Server Navigator and expand Application Servers node.
- As you noticed above, Integrated WebLogic Server listed isn’t till now configured and it needs some additional steps from your side to be like that.
- Right click on the Integrated WebLogic Server node and choose Create Default Domain.
- Fill in your preferred data like administrator id : weblogic, password: weblogic123, listen address : mohammad-amr-lt and listen port : 7101 and click okay. Waiting till JDeveloper creates the domain for you.
- Success domain creation should lead you to see these messages below:
- Now access http://10.10.90.3:7101/console and you should see the below login page, so log on using weblogic/weblogic123.
Exploring Features of Portal Framework Application
A WebCenter Portal Framework Application is a standard ADF web application that includes Portal features, like navigation, pages, page templates, content, and more.
That is, Oracle Webcenter Portal Framework adds a number of Portal-Specific features to an ADF Application. You’ve created your own first Oracle Webcenter Portal Framework Application previously and you see how you can we use a JDeveloper for managing this.
This time, you will go so far from just getting a well-running Oracle Webcenter Portal Framework Application to get more details about these features that are provided by this Framework.
Pages And Page Hierarchies Features
This feature allows the developers to formulate their pages into a tree structure manner, (i.e. Parent-Child relationship). This type of formulation allows convenient propagation and inheritance of security settings from pages to sub-pages as well as structural the overall Portal that you’re going to build.
Basically, any Portal may consists of multiple pages, each page located there in may contain one or more entities like Task Flows, Portlets and content. It also may contain a navigational interface like navigation Tree, Tabs or bread crumbs.
Page hierarchy concept is acting upon your Portal Framework Pages that are located within your Portal Application beneath Web Content folder like below:
At this following simple practice, you will create a new Pages About, Help & Info. This newly page hierarchy created will form the navigation model and control the security policies Oracle Portal Framework Application uses to allow/deny users accessibility.
- Open your JDeveloper IDE.
- Create your own Oracle Webcenter Framework Application. If you didn’t do that before, you may visit introduction tutorial published here.
- I assumed that you have a Portal Framework Application in addition to its default pages just like below:
- If your project gets running, you will certainly get the following default page once you access it through http://10.10.90.3:7101/[yourContextRoot]. This actually will invoke the default navigation model and shows you the below page.
Your context root can be controlled by providing custom deployment profile or you may use the default one created by JDeveloper. This will be explained later but at all cases, your deployment URL will be provided by the console of JDeveloper.
- Add your newly page About by creating a new JSPX file beneath the Web Content / oracle / webcenter / portalapp / pages and name it about.jspx. That could be done by right clicking on pages folder and choosing JSP from the New Gallery dialog.
- See your newly created page listed beside all default pages.
- Edit your about.jspx to be look like below:
about.jspx
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" title="About">
<af:form id="f1">
<af:pageTemplate value="#{bindings.pageTemplateBinding.templateModel}"
id="pt1">
<f:facet name="content">
<h:outputText id="outText" value="JournalDev is a Technical Site"/>
</f:facet>
</af:pageTemplate>
</af:form>
</af:document>
</f:view>
</jsp:root>
Here’s detailed explanation for the code listed above and the complementary steps that you still need to build up your page every time you want that:
- JSPX is a legal format that can be used for writing your JSPs pages. It’s likely similar for normal JSP with one different, it’s used XML structure.
- Before using any Tag-library, it should be imported within the jsp:root Tag. Standard HTML and core of JSF are imported in addition to ADF faces.
- Oracle Webcenter Portal Framework is an ADF Web Application with Portal-features as so, you may find f:view component. This component is used intensively when you consider JSF 1.2 implementation.
- Document component is used mainly as a replacement for creating all HTML standards element like (html, body, head).
- The af:pageTemplate is used for referring your fabricated Template. Your bindings variable will refer the binding component for this page. This variable is created automatically once you get this page added into your pages.xml page hierarchy definition. Figure below shows you Page Hierarchy – Editor View.
- By clicking in the green plus on the Page Hierarchy – editor view, you’ll be able of adding new page into your pages. You have the ability to choose which parent this page will refer by selecting the parent page from the pages listed in the Hierarchy before getting plus action clicked.
You may be able of adding the pages into that defined Page Hierarchy by dragging those pages created into Page Hierarchy’s panel but make sure your pages are defined under oracle/webcenter/portalapp.
- Open pages folder and choose your about.jspx file. And you may notice afterwards existence of new about page under Root and aboutPageDef.xml binding file.
- Save all, and configure your aboutPageDef binding through clicking on it and adding that pageTemplateBinding variable which will refer the PreferenceBean default template method.
- Click on green plus shown above.
- Click Okay and name the variable as pagTemplateBinding and click Okay once again.
- Edit created variable by clicking on pencil icon after the variable is selected.
- Edit variable common properties like below:
- Associate this variable with PreferenceBean default page Template method like below:
- If you print out the default template this variable references, you’ll definitely see that template located under pagetemplates folder pageTemplate_globe.jspx. Later we will discuss the page template concept, but let’s now consider the template as a reference-based page that’s referenced by the pages to formulate their contents.
The default page template includes navigation UI component which will reacting according for the security policies defined for every page links.
- Click save all icon at the menu bar and do the same thing with help and info with one and only one difference and it’s info page will be added under home page inside the page hierarchy. The final view of our page would take this form below:
- For each new level you create in the page hierarchy, a pagehierarchy/pages/*pages file is created. Star is an indicator (reference) for the parent page. These files created (homePages.xml) contain a references for pages in that level.
homePages.xml
<?xml version="1.0" encoding="windows-1252" ?> <pagesDef xmlns="http://xmlns.oracle.com/webcenter/page" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/webcenter/page/pagesDef.xsd" parent="/oracle/webcenter/portalapp/pagehierarchy/pages.xml"> <pageDef contentMRef="/oracle/webcenter/portalapp/pages/info.jspx" hidden="false" shared="false" hasSubPages="false" id="info" overridePolicy="true"/> </pagesDef>
- The overall structure view of your site now would look like below:
- You may noticed that all pages you navigated have considered the same template and that is because you’re specifying the same page template using the binding variable you’ve worked on before.
But this is not the only facility that the page hierarchy provides, it also provides us so important feature relevant for security policy propagation and inheritance. That is, the parent page is propagated its security policies into its sub pages and the sub pages may consider this propagation or may not by overriding it.
Let’s examine that by providing the following security and see how can we apply that:
- Home page should be seen by all of anonymous, authenticated and administrator visitors.
- About page should be seen by all of authenticated visitors only.
- Help page should be seen by all of anonymous, authenticated and administrator visitors.
- Info page should be seen by all of authenticated visitors only.
Let’s see how can we achieve that through figuring out the below screen shots:
- Root parent is an imaginary node and it’s configured like below:
- Home page won’t override any of those security policies. So, it will remain the same. This security policy will allows anonymous, authenticated and administrator roles seeing this page.
- Info page will override these security policies inherit from Root and Home pages. This override will look like below:
- About page will also override these propagated security policies by Root and home to be like below:
Inheritance of security policies will enforce all sub pages to consider the propagated policies that the parent defines. In contrast, security policies delegation will allow the sub pages to override the parent’s security and the defined polices will be propagated to all child pages that are inheriting security of that sub page.
- The navigation UI component will be affected by defined security policies. So, Oracle Webcenter Portal Framework Application will let us see the page link that we’re permitted to see.
- As you may noticed above, Info sub menu isn’t shown also. Now, log on into your system by using your weblogic administrator user.
- As you may noticed above, all menus are seen now, cause we’re already logged in into the system.
Summary
Oracle Webcenter Portal Framework Application is an ADF Web Application with Portal-Features. One of these features is Page Hierarchy which is used for covering the overall structure of your Portal in addition to apply proper security policies either by propagation or by delegation. This series will complete discussing the all features of Oracle Webcenter Portal, so contribute us by commenting below and bear with us for next coming ones.
No comments:
Post a Comment