![]() ![]() ![]() ![]() |
Administration Console の拡張は、既存の Administration Console に統合する Web アプリケーションです。コンソール内のページにポートレットを追加する、複数のブックとページを含むエディタ モジュールの全体を追加などの簡単な作業には、拡張を利用できます。
拡張を作成するには、EAR 内で Administration Console Web アプリケーションを再度作成して、関連するライブラリをインポートします。これによって Web アプリケーションに機能を追加または削除することができます。
追加した拡張をすべて含むカスタム Administration Console を作成したら、この新しいカスタム Administration Console を J2EE ライブラリとしてパッケージ化します。このライブラリを既存の Web アプリケーションに追加して、これまでポータルに関連付けられていた Administration Console と置き換えます。
既存の Administration Console 内のブックやページにブック、ページ、ポートレットを追加して Administration Console を拡張できます。たとえば、Administration Console にログイン ポートレットを追加することができます。これにより、ユーザは Network Operations Center (NOC) などの別の管理アプリケーションにログインできるようになります。
Portal Administration Console を拡張する場合、最初に拡張に必要なアプリケーション ファイル (新しいブック、ページ、JSP、およびポートレットなど) を構築する必要があります。次に Portal Administration Console がリソースを探し、通信できるように拡張をコンフィグレーションします。
最も簡単な拡張は Administration Console のホーム ページ (デスクトップ) にコンテンツを追加することです。このような拡張用の JAR ファイルには、以下が含まれます。
開発環境の設定では、EAR に 2 つの追加 web プロジェクトを作成する必要があります。1 つのプロジェクトは、Administration Console をそのライブラリ全体と共に再度作成するために使用されます。このプロジェクトは新しい拡張された Administration Console になります。拡張を作成するには、追加 web プロジェクトを使用します。
カスタム Administration Console web プロジェクトの作成。
Administration Console には以下の J2EE モジュールが必要です。コンソールの 1 ページのみをカスタマイズする場合でも、これらのモジュールをすべて Web プロジェクトにインポートします。デプロイメントの一貫性を保つため、Administration Console 全体を再度作成します。
注意 : | WebLogic Portal をアップグレードする場合は、Web プロジェクトにインポートされていない J2EE ライブラリを上書きできます。ほとんどの場合、こうすることが望ましいためです。ただしライブラリをアップグレードすると、Administration Console をカスタマイズおよび拡張した部分が削除されます。 |
Web プロジェクトに J2EE モジュールをコピーするには、以下の手順に従います。
拡張を組み込む場所に web プロジェクトを作成します。拡張には、ブック、ページ、ポートレット、またはポータル全体を含めることができます。
拡張 Web プロジェクトを作成するには、以下の手順に従います。
拡張に使うリソースの作成が完了したら、作成した Administration Console に拡張を統合するために必要なコンフィグレーション ファイルを作成する準備が整いました。プロジェクトに含める 2 つのコンフィグレーション ファイルを作成し、プロジェクトをパッケージ化して Administration Console Web プロジェクトに追加する必要があります。
拡張を作成する場合は、新しい Web アプリケーション を作成します。この Web アプリケーションは、拡張アプリケーション自体に含まれるnetuix-extension.xm
ファイルを通じて Administration Console で使用できます。拡張に Administration Console のメイン メニューからアクセスするには、editors.xml
ファイルも作成する必要があります。
Administration Console はコンソール でサポートされる機能を持つ複数のライブラリ モジュールを使用して構築されています。Administration Console のメイン ポータルは wlp-tools-common-web-lib にあります。この主な portal.portal
ファイルは、後続の各ライブラリ モジュールで拡張されます。ポータルを拡張するには、各ライブラリでそのリソースを参照するnetuix-extension.xml
を使用して portal.portal
を拡張する場所を指定します。
Administration Console は、ブックやページ レベルで拡張できます。拡張するブックを決定するには、各ライブラリ モジュールの netuix-extension.xml
ファイルを使用して、Administration Console がどのように構成されているかを理解します。
拡張する Administration Console のブックとページを決定した後で、拡張を Administration Console のどこに表示されるかを指定するには、拡張モジュールの netuix-extension.xml
にある各モジュールのブックとページの定義ラベルを参照します。
これらの定義ラベルを表示するには、拡張ポイントに関連付けられたブックを含む各 *.war
ファイルを開きます。既存の Administration Console ファイルやモジュールは変更しないように注意してください。代わりに、既存のファイルを指す拡張を作成します。表 3-2 に、一般的に使用される拡張ポイントの定義ラベルを含むブックを示します。
拡張アプリケーションに新しい netuix-extension.xml
ファイルを作成して追加する最も簡単な方法は、ライブラリ モジュールにある *.war
ファイルから既存のファイルを 1 つコピーすることです。netuix-extension.xml
ファイルはプロジェクトの //WEB-INF/
ディレクトリ内に配置する必要があります。
これらの手順を開始する前に、新しいファイルで使用するテキストを既存の netuix-extension.xml
からコピーします。コード リスト 3-1 に、ファイルの例を示します。
<?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>
Web プロジェクトに netuix-extension.xml
ファイルを作成するには、以下の手順に従います。
netuix-extension
を入力し、[終了] をクリックします。netxuix-extension.xml
ファイルを右クリックして、[アプリケーションから開く|テキスト エディタ] を選択します。netuix-extension.xml
ファイルからコピーしたテキストを貼り付けます。
Administration Console のヘッダ メニューに拡張を追加するには (コードリスト 3-1 に表示)、拡張 Web プロジェクトに editors.xml
ファイルを追加する必要があります。
editors.xml
ファイルを使用すると、既存の メニュー エントリの拡張、または新しいメニュー エントリの追加ができます。
拡張アプリケーションに新しい editors.xml
ファイルを作成して追加する最も簡単な方法は、ライブラリ モジュールにある *.war
ファイルから既存のファイルを 1 つコピーすることです。editors.xml
ファイルはプロジェクトの //WEB-INF/ ディレクトリ内に配置する必要があります。
注意 : | WebLogic Portal 10.0 では、既存のメニューにエディタを追加する場合、システムへのパスにプロパティ ファイルを追加する必要があります。詳細については、「WebLogic Portal リリース ノート」を参照してください。 |
これらの手順を開始する前に、新しいファイルで使用するテキストを既存の editors.xml
からコピーします。コード リスト 3-1 に、ファイルの例を示します。
editors.xml
ファイルを作成するには、以下の手順に従います。
editors
を入力し、[終了] をクリックします。editors.xml
ファイルを右クリックして、[アプリケーションから開く|テキスト エディタ] を選択します。editors.xml
ファイルからコピーしたテキストを貼り付けます。editors.xml
ファイルの例を示します。<?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>
拡張リソースを構築し、必要なコンフィグレーション ファイル (netuix-extension.xml
ファイルとオプションの editors.xml
ファイル)の追加が完了したら、Administration Console のカスタム アプリケーションに拡張をエクスポートする必要があります。
注意 : | 作成した Administration Console のカスタム プロジェクトに拡張を追加します。「Administration Console Web プロジェクトの作成」を参照してください。 |
Administration Console アプリケーションに拡張を追加するには、以下の手順に従います。
\\WEB-INF\bea-ext
ディレクトリに移動します。次に例を示します。c:\bea\user_projects\w4WP_workspaces
\myWorkspace\adminConsoleWebProject
\webContent\web-inf\bea-ext\
myExtension.war
) を右クリックし、[コピー] を選択します。myExtension.jar
がその例です。
WebLogic Portal Administration Console にアクセスするのと同様、Administration Console にも URL からアクセスします。次に例を示します。http://localhost:7001/myCustomConsoleWebProject/portal.portal
![]() ![]() ![]() |