Oracle® Fusion Middleware Oracle WebCenter PortalおよびOracle JDeveloperでのポータルの開発 11gリリース1 (11.1.1.9.0) E49666-05 |
|
![]() 前 |
![]() 次 |
この付録では、デフォルトのカタログ定義ファイルの構成、場所および属性について説明します。
内容は次のとおりです。
この情報は、第XIII部「アプリケーションのカスタマイズとカスタマイズ・オプションの拡張」で説明されているタスクの実行時に役立ちます。
リソース・カタログの詳細は、第14章「リソース・カタログの開発」を参照してください。
adf-config.xml
ファイルのrcv-config
セクションは、デフォルトのカタログの名前を定義します。rcv-config
要素は、アプリケーションのデフォルトではadf-config.xml
ファイル内で使用できません。デフォルト・カタログの名前を変更する場合や、複数のカタログを実装する場合には、これを追加する必要があります。
<rcv:rcv-config>
<rcv:catalog-selector class-name=""/>
<rcv:default-catalog catalog-name="/oracle/webcenter/portalapp/catalogs/default-catalog.xml"/></rcv:rcv-config>
リソース・カタログ・サービスは、resource-catalog-root
ディレクトリでMDSにカタログ定義ファイルを格納します。resource-catalog-root
はMDSネームスペースとして定義され、したがって、正確な場所はMDS構成によって異なります。デフォルトのresource-catalog-root
は、adf-config.xml
のadf-rcs-config
要素のdefault-scope
属性によって定義されます。この属性は/
に設定され、カタログIDが完全な修飾MDSパスとして表されることを意味します。
<rcs:adf-rcs-config>
<rcs:rcs-config>
<rcs:catalog-config default-scope="/"
default-registry="/oracle/webcenter/portalapp/catalogs/catalog-registry.xml"/>
. . .
<rcs:security-manager class-name="oracle.webcenter.portalframework.genericsiteresources.internal.security.CatalogSecurityManager"/>
</rcs:rcs-config>
security-manager
要素は、セキュリティ・マネージャの実装を定義します。
例C-1に、参照用のカタログ定義のXMLスキーマを示します。
例C-1 カタログ定義のXMLスキーマ
<xsd:schema elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/adf/rcs/catalog" xmlns:rcs="http://xmlns.oracle.com/adf/rcs/catalog" xmlns:md="http://xmlns.oracle.com/bali/xml/metadata" xmlns:mds="http://xmlns.oracle.com/mds" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0"> <xsd:annotation> <xsd:appinfo> <jaxb:schemaBindings> <jaxb:package name="oracle.adfinternal.rc.catalog.xml"/> </jaxb:schemaBindings> </xsd:appinfo> </xsd:annotation> <!-- declare all elements as top-level elements so they appear in the component palette pages generated by XMLEF --> <!-- IMPORTANT: catalogDefinition & navigationModel CANNOT share a common type --> <!-- MDS cannot handle it. --> <xsd:element name="catalogDefinition" type="rcs:catalogDefinitionType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <!-- enable customization for navigation models --> <xsd:element name="navigationDefinition" type="rcs:navigationDefinitionType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <!-- disable customization of the schema definition for both catalog & navigation models --> <xsd:element name="schema" type="rcs:schemaType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="descriptor" type="rcs:descriptorType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="attributes" type="rcs:attributesType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="attribute" type="rcs:attributeType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> <!-- ### this marks "attributeId" attribute as "locally unique" within the <attributes> tag --> <mds:localUniqueAttribute>attributeId</mds:localUniqueAttribute> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="parameters" type="rcs:parametersType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="parameter" type="rcs:parameterType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> <!-- ### this marks "id" attribute as "locally unique" within the <parameters> tag --> <mds:localUniqueAttribute>id</mds:localUniqueAttribute> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="contents" type="rcs:contentsType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="folder" type="rcs:folderType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="resource" type="rcs:resourceType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="includeCatalog" type="rcs:includeCatalogType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="includeNavigation" type="rcs:includeNavigationType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="repository" type="rcs:repositoryType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="dynamicFolder" type="rcs:dynamicFolderType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="source" type="rcs:dynamicFolderSourceType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="customFolder" type="rcs:customFolderType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="component" type="rcs:componentType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="url" type="rcs:urlType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="customContent" type="rcs:customContentType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="separator" type="rcs:separatorType"> <xsd:annotation> <xsd:appinfo> <md:elementMetadata> <mds:customizationAllowed>true</mds:customizationAllowed> </md:elementMetadata> </xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:complexType name="descriptorType"> <xsd:attribute name="attributeId" type="xsd:string" use="required"/> <xsd:attribute name="labelKey" type="xsd:string"/> <xsd:attribute name="shortLabelKey" type="xsd:string"/> <xsd:attribute name="helpTextKey" type="xsd:string"/> <xsd:attribute name="hintTextKey" type="xsd:string"/> <xsd:attribute name="searchable" type="xsd:boolean" default="true"/> <xsd:attribute name="multivalue" type="xsd:boolean" default="false"/> <xsd:attribute name="endUserVisible" type="xsd:boolean" default="true"/> <xsd:attribute name="resourceBundle" type="xsd:string"/> </xsd:complexType> <xsd:complexType name="schemaType"> <xsd:sequence> <xsd:element ref="rcs:descriptor" minOccurs="1" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="resourceBundle" type="xsd:string"/> </xsd:complexType> <xsd:complexType name="attributeType"> <xsd:attribute name="attributeId" type="xsd:string" use="required"/> <xsd:attribute name="value" type="xsd:string" use="required"/> <xsd:attribute name="isKey" type="xsd:boolean" default="false"/> <xsd:attribute name="resourceBundle" type="xsd:string"/> </xsd:complexType> <xsd:complexType name="attributesType"> <xsd:sequence> <xsd:element ref="rcs:attribute" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="resourceBundle" type="xsd:string"/> </xsd:complexType> <xsd:complexType name="parameterType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="id" type="xsd:string" use="required"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="parametersType"> <xsd:sequence> <xsd:element ref="rcs:parameter" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="itemType"> <xsd:all> <xsd:element ref="rcs:attributes" minOccurs="0" maxOccurs="1"/> <xsd:element ref="rcs:parameters" minOccurs="0" maxOccurs="1"/> </xsd:all> <xsd:attribute name="id" type="xsd:ID" use="required"/> <xsd:attribute name="name" type="xsd:string"/> <xsd:attribute name="description" type="xsd:string"/> <xsd:attribute name="visible" type="xsd:string" default="true"/> </xsd:complexType> <xsd:complexType name="includeCatalogType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:attribute name="scope" type="xsd:string" use="required"/> <xsd:attribute name="catalogId" type="xsd:string" use="required"/> <xsd:attribute name="insertFolderContents" type="xsd:boolean" default="false"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="includeNavigationType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:attribute name="scope" type="xsd:string" use="required"/> <xsd:attribute name="navigationId" type="xsd:string" use="required"/> <xsd:attribute name="insertFolderContents" type="xsd:boolean" default="false"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="repositoryType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:attribute name="repository" type="xsd:string" use="required"/> <xsd:attribute name="path" type="xsd:string"/> <xsd:attribute name="includeSubfolders" type="xsd:boolean" default="true"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="dynamicFolderSourceType"> <xsd:attribute name="repository" type="xsd:string"/> <xsd:attribute name="path" type="xsd:string"/> <xsd:attribute name="includeSubfolders" type="xsd:boolean" default="true"/> </xsd:complexType> <xsd:complexType name="dynamicFolderType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:sequence> <xsd:element ref="rcs:source" minOccurs="1" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="expression" type="xsd:string"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="customContentType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:attribute name="contentProviderClass" type="xsd:string" use="required"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="customFolderType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:attribute name="factoryClass" type="xsd:string" use="required"/> <xsd:attribute name="path" type="xsd:string"/> <xsd:attribute name="insertFolderContents" type="xsd:boolean" default="false"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- this is a bit of a kludge. To keep MDS happy we must define a type --> <!-- for separators even though they don't have any special attributes --> <xsd:complexType name="separatorType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"/> </xsd:complexContent> </xsd:complexType> <!-- implementation of filters has been deferred <xsd:complexType name="filterType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:attribute name="expression" type="xsd:string"/> <xsd:attribute name="filterClass" type="xsd:string"/> <xsd:attribute name="scope" type="xsd:string" default="subtree"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> --> <xsd:group name="folderContentGroup"> <xsd:choice> <xsd:element name="folder" type="rcs:folderType"/> <xsd:element name="repository" type="rcs:repositoryType"/> <xsd:element name="resource" type="rcs:resourceType" /> <xsd:element name="dynamicFolder" type="rcs:dynamicFolderType" /> <xsd:element name="customFolder" type="rcs:customFolderType"/> <xsd:element name="customContent" type="rcs:customContentType"/> <xsd:element name="component" type="rcs:componentType"/> <xsd:element name="url" type="rcs:urlType"/> <xsd:element name="includeCatalog" type="rcs:includeCatalogType"/> <xsd:element name="includeNavigation" type="rcs:includeNavigationType"/> <xsd:element name="separator" type="rcs:separatorType"/> </xsd:choice> </xsd:group> <xsd:complexType name="contentsType"> <xsd:group ref = "rcs:folderContentGroup" minOccurs="0" maxOccurs="unbounded" /> </xsd:complexType> <!-- contents is optional to allow resourceType to extend folderType --> <!-- most resources won't have children so the contents element should be optional --> <xsd:complexType name="folderType"> <xsd:complexContent> <xsd:extension base="rcs:itemType"> <xsd:all> <!-- <xsd:element name="filter" type="rcs:filterType" minOccurs="0" maxOccurs="unbounded"/> --> <xsd:element ref="rcs:contents" minOccurs="0" maxOccurs="1"/> </xsd:all> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- resourceType extends folderType to allow resource elements to have children --> <xsd:complexType name="resourceType"> <xsd:complexContent> <xsd:extension base="rcs:folderType"> <xsd:attribute name="repository" type="xsd:string" use="required"/> <xsd:attribute name="path" type="xsd:string" use="required"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- resourceType extends folderType to allow component elements to have children --> <xsd:complexType name="componentType"> <xsd:complexContent> <xsd:extension base="rcs:folderType"> <xsd:attribute name="factoryClass" type="xsd:string" use="required"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- resourceType extends folderType to allow URL elements to have children --> <xsd:complexType name="urlType"> <xsd:complexContent> <xsd:extension base="rcs:folderType"> <xsd:attribute name="url" type="xsd:string" use="required"/> <xsd:attribute name="factoryClass" type="xsd:string" use="required"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="catalogDefinitionType"> <xsd:complexContent> <xsd:extension base="rcs:folderType"> <xsd:all> <xsd:element ref="rcs:schema" minOccurs="0" maxOccurs="1"/> </xsd:all> <xsd:attribute name="contact" type="xsd:string"/> <xsd:attribute name="definitionFilter" type="xsd:string"/> <xsd:attribute name="resourceBundle" type="xsd:string"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="navigationDefinitionType"> <xsd:complexContent> <xsd:extension base="rcs:folderType"> <xsd:all> <xsd:element ref="rcs:schema" minOccurs="0" maxOccurs="1"/> </xsd:all> <xsd:attribute name="contact" type="xsd:string"/> <xsd:attribute name="definitionFilter" type="xsd:string"/> <xsd:attribute name="resourceBundle" type="xsd:string"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:schema>
カタログ定義スキーマにより、リソース・カタログの構造およびコンテンツを指定できる豊富な要素のセットが提供されます。
この項の内容は、次のとおりです。
カスタム・カタログ定義ファイルを作成する方法の例は、第14.2項「リソース・カタログの作成」を参照してください。
catalogDefinition
要素では、変換済の文字列の場所など、カタログの全体的な特性を定義します。
例C-2に、catalogDefinition
の使用方法を示します。
例C-2 catalogDefinitionの例
<catalogDefinition id="DefaultCatalog" visible="#{true}" resourceBundle="portal.catalog.DefaultCatalogBundle" definitionFilter="portal.catalog.DefaultCatalogFilter" xmlns="http://xmlns.oracle.com/adf/rcs/catalog">
表C-1に、catalogDefinition
要素のキーワードを示します。要素にタイトル、サブジェクト、説明などのattributes
を指定する方法の詳細は、第C.3.8項「attributes」を参照してください。
表C-1 catalogDefinitionのキーワード
キーワード | 説明 |
---|---|
|
|
|
このカタログ定義を参照する際に使用される識別子。 |
|
リソース・カタログを実行時に選択できるようにする必要があるかどうかを指定します。この属性は、EL値を取得し、このカタログを特定のユーザーやグループに条件付で表示するために使用できます。デフォルトでの値は |
|
|
|
|
folder
要素では、カタログのコンテンツの編成に使用されるカタログ・フォルダを定義します。フォルダには、その他のフォルダを含め、任意の数のエントリを含めることができます。同じフォルダに異なるタイプのカタログ要素を混在させることができます。
フォルダには、他のエントリと同様にattributes
があります。要素にattributes
を指定する方法の詳細は、第C.3.8項「attributes」を参照してください。
例C-3に、folder
要素の使用方法を示します。
例C-3 folderの例
<folder visible="#{true}" id="webDevFolder"> <attributes> <attribute value="WEB_DEV_FOLDER.TITLE" attributeId="Title" isKey="true"/> <attribute value="WEB_DEV_FOLDER.DESCRIPTION" attributeId="Description" isKey="true"/> <attribute value="WEB_DEV_FOLDER.KEYWORDS" attributeId="Subject" isKey="true"/> <attribute value="/adf/webcenter/folderlayout_qualifier.png" isKey="false" attributeId="IconURI"/> </attributes> <contents/> <folder>
表C-2に、folder
要素のキーワードを示します。
表C-2 folderのキーワード
キーワード | 説明 |
---|---|
|
このフォルダを参照する際に使用される一意の識別子。 |
|
リソースをカタログに表示する必要があるかどうか。この属性はEL値を取り、条件付きで特定のユーザーまたはグループにリソースを表示するために使用できます。デフォルト値は |
カタログ定義のソースにコードを追加するよりも、カタログ定義ファイルの「設計」ビューにフォルダを追加する方が簡単な場合があります。詳細は、第14.3.4項「リソース・カタログにフォルダを追加する方法」を参照してください。
url
要素は、カタログの次のタイプのリンクを定義するために使用します。
タスク・フロー: WebCenter Portalのツールとサービス・タスク・フロー、またはJDeveloperで作成したカスタム・タスク・フローへのリンク。
ポートレット: 登録済のポートレット・プロデューサへのリンク。
コンテンツ: 既存のコンテンツ・リポジトリ接続からファイルまたはディレクトリへのリンク。
その他: カスタム・コンポーネント(そのコンポーネントのXMLコードを提供することで作成します)へのリンク。
例C-4に、url
要素の使用方法を示します。
例C-4 urlリソースの例
<url visible="#{true}" factoryClass="oracle.webcenter.portalframework.sitestructure.rc.TaskFlowResourceFactory" id="tagCloud" url="taskflow://oracle/webcenter/tagging/controller/taskflows/tag-selection.xml#tag-selection"> <attributes> <attribute value="TAG_CLOUD.TITLE" attributeId="Title" isKey="true"/> <attribute value="TAG_CLOUD.DESCRIPTION" attributeId="Description" isKey="true"/> <attribute value="TAG_CLOUD.KEYWORDS" attributeId="Subject" isKey="true"/> <attribute value="oracle.webcenter.tagging" attributeId="WEBCENTER_SERVICE_ID" isKey="false"/> <attribute value="/adf/webcenter/label_qualifier.png" attributeId="IconURI"/> <attribute value="height:211px" attributeId="attr.contentStyle" isKey="false"/> </attributes> <contents/> </url>
表C-3に、url
要素のキーワードを示します。
表C-3 urlのキーワード
キーワード | 説明 |
---|---|
|
このリンクを参照する際に使用される一意の識別子。 |
|
リソースをカタログに表示する必要があるかどうか。この属性はEL値を取り、条件付きで特定のユーザーまたはグループにリソースを表示するために使用できます。デフォルト値は |
|
カスタム・コンポーネントを追加する場合には、コンポーネントのファクトリ・クラスを指定します。その他のすべてのリソース・タイプには、設計モードのタイプを選択した時点で 使用可能なリソース・タイプのファクトリ・クラスは、次のとおりです。
|
|
ソースにアクセスするためのURL。リンク・タイプごとに、異なるURL形式がサポートされています。詳細は、表14-1を参照してください。 |
リソース・リンクでは、タイトル、サブジェクト、説明およびパラメータなどの属性を使用できます。詳細は、第C.3.8項「attributes」および第C.3.10項「parameters」を参照してください。
カタログ定義のソースにコードを追加するよりも、カタログ定義ファイルの「設計」ビューにリンクを追加する方が簡単な場合があります。詳細は、第14.3.3項「リソース・カタログにリンクを追加する方法」を参照してください。
includeCatalog
要素は、他のカタログ定義ファイルへの参照を組み込むために使用します。
例C-5に、includeCatalog
要素の使用方法を示します。
例C-5 ネストされたリソース・カタログの例
<includeCatalog visible="#{true}" scope="/" id="users-catalog" catalogId="/oracle/webcenter/portalapp/catalogs/users-catalog.xml"> <attributes> <attribute value="catalog" isKey="false" attributeId="Title"/> </attributes> </includeCatalog>
includeCatalog
要素は、catalogDefinition
要素と同じキーワードをサポートします。includeCatalog要素のキーワードは表C-1
を参照してください。
カタログには、タイトル、件名および説明などのattributes
を含めることができます。要素にattributes
を指定する方法の詳細は、第C.3.8項「attributes」を参照してください。
カタログ定義のソースにコードを追加するよりも、カタログ定義ファイルの「設計」ビューにカタログを追加する方が簡単な場合があります。詳細は、第14.3.8項「リソース・カタログを別のリソース・カタログに追加する方法」を参照してください。
component
要素は、単純なADF Facesコンポーネントや通常のHTMLなどのカスタムXMLリソースをカタログに組み込むために使用します。component
要素は、contents
セクション内に配置する必要があります。カタログ定義ファイルには複数のcomponent
要素を追加できます。
component
要素には、parameters
要素とネストされたparameter
要素が含まれている必要があります。parameter
要素のid
をxml
に設定します。このparameter
要素内にXMLフラグメントを含めます。実行時にコンポーネントのADF Faces IDを生成するには、コンポーネントのIDを#
(ハッシュ・シンボル)に設定します。
例C-6は、Box
コンポーネントをリソース・カタログに追加するコードを示しています。
例C-6 カタログ定義ファイルのPanel Customizableコンポーネント
<component id="pc" visible="#{true}" factoryClass="oracle.adf.rc.component.XmlComponentFactory"> <attributes> <attribute attributeId="Title" value="BOX" isKey="true"/> <attribute attributeId="Description" value="BOX.DESCRIPTION" isKey="true"/> <attribute attributeId="Subject" value="BOX.KEYWORDS" isKey="true"/> <attribute attributeId="IconURI" value="/adf/webcenter/panelcustomizable_qualifier.png"/> </attributes> <parameters> <parameter id="xml"><cust:panelCustomizable id="#" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"/> </parameter></parameters> </parameters> </component>
表C-4に、component
要素のキーワードを示します。要素にattributes
を指定する方法の詳細は、第C.3.8項「attributes」を参照してください。
表C-4 componentのキーワード
キーワード | 説明 |
---|---|
|
カタログ定義内のコンポーネントの一意の識別子。 |
|
リソースをカタログに表示する必要があるかどうか。この属性はEL値を取り、条件付きで特定のユーザーまたはグループにリソースを表示するために使用できます。デフォルト値は |
|
|
カスタム・コンポーネントでは、タイトル、サブジェクト、説明およびパラメータなどの属性を使用できます。詳細は、第C.3.8項「attributes」および第C.3.10項「parameters」を参照してください。
カタログ定義ファイルの「設計」ビューにカスタム・コンポーネントを追加することが簡単な場合があります。詳細は、第14.3.5項「リソース・カタログにカスタム・コンポーネントを追加する方法」を参照してください。
customFolder
要素は、リソース・カタログ・アダプタを使用して生成されたコンテンツを定義します。この要素は、実行時に動的にコンテンツを移入するフォルダをレンダリングします。カタログには、フォルダ内リソースがない場合でもそのフォルダが表示されます。
例C-7に、分析サービスからタスク・フローをレンダリングするcustomFolder
要素の使用方法を示します。
例C-7 customFolderリソースの例
<customFolder factoryClass="oracle.webcenter.analytics.view.rc.ASServiceContextFactory" id="analyticsServiceFolder" visible="#{true}"> <attributes resourceBundle="oracle.webcenter.spaces.resource.DefaultGroupSpaceCatalogBundle"> <attribute attributeId="Description" isKey="true" resourceBundle="oracle.webcenter.spaces.resource.DefaultGroupSpaceCatalogBundle" value="ANALYTICS_FOLDER.DESCRIPTION"/> <attribute attributeId="IconURI" isKey="false" value="/adf/webcenter/folderanalytics_qualifier.png"/> <attribute attributeId="Subject" isKey="true" resourceBundle="oracle.webcenter.spaces.resource.DefaultGroupSpaceCatalogBundle" value="ANALYTICS_FOLDER.KEYWORDS"/> <attribute attributeId="WEBCENTER_SERVICE_ID" isKey="false" value="oracle.webcenter.analytics"/> <attribute attributeId="attr.text" isKey="false" value="#{uib_o_w_s_r_DefaultGroupSpaceCatalog['ANALYTICS_FOLDER.TITLE']}"/> <attribute attributeId="Title" isKey="true" resourceBundle="oracle.webcenter.spaces.resource.DefaultGroupSpaceCatalogBundle" value="ANALYTICS_FOLDER.TITLE"/> </attributes> <parameters/> </customFolder>
表C-5に、customFolder
要素のキーワードを示します。
表C-5 customFolderのキーワード
キーワード | 説明 |
---|---|
|
このフォルダを参照する際に使用される一意の識別子。 |
|
リソースをカタログに表示する必要があるかどうか。この属性はEL値を取り、条件付きで特定のユーザーまたはグループにリソースを表示するために使用できます。デフォルト値は |
|
サービスのファクトリ・クラス。 サポートされているファクトリ・クラスに関する情報は、第C.4項「カタログへの動的リソースの追加に使用可能なファクトリ・クラス」を参照してください。 |
カスタム・フォルダでは、タイトル、サブジェクト、説明およびパラメータなどの属性を使用できます。詳細は、第C.3.8項「attributes」および第C.3.10項「parameters」を参照してください。
カタログ定義のソースにコードを追加するよりも、カタログ定義ファイルの「設計」ビューにカスタム・フォルダを追加する方が簡単な場合があります。詳細は、第14.3.6項「リソース・カタログにカスタム・フォルダを追加する方法」を参照してください。
customContent
要素は、リソース・カタログ・アダプタを使用して生成されたコンテンツを定義します。この要素は、実行時に動的に生成されるリソースを含んだフォルダをレンダリングします。customFolder
要素と違い、customContent
要素は、フォルダ内にリソースがある場合にのみカタログ内のフォルダをレンダリングします。
例C-8に、customContent
要素の使用方法を示します。
例C-8 customContentリソースの例
<customContent contentProviderClass="com.oracle.ensemble.interop.adf.EnsembleContentProvider" id="ensembleContentProvider" visible="true"> <attributes resourceBundle="oracle.webcenter.spaces.resource.DefaultGroupSpaceCatalogBundle"/> </customContent>
表C-6に、customContent
要素のキーワードを示します。
表C-6 customContentのキーワード
キーワード | 説明 |
---|---|
|
このフォルダを参照する際に使用される一意の識別子。 |
|
リソースをカタログに表示する必要があるかどうか。この属性はEL値を取り、条件付きで特定のユーザーまたはグループにリソースを表示するために使用できます。デフォルト値は |
|
|
カスタム・コンテンツ・プロバイダでは、タイトル、サブジェクト、説明およびパラメータなどの属性を使用できます。詳細は、第C.3.8項「attributes」および第C.3.10項「parameters」を参照してください。
カタログ定義のソースにコードを追加するよりも、カタログ定義ファイルの「設計」ビューにカスタム・コンテンツ・フォルダを追加する方が簡単な場合があります。詳細は、第14.3.7項「リソース・カタログにカスタム・コンテンツ・プロバイダを追加する方法」を参照してください。
リソース·カタログのエントリは、エントリを記述する属性が関連付けられています。いくつかの属性の値は、リソースから直接得られるか、または、カタログ定義の各XML要素のname
およびdescription
属性から得られます。ただし、これらの値は、エンドユーザーに表示するために適切でない可能性があり、異なる言語では利用できない場合があります。カタログ定義のattributes
要素を使用して定義される属性を使用すると、他のソースから利用可能な属性をオーバーライドできます。さらに、これらの属性は、リソース・バンドルのキーの点から定義されているので、表示されている実際の値は現在のユーザーの場所を反映します。
attributes
要素には、リソース・カタログ・エントリに適用する必要のある属性を定義する個別のattribute
要素を必要なだけ挿入できます。
例C-9に、attributes
要素の使用方法を示します。
例C-9 attributesおよびattribute要素の例
<attributes> <attribute value="ANNOUNCEMENTS_MAIN_VIEW.TITLE" attributeId="Title" isKey="true"/> <attribute value="ANNOUNCEMENTS_MAIN_VIEW.DESCRIPTION" attributeId="Description" isKey="true"/> <attribute value="ANNOUNCEMENTS_MAIN_VIEW.KEYWORDS" attributeId="Subject" isKey="true"/> <attribute value="oracle.webcenter.collab.announcement" attributeId="WEBCENTER_SERVICE_ID" isKey="false"/> </attributes>
表C-7に、attributes
要素のキーワードを示します。
attribute
要素は、schema
要素の記述子に対応するリソース・カタログ・エントリの属性を定義します。属性に関する詳細は、第C.3.8項「attributes」を参照してください。コンポーザは次の属性を使用します。
役職
説明
Subject
IconURI
ToolTip
それぞれのカテゴリ・エントリには、少なくともTitle
およびDescription
属性を組み込む必要があります。Subject
属性も、リソース・カタログのキーワード検索を容易にするために特にお薦めします。Title
属性は、親要素上のname
属性をオーバーライドし、リソース・バンドルを介して変換される表示名の宣言に使用されます。同様に、Description
属性は、親要素上のdescription
属性をオーバーライドし、リソース・バンドルを介して変換される説明の宣言に使用されます。
schema
要素に独自の属性を含めることで、それらを宣言できます。詳細は、第C.3.11項「schema」を参照してください。
例C-10に、attribute
要素の使用方法を示します。
例C-10 attributesおよびattribute要素の例
<attributes> <attribute value="ANNOUNCEMENTS_MAIN_VIEW.TITLE" attributeId="Title" isKey="true"/> <attribute value="ANNOUNCEMENTS_MAIN_VIEW.DESCRIPTION" attributeId="Description" isKey="true"/> <attribute value="ANNOUNCEMENTS_MAIN_VIEW.KEYWORDS" attributeId="Subject" isKey="true"/> <attribute value="oracle.webcenter.collab.announcement" attributeId="WEBCENTER_SERVICE_ID" isKey="false"/> </attributes>
表C-8に、attribute
要素のキーワードを示します。
表C-8 attributeのキーワード
キーワード | 説明 |
---|---|
|
|
|
属性の値 |
isKey |
値がリテラル値( |
|
変換された属性値の取得に使用されるリソース・バンドルの名前。 |
リソース・カタログに含まれるタスク・フローの場合、attribute
要素を使用してタスク・フロー・パラメータと包含Show Detail Frame
コンポーネントの属性を渡すことができます。これには、次の例のようにタスク・フロー・パラメータのattributeId
の値と、Show Detail Frame
属性の先頭に、それぞれparameter.
とattr.
を付けます。
<attributes> <attribute value="dark" attributeId="attr.background" isKey="false"/> <attribute value="#{myBean.myParam1}" attributeId="parameter.myParam1" isKey="false"/> </attributes>
詳細は、第14.7項「タスク・フロー・パラメータおよびタスク・フローを囲んでいるShow Detail Framesの属性の定義」を参照してください。
リンク、カスタム・コンポーネントおよびカスタム・フォルダなど、リソース・カタログのコンポーネントのいくつかでは、パラメータがサポートされています。パラメータは、カスタム・コンポーネント用にXMLコードを提供したり、リソースをアプリケーション内の他のアーティファクトにバインドするために使用します。parameters
要素を使用して、リソースのパラメータを定義できます。parameters
要素は、リソースのタグ内に配置する必要があります。各parameters
要素では、複数のparameter
タグを使用できます。定義するパラメータにはそれぞれIDと値を指定する必要があります。
カスタムXMLコンポーネントにパラメータを定義するとき、パラメータIDにxml
を指定し、値にはカスタム・コンポーネントのコードを指定する必要があります。コード内で、コンポーネントのIDは#
にして、実行時に生成させる必要があります。さらに、コンポーネントのネームスペースを指定する必要があります。
例C-11に、カスタムXMLコンポーネントの定義におけるparameters
要素の使用方法を示します。
schema
には、1つ以上のdescriptor
要素を指定します。descriptor
要素は、カタログ内で使用される属性に関する情報(それらの属性が検索可能かどうかなど)とともに、リソース・カタログ・サービスを提供します。属性のTitle、Description、Subject、ToolTipおよびIconURIはリソースに対して最初からサポートされています。リソースで公開する他のカスタム属性を追加できます。
例C-12に、schema
要素の使用方法を示します。
例C-12 schemaの例
<schema resourceBundle="oracle.adf.rc.attribute.nls.AttributeBundle" xmlns="http://xmlns.oracle.com/adf/rcs/catalog"> <descriptor labelKey="TITLE.PROMPT_KEY" endUserVisible="true" multivalue="false" searchable="true" attributeId="Title" shortLabelKey="TITLE.SHORT_PROMPT_KEY" xmlns="http://xmlns.oracle.com/adf/rcs/catalog"/> <descriptor labelKey="DESCRIPTION.PROMPT_KEY" endUserVisible="true" multivalue="false" searchable="true" attributeId="Description" shortLabelKey="DESCRIPTION.SHORT_PROMPT_KEY" xmlns="http://xmlns.oracle.com/adf/rcs/catalog"/> <descriptor labelKey="SUBJECT.PROMPT_KEY" endUserVisible="true" multivalue="false" searchable="true" attributeId="Subject" shortLabelKey="SUBJECT.SHORT_PROMPT_KEY" xmlns="http://xmlns.oracle.com/adf/rcs/catalog"/> <descriptor labelKey="TOOL_TIP.PROMPT_KEY" endUserVisible="true" multivalue="false" searchable="false" attributeId="ToolTip" shortLabelKey="TOOL_TIP.SHORT_PROMPT_KEY" xmlns="http://xmlns.oracle.com/adf/rcs/catalog"/> <descriptor labelKey="ICON_URI.PROMPT_KEY" endUserVisible="false" multivalue="false" searchable="false" attributeId="IconURI" shortLabelKey="ICON_URI.SHORT_PROMPT_KEY" xmlns="http://xmlns.oracle.com/adf/rcs/catalog"/> </schema>
表C-9に、descriptor
要素のキーワードを示します。
表C-9 descriptorのキーワード
キーワード | 説明 |
---|---|
|
説明する属性の識別子。 |
|
リソース・カタログ検索に属性を含めるか( |
|
リソース・カタログ検索に属性を含めるか( |
|
エンド・ユーザーに属性を公開するか( |
|
ラベル・キーの変換に使用されるリソース・バンドルの名前。 |
|
属性のラベルのリソース・バンドル・キー。 |
|
ショート・ラベルのリソース・バンドル・キー。 |
resource
要素は、タスク・フローなど、個々のリソースをカタログに宣言する際に使用します。この要素は、「コンポーザ」のスタンドアロン・バージョン(WebCenter Portal Frameworkを使用しない「コンポーザ」)を使用する場合に必要になります。
注意: url 要素(第C.3.3項「url」を参照)を使用してカタログにリソースを宣言することもできます。ただし、url が使用可能になるのは、WebCenter Portal Frameworkをインストール済で、共有ライブラリが関連付けられている場合のみです。 |
例C-13に、resource
要素の使用方法を示します。
例C-13 resourceの例
<resource id="weatherTF" repository="application.classpath" path="TaskFlow.jar/ADF_TaskFlow/oracle+composer+internal+test+weather-tfdefn.xml#weather_tf_defn" visible="#{true}"> <attributes> <attribute value="/images/bulbgauge_ena.png" attributeId="IconURI"/> <attribute value="never" attributeId="attr.showResizer"/> <attribute value="Weather in Bangalore is rainy" attributeId="parameter.message"/> <attribute value="WeatherBee" isKey="false" attributeId="Title"/> <attribute value="Displays the weather of your city" isKey="false" attributeId="Description"/> <attribute value="Weather widget" isKey="false" attributeId="ToolTip"/> </attributes> <parameters/> </resource>
表C-10に、resource
要素のキーワードを示します。要素にattributes
を指定する方法の詳細は、第C.3.8項「attributes」を参照してください。
表C-10 resourceキーワード
キーワード | 説明 |
---|---|
|
カタログの要素の識別子。識別子は必須で、フォルダ・レベルで一意である必要があります。 |
|
クラスパスに含まれるADFライブラリにアクセスするパス。 |
|
リソースへのパス。ADFライブラリ内のタスク・フローの場合は、パスは次の形式になります。 path_to_jar/ADF_TaskFlow/task_flow_path
例: 次のツールチップの場合 oracle/webcemter/collab/announcement/view/taskflows/main-view-definition.xml#announcement-main-view
oracle+webcenter+collab+announcement+view+taskflows+main-view-definition.xml#announcement-main-view |
リソース・カタログ・アダプタは、動的にカタログにリソース(たとえば、ユーザーに利用可能なすべてのコンテンツ・リポジトリ接続を表示するフォルダ)を追加するのに使用されます。カタログを作成するときにそのようなフォルダのコンテンツを決定することができないので、アダプタは、フォルダが動的に移入されることを確認します。アダプタを使用するには、リソースを追加する際に、リソース定義の一部としてファクトリ・クラスを指定する必要があります。
この項では、サポートされているファクトリ・クラスについて説明します。内容は次のとおりです。
<component>
構造内のoracle.adf.rc.component.XmlComponentFactory
クラスは、カタログにXMLコンポーネントを含めるために使用します。XmlComponentFactory
クラスはxml
という名前のパラメータを1つ要求し、このパラメータの値は、XMLのブロックで、ページに追加可能な1つ以上のコンポーネントを表します。次の例は、Panel Customizable
コンポーネントをリソース・カタログに追加するコードを示しています。
<component id="pc" factoryClass="oracle.adf.rc.component.XmlComponentFactory">
<attributes>
<attribute attributeId="Title" value="Box"/>
<attribute attributeId="Description" value="Container for other objects"/>
<attribute attributeId="IconURI" value="/adf/webcenter/panelcustomizable_qualifier.png"/>
</attributes>
<parameters>
<parameter id="xml">
<cust:panelCustomizable id="#" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"/>
</parameter>
</parameters>
</component>
詳細な手順は、第14.3.5項「リソース・カタログにカスタム・コンポーネントを追加する方法」を参照してください。
ContentUrlResourceFactory
クラスは、UCM接続からポータル・フレームワークのコンテンツを含めるために使用します。コンテンツ・タイプのURLリソースをカタログに追加するときに使用します。次の例では、ContentUrlResourceFactory
の使用方法を示しています。
<url id="contentItem" factoryClass="oracle.webcenter.content.model.rc.ContentUrlResourceFactory" url="content://UCM/PersonalSpaces/weblogic/content.xml"> <attributes> <attribute value="Personal Document" isKey="false" attributeId="Title"/> </attributes> <parameters> <parameter id="templateView">SpaceTemplate</parameter> </parameters> </url>
ここで、id
はリソースの固有の識別子であり、url
はリソースへアクセスするURLです。ContentUrlResourceFactory
を使用する場合、URLはcontent:
で始める必要があります。さらに、templateView
パラメータを追加することで、使用するコンテンツ・プレゼンタ表示テンプレートを指定できます。
詳細は、第14.3.3項「リソース・カタログにリンクを追加する方法」を参照してください。
ContentFolderContextFactory
クラスは、アプリケーションで使用可能なすべてのコンテンツ・リポジトリ接続をリストするために使用します。次の例に示すように、customFolder
リソースをカタログに追加し、このファクトリ・クラスを指定できます。
<customFolder id="AllConnections" factoryClass="oracle.webcenter.content.model.rc.CustomFolderContextFactory" />
カスタム・フォルダの詳細は、第14.3.6項「リソース・カタログにカスタム・フォルダを追加する方法」を参照してください。
WebCenter Portalのコンテキストでは、DefaultFolderContextFactory
クラスが現在のポータルのフォルダをレンダリングするために使用されます。ユーザーがホーム・ポータル内にある場合、ユーザーの個人フォルダがレンダリングされます。次の例に示すように、customFolder
リソースをカタログに追加し、このファクトリ・クラスを指定できます。
<customFolder id="GroupDocuments" factoryClass="oracle.webcenter.doclib.model.rc.DefaultFolderContextFactory" />
カスタム・フォルダの詳細は、第14.3.6項「リソース・カタログにカスタム・フォルダを追加する方法」を参照してください。
ContentListFactory
クラスは、フォルダの動的リストをカタログに追加するために使用します。次の例に示すように、customFolder
リソースをカタログに追加し、このファクトリ・クラスを指定できます。
<customFolder id="customFolder-folder" visible="#{true}" path="" factoryClass="oracle.webcenter.content.model.rc.ContentListFactory"> <attributes> <attribute attributeId="Title" value="Folders List" isKey="false"/> </attributes> <parameters> <parameter id="datasource">UCM#dCollectionID:60</parameter> <parameter id="datasourceType">dsTypeFolderContents</parameter> </parameters> </customFolder>
ContentListFactory
クラスでは、次のパラメータがサポートされます。
datasource
: コンテンツのデータソース。この値は、datasourceType
の値に依存します。
datasourceType
: コンテンツのデータソース・タイプ。使用可能な値はdsTypeSingleNode
、dsTypeFolderContents
、dsTypeQueryExpression
、dsTypeMultiNode
およびdsTypeScenarioResults
です。
templateView
: 使用するコンテンツ・プレゼンタ表示テンプレートを指定します。
コンテンツ・プレゼンタを使用する方法の詳細は、第29章「ポータル・ページへのコンテンツ・タスク・フローおよびドキュメント・コンポーネントの追加」を参照してください。
EnsembleContentProvider
クラスは、すべての登録済ページレット・プロデューサを表示するために使用します。次の例に示すように、customContent
リソースをカタログに追加し、このファクトリ・クラスを指定できます。
<customContent contentProviderClass="com.oracle.ensemble.interop.adf.EnsembleContentProvider" id="ensembleContentProvider" visible="true"> <attributes resourceBundle="oracle.webcenter.spaces.resource.DefaultGroupSpaceCatalogBundle"/> </customContent>
カスタム・コンテンツ・プロバイダの詳細は、第14.3.7項「リソース・カタログにカスタム・コンテンツ・プロバイダを追加する方法」を参照してください。