Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter 11g Release 1 (11.1.1) Part Number E10148-09 |
|
|
View PDF |
This appendix explains how to manually migrate a PS2 WebCenter custom application to a PS3 WebCenter Portal application.
This appendix includes the following sections:
Oracle strongly recommends that you perform the procedures in this appendix only after careful consideration and then only if absolutely necessary. The recommended best practice for migration is to create a new (PS3) WebCenter Portal application using the WebCenter Portal Application template and then manually migrate the content, configurations, and logic from your old PS2 application to the new portal application. If it is not possible to follow this recommended practice, then follow the procedures described in this appendix to migrate your application.
It's important to understand that this appendix is about manually adding WebCenter Portal Frame file structures, components, and configurations to an existing WebCenter PS2 application that has been migrated to PS3 using the automatic migration feature in JDeveloper. Portal Framework features include page navigations, page hierarchies, and other features, as discussed in Chapter 8, "Understanding WebCenter Portal Applications."
As explained in detail in this appendix, you first need to perform an automatic migration to PS3 (by opening your PS2 application in a PS3 version of JDeveloper). Then, you can follow the directions in this appendix to manually add portal features.
The procedure described in this appendix is optional. Even if you perform the automatic migration by opening your PS2 application in PS3 JDeveloper, your existing, you only need to perform the migration steps described in this appendixif you want to use the Portal Framework features.
For detailed information on the WebCenter Portal Application template and creating a portal application, see Chapter 5, "Creating WebCenter Applications."
Besides explaining how to manually migrate an application, this appendix outlines in technical detail the configuration elements that distinguish a PS2 custom application from a PS3 portal application. One way to read this appendix is as a detailed roadmap or "anatomy" of the structure of a portal application versus a PS2 custom application.
For more information on the portal-specific features, see Chapter 8, "Understanding WebCenter Portal Applications." For more information on the structure of a portal, see Section 8.12, "How are WebCenter Portal Files Organized?."
The manual migration of a PS2 WebCenter custom application to a PS3 WebCenter Portal application can be broken down into these basic steps:
Preparing for the migration.
Preparation includes properly installing the WebCenter and JDeveloper PS3 software and opening the PS2 application in the PS3 version of JDeveloper (with PS3 WebCenter installed). See Section H.4, "Preparing for the Migration."
Editing configuration files.
You must manually open and edit several configuration files to add PS3 features. See Section H.5, "Editing Configuration Files."
Adding project configurations.
Project configurations include adding appropriate JAR files and technology scopes to your application. See Section H.6, "Modifying the Project Configurations."
Creating portal-specific files.
You must manually create the directory structure of a portal application and populate it with portal-specific files, like navigation, registry, page hierarchy, and catalog files. See Section H.7, "Creating Portal-Specific Files."
Applying security configurations.
Finally, you need to configure ADF security and populate the jazn-data.xml
file with appropriate policy information. See Section H.8, "Applying Security Configurations."
Before performing the rest of the migration steps described in this appendix:
Install the PS3 version of JDeveloper and the PS3 WebCenter Extension Bundle. For details, see Section 3.2, "Installing the WebCenter Extension Bundle."
Back up your PS2 application.
In JDev (with the PS3 WebCenter Extension Bundle installed), open the application:
From the File menu select Open.
In the Open dialog, navigate to the application .jws
file and click OK.
If prompted to migrate the application, click Yes. This step migrates the application from PS2 technology to PS3 technology without changing the structure of the application. Your PS2 application will continue to function as it did in PS2.
Follow the migration steps described in the rest of this chapter.
This section lists the set of configuration files that you must manually update.
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Application Sources > DEFAULT_PACKAGE > DataBindings.cpx
Location on the filesystem:
PROJECT_ROOT/adfmsrc/DEFAULT_PACKAGE/DataBindings.cpx
Detailed Instructions:
The following two attributes must exist in the root <Application>
element of DataBindings.cpx
. These attributes enable dynamic page mapping, so that any pages created at runtime (for example, through the Page Hierarchy editor) do not need to have page definition mappings in DataBindings.cpx
.
<Application PageMapClass="oracle.jbo.uicli.mom.DynamicPageMapImpl" BasePageDefPackageName="pageDefs" ... >
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > WEB-INF > weblogic.xml
Location on the filesystem:
PROJECT_ROOT/public_html/WEB-INF/weblogic.xml
Detailed Instructions:
Add the following entry as a child of the root <weblogic-web-app>
element. This element adds a reference to the REST shared library, which is necessary for the application to be able to use REST features.
<library-ref> <library-name>jaxrs-framework-web-lib</library-name> </library-ref>
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > WEB-INF > faces-config.xml
Location on the filesystem:
PROJECT_ROOT/public_html/WEB-INF/faces-config.xml
Detailed Instructions:
Add the following entries as children of the root <faces-config>
element or merge them in with any existing elements, as appropriate.
The CustomViewHandler
interprets the URL syntax used by the navigation model. The handler takes a URL that points to a node in a navigation and finds the corresponding JSPX page to render.
The SkinPhaseListener
enables any skins that are created and registered as portal resources at design time to be used at runtime.
The preferenceBean
provides the set of "default values" for the application, such as default navigation, catalog, page template, and skin. These values are defined in adf-config.xml
and can be changed at runtime in the Preferences tab of the Portal Administration page.
<application> <default-render-kit-id>oracle.adf.rich</default-render-kit-id> <view-handler> oracle.webcenter.portalframework.sitestructure.handler.CustomViewHandler </view-handler> </application> <lifecycle> <phase-listener>oracle.webcenter.skin.view.SkinPhaseListener</phase-listener> </lifecycle> <managed-bean> <managed-bean-name>preferenceBean</managed-bean-name> <managed-bean-class> oracle.webcenter.portalframework.sitestructure.preference.PortalPreferences </managed-bean-class> <managed-bean-scope>application</managed-bean-scope> </managed-bean>
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > WEB-INF > trinidad-config.xml
Location on the filesystem:
PROJECT_ROOT/public_html/WEB-INF/trinidad-config.xml
Detailed Instructions:
Add the following entry as a child of the root <trinidad-config>
element, replacing any existing <skin-family>
value. This EL expression allows the default skin to be changed at runtime; the value for the skin is provided by the preferenceBean
. The preferenceBean
provides the set of "default values" for the application, such as default navigation, catalog, page template, and skin.
<skin-family>#{preferenceBean.defaultTrinidadSkin}</skin-family>
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > WEB-INF > web.xml
Location on the filesystem:
PROJECT_ROOT/public_html/WEB-INF/web.xml
Detailed Instructions:
Add the following entries as children of the root <web-app>
element. The <context-param>
values should replace any existing values, as appropriate.
The PortalAdminServlet
redirects to the built in Portal Administration page. The link to this administration page is accessible at http://<server:port>/<context-root>/admin
.
The PortalFrameworkContextListener
ensures that the application's memory references are properly cleaned up when it is deployed/undeployed.
The JerseyWebApplicaton
and restFacesContext
entries configure the application to be able to use REST functionality.
The parameter org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION
is set to false by default for WebCenter Portal applications for performance reasons, enabling compression for style class names.
The parameter oracle.adf.view.rich.pprNavigation.OPTIONS
is set to onWithForcePPR
by default for WebCenter Portal applications for performance reasons. This setting enables partial page navigation.
<context-param> <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>oracle.adf.view.rich.pprNavigation.OPTIONS</param-name> <param-value>onWithForcePPR</param-value> </context-param> <listener> <description>Portal Framework Context Listener</description> <display-name>PortalFrameworkContextListener</display-name> <listener-class> oracle.webcenter.portalframework.sitestructure.internal.view.PortalFrameworkContextListener </listener-class> </listener> <servlet> <servlet-name>PortalAdminServlet</servlet-name> <servlet-class>oracle.webcenter.portalwebapp.servlet.PortalAdminServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>PortalAdminServlet</servlet-name> <url-pattern>/admin</url-pattern> </servlet-mapping> <servlet> <servlet-name>JerseyWebApplication</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value> org.codehaus.jackson.jaxrs;oracle.webcenter.jaxrs;test.controller;oracle.webcenter.jaxrs.services.n avigation.controller </param-value> </init-param> <init-param> <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name> <param-value> oracle.webcenter.jaxrs.framework.filters.EmptyQueryParamRequestFilter </param-value> </init-param> <init-param> <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name> <param-value> oracle.webcenter.jaxrs.framework.filters.PaginatedLinkedFilter;oracle.webcenter.jaxrs.framework.fil ters.HypermediaResponseFilter </param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> <param-value>com.sun.jersey.api.core.ClasspathResourceConfig</param-value> </init-param> <init-param> <param-name>token.names</param-name> <param-value>stoken</param-value> </init-param> <init-param> <param-name>token.manager.enabled</param-name> <param-value>false</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>JerseyWebApplication</servlet-name> <url-pattern>/api/*</url-pattern> </servlet-mapping> <filter> <filter-name>restFacesContext</filter-name> <filter-class> oracle.webcenter.jaxrs.services.sitestructure.faces.context.FacesContextFilter </filter-class> </filter> <filter-mapping> <filter-name>restFacesContext</filter-name> <servlet-name>JerseyWebApplication</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping> <filter-mapping> <filter-name>adfBindings</filter-name> <servlet-name>JerseyWebApplication</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping> <mime-mapping> <extension>html</extension> <mime-type>text/html</mime-type> </mime-mapping>
Location in JDeveloper's Application Navigator:
Application Resources > Descriptors > ADF META-INF > adf-config.xml
Location on the filesystem:
APPLICATION_ROOT/.adf/META-INF/adf-config.xml
Detailed Instructions:
Add these entries as children of the root <adf-config>
element. The highlighted (bold faced) <namespace>
elements must be merged in with the existing <mds-config>
entry, because this top-level entry should already exist.
The <mds-config>
element is the top-level element.
The <page-editor-config>
element sets up the default security policies for customization and personalization of pages and task flows within the Resource Manager. See also Chapter 16, "Adding and Using the Resource Manager."
The <adf-portal-config>
entry specifies the values of the default resources for the application. These values are the default values for the PreferenceBean and for the preferences that will appear in the Preferences tab of the WebCenter Portal Administration Console. Replace the highlighted paths with actual values (these default resources will be created in subsequent steps).
The <adf-rcs-config>
element defines the default resource catalog registry and navigation registry, which are used when editing catalogs and navigations in the Resource Manager. Replace the highlighted paths with actual values (these resources will be created in subsequent steps).
The <rcv-config>
element defines the default resource catalog, which is used when editing a page with Composer. This element includes the default resource catalog and the catalog selector. The catalog selector determines which catalog is used when editing a page. The PortalCatalogSelector
attribute receives its values from the portal preference settings. The defaults for these settings are defined under <adf-portal-config>
. The default catalog defined in <rcv-config>
is only used if the catalog selector does not return a value. The preference setting takes precedence over the <rcv-config>
setting. The highlighted path should be replaced with the path to the desired catalog. Any existing resource catalogs in the migrated application should be moved to the /oracle/webcenter/portalapp
directory (created in subsequent steps), if they are to continue to be used in the portal application. See also Chapter 15, "Creating and Managing Resource Catalogs."
<mdsC:adf-mds-config version="11.1.1.000"> <mds-config xmlns="http://xmlns.oracle.com/mds/config"> <persistence-config> <metadata-namespaces> ... <namespace path="/oracle/webcenter/portalapp" metadata-store-usage="WebCenterFileMetadataStore"/> <namespace path="/oracle/webcenter/siteresources/scopedMD" metadata-store-usage="WebCenterFileMetadataStore"/> <namespace path="/oracle/webcenter/security/scopedMD" metadata-store-usage="WebCenterFileMetadataStore"/> <namespace path="/oracle/webcenter/siteresources/shared" metadata-store-usage="WebCenterFileMetadataStore"/> <namespace path="/oracle/webcenter/quicklinks/scopedMD" metadata-store-usage="WebCenterFileMetadataStore"/> <namespace path="/oracle/webcenter/page/scopedMD" metadata-store-usage="WebCenterFileMetadataStore"/> <namespace path="/pageDefs" metadata-store-usage="WebCenterFileMetadataStore"/> ... </metadata-namespaces> </persistence-config> </mds-config> </mdsC:adf-mds-config> <page-editor-config xmlns="http://xmlns.oracle.com/adf/pageeditor/config"> <security-config> <security-policies> <security-policy name="customPagePolicy" override="pagePolicy"> <policy-class>oracle.webcenter.security.policy.WCPageSecurityPolicy</policy-class> </security-policy> <security-policy name="customTFPolicy" override="taskFlowPolicy"> <policy-class>oracle.webcenter.security.policy.WCTaskflowSecurityPolicy</policy-class> </security-policy> </security-policies> </security-config> </page-editor-config> <adf-portal-config xmlns="http://xmlns.oracle.com/webcenter/portal/config"> <preferences> <preference id="oracle.webcenter.portalapp.navigation.model" desc="Default Navigation Model" value="/path/to/your/default/navigation.xml" resourceType="navigation" display="true"/> <preference id="oracle.webcenter.portalapp.resourcecatalog" desc="Default Resource Catalog" value="/path/to/your/default/catalog.xml" resourceType="ResourceCatalog" display="true"/> <preference id="oracle.webcenter.portalapp.pagetemplate.pageTemplate" desc="Default Page Template" value="/path/to/your/default/page/template.jspx" resourceType="Template" display="true"/> <preference id="oracle.webcenter.portalapp.navigation.renderer" desc="Default Navigation Renderer" value="/oracle/webcenter/portalapp/pages/navigation-renderer.jspx" display="false"/> <preference id="oracle.webcenter.portalapp.skin" desc="Default Portal Skin" value="portal" resourceType="Skin" display="true"/> </preferences> </adf-portal-config> <adf-rcs-config xmlns="http://xmlns.oracle.com/adf/rcs/adf-config"> <rcs-config> <catalog-config default-scope="/" default-registry="/path/to/your/default/catalog/registry.xml"/> <navigation-config default-scope="/" default-registry="/path/to/your/default/navigation/registry.xml"/> <security-manager class-name= "oracle.webcenter.portalframework.genericsiteresources.internal.security.CatalogSecurityManager"/> </rcs-config> </adf-rcs-config> <rcv-config xmlns="http://xmlns.oracle.com/adf/rcs/viewer/adf-config"> <default-catalog catalog-name="/path/to/your/default/catalog.xml"/> <catalog-selector class-name="oracle.webcenter.portalframework.sitestructure.rc.PortalCatalogSelector"/> </rcv-config>
This section lists the project configuration files – JAR files, technology scopes, and WAR files – that must be added to the application.
Add the following Portal Framework libraries to the project classpath. These libraries add the necessary Portal application-specific JARs to the design time classpath. (To do this, right-click the project and chose Libraries and Classpaths and then Project Properties. Simply add the libraries from the list of available libraries.)
WebCenter Portal Framework
WebCenter Portal Framework REST API
Add the following technology scope to the application. This technology scope identifies the application as a PS3 Portal application. See also Section 6.1, "Manually Configuring a WebCenter Application With Technology Scopes."
Portal Framework
Create a WAR deployment profile for project (or modify an existing one) and add pattern filters as described below. The deployment profile and filters ensure that the portal application's resources are properly packaged when it is deployed.
Web files
Exclude oracle/webcenter/portalapp/*
Exclude oracle/webcenter/siteresources/scopedMD/*
WEB-INF/classes
Exclude oracle/webcenter/portalapp/*/*.dcx
Exclude oracle/webcenter/portalapp/*/*.cpx
Exclude oracle/webcenter/portalapp/*/*.xml
The basic procedure for adding the filters is:
Right-click the project and select Project Properties.
In the Project Properties dialog, select the Deployment node.
In the Deployment Profiles list, select the WAR file deployment profile for your portal application and click Edit.
In the Edit WAR Deployment Profile Properties dialog, open the File Groups node and select Filters under the Web Files node.
Select the Patterns tab, as shown in Figure H-1.
Figure H-1 Edit WAR Deployment Profile Properties Dialog
Select the file patterns to exclude.
The steps for excluding WEB-INF/classes
is similar the above procedure. Instead of selecting Web Files and then Filters, select WEB-INF/classes and then Filters.
A WebCenter Portal application requires a specific file structure. This section explains how to create and configure this file structure. See also Section 8.12, "How are WebCenter Portal Files Organized?."
Create the portal folder structure in the specified location.
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content
Location on the filesystem:
PROJECT_ROOT/public_html
Detailed Instructions:
Create the following folder structure in the location specified above (that is, in the Web Content folder in JDev). To add a folder, right-click the portalapp
folder and select General in the New Gallery dialog. Then, select Folder from the list of Items.
oracle/webcenter/portalapp/
catalogs/
navigations/
pages/
pagetemplates/
shared/
The /oracle/webcenter/portalapp
folder structure is required, and all portal resources must be created under this namespace. For more information on the file structure, see Section 8.12.1.2, "Why Is a Portal Application Organized the Way It Is?."
The additional subfolders (except for the shared folder) are not strictly required, but are useful for organizational purposes. However, the shared
folder must exist. This folder provides the path under which any resources associated with a portal resource (such as images) must be located.
The generic-site-resources.xml
file is required for resources to be registered with the runtime Resource Manager. For more information on the Resource Manager, see Chapter 16, "Adding and Using the Resource Manager."
Create a resource registry file under APPLICATION_ROOT/mds/oracle/webcenter/siteresources/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/generic-site-resources.xml
with the following content. Note that you must create this folder structure manually; it does not exist by default.
<?xml version = '1.0' encoding = 'UTF-8'?> <resources xmlns="http://xmlns.oracle.com/webcenter/portalframework/genericSiteResources" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <resourceType name="siteTemplate" resourceBundle=""/> <resourceType name="pageStyle" resourceBundle=""/> <resourceType name="dataPresenter" resourceBundle=""/> <resourceType name="contentPresenter" resourceBundle=""/> <resourceType name="resourceCatalog" resourceBundle=""/> <resourceType name="navigation" resourceBundle=""/> <resourceType name="skin" resourceBundle=""/> <resourceType name="taskFlowStyle" resourceBundle=""/> <resourceType name="taskFlow" resourceBundle=""/> <resourceType name="dataControl" resourceBundle=""/> </resources>
This section explains how to create and register several portal resource files.
The navigation model file, default-navigation-model.xml
, allows you to incorporate navigation structures in portal site. For more information, see Chapter 10, "Building a Navigation Model for Your Portal" and Section 8.5.3, "Understanding the Navigation Model and the Navigation Registry."
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/navigations
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/navigations
Procedure:
Right-click /oracle/webcenter/portalapp/navigations
folder in Application Navigator and select New.
In the New Gallery dialog, open the Portal node under Web Tier and select Navigation.
Enter a name (for example, default-navigation-model.xml
), ensure directory is PROJECT_ROOT/public_html/oracle/webcenter/portalapp/navigations
, and check the box labeled Create as a Portal Resource.
The navigation registry file, navigation-registry.xm
l
, is used for editing navigations in the Resource Manager. See also Chapter 10, "Building a Navigation Model for Your Portal" and Section 8.5.3, "Understanding the Navigation Model and the Navigation Registry."
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/navigations
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/navigations
Procedure:
Create a new WebCenter Portal application. You will copy some files from this new application into the application you are migrating.
From the new application, copy this file:
<PROJECT_ROOT>/public_html/oracle/webcenter/portalapp/navigations/navigation-registry.xml
to this location in the application you are migrating:
<PROJECT_ROOT>/oracle/webcenter/portalapp/navigations/navigation-registry.xml
Add two top-level folders, called new
and links
.
Under the new
folder, add the set of resources that should allowed to be added to a navigation when editing at runtime.
Under the links
folder, add the set of resources that should appear in the links picker, which is displayed when adding an item of type "Link" to a navigation at runtime. For more information, see Chapter 10, "Building a Navigation Model for Your Portal."
A catalog specifies a collection of an otherwise unrelated group of elements, like layout components, task flows, portlets, documents, and others, that an authorized user can add to a portal at runtime. Oracle Composer uses catalogs at runtime to determine which elements an authorized user can add to a portal page. See also Chapter 16, "Adding and Using the Resource Manager" and Section 8.5.4, "Understanding Resource Catalogs and Catalog Registries."
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/catalogs
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/catalogs
Follow one of the following two procedures. The first explains how to create a new resource catalog, and the second explains how to reuse resource catalogs from your current application.
Procedure:
Right-click /oracle/webcenter/portalapp/catalogs
folder in Application Navigator and select New.
In the New Gallery dialog, open the Portal node under Web Tier and select Application Resource Catalog.
Enter a name (for example, default-catalog.xml
), ensure directory is PROJECT_ROOT/public_html/oracle/webcenter/portalapp/catalogs
, and check the box labeled Create as a Portal Resource.
Add the set of resources that should allowed to be added to a page when editing at runtime. For more information, see Section 16.2, "Working with Portal Resources in JDeveloper."
Alternate Procedure:
Consider following this procedure if you have existing resource catalogs that you would like to reuse:
Copy any existing resource catalogs your application may have (normally found in APPLICATION_ROOT/mds/oracle/adf/rc/metadata
) to PROJECT_ROOT/public_html/oracle/webcenter/portalapp/catalogs
.
Right-click on each catalog under PROJECT_ROOT/public_html/oracle/webcenter/portalapp/catalogs
and choose Create Portal Resource.
This alternate procedure registers each catalog as a portal resource so it appears in the Resources tab of the WebCenter Portal Administration Console.
The resource catalog registry file defines the set of items that are available for inclusion in your resource catalog at runtime. See Chapter 15, "Creating and Managing Resource Catalogs."
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/catalogs
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/catalogs
Procedure:
Create a new WebCenter Portal application. You will copy some files from this new application into the application you are migrating.
From the new application, copy this file:
<PROJECT_ROOT>/public_html/oracle/webcenter/portalapp/catalogs/catalog-registry.xml
to this location in the application you are migrating:
<PROJECT_ROOT>/oracle/webcenter/portalapp/catalogs/catalog-registry.xml
Page templates allow you to define entire page layouts and apply them to pages to create a consistent layout across the portal. For more information, see Chapter 11, "Designing the Look and Feel of Your Portal."
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/pagetemplates
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/pagetemplates
Procedure:
Right-click the /oracle/webcenter/portalapp/pagetemplates
folder in Application Navigator and select New.
In the New Gallery dialog, open the JSF node under Web Tier and select JSF Page Template.
Check the box labeled Create Associated ADFm Page Definition and add a facet definition named content
.
Add a reference to the content
facet within the page template once it has been created. For example:
<?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <jsp:directive.page contentType="text/html;charset=UTF-8"/> <af:pageTemplateDef var="attrs"> <af:xmlContent> <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component"> <display-name>Default Page Template</display-name> <facet> <facet-name>content</facet-name> </facet> </component> </af:xmlContent> <af:facetRef facetName="content"/> </af:pageTemplateDef> </jsp:root>
Right-click the page template in the Application Navigator and select Create Portal Resource, then click OK.
The navigation renderer file is responsible for rendering non-page resources that appear in a navigation, such as portlets, content, and task flows. For more information, see Section 10.5, "Editing the Navigation Renderer."
Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/pages/
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/pages/
Procedure:
In the folder specified by the location listed above, create a new JSF page. From the New menu, select Web Tier, then JSF, then JSF Page. Name the file navigation-renderer.jspx
.
Replace the file content with the following:
<?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:af="http://xmlns.oracle.com/adf/faces/rich"> <jsp:directive.page contentType="text/html;charset=UTF-8"/> <f:view> <af:document id="d1" title="#{SiteStructureContext.currentNavigationModel.currentSelection.title}"> <af:form id="f1"> <af:pageTemplate value="#{bindings.pageTemplateBinding.templateModel}" id="pt1"> <f:facet name="content"> <af:region value="#{bindings.sitestructurerenderer1.regionModel}" id="r1"/> </f:facet> </af:pageTemplate> </af:form> </af:document> </f:view> </jsp:root>
The pages.xml
, or "page hierarchy" file, organizes pages into a tree structure, with a parent-child relationship between pages. This hierarchical structure allows the convenient propagation or inheritance of security settings from pages to sub pages. See Section 8.5.1, "Understanding Pages, Page Templates, and the Portal Page Hierarchy."
Note:
After creating thepages.xml
file in JDeveloper, JDeveloper must be restarted in order for the pages.xml
to be recognized as a page hierarchy file and for the hierarchy editor to be displayed when it is opened.Location in JDeveloper's Application Navigator:
PROJECT_NAME > Web Content > oracle/webcenter/portalapp/pagehierarchy
Location on the filesystem:
PROJECT_ROOT/public_html/oracle/webcenter/portalapp/pagehierarchy
Procedure:
In the folder specified by the location listed above, create a new file called pages.xml
.
Add the following content to the file:
<?xml version="1.0" encoding="US-ASCII" ?> <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" />
This section explains how to configure security in the portal application.
Ensure ADF Security is configured for ADF Authentication and Authorization. For more information, see Section 63.3.1, "Configuring ADF Security Settings." If security was not already configured for the application, you can configure it as follows:
From the Application menu, select Secure and then Configure ADF Security.
Select the ADF Authentication and Authorization option.
Click Finish.
These permissions are required for the proper functioning of the Portal Administration page and the Resource Manager at runtime.
Note:
Do not replace the contents ofjazn-data.xml
with the following contents; rather, merge the highlighted (bold faced) elements with the existing <grant>
and <permissions>
entries.In the Application Navigator, open the Application Resources folder, then open Descriptors, and then the META-INF folder.
In the META-INF folder, open the jazn-data.xml
file.
Add an Application Role called Administrator, if one doesn't exist. See Section 63.2, "Creating an Application Role."
Manually insert permission entries into the source file as follows. Again, be careful to merge the highlighted elements rather than replace the entire contents of the file with the following code.
<grant> <grantee> <principals> <principal> <class>oracle.security.jps.internal.core.principals.JpsAuthenticatedRoleImpl</class> <name>authenticated-role</name> </principal> </principals> </grantee> <permissions> ... <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.portalwebapp.pages.adminPageDef</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.taskflow.view.ContainerPageDef</name> <actions>grant</actions> </permission> <permission> <class>oracle.webcenter.security.auth.HierarchicalResourcePermission</class> <name>serviceID=oracle.webcenter.page,scopeID=s8bba98ff_4cbb_40b8_beee_296c916a23ed,resourceID=s8bba98ff_4cbb_40b8_beee_296c916a23ed</name> <actions>personalize,view</actions> </permission> <permission> <class>oracle.adf.rc.security.CatalogPermission</class> <name>/oracle/webcenter/quicklinks/scopedMD/.*</name> <actions>create,edit</actions> </permission> ... </permissions> </grant> <grant> <grantee> <principals> <principal> <class>oracle.security.jps.internal.core.principals.JpsAnonymousRoleImpl</class> <name>anonymous-role</name> </principal> </principals> </grantee> <permissions> ... <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.siteresources.scopedMD.*</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.controller.security.TaskFlowPermission</class> <name>/oracle/webcenter/siteresources/scopedMD/.*</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.controller.security.TaskFlowPermission</class> <name>/oracle/webcenter/portalapp/.*</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.taskflow.view.ContainerPageDef</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.taskflow.view.ViewerPageDef</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.taskflowstyle.view.PreviewPageDef</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.page.pstemplates.*</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.share.security.authorization.RegionPermission</class> <name>oracle.webcenter.portalapp.pagetemplates.*</name> <actions>view</actions> </permission> <permission> <class>oracle.webcenter.security.auth.HierarchicalResourcePermission</class> <name>serviceID=oracle.webcenter.page,scopeID=s8bba98ff_4cbb_40b8_beee_296c916a23ed,resourceID=s8bba98ff_4cbb_40b8_beee_296c916a23ed</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.controller.security.TaskFlowPermission</class> <name>/oracle/webcenter/navigationtaskflows/view/.*</name> <actions>view</actions> </permission> <permission> <class>oracle.adf.controller.security.TaskFlowPermission</class> <name>/oracle/webcenter/.*</name> <actions>view</actions> </permission> ... </permissions> </grant> <grant> <grantee> <principals> <principal> <class>oracle.security.jps.service.policystore.ApplicationRole</class> <name>Administrator</name> <guid>843A31B1C1B211DFBFA9CF5E373CA556</guid> </principal> </principals> </grantee> <permissions> ... <permission> <class>oracle.webcenter.security.auth.HierarchicalResourcePermission</class> <name>serviceID=oracle.webcenter.page,scopeID=s8bba98ff_4cbb_40b8_beee_296c916a23ed,resourceID=s8bba98ff_4cbb_40b8_beee_296c916a23ed</name> <actions>create,delete,grant,manage,personalize,update,view</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_contentpresenter_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_datacontrol_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_navigation_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_pagestyle_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_catalog_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_pagetemplate_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_skin_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_taskflow_.*</name> <actions>manage</actions> </permission> <permission> <class>oracle.webcenter.security.auth.WebCenterResourcePermission</class> <name>oracle_webcenter_siteresource_s8bba98ff_4cbb_40b8_beee_296c916a23ed_taskflowstyle_.*</name> <actions>manage</actions> </permission> ... </permissions> </grant>