This chapter helps you get started using JDeveloper to develop assets and extensions to WebCenter Portal, providing guidance and tips on how to structure your development environment.
This chapter includes the following topics:
This chapter distinguishes between tasks that are general and tasks that are application-specific. General tasks apply no matter what kind of application you are developing. For instance, installing JDeveloper and the WebCenter Portal extensions are general setup tasks. Other tasks described in this chapter apply only if you are developing specific kinds of applications, like WebCenter Portal server extensions or WebCenter Portlet Producer applications.
This section describes setup tasks that do not depend on the kind of application you are developing.
Oracle JDeveloper provides an integrated development environment (IDE) for developing portals and custom portal components. For information on obtaining and installing Oracle JDeveloper, see the Oracle JDeveloper page on OTN at:
http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html
The WebCenter Portal extensions is an add-in that provides JDeveloper with the complete set of WebCenter Portal capabilities and features. To install the WebCenter Portal extensions:
See also Installing and Configuring Oracle WebCenter Portal.
Oracle strongly recommends that you set an environment variable for the user home directory that is referenced by JDeveloper. By setting this variable, you can avoid receiving long pathname errors that are known to occur in some circumstances.
For detailed instructions on setting this variable on Windows, Linux, UNIX, and Mac OS X operating systems, see Setting the User Home Directory in Installing Oracle JDeveloper.
The following topics describe the Integrated WebLogic Server used by JDeveloper, and how to deploy and configure it:
The Integrated WebLogic Server is a runtime service that references an instance of Oracle WebLogic Server and is bundled with JDeveloper. The Integrated WebLogic Server allows developers to run, test, and debug WebCenter Portal portlet producer and consumer applications from within JDeveloper. Note that you will need to publish and test assets within WebCenter Portal to determine their suitability within a particular portal and/or page.
For detailed information managing the Integrated WebLogic Server, see the topic "Deploying to Integrated WebLogic Server" in the JDeveloper Online Help. Other options, such as running in debug mode and logging into the WebLogic Server Administration Console, are also covered in that section.
Although it is not required, you have the option of changing the default Java Virtual Machine (JVM) settings the Integrated WLS in the setDomainEnv.sh
. This file is located in JDEV_SYSTEM_DIRECTORY/DefaultDomain/bin
.
The default memory values are:
-Xms512m -Xmx512m
When creating or referring to the JDEV_SYSTEM_DIRECTORY
, keep in mind that, on a Windows platform, a WebCenter domain name cannot contain spaces, and the domain cannot be created in a folder that has a space in its path. Therefore, ensure that DOMAIN_HOME
and JDEV_SYSTEM_DIRECTORY
paths do not contain spaces.
Connections allow applications to access external data and services. For example, to use the Content Presenter task flow to display content from an Oracle WebCenter Content Server repository, you need to configure a connection to the repository. If you intend to consume portlets from a portlet producer, you need to configure the producer connection.
Tip:
A good practice is to create and test your connections once and check them into your source control system. Then, other developers on your team can check out the connections and use them. This technique also allows your team to keep in sync whenever a connection changes.
This section discusses connections and describes the different ways to access the wizards for creating new connections.
Depending on how you invoke a wizard to create a connection, connections are placed in one of the following locations:
Under Application Resources in the Application Navigator
Connections created here can be used in the current application only. This is the most common way to create a repository connection.
For certain features, you can drag and drop a connection from Application Resources onto a page to create different types of task flow regions. To learn more, refer to the individual chapters on tools and services for WebCenter Portal.
Under IDE Connections in the Resource Palette
Connections created here can be reused across applications. To use these connections in an application, you just have to drag and drop the connection from the Resource Palette onto the Connections node in that application.
To access a connection wizard from the New Gallery:
From the File menu, choose New.
In the New Gallery dialog, expand Connections, select the type of connection you want to create, and click OK.
Depending on your selection, the Create <Connection_Type> Connection dialog opens.
The Create Connection in option is set to Application Resources by default.
You can select IDE Connections to create a connection in the Resource Palette.
To access a connection wizard from the Application Navigator:
Right-click the Connections node under Application Resources and select New Connection, then select the connection type from the context menu.
Depending on your selection, the Create <Connection_Type> Connection dialog or wizard opens.
The Create Connection in option is set to Application Resources by default.
To access a connection wizard from the Resource Palette:
WebCenter Portal provides a variety of ready-to-use portlets that you can add to your portal pages. This section provides a brief description of the preconfigured producers and the portlets they provide. It contains the following subsections:
For more information about WebCenter Portlet Producer applications, see Introduction to Portlets.
The preconfigured portlet producers are not deployed by default, you must deploy them manually, as explained in this section.
Note:
These producer applications consume memory and require CPU time during deployment. This contributes to the WebLogic Server startup time and base memory footprint. For these reasons, it makes sense to only deploy the applications you need. For more information about tuning the deployment of internal applications, see On-demand Deployment of Internal Applications in Deploying Applications to Oracle WebLogic Server.
The Integrated WLS contains PortalTools, which provides access to the design time at runtime OmniPortlet portlet. Design time at runtime means that users define portlet content after the portlet is placed on an application page and the page is run.
To access the OmniPortlet portlet producer:
Start the Integrated WebLogic Server and open the WebCenter Portal Deployments dialog as described in Deploying the Preconfigured Portlet Producers.
Select Portal Tools Portlet Producers and click OK to deploy them to the Integrated WebLogic Server.
The Deployment - Log tab in JDeveloper displays a link that opens the PortalTools Welcome page, from where you can open two Portal Tools test pages—one for the OmniPortlet producer and one for the Sample Portlet Producers.
The OmniPortlet producer provides OmniPortlet, which is a declarative portlet-building tool that enables you to build portlets against a variety of data sources, including XML files, character-separated value files (for example, spreadsheets), web services, databases, and web pages. OmniPortlet users can also choose a prebuilt layout for the data. Prebuilt layouts include tabular, news, bullet, form, chart, or HTML. For more information about OmniPortlet, see Working with OmniPortlet in Building Portals with Oracle WebCenter Portal.
The Sample Portlet Producer includes portlets built with OmniPortlet that are for demonstration purposes only. The portlet samples include a scrolling RSS portlet and a simple RSS portlet. Note that the sample producer is for demonstration and should not be used to create real-use portlet instances.
On the PortalTools Welcome page, copy the OmniPortlet Producer link, or the Sample Portlet Producer link, and use it to register OmniPortlet with your portal. For information about registering a portlet producer, see Registering an Oracle PDK-Java Portlet Producer in Administering Oracle WebCenter Portal.
The Integrated WLS includes sample WSRP portlet producers and portlets you can use with your application.
Note:
You can find the source code for the sample portlets is in the following EAR file:
JDEV_HOME
/oracle_common/modules/oracle.wccore/wsrp-samples.ear
where JDEV_HOME
is the location where JDeveloper is installed on your machine.
To access the WSRP sample portlet producers:
Start the Integrated WebLogic Server and open the WebCenter Portal Deployments dialog as described in Deploying the Preconfigured Portlet Producers.
Select WSRP Sample Portlet Producers and click OK to deploy them to the Integrated WebLogic Server.
The Deployment - Log tab in JDeveloper displays a link that opens the WSRP Sample Producer Test Page.
Copy the Web Services Description Language (WSDL) URL for a WSRP producer—either WSRP v1 WSDL or WSRP v2 WSDL— and use it to register the producer. For more information about registering portlet producers, see Managing Portlet Producers in Administering Oracle WebCenter Portal.
The Integrated WLS includes sample PDK-Java portlet producers and portlets you can use to familiarize yourself with the types of functionality that are available through PDK-Java portlets.
To access PDK-Java sample portlet producers:
Start the Integrated WebLogic Server and open the WebCenter Portal Deployments dialog as described in Deploying the Preconfigured Portlet Producers.
Select PDK-Java Sample Portlet Producers and click OK to deploy the PDK-Java Sample Producers Test Page to the Integrated WebLogic Server.
The Deployment - Log tab in JDeveloper displays a link that opens the provider test page.
Open a test page, copy the link and use it to register the producer.
For information about registering a portlet producer, see Managing Portlet Producers in Administering Oracle WebCenter Portal.