Tuesday, April 28, 2015

Setting up Oracle JDeveloper for WebCenter Portal Asset Development

Oracle WebCenter Portal's round-trip development features provide a simple, convenient way to create and modify Oracle WebCenter Portal assets without redeploying the entire application. Round-trip development refers to features and techniques that allow you to download assets from Oracle WebCenter Portal and upload them to Oracle JDeveloper for maintenance or enhancement. Once an asset has been modified, you can upload it back to Oracle WebCenter Portal for immediate use or for testing.
In this article you will learn how to set up your development environment for Oracle WebCenter
Examples in this article use an environment that has Oracle WebLogic Server, Oracle WebCenter Portal, and Oracle WebCenter Content installed and running.
The installation of Oracle JDeveloper occurs on a laptop with Windows 7 OS.

JDeveloper Installation and Configuration

  1. Download and install JDeveloper
    1. As of September 26, 2013, this is the most recent version of JDeveloper that supports asset development for Oracle WebCenter Portal
    2. JDeveloper 11.1.2.X.X versions do not support WebCenter development
      JDeveloper was installed in this path: C:\Oracle\Middleware\11117

      That path will be referenced throughout this article, but may be different based on your installation.
  2. Open JDeveloper.
  3. Install the Oracle WebCenter Portal Extension for JDeveloper.
    1. Help —> Check For Updates
    2. Search for Oracle WebCenter Portal extension (version
    3. Select the extension, then click Finish
    4. Restart JDeveloper
  4. Download the portal asset development workspace from OTN:
    1. http://download.oracle.com/otndocs/tech/webcenter/files/DesignWebCenterSpaces_11.
    2. This folder is a JDeveloper application that you will connect to your WebCenter instance for direct download and upload.
      This ZIP file was downloaded to: C:\Users\MPALSKI\Downloads.

      This path will be referenced for the rest of this article.
    3. Unzip DesignWebCenterSpaces_11. to C:\Users\MPALSKI\Downloads\DesignWebCenterSpaces_11.
  5. Copy the workspace WLST scripts to your JDeveloper instance.
    1. Navigate to: C:\Users\MPALSKI\Downloads\DesignWebCenterSpaces_11.\copy_to_common\common
    2. Select the folders script_handlers and wlst and copy them
    3. Navigate to: C:\Oracle\Middleware\11117\oracle_common\common
    4. Paste the folders into common to replace the existing script_handlers and wlst folders (Figure 1).
Figure 1
  1. Copy the workspace JAR file to your JDeveloper extensions library.
    1. Navigate to: C:\Users\MPALSKI\Downloads\DesignWebCenterSpaces_11.\copy_to_jdev_ext
    2. Right-click and copy oracle.webcenter.portal.jar
    3. Navigate to: C:\Oracle\Middleware\11117\jdeveloper\jdev\extensions
    4. Rename oracle.webcenter.portal.jar to oracle.webcenter.portal_old.jar.
    5. Paste oracle.webcenter.portal.jar into the folder (Figure 2).
Figure 2
  1. Copy the workspace into your JDeveloper folder.
    1. Navigate to: C:\Users\MPALSKI\Downloads\DesignWebCenterSpaces_11.
    2. Copy the DesignWebCenterSpaces folder.
    3. Navigate to: C:\JDeveloper\mywork.
    4. Note that this is NOT the same location as your JDeveloper installation folder.
    5. Paste the workspace into the mywork folder.
  2. Restart JDeveloper.
    1. Close JDeveloper
    2. Re-open JDeveloper

Workspace Configuration

  1. Open the workspace:
    1. Open JDeveloper
    2. Navigate to File —> Open
    3. Navigate to C:\JDeveloper\mywork\DesignWebCenterSpaces
    4. Select DesignWebCenterSpaces.jws
    5. Click the Open button.
  2. Open connection properties file:
    1. Expand WebCenterSpacesExtensionLibrary
    2. Expand Resources
    3. Expand WebCenterSpacesExtensionLibrary
    4. Open config.properties by double-clicking the file (Figure 3).
Figure 3
  1. Set connection properties:
    1. Follow the instructions in this file that display in green and are prefixed with a # so that they are commented out.
    2. For reference, here are some example values:
      1. jdeveloper.install.home.directory=C:\\Oracle\\Middleware\\11117
      2. wlst.executable=wlst.cmd
      3. extending.spaces.home.dir=C:\\JDeveloper\\mywork\\DesignWebCenterSpaces
      4. oracle.jdeveloper.ojdeploy.path=${jdeveloper.install.home.directory}/jdeveloper/jdev/bin/ojdeploy
      5. wls.port=7001
      6. wls.host=<IP address>
      7. wc.port=8888
      8. wc.host= <IP address>
      9. wc.protocol=http
  2. Create User Key and User Config files:
    1. Navigate to your wlst.cmd file
      1. C:\Oracle\Middleware\11117\oracle_common\common\bin
      2. Double-click wlst.cmd
    2. Connect to the admin server
      1. connect('weblogic','welcome1','<IP address>:7001')
    3. Enter the following command
      1. storeUserConfig('C:/myFiles/myuserconfigfile.secure', 'C:/myFiles/myuserkeyfile.secure')
    4. When prompted, enter Y and then hit Enter (Figure 4).
Figure 4
  1. Complete connection properties:
    1. wls.userkey=C:\\myFiles\\myuserkeyfile.secure
    2. wls.userconfig=C:\\myFiles\\myuserconfigfile.secure
    3. wls.target=WC_Spaces,AdminServer
    4. wls.webcenter.app.target=WC_Spaces
    5. webcenter.app.name=webcenter
    6. restart.implementation.version.suffix=2
    7. restart.implementation.version.suffix.ear=2
  2. Test the connection:
    1. Navigate to WebCenterSpacesResources\Web Content\oracle\webcenter\siteresources\scopedMD\s8bba98ff_4cbb_40b8_beee_296c916a23ed\navigation\gsra789be69_045e_40dc_9884_c9d30e78a90b\Navigation.xml
    2. Right-click Navigation.xml
    3. Select "Upload Portal Resource to server…" (Figure 5).
      Figure 5
    4. Enter your admin username and password. The default values are (Figure 6):
      1. Username: weblogic
      2. Password: welcome1
      Figure 6
    5. A confirmation dialogue box will display (Figure 7):
      Figure 7

Downloading Assets

  1. In the Navigator, right-click the WebCenterSpacesResources project and then select Download Portal Resource from Server. You may be prompted to enter a username and password.
    Figure 8
  2. In the Download Portal Resources dialogue, choose to download either a shared asset (Application-Level Resource) or a portal asset (Portal-Level Resource).
  3. To filter the list of possible asset names, select the type of asset you wish to download from the Resource Type menu (Figure 9).
    Figure 9
  4. Finally, select the name of the asset you wish to download from the Resource Name menu.
  5. Click the OK button. A progress bar will appear and then a confirmation will display (Figure 10).
    Figure 10
  6. You can check the log file to confirm that the download completed successfully. Your log file should resemble Figure 11.
    Figure 11
  7. The asset that you selected will now appear in your JDeveloper project. In the following example screen shots, a Page Template was downloaded (Figure 12).
    Figure 12
  8. To ensure you are viewing the same asset that you just downloaded, right-click the asset and select Update Portal Resource (Figure 14). The display name will match the Resource Name that you selected during download (step #3 in this section).
    Figure 13
  9. Click Cancel to close the dialogue and return to your project for resource development.

Editing Portal Resources in JDeveloper

To learn more about building assets, read the appropriate chapters in the Oracle WebCenter Documentation:

Backing Up Your Resources

Sometimes, you may want to create a backup copy of a portal asset. For instance, it would be wise to back up a portal asset before uploading a new version of it in case your development causes unintended results.
Portal resources are saved as EAR files. To save a copy of a portal asset, follow these steps:
  1. Navigate to the Administration page.
  2. Select Shared Assets in the top-navigation.
  3. Select an asset category from the left-navigation.
  4. Navigate to the resource you wish to back up, right-click, and select download (Figure 14).
    Figure 14
  5. In the Download dialogue box, click Download to save the EAR file to your local machine (Figure 15).
    Figure 15
  6. You have now successfully made a backup copy of that portal resource.

Restoring Your Backup

To restore your backup copy of the resource, simply return to the Administration interface and use the Upload button to import the backup EAR file that you downloaded (Figure 16).
Figure 16
When replacing a copy of the asset that has already been edited in JDeveloper:
  1. Delete the asset that was already imported into JDeveloper by right-clicking it and selecting Delete (Figure 17).
    Figure 17
  2. Follow the steps in this article to download the resource to your JDeveloper project from WebCenter.


Out-of-the-box, Oracle WebCenter Portal provides tools knowledge workers and developers with the tools to quickly and easily create portals, intranets, extranets, and self-service applications that offer users a more effective and efficient way to access and interact with information, business applications, and process. Oracle WebCenter Portal can be customized using browser-based tools and JDeveloper.
JDeveloper can be used to develop components that can be deployed and used in Oracle WebCenter Portal. Components can be ADF task flows, data controls,managed beans, and such other assets as skins, page styles, task flow styles, page templates, content-present display templates, navigations, and resource catalogs.
Enabling direct upload/download between JDeveloper and Oracle WebCenter Portal makes iterative asset development quicker and easier for your development team.

By leveraging the indirect process of downloading a portal asset as an EAR file, development teams can back up portal assets before deploying a new version to their environment.

Reference : http://www.oracle.com/technetwork/articles/enterprise2/palski-jdeveloper-webcenter-2062770.html

No comments:

Post a Comment