Customizing the Administration Console

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Extending the Portal Administration Console

Administration Console extensions are web applications that you integrate with the existing Administration Console. You can use an extension to do something as simple as adding a portlet to a page within the console, or as complex as adding an entire editor module that includes multiple books and pages.

To create an extension, you re-create the Administration Console web application within your EAR and import the associated libraries. You then can add or remove functionality to the web application.

After creating your custom Administration Console, including any extensions you added, you package this new custom Administration Console as a J2EE library and add that library to your existing web application. The new library will replace the Administration Console that was previously associated with your portal.

The section includes the following topics:

 


What Is an Administration Console Extension?

You can extend the Administration Console by adding books, pages, or portlets to an existing book or page within the Administration Console. For example, you can add a login portlet to the Administration Console that allows users to login to another administrative application, such as a Network Operations Center.

When you extend the Portal Administration Console, you need to first assemble the application files that are needed in the extension (new books, pages, JSPs, portlets, and so on), and then configure your extension so that the Portal Administration Console can locate and communicate with its resources.

The simplest extension adds content to the Administration Console's home page (desktop). The JAR file for such an extension contains:

 


Setting up Your Development Environment

Setting up your development environment involves creating two additional web projects within your EAR. One project will be used to re-create the Administration Console with all of its libraries. This project will become your new extended Administration Console. You use an additional web project to create your extension.

Creating an Administration Console Web Project

To create your custom Administration Console web project:

  1. Create a web project:
    1. Right-clicking your EAR project.
    2. Choose New > Portal Web Project.
  2. In the New Portal Web Project dialog, associate your web project with the same EAR that your portal web application is associated with.
  3. In the Project Facets dialog, de-select the Portal Visitor Tools facet.
  4. Click Finish.

Add the Administration Console J2EE Libraries to your Extension Project

The following J2EE modules are required for the Administration Console. Even though you may be customizing only a page of the console, import all of these modules to your web project. Remember you are re-creating the entire Administration Console, which ensures that your deployment remains consistent.

WARNING: J2EE libraries not imported to your web project can be overwritten when you upgrade WebLogic Portal. In most cases, this is desirable. However, upgraded libraries will delete your Administration Console customizations and extensions.

To copy a J2EE module to your web project:

  1. In the Project Explorer, right-click the //web_project_name/WebLogic Deployment Descriptor > J2EE Libraries folder and then select Add Multiple.
  2. In the Select WebLogic J2EE library, select the modules you need. Figure 3-1 lists the required libraries.
  3. Table 3-1 Required Administration Console J2EE Libraries
    Required Administration Console J2EE Libraries
    wlp-tools-full-console-web-lib
    wlp-tools-common-web-lib
    wlp-tools-content-web-lib
    wlp-tools-framework-web-lib
    wlp-tools-im-web-lib
    wlp-tools-portal-web-lib
    wlp-tools-serviceadmin-web-lib
    wlp-tools-ugm-web-lib

  4. Click OK.

Creating your Extension Web Project

Create a web project where you will build your extension. Your extension can include books, pages, portlets, or an entire portal.

To create your extension web project:

  1. Create a web project:
    1. Right-click your EAR project.
    2. Choose New > Portal Web Project.
  2. In the New Portal Web Project dialog, associate your web project with the same EAR that your portal web application is associated with.
  3. In the Project Facets dialog, de-select the Portal Visitor Tools facet.
  4. Click Finish.
  5. Create the books, pages, and other resources that you want to include in your extension. For more information about building portal resources, see the Portal Development Guide.

 


Building Your Extension Module

When you are finished creating the resources for your extension, you are ready to create the configuration files necessary to integrate your extension with the Administration Console project you created. You need to create two configuration files to include with your project, then package the project and add it to your Administration Console web project.

Creating Configuration Files for Your Extension

When you create an extension, you are creating a new web application that can be used in your Administration Console via a netuix-extension.xml file that is contained within the extension application itself. If you want your extension to be accessible via the main menu of the Administration Console, you also need to create an editors.xml file.

Note: The beehive-netui-config.xml file in the WEB-INF/ directory specifies netui-specific tags and handler classes. Add the following elements to the beehive-netui-config.xml file between the <pageflow-config> and the <request-interceptors> elements:
	<jsp-tag-config>
<id-javascript>legacy</id-javascript>
<tree-renderer-class>com.bea.jsptools.patterns.tree.
ToolsTreeRenderer</tree-renderer-class>
</jsp-tag-config>

Determining Where to Place Your Extension

The Administration Console is built from several library modules that represent the features supported within the console. The main portal of the Administration Console resides in the wlp-tools-common-web-lib. This main portal.portal file is extended by each subsequent library module. To extend the portal, each library uses an netuix-extension.xml that references its resources and indicates where it will extend the portal.portal.

You can also extend the Administration Console at the book or page level. To determine which book to extend, you use the netuix-extension.xml files for each library module to familiarize yourself with how the Administration Console is structured.

