Attribute定義の作成

Attribute定義は画面の中で使用するデータ項目の属性を管理するXMLで、
基本的にEvent処理クラスとセットで作成します。

Local Attributeの作成

Event処理クラスと同パッケージ・同名のxmlファイルを作成します。
(例)jp.co.hogehoge.SampleEventのAttribute定義は「/jp/co/hogehoge/SampleEvent.xml」です。 (記述様式)

    <?xml version="1.0" encoding="UTF-8"?>
    <attributes
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="{XSDの参照パス}"
     controller="jp.co.cam.usax.rule.bean.resource.impl.AttributeResource"
     import="{インポートする他のAttribute定義}">

     ...省略(画面で使用する項目のAttributeを記述する)
    </attributes>
  
(記述例)

    <?xml version="1.0" encoding="UTF-8"?>
    <attributes
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="./resource/Attribute_WebEx.xsd"
     controller="jp.co.cam.usax.rule.bean.resource.impl.AttributeResource"
     import="jp.co.hogehoge.UserInformation">

     ...省略(画面で使用する項目のAttributeを記述する)
    </attributes>
  
💡XSDはWEB用の拡張版と標準の2種があり読込むことでAttribute定義が容易になります。

Attribute定義の詳細機能はこちらを参照

共通Attribute定義の作成

共通で使用されるデータ項目は、共通定義を作成し各Attribute定義にてインポート設を行うことで
その共通定義の内容を取込みます。また、Event処理クラスが親クラスを持つ場合、
親クラスが持つAttribute定義についてもインポート同様にその内容を取込みます。

前項の記述例では「jp.co.hogehoge.UserInformation」をインポートしていますが、
これにより/jp/co/hogehoge/UserInformation.xmlの定義内容が使用できます。
Attribute定義の優先順位 Attribute定義は同じIDの設定があった場合、その優先順位によって上書きされます。
©Camel engineering LLP