機械翻訳について

Oracle Content Managementツールキットを使用したカスタム・フィールド・エディタの開発

Oracle Content Management Toolkitは、Field Appearanceタイプのコンポーネントの開発をサポートします。 開発者は、カスタム・フィールド・エディタを作成および管理できます。

フィールドの外観タイプのコンポーネントに対しては、次のタスクを実行できます:

  • コンポーネントを開く、コピーまたは削除
  • コンポーネントを公開するか、公開を取り消す
  • コンポーネントのエクスポートまたはインポート
  • コンポーネントのメンバーの追加または削除
  • プロパティの表示
  • コンポーネント・ロゴを選択

コンポーネントのリストは、フィールドの外観タイプでフィルタできます。

カスタム・フィールド・エディタを開発するには、次のContent Toolkitコマンドを使用できます:

cec add-field-editor <name>                        Adds a field editor to a field in a content type.                       [alias:  afe]
  cec remove-field-editor <name>                     Removes a field editor from a field in a content type.                  [alias:  rfe]

------------------------
cec add-field-editor
------------------------
Usage: cec add-field-editor <name>

Adds a field editor to a field in a content type.

Options:
  --template, -t         The template the content type is from  [required]
  --contenttype, -c      The content type  [required]
  --field, -f            The field the field editor is for  [required]
  --contenttemplate, -n  Flag to indicate the template is a content template
  --help, -h             Show help  [boolean]

Examples:
  cec add-field-editor editor1 -t BlogTemplate -c BlogPost -f summary            Use editor1 as the appearance for field summary in content type BlogPost from local template at src/templates/BlogTemplate
  cec add-field-editor editor1 -t BlogTemplateContent -n -c BlogPost -f summary  Use editor1 as the appearance for field summary in content type BlogPost from local template at src/content/BlogTemplateContent
------------------------
cec remove-field-editor
------------------------
Usage: cec remove-field-editor <name>

Removes a field editor from a field in a content type.

Options:
  --template, -t         The template the content type is from  [required]
  --contenttype, -c      The content type  [required]
  --field, -f            The field the field editor is for  [required]
  --contenttemplate, -n  Flag to indicate the template is a content template
  --help, -h             Show help  [boolean]

Examples:
  cec remove-field-editor editor1 -t BlogTemplate -c BlogPost -f summary            Remove editor1 as the appearance for field summary in content type BlogPost from local template at src/templates/BlogTemplate
  cec remove-field-editor editor1 -t BlogTemplateContent -n -c BlogPost -f summary  Remove editor1 as the appearance for field summary in content type BlogPost from local template at src/content/BlogTemplateContent

次のフィールド外観コンポーネントのサンプルは、Content Toolkitに含まれています:

  • TextFieldEditor
  • SliderFieldEditor
  • MapFieldEditor

次の図は、フィールド外観のサンプル・コンポーネントの開発に使用できるContent Toolkitコマンドを示しています。

develop-custom-field-editor-commands.pngの説明は以下のとおりです
「図develop-custom-field-editor-commands.pngの説明」

すぐに使用可能なField Appearanceコンポーネントをローカル・サーバーに作成し、テストして、それをOracle Content Managementインスタンスにアップロードできます。 次の図は、localhost:8085でのこれらのコンポーネントを示しています。


custom-components-local-server.pngの説明は以下のとおりです
「図custom-components-local-server.pngの説明」

スライダなどのコンポーネントは、ローカル・サーバーでテストできます。 そこでコンポーネントのプロパティを選択し、保存できます。


slider.pngの説明が続きます
「図slider.pngの説明」

マップ・コンポーネントの場合、マップをクリックして、エディタ値としてロケーションを指定できます。


map1.pngの説明は以下のとおりです
「図map1.pngの説明」

コンポーネントのHTMLファイルを編集して、バックグラウンド色などの設定を変更できます。


edit-component-html.pngの説明は以下のとおりです
「図edit-component-html.pngの説明」

Content Toolkitコマンドを使用すると、フィールド・エディタをコンテンツ・タイプのフィールドにローカルに関連付けることができます:

cec add-field-editor editor1 -t SimpleContent -n -c SimpleType -f title

cec add-field-editor slider -t SimpleContent -n -c SimpleType -f value

カスタム・フィールド・エディタの構成およびテストが終了したら、Content Toolkitコマンドを使用してOracle Content Managementインスタンスにアップロードできます:

# upload editors
cec ulcp editor1,slider -p -s Latest

# upload content

cec cr Repo5 -s

cec upload-content SimpleContent -r Rpo5 -s

カスタム・フィールド・エディタをアップロードすると、コンポーネントはOracle Content Managementインスタンスにインポートされ、「開発者」セクションの「コンポーネント」ページに表示されます。