Oracle Webcenter Portal Framework应用程序功能–页面和页面层次结构

穆宾白
2023-12-01

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.

您已经在此处发布的上一教程中安装了Oracle Webcenter 11.1.1.8.0,但是您可能知道或可能不知道与该安装一起使用的这些组件。

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.

安装Oracle Webcenter Portal时,您选择安装的组件将部署到各种默认托管服务器上。 下表列出了托管服务器以及在其上部署Oracle Webcenter Portal组件的端口号。

ComponentManaged ServerPort
WebCenter PortalWC_Spaces8888
Oracle WebCenter Portal’s Portlet ProducersWC_Portlet8889
Oracle WebCenter Portal’s Pagelet ProdcuerWC_Portlet8889
Oracle WebCenter Portal’s Discussion ServerWC_Collaboration8890
Oracle WebCenter Portal’s Activity Graph EnginesWC_Utilities8891
Oracle WebCenter Portal’s Analytics CollectorWC_Utilities8891
Custom Portal Managed ServerWC_CustomePortal8892
Custom Services Producer Managed ServerWC_CustomServicesProdcuer8793
零件 受管服务器 港口
WebCenter门户 WC_Spaces 8888
Oracle WebCenter Portal的Portlet生产者 WC_Portlet 8889
Oracle WebCenter Portal的Pagelet产品 WC_Portlet 8889
Oracle WebCenter Portal的讨论服务器 WC_协作 8890
Oracle WebCenter Portal的活动图引擎 WC_Utilities 8891
Oracle WebCenter Portal的Analytics Collector WC_Utilities 8891
自定义门户托管服务器 WC_CustomePortal 8892
定制服务生产者托管服务器 WC_CustomServicesProdcuer 8793

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.

本教程是本系列的第一个教程,旨在讨论Oracle Webcenter Portal的所有功能,并且绝对应该通过使用Oracle Webcenter JDeveloper及其集成的Weblogic Server加以应用。

