属性ジェネリックは、属性コンポーネントのジェネリックの定義済みコンフィギュレーションであり、属性コンポーネントを設定するときに開始点として使用できます。ジェネリックコンフィギュレーションでは属性が指定されていないので、そのコンフィギュレーションを編集して属性を追加する必要があります。
• 水平レイアウトのサンプルコンフィギュレーション:
{
"layout": {
"selectedKey": "horizontal",
"additionalData": {
"isMultilineDefinition": {
"isMultiLine": {
"additionalData": {
"dimensionDefinition": {
"maxHeight": {
"version": "1.0.0",
"value": 200
}
}
},
"version": "1.0.0",
"value": true
}
}
},
"version": "1.0.0"
},
"attributes": {
"sets": [{
"data": {
"selectedValues": {
"data": [{
"itemListsData": [{
"items": [{
"id": "Description",
"ordinal": 0
}, {
"id": "ProposedSolution",
"ordinal": 1
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"inTailoring": true,
"version": "1.0.0"
},
"name": ""
}
],
"inTailoring": true,
"filteredValues": {
"data": [{
"itemListsData": [{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
},
"version": "1.0.0"
},
"messageWhenNoAttributes": {
"version": "1.0.0",
"value": "[[PTC.Nav.AttributesGeneric.NoAttributesMessage]]"
},
"baseConfigurationVersion": {
"value": "nav.2"
},
"implementationConfigurationVersion": {
"value": "nav.1"
},
"hideLabel": {
"value": false
}
}
• 垂直レイアウトのサンプルコンフィギュレーション:
{
"layout": {
"selectedKey": "vertical",
"additionalData": {
"isMultilineDefinition": {
"isMultiLine": {
"additionalData": {
"dimensionDefinition": {
"maxHeight": {
"version": "1.0.0",
"value": 200
}
}
},
"version": "1.0.0",
"value": true
}
}
},
"version": "1.0.0"
},
"attributes": {
"sets": [{
"data": {
"selectedValues": {
"data": [{
"itemListsData": [{
"items": [{
"id": "Description",
"ordinal": 0
}, {
"id": "ProposedSolution",
"ordinal": 1
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"inTailoring": true,
"version": "1.0.0"
},
"name": ""
}
],
"inTailoring": true,
"filteredValues": {
"data": [{
"itemListsData": [{
"objectType": ""
}
],
"adapter": {
"instanceName": "",
"thingName": ""
}
}
]
},
"version": "1.0.0"
},
"messageWhenNoAttributes": {
"version": "1.0.0",
"value": "[[PTC.Nav.AttributesGeneric.NoAttributesMessage]]"
},
"baseConfigurationVersion": {
"value": "nav.2"
},
"implementationConfigurationVersion": {
"value": "nav.1"
},
"hideLabel": {
"value": false
}
}
コンフィギュレーションに加え、コンポーネントごとにビジネスロジックを拡張してコンポーネントをカスタマイズできます。各コンポーネントのビジネスロジックには、拡張およびオーバーライド可能な Thing Template 内のサービスが含まれています。次のテーブルは、このコンポーネントのオーバーライド可能なサービスの詳細を示しています。
各サービスの戻り値とパラメータの例については、
カスタマイズサービスの入力/出力の例を参照してください。
名前 | 説明 |
|---|
GetConfigurations | 属性ジェネリックの実装で使用可能なコンフィギュレーションを返します。 パラメータ: なし 戻り値: JSON |
GetImplementationLabel | コンポーネントのローカライズ名、またはローカライズ名を取得するために使用できるトークンを返します。このローカライズ名は Mashup Builder のユーザーインタフェースに表示されます。 パラメータ: なし 戻り値: String |
GetAttributesValues | 属性とその値を含む JSON を返します。 パラメータ: input (必須) - バックエンドシステムからフェッチするデータの入力 ID およびバックエンドシステムのアダプタ情報を含む、 CCOフォーマットの JSON。 configuration (オプション) - 調整マネージャリソースから取得した最終マージコンフィギュレーションを含む JSON。 attributes (必須) - 既成の属性のリストを含む JSON。 |
{
"array": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"additionalDefinition": [],
"updateServiceName": "",
"minimumSelectedAttributes": null,
"supportedTypes": {
"data": [
{
"itemListsData": [
{
"selectionGroupIds": [
"CR"
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
},
{
"selectionGroupIds": [
"WI"
],
"objectType": "PTC.Workflow.WorkItem"
},
{
"selectionGroupIds": [
"Part"
],
"objectType": "PTC.ProdMgmt.Part"
},
{
"selectionGroupIds": [
"CAD"
],
"objectType": "PTC.CADDocumentMgmt.CADDocument"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring": true
},
"addServiceName": "",
"maximumSelectedAttributes": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.AttributesSetsSelector"
},
"mandatory": true,
"key": "attributes"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": "vertical",
"options": [
{
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": true,
"true": {
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxHeight"
}
],
"key": "dimensionDefinition"
}
],
"label": "[[PTC.Nav.Yes]]"
},
"false": {
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxWidth"
}
],
"key": "dimensionDefinition"
}
],
"label": "[[PTC.Nav.No]]"
},
"label": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"mandatory": false,
"key": "isMultiLine"
}
],
"key": "isMultilineDefinition"
}
],
"description": "attribute name-value pairs are shown in the user interface vertically stacked one below the other",
"label": "[[PTC.Nav.Attributes.Layout.Vertical]]",
"key": "vertical"
},
{
"additionalDefinition": [
{
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxHeight"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"minValue": null,
"default": null,
"maxValue": null,
"step": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Number"
},
"mandatory": false,
"key": "maxWidth"
}
],
"key": "dimensionDefinition"
}
],
"description": "attribute name-value pairs are shown in the user interface in column form, or horizontally stacked one next to the other",
"label": "[[PTC.Nav.Attributes.Layout.Horizontal]]",
"key": "horizontal"
}
],
"updateServiceName": null,
"addServiceName": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.RadioButton"
},
"mandatory": true,
"key": "layout"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "messageWhenNoAttributes"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": false,
"true": {
"additionalDefinition": [],
"label": null
},
"false": {
"additionalDefinition": [],
"label": null
},
"label": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"mandatory": false,
"key": "hideLabel"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "inputDisplay"
}
]
}