Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter Portal (Oracle Fusion Applications Edition)
11g Release 1 (11.1.1.6.3)

Part Number E25595-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

H Manually Migrating a Framework Application

This appendix explains how to manually migrate a PS2 WebCenter custom application to a PS5 WebCenter Portal: Framework application.

This appendix includes the following sections:

H.1 When is Migration Required?

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 (PS5) Framework application using the WebCenter Portal – Framework Application template and then manually migrate the content, configurations, and logic from your old PS2 application to the new Framework application. If it is not possible to follow this recommended practice, then follow the procedures described in this appendix to migrate your application.

It is important to understand that this appendix is about manually adding WebCenter Portal: Framework file structures, components, and configurations to an existing WebCenter PS2 application that has been migrated to PS5 using the automatic migration feature in JDeveloper. Oracle WebCenter Portal: Framework features include page navigations, page hierarchies, and other features, as discussed in Chapter 9, "Understanding Framework Applications."

As explained in detail in this appendix, you first need to perform an automatic migration to PS5 (by opening your PS2 application in a PS5 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 PS5 JDeveloper, your existing, you only need to perform the migration steps described in this appendix if you want to use the Oracle WebCenter Portal: Framework features.

For detailed information on the WebCenter Portal: Framework Application template and creating a WebCenter Portal: Framework application, see Chapter 5, "Creating Framework and Portlet Producer Applications."

H.2 Anatomy of a Framework Application

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 PS5 Framework application. One way to read this appendix is as a detailed roadmap or "anatomy" of the structure of a Framework application versus a PS2 custom application.

For more information on the portal-specific features, see Chapter 9, "Understanding Framework Applications." For more information on the structure of a portal, see Section 9.12, "How are WebCenter Portal Files Organized?."

H.3 Overview of the Migration Procedure

The manual migration of a PS2 WebCenter custom application to a PS5 Framework application can be broken down into these basic steps:

  1. Preparing for the migration.

    Preparation includes properly installing the WebCenter and JDeveloper PS5 software and opening the PS2 application in the PS5 version of JDeveloper (with PS5 WebCenter installed). See Section H.4, "Preparing for the Migration."

  2. Editing configuration files.

    You must manually open and edit several configuration files to add PS5 features. See Section H.5, "Editing Configuration Files."

  3. Adding project configurations.

    Project configurations include adding appropriate JAR files and technology scopes to your application. See Section H.6, "Modifying the Project Configurations."

  4. Creating portal-specific files.

    You must manually create the directory structure of a Framework application and populate it with portal-specific files, like navigation, registry, page hierarchy, and catalog files. See Section H.7, "Creating Portal-Specific Files."

  5. 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."

H.4 Preparing for the Migration

Before performing the rest of the migration steps described in this appendix:

  1. Install the PS5 version of Oracle JDeveloper and WebCenter Portal's extension for Oracle JDeveloper. For details, see Section 3.2, "Installing WebCenter Portal's Extension for Oracle JDeveloper."

  2. Back up your PS2 application.

  3. In JDev (with the PS5 version of the WebCenter Portal extension installed), open the application:

    1. From the File menu select Open.

    2. In the Open dialog, navigate to the application .jws file and click OK.

    3. If prompted to migrate the application, click Yes. This step migrates the application from PS2 technology to PS5 technology without changing the structure of the application. Your PS2 application will continue to function as it did in PS2.

  4. Follow the migration steps described in the rest of this chapter.

H.5 Editing Configuration Files

This section lists the set of configuration files that you must manually update.

H.5.1 Updating DataBindings.cpx

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" ... >

H.5.2 Updating weblogic.xml

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>

H.5.3 Updating faces-config.xml

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>

H.5.4 Updating trinidad-config.xml

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>

H.5.5 Updating web.xml

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 Framework 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 Framework 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>

H.5.6 Updating adf-config.xml

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 17, "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: Spaces 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 Framework application. See also Chapter 16, "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/scopedMD/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>

H.6 Modifying the Project Configurations

This section lists the project configuration files – JAR files, technology scopes, and WAR files – that must be added to the application.

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.

H.7 Creating Portal-Specific Files

A Framework application requires a specific file structure. This section explains how to create and configure this file structure. See also Section 9.12, "How are WebCenter Portal Files Organized?."

H.7.1 Create the Framework Application Folder Structure

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 9.12.1.2, "Why Is a WebCenter Portal: Framework 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.

H.7.2 Create a Resource Registry File

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 17, "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>

H.7.3 Create Default Resources

This section explains how to create and register several portal resource files.

H.7.3.1 Default Navigation Model File

The navigation model file, default-navigation-model.xml, allows you to incorporate navigation structures in portal site. For more information, see Chapter 11, "Building a Navigation Model for Your Portal" and Section 9.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:

  1. Right-click /oracle/webcenter/portalapp/navigations folder in Application Navigator and select New.

  2. In the New Gallery dialog, open the Portal node under Web Tier and select Navigation.

  3. 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.

H.7.3.2 Navigation Registry File

The navigation registry file, navigation-registry.xml, is used for editing navigations in the Resource Manager. See also Chapter 11, "Building a Navigation Model for Your Portal" and Section 9.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:

  1. Create a new Framework application. You will copy some files from this new application into the application you are migrating.

  2. 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
    
  3. Add two top-level folders, called new and links.

  4. Under the new folder, add the set of resources that should allowed to be added to a navigation when editing at runtime.

  5. 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 11, "Building a Navigation Model for Your Portal."

H.7.3.3 Resource Catalog File

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 WebCenter Portal's Composer uses catalogs at runtime to determine which elements an authorized user can add to a portal page. See also Chapter 17, "Adding and Using the Resource Manager" and Section 9.5.4, "Understanding Resource Catalogs and the Catalog Registry."

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:

  1. Right-click /oracle/webcenter/portalapp/catalogs folder in Application Navigator and select New.

  2. In the New Gallery dialog, open the Portal node under Web Tier and select Application Resource Catalog.

  3. 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.

  4. Add the set of resources that should allowed to be added to a page when editing at runtime. For more information, see Section 17.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:

  1. 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.

  2. 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.

H.7.3.4 Resource Catalog Registry File

The resource catalog registry file defines the set of items that are available for inclusion in your resource catalog at runtime. See Chapter 16, "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:

  1. Create a new Framework application. You will copy some files from this new application into the application you are migrating.

  2. 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
    

H.7.3.5 Page Template File

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 12, "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:

  1. Right-click the /oracle/webcenter/portalapp/pagetemplates folder in Application Navigator and select New.

  2. In the New Gallery dialog, open the JSF node under Web Tier and select JSF Page Template.

  3. Check the box labeled Create Associated ADFm Page Definition and add a facet definition named content.

  4. 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>
    
  5. Right-click the page template in the Application Navigator and select Create Portal Resource, then click OK.

H.7.3.6 Navigation Renderer File

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 11.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:

  1. 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.

  2. 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>
    

H.7.3.7 Page Hierarchy File

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 9.5.1, "Understanding Pages, Page Templates, and the Portal Page Hierarchy."

Note:

After creating the pages.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:

  1. In the folder specified by the location listed above, create a new file called pages.xml.

  2. 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"
      />
    

H.8 Applying Security Configurations

This section explains how to configure security in the Framework application.

H.8.1 Configure ADF Security

Ensure ADF Security is configured for ADF Authentication and Authorization. For more information, see Section 69.3.1, "Configuring ADF Security Settings." If security was not already configured for the application, you can configure it as follows:

  1. From the Application menu, select Secure and then Configure ADF Security.

  2. Select the ADF Authentication and Authorization option.

  3. Click Finish.

H.8.2 Configure the jazn-data.xml File

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 of jazn-data.xml with the following contents; rather, merge the highlighted (bold faced) elements with the existing <grant> and <permissions> entries.

  1. In the Application Navigator, open the Application Resources folder, then open Descriptors, and then the META-INF folder.

  2. In the META-INF folder, open the jazn-data.xml file.

  3. Add an Application Role called Administrator, if one doesn't exist. See Section 69.2, "Creating an Application Role."

  4. 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>