After determining the Administration Console book or page you want to extend, you refer to the definition labels of the respective module's books or pages in your own extension module's netuix-extension.xml to indicate where your extension should appear within the Administration Console.

To view these definition labels, you open the respective WAR files that contain the associated books for your extension point. Keep in mind that you do not modify the existing Administration Console files or modules in any way. Instead, you create an extension that points to the existing files. Table 3-2 lists the books that contain definition labels of commonly used extension points.

Table 3-2 Common Extensions for the Administration Console 
Book
Extension Point
netuix-extension.xml Location
/im/interactionToolsMainBook.book
The main book for Interaction Management.
Look in this book's XML file for the definition labels of subsequent books that you want to extend.
//WebLogic_Home/
portal/lib/modules/
wlp-im-web-lib.war
/ugm/TopLevelEditor.book
The main book for User and Group Management.
Look in this book's XML file for the definition labels of subsequent books that you want to extend.
//WebLogic_Home/
portal/lib/modules/
wlp-ugm-web-lib.war
/portalTools/portalTopLevelEditorBook.book
The main book for Portal Management.
Look in this book's XML file for the definition labels of subsequent books that you want to extend.
//WebLogic_Home/
portal/lib/modules/
wlp-pm-web-lib.war
/serverTools/
serverToolsTopLevelEditorBook.book
The main book for Service Administration.
Look in this book's XML file for the definition labels of subsequent books that you want to extend.
//WebLogic_Home/
portal/lib/modules/
wlp-serviceadmin-web-lib.war
/content/
contentTopLevelEditorBook_twoPageTree.book
The main book for Content Management when using library services.
Look in this book's XML file for the definition labels of subsequent books that you want to extend.
//WebLogic_Home/
portal/lib/modules/
wlp-cm-web-lib.war
/content/
contentTopLevelEditorBook_onePageTree.book
The main book for content management if not using library services.
Look in this book's XML file for the definition labels of subsequent books that you want to extend.
//WebLogic_Home/
portal/lib/modules/
wlp-cm-web-lib.war

Creating a netuix-extension.xml File

The easiest way to create a new netuix-extension.xml file to include in your extension application is to copy an existing file from one of the WAR files included in a library module. The netuix-extension.xml file must reside in the //WEB-INF/ directory of your project.

Before beginning these steps, copy the text from an existing netuix-extension.xml to use in your new file. Listing 3-1 provides an example file.

Listing 3-1 Example of a netuix-extension File that Extends the Main Book of the Administration Console
<?xml version="1.0" encoding="UTF-8" ?> 
<weblogic-portal-extension xmlns="http://www.bea.com/servers/portal/weblogic-portal/8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/servers/portal/weblogic-portal/8.0 netuix-extension-1_0_0.xsd">
< !-- The provider-info element allows you to enter a description for your extension -->
<provider-info>
	<title>BEA WebLogic Portal Administration Console - Content Management Extension</title> 
	<description>Content Management books that are inserted into theBEA WebLogic Portal Administration Console</description> 
	<author>BEA Systems, Inc.</author> 
</provider-info>
<! -- The portal-file element defines which portal file you are extending. To extend the Administration Console, the value of this element should be portal.portal -->
<portal-file>/portal.portal</portal-file>
<! -- Use the book-extension element and its children to define which book in the Adminstration Console you are extending. The <book-content content-uri> element is wehre you put that path to your extension. In the following example, content is the name of the web extension application that contains the contentTopLevelEditorBook-twoPageTree.book -->
<book-extension>
	<book-location>
  		<parent-label-location label="mainToolsBook" /> 
  		<book-insertion-point page-label="homeBook" action="append" /> 
	</book-location>
	<book-content content-uri="/content/contentTopLevelEditorBook_twoPageTree.book" /> 
</book-extension>
< ! -- This example file includes two extensions. Both of which extend the home book of the mainToolsBook of the Administration Console -->
<book-extension>
	<book-location>
  		<parent-label-location label="mainToolsBook" /> 
  		<book-insertion-point page-label="homeBook" action="append" /> 
  	</book-location>
  	<book-content content-uri="/content/contentTopLevelEditorBook_onePageTree.book" /> 
</book-extension>
</weblogic-portal-extension>

To create a netuix-extension.xml file within your web project:

  1. Right-click the //WEB-INF folder within your extension web project and select New > Other.
  2. In the Select a Wizard dialog, select XML > XML and click Next.
  3. In the Create an XML File dialog, mark Create XML File from Scratch and click Next.
  4. In the XML File Name dialog, type netuix-extension as the name of your file and click Finish.
  5. In the Package Explorer, right-click the netxuix-extension.xml file and select Open With > Text Editor.
  6. Paste the text you have copied from a valid netuix-extension.xml file.
  7. Make modifications to the text that match the extension module you have created and save the file.

Creating an editors.xml File