Oracle WebCenter门户 (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.

Oracle WebCenter提供了一个现成的企业可定制和可配置的应用程序,称为WebCenter Portal,使您能够有效地工作和协作。

Accessing of that environment can be done through starting the WC_Spaces – Like you did previously and typing the URL https://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

可以通过启动WC_Spaces来访问该环境–就像您之前所做的那样,并输入URL https://host:port/webcenter ,然后使用诸如weblogic之类的域管理员用户登录。 如果您将非默认用户指定为域管理员,则应授予该用户足够的角色

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.

主机广告端口均引用WC_Spaces运行所在的系统主机和端口,默认端口号为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.

如果要访问上面的URL,那么您肯定会站在Oracle WebCenter Home Portal上。 此外,如果您考虑使用新的上下文根,那么可以部署自定义的Portal Framework应用程序,然后再从同一URL访问它,这在Oracle WebCenter安装教程中非常清楚。

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.

实际上,这不仅是您这样做的方式; 您也可以使用JDeveloper Integrated Server。 JDeveloper集成服务器只是引用WebLogic Server实例的运行时服务,允许您从JDeveloper IDE内运行,测试和调试WebCenter Portal Framework应用程序。

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.

如此简单,而不是让您的节点管理器以及WC_Spaces以及其他服务器启动并运行(取决于您使用的功能),而这会大量消耗内存和处理器性能,单个实例就足够了为了那个原因。

配置JDeveloper集成服务器 (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.

仅发布Oracle JDeveloper 11.1.1.7.0,您可以使用其集成服务器来运行Oracle Portal Framework应用程序。 我们已经为您阐明了如何在Oracle WebCenter安装教程中进行安装,但这还不足以开始您的开发任务。

Steps below would help you install, extend and configure JDeveloper Integrated Instance:

以下步骤将帮助您安装,扩展和配置JDeveloper集成实例:

  • After JDeveloper get installed as you see in the Oracle WebCenter Tutorial.

    如您在Oracle WebCenter教程中看到的那样安装JDeveloper之后。
  • Make sure you have the latest update of Oracle WebCenter Extensions. From Help menu choose, Check for updates.

    确保您具有Oracle WebCenter Extensions的最新更新。 从“帮助”菜单中选择“检查更新”。
  • Click finish and restart the JDeveloper once the below image got seen.

    一旦看到以下图像,请单击完成并重新启动JDeveloper。
  • From view menu, select Application Server Navigator and expand Application Servers node.

    从视图菜单中,选择“ Application Server Navigator”,然后展开“ Application Servers”节点。
  • 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.

    正如您在上面注意到的那样,列出的Integrated WebLogic Server直到现在都没有配置,它需要您采取一些额外的步骤。
  • Right click on the Integrated WebLogic Server node and choose Create Default Domain.

    右键单击Integrated WebLogic Server节点,然后选择“ 创建默认域”
  • 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.

    填写您的首选数据,例如管理员ID:weblogic,密码:weblogic123,监听地址:mohammad-amr-lt,监听端口:7101,然后单击确定。 等到JDeveloper为您创建域。
  • Success domain creation should lead you to see these messages below:

    成功创建域应该使您看到以下消息:
  • Now access https://10.10.90.3:7101/console and you should see the below login page, so log on using weblogic/weblogic123.

    现在访问https://10.10.90.3:7101/console,您应该看到下面的登录页面,因此请使用weblogic / weblogic123登录。

探索Portal Framework应用程序的功能 (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.

WebCenter Portal Framework应用程序是一个标准的ADF Web应用程序,其中包括门户功能,例如导航,页面,页面模板,内容等。

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.

也就是说,Oracle Webcenter Portal Framework向ADF应用程序中添加了许多特定于门户的功能。 您先前已经创建了自己的第一个Oracle Webcenter Portal Framework应用程序,并且看到了如何使用JDeveloper来管理它。

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.

这次,您将远远不止获得一个运行良好的Oracle Webcenter Portal 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.

此功能使开发人员可以将其页面制定为树状结构(即父子关系)。 这种类型的表达方式可以方便地从页面到子页面传播和继承安全设置,并构造要构建的整体Portal。

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.

基本上,任何门户网站都可以包含多个页面,位于其中的每个页面都可以包含一个或多个实体,例如任务流,Portlet和内容。 它还可能包含导航界面,例如导航树,选项卡或面包屑。

Page hierarchy concept is acting upon your Portal Framework Pages that are located within your Portal Application beneath Web Content folder like below:

页面层次结构概念作用于位于Web内容文件夹下的Portal应用程序内的Portal Framework页面,如下所示:

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.

通过以下简单实践,您将创建一个新的关于,帮助和信息页面。 这个新创建的页面层次结构将形成导航模型,并控制Oracle Portal Framework应用程序用来允许/拒绝用户访问的安全策略。

  • Open your JDeveloper IDE.

    打开您的JDeveloper IDE。
  • Create your own Oracle Webcenter Framework Application. If you didn’t do that before, you may visit introduction tutorial published here.

    创建您自己的Oracle Webcenter Framework应用程序。 如果您以前没有这样做,则可以访问此处发布的入门教程。
  • I assumed that you have a Portal Framework Application in addition to its default pages just like below:

    我假设除了默认页面外,您还拥有一个Portal Framework应用程序,如下所示:
  • If your project gets running, you will certainly get the following default page once you access it through https://10.10.90.3:7101/[yourContextRoot]. This actually will invoke the default navigation model and shows you the below page.

    如果您的项目正在运行,则通过https://10.10.90.3:7101/ [ yourContextRoot ]访问该页面后,您肯定会获得以下默认页面。 实际上,这将调用默认的导航模型,并向您显示以下页面。

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.

您可以通过提供自定义部署配置文件来控制上下文根,也可以使用JDeveloper创建的默认根配置文件。 稍后将对此进行解释,但是在所有情况下,您的部署URL将由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.

    通过在Web Content / oracle / webcenter / portalapp /页面下创建一个新的JSPX文件来添加新页面About,并将其命名为about.jspx。 可以通过右键单击pages文件夹,然后从“ New Gallery”对话框中选择“ JSP”来完成。
  • See your newly created page listed beside all default pages.

    请参见所有默认页面旁边列出的新创建页面。
  • Edit your about.jspx to be look like below:

    编辑about.jspx如下所示:

about.jspx

about.jspx

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="https://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="https://java.sun.com/jsf/core"
          xmlns:h="https://java.sun.com/jsf/html"
          xmlns:af="https://xmlns.oracle.com/adf/faces/rich">
  <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
              doctype-system="https://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.

    JSPX是可用于编写JSP页面的合法格式。 对于普通的JSP来说,它可能很相似,只是使用了XML结构。
  • 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.

    在使用任何标记库之前,应将其导入jsp:root标记内。 除了ADF面外,还导入了标准HTML和JSF核心。
  • 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.

    Oracle Webcenter Portal Framework是具有门户功能的ADF Web应用程序,因此,您可能会找到f:view组件。 考虑JSF 1.2实现时,会大量使用此组件。
  • Document component is used mainly as a replacement for creating all HTML standards element like (html, body, head).

    文档组件主要用作创建所有HTML标准元素(如(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.

    af:pageTemplate用于引用您制作的模板。 您的bindings变量将引用此页面的绑定组件。 一旦将此页面添加到pages.xml页面层次结构定义中,就会自动创建此变量。 下图显示了页面层次结构–编辑器视图。
  • 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.

通过将创建的页面拖动到“页面层次结构”的面板中,您可以将页面添加到已定义的“页面层次结构”中,但是请确保您的页面在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.

    打开页面文件夹,然后选择about.jspx文件。 然后,您可能会注意到Root和aboutPageDef.xml绑定文件下存在新的About页面。
  • Save all, and configure your aboutPageDef binding through clicking on it and adding that pageTemplateBinding variable which will refer the PreferenceBean default template method.

    保存所有内容,并通过单击它并添加将引用PreferenceBean默认模板方法的pageTemplateBinding变量来配置aboutPageDef绑定。
  • Click on green plus shown above.

    单击上面显示的绿色加号。
  • Click Okay and name the variable as pagTemplateBinding and click Okay once again.

    单击确定,并将变量命名为pagTemplateBinding ,然后再次单击确定。
  • 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:

    将此变量与PreferenceBean默认页面Template方法相关联,如下所示:
  • 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.

    如果打印出此变量引用的默认模板,则肯定会看到该模板位于pagetemplates文件夹pageTemplate_globe.jspx下 。 稍后,我们将讨论页面模板的概念,但现在让我们将模板视为基于参考的页面,页面会参考这些页面来制定其内容。

The default page template includes navigation UI component which will reacting according for the security policies defined for every page links.

默认页面模板包括导航UI组件,它将根据为每个页面链接定义的安全策略做出React。

  • 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="https://xmlns.oracle.com/webcenter/page"
              xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="https://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>

    对于您在页面层次结构中创建的每个新级别,都会创建一个pagehierarchy / pages / * pages文件。 星号是父页面的指示器(参考)。 这些创建的文件(homePages.xml)包含该级别页面的引用。

    homePages.xml

  • 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:

    “关于”页面还将覆盖由Root和home传播的这些安全策略,如下所示:

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.

    导航UI组件将受到已定义的安全策略的影响。 因此,Oracle Webcenter Portal Framework应用程序将使我们能够看到允许查看的页面链接。
  • As you may noticed above, Info sub menu isn’t shown also. Now, log on into your system by using your weblogic administrator user.

    正如您可能在上面注意到的那样,“信息”子菜单也未显示。 现在,使用weblogic管理员用户登录到系统。
  • 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.

Oracle Webcenter Portal Framework应用程序是具有门户功能的ADF Web应用程序。 这些功能之一是页面层次结构,该层次结构用于覆盖门户的整体结构,此外还可以通过传播或委派来应用适当的安全策略。 本系列将完成对Oracle Webcenter Portal的所有功能的讨论,因此,请在下面的评论中为我们做出贡献,并为下一个新功能提供帮助。

翻译自: https://www.journaldev.com/6830/oracle-webcenter-portal-framework-application-features-page-hierarchy

 类似资料: