Click Finish. You should see a Registration Confirmation page similar to the one

6-30 Oracle Fusion Middleware Developers Guide for Oracle Portal

6.4 Introduction to Oracle PDK-Java

Oracle PDK-Java gives you a framework to simplify the development of Java portlets by providing commonly required utilities and allowing you to leverage existing development skills and application components such as JSPs, servlets, and static HTML pages. Oracle PDK-Java also enables you to create portlets without having to deal directly with the complexity of communications between Oracle Portal and providers. The Oracle PDK-Java framework is divided into the following areas: ■ The Provider Adapter insulates the developer from the HTTP syntax defined by Oracle Portal for communication with Web providers. It translates the information passed between Oracle Portal and your Java Web provider. Without an adapter, your provider would not only manage portlets, but it would also have to communicate this information directly to Oracle Portal in the expected language. The adapter eliminates the need for your Web provider to understand the portal language and vice-versa. ■ The Provider Interface defines the APIs functions required by your Java implementation to integrate with the Provider Adapter. The Provider Adapter receives messages from the portal, translates them into calls to the Provider Interface, and translates the providers response into a format that the portal can understand. The Provider Interface contains a set of Java classes that define the methods your provider needs to implement and, in many cases, provides a standard implementation. Some of the primary classes are as follows: – ProviderDefinition oracle.portal.provider.v2.ProviderDefinition – ProviderInstance oracle.portal.provider.v2.ProviderInstance – PortletDefinition oracle.portal.provider.v2.PortletDefinition – PortletInstance oracle.portal.provider.v2.PortletInstance – ParameterDefinition oracle.portal.provider.v2.ParameterDefinition – EventDefinition oracle.portal.provider.v2.EventDefinition ■ The Provider Runtime provides a base implementation that follows the specification of the Provider Interface. The Provider Runtime includes a set of default classes that implement each one of the Provider Interfaces and enables you to leverage the rendering, personalization, and security frameworks provided with PDK-Java. These classes and the associated frameworks simplify the development of a provider by implementing common functions for Oracle Portal requests and providing a declarative mechanism for configuring the provider. Using the Provider Runtime, you can focus your development efforts on the portlets themselves rather than the infrastructure needed to communicate with the portal. If the standard behavior of the Provider Runtime does not meet your requirements, you can easily extend or override specific behaviors. Some of the primary classes are as follows: – DefaultProviderDefinition oracle.portal.provider.v2.DefaultProviderDefinition – DefaultProviderInstance oracle.portal.provider.v2.DefaultProviderInstance – DefaultPortletDefinition oracle.portal.provider.v2.DefaultPortletDefinition – DefaultPortletInstance oracle.portal.provider.v2.DefaultPortletInstance – PortletRenderer oracle.portal.provider.v2.render.PortletRenderer Creating Java Portlets 6-31 – PortletPersonalizationManager oracle.portal.provider.v2.personalize.PortletPersonalizationManager – PortletSecurityManager oracle.portal.provider.v1.http.DefaultSecurityManager ■ The Provider Utilities provide methods for simplifying the rendering of portlets. The utilities include methods for constructing valid links hrefs, rendering the portlets container including the header, rendering HTML forms that work within a portal page, and supporting portlet caching.

6.5 Building Oracle PDK-Java Portlets with Oracle JDeveloper

Using the Oracle PDK-Java Portlet Wizard in Oracle JDeveloper you can begin your portlet development quickly and easily. This section assumes the following: ■ You are familiar with portlet terminology such as portlet Show modes. Refer to Chapter 1, Understanding Portlets and Section 6.1, Guidelines for Writing Java Portlets . ■ You are already familiar with Oracle JDeveloper and know how to build and deploy Java components using it. You can download Oracle JDeveloper from OTN. Visit the Oracle JDeveloper page on OTN: http:www.oracle.comtechnologyproductsjdevindex.html This section contains the following sections: ■ Section 6.5.1, Creating an Oracle PDK-Java Portlet and Provider ■ Section 6.5.2, Adding Portlet Logic to Your Oracle PDK-Java Portlet ■ Section 6.5.3, Validating Your Oracle PDK-Java Portlet and Provider ■ Section 6.5.4, Deploying Your Oracle PDK-Java Portlet to an Application Server ■ Section 6.5.5, Registering and Viewing Your Oracle PDK-Java Portlet

6.5.1 Creating an Oracle PDK-Java Portlet and Provider

This section walks you through the Oracle PDK-Java Portlet Wizard. You can choose which portlet Show modes you want to implement and the implementation method JSP, HTTP servlet, Java class, or HTML. The wizard then creates a simple sample implementation for each of the selected modes. The steps to create a portlet and provider are as follows: 1. Start Oracle JDeveloper. 2. In the Application Navigator, expand the application under which you want to create your portlet. 3. Right-click the project under which you want to create your portlet, and select New.