If you want to include your extension in the header menu of the Administration Console (shown in Listing 3-1), you need to include an editors.xml file in your extension web project.

Figure 3-1 The Administration Console Header Menu

The Administration Console Header Menu

The editors.xml file allows you to extend an existing menu entry or add a new menu entry.

The easiest way to create a new editors.xml file to include in your extension application is to copy an existing file from one of the WAR files included in a library module. The editors.xml file must reside in the //WEB-INF/ directory of your project.

Note: For WebLogic Portal 10.x, if you want to add an editor to an existing menu, you need to add a properties file to your system path. For more information, see the WebLogic Portal Release Notes.

Before beginning these steps, copy the text from an existing editors.xml to use in your new file. Listing 3-1 provides an example file.

To create an editors.xml file:

  1. Right-click the //WEB-INF folder within your extension web project and select New > Other.
  2. In the Select a Wizard dialog, select XML > XML and click Next.
  3. In the Create an XML File dialog, mark Create XML File from Scratch and click Next.
  4. In the XML File Name dialog, type editors as the name of your file and click Finish.
  5. In the Package Explorer, right-click the editors.xml file and select Open With > Text Editor.
  6. Paste the text you have copied from a valid editors.xml file.
  7. Make modifications to the text that match the extension module you have created and save the file. Listing 3-2 shows an example of a valid editors.xml file.
  8. Listing 3-2 Example of an editors.xml File
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- @name: the name of the top-level menu item.  This is used as the key for getting the title from the properties file specified in the bundleName attribute. --> 
    <!-- @defLabel: the definition label of the default book to show for this editor group.  This is not currently used by the menu. --> 
    <!-- @defaultEditor: the name attribute of the default editor for this group --> 
    <!-- @bundleName: the name of the applications scoped (EAR) properties file from which to retrieve the title for @name -->
    <edtrs:editor-group
        xmlns:edtrs="http://com.bea.portal/tools/admin/xsd/editors-1_0_0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://com.bea.portal/tools/admin/xsd/editors-1_0_0 editors-1_0_0.xsd"
        name="myPAT" 
        defLabel="NOT_USED" 
        defaultEditor="myPATeditor" 
        bundleName="myPATeditor.i18n.myPATeditor" > 
    <!-- @name: the name of this editor which is used as a second level menu item.  This is used as the key for getting the title from the properties file specified in the bundleName attribute. --> 
    <!-- @landingDefLabel: the definition label of the landing page for this editor; IT MUST END WITH _landingPage --> 
    <!-- @headerIcon: the icon to show for this editor --> 
    <!-- @bundleName: the name of the applications scoped (EAR) properties file from which to retrieve the title for @name -->
    	<edtrs:editor name="myPATeditor" 
    		landingDefLabel="myPATeditor_landingPage" 
    		headerIcon="wlp-content-mgmt-24.gif" 
    		bundleName="myPATeditor.i18n.myPATeditor" > 
    <!--  tree builders are only used in the Administration Console editors. However, this entry is required.-->
    		<edtrs:tree-builder>
    			<edtrs:mode>NOT_USED</edtrs:mode>
    		</edtrs:tree-builder>        	
    	</edtrs:editor>
    </edtrs:editor-group>

Adding Your Extension to Your Administration Console

When you have finished building your extension resources and added the necessary configuration files (a netuix-extension.xml file and an optional editors.xml file), you need to export your extension to your custom Administration Console application.

Note: Make sure that you have added your extension to the custom Administration Console project you created, see Creating an Administration Console Web Project.

To add your extension to your Administration Console application:

  1. In your Administration Console web project, add a folder called bea-ext under the WEB-INF directory. You will export your extension project to this directory.
  2. In your extension web project, right-click the root directory of your extension web project and select Export > WAR.
  3. In the Export WAR dialog, click Browse to navigate to the \\WEB-INF\bea-ext directory in your Administration Console web project. For example, c:\bea\user_projects\workspaces\myWorkspace\adminConsoleWebProject\webContent\web-inf\bea-ext\
  4. Click Finish.
  5. Using the Project Explorer, navigate to the WAR file you just exported to your custom Administration Console. You may need to press F5 to refresh the directory's contents.
  6. Right-click on the *.war file (for example, myExtension.war) and select Copy.
  7. Right-click the //WEB-INF/bea-ext directory and select Paste.
  8. In the Naming Conflict dialog, rename your WAR file to the same name yet with a *.jar file extension. For example, myExtension.jar.
  9. Delete the *.war file.

 


Using Online Help in an Extended Console

In an extended administration console, some features and steps that are referred to in the administration console online help system might not apply. This situation can occur, for instance, if you have removed features or parts of the administration console. Users of the extended administration console need to be aware of this possibility.

 


Using your Extended Administration Console

As with the WebLogic Portal Administration Console, you access the extended Administration Console with a URL. For example, http://localhost:7001/myCustomConsoleWebProject/portal.portal


  Back to Top       Previous  Next