“部件标识”是“项标识”组件的预定义配置,用于显示一个包含部件或 CAD 文档基本信息的面板。此面板中包含主要和次要标题、图像、次要图标和标识属性。次要图标用于指示项类型,即使用 Windchill 图标指示此项类型。对于部件,此面板中包含的默认属性有“版本”、“视图”、“状态”、“上次修改时间”和“上下文”。对于 CAD 文档,此面板中包含的默认属性有“文件名”、“版本”、“状态”、“上次修改时间”和“上下文”。
{
"primaryTitle":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"numericIdentifier":1,
"id":"Number"
},
{
"numericIdentifier":2,
"id":"Name"
}
],
"objectType":"PTC.ProdMgmt.Part"
},
{
"items":[
{
"numericIdentifier":1,
"id":"Number"
},
{
"numericIdentifier":2,
"id":"Name"
}
],
"objectType":"PTC.CADDocumentMgmt.CADDocument"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
},
"pattern":"%1, %2",
"filteredValues":{
"data":[
{
"itemListsData":[
{
"objectType":""
}
],
"adapter":{
"instanceName":"",
"thingName":""
}
}
]
}
},
"actionBarConfiguration":{
"value":{
}
},
"showSecondaryIcon":{
"version":"1.0.0",
"value":true
},
"secondaryTitle":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"numericIdentifier":1,
"id":"ObjectType"
}
],
"objectType":"PTC.ProdMgmt.Part"
},
{
"items":[
{
"numericIdentifier":1,
"id":"TypeDisplayName"
}
],
"objectType":"PTC.CADDocumentMgmt.CADDocument"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
},
"pattern":"%1",
"filteredValues":{
"data":[
{
"itemListsData":[
{
"objectType":""
}
],
"adapter":{
"instanceName":"",
"thingName":""
}
}
]
}
},
"attributes":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"Version",
"ordinal":0
},
{
"id":"View",
"ordinal":1
},
{
"id":"State#Display",
"ordinal":2
},
{
"id":"LastModified",
"ordinal":3
},
{
"id":"Context|Name",
"ordinal":4
}
],
"objectType":"PTC.ProdMgmt.Part"
},
{
"items":[
{
"id":"FileName",
"ordinal":0
},
{
"id":"Version",
"ordinal":1
},
{
"id":"State#Display",
"ordinal":2
},
{
"id":"LastModified",
"ordinal":3
},
{
"id":"Context|Name",
"ordinal":4
}
],
"objectType":"PTC.CADDocumentMgmt.CADDocument"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
},
"inTailoring":true,
"filteredValues":{
"data":[
{
"itemListsData":[
{
"objectType":""
}
],
"adapter":{
"instanceName":"",
"thingName":""
}
}
]
}
},
"showImage":{
"additionalData":{
"itemIdentityShowImageDefinition":{
"defaultImagePath":{
"value":""
}
}
},
"version":"1.0.0",
"value":true
}
}
除配置外,每个组件还支持通过扩展其业务逻辑来自定义组件。每个组件的业务逻辑在事物模板中都包含可改写服务,您可以对这些服务进行扩展和改写。下表对此组件的可改写服务进行了详细说明。
有关每个服务的返回值和参数的示例,请参阅
自定义服务的输入/输出示例。
名称 | 说明 |
---|
GetConfigurations | 返回“项标识”实施的可用配置。 参数:无 返回:JSON |
GetImplementationLabel | 返回此组件的本地化名称或可用于获取此本地化名称的标记。此本地化名称显示在 Mashup Builder 用户界面中。 参数:无 返回:字符串 |
GetItemIdentityAttributes | 检查配置并添加所需的任何附加属性,然后调用 GetAttributeValues 以从后端系统获取所有属性值。 如果将图像或次级图标配置为显示,则系统会将其添加到返回的 JSON,以便 GetAttributeValues 从后端系统中获取其值。 参数: input (必需) - CCO 格式的 JSON,其中包含要从后端系统获取的数据的输入 ID,以及后端系统的适配器信息。 configuration (可选) - JSON,其中包含从“定制管理器”资源获得的最终合并配置。 attributes (必需) - JSON,其中包含在配置中指定或通过定制方式设置的预设属性列表。 返回:JSON |
GetAttributesValues | 返回具有属性及其值的 JSON。 参数: input (必需) – CCO 格式的 JSON,其中包含要从后端系统获取的数据的输入 ID,以及后端系统的适配器信息。 configuration (可选) - JSON,其中包含从“定制管理器”资源获得的最终合并配置。 attributes (必需) - JSON,其中包含预设属性和附加属性的列表。 |
{
"array": [
{
"value": {
"initializationData": {
"constraints": {},
"properties": {
"supportedTypes": {
"data": [
{
"adapter": {
"thingName": "PTC.WCAdapter",
"instanceName": "windchill"
},
"itemListsData": [
{
"objectType": "PTC.ProdMgmt.Part",
"selectionGroupIds": [
"PART"
]
},
{
"objectType": "PTC.CADDocumentMgmt.CADDocument",
"selectionGroupIds": [
"CAD"
]
}
]
}
],
"allowSubsetForTailoring": true
},
"updateServiceName": "",
"addServiceName": ""
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.PatternSelector"
},
"mandatory": true,
"key": "primaryTitle"
},
{
"value": {
"initializationData": {
"constraints": {},
"properties": {
"supportedTypes": {
"data": [
{
"adapter": {
"thingName": "PTC.WCAdapter",
"instanceName": "windchill"
},
"itemListsData": [
{
"objectType": "PTC.ProdMgmt.Part",
"selectionGroupIds": [
"PART"
]
},
{
"objectType": "PTC.CADDocumentMgmt.CADDocument",
"selectionGroupIds": [
"CAD"
]
}
]
}
],
"allowSubsetForTailoring": true
},
"updateServiceName": "",
"addServiceName": ""
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.PatternSelector"
},
"mandatory": true,
"key": "secondaryTitle"
},
{
"value": {
"initializationData": {
"constraints": {},
"properties": {
"supportedTypes": {
"data": [
{
"adapter": {
"thingName": "PTC.WCAdapter",
"instanceName": "windchill"
},
"itemListsData": [
{
"objectType": "PTC.ProdMgmt.Part",
"selectionGroupIds": [
"PART"
]
},
{
"objectType": "PTC.CADDocumentMgmt.CADDocument",
"selectionGroupIds": [
"CAD"
]
}
]
}
],
"allowSubsetForTailoring": true
},
"updateServiceName": "",
"addServiceName": "",
"maximumSelectedAttributes": 5,
"minimumSelectedAttributes": null
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory": true,
"key": "attributes"
},
{
"property": {},
"value": {
"initializationData": {
"constraints": {},
"properties": {
"directDefinition": []
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory": false,
"key": "actionBarConfiguration"
},
{
"value": {
"initializationData": {
"properties": {},
"constraints": {},
"additionalDefinition": [
{
"true": {
"label": "[[PTC.Nav.Yes]]",
"additionalDefinition": [
{
"key": "itemIdentityShowImageDefinitions",
"directDefinition": [
{
"property": {},
"value": {
"initializationData": {
"constraints": {},
"properties": {}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Textbox"
},
"mandatory": false,
"key": "defaultImagePath"
}
]
}
]
},
"false": {
"label": "[[PTC.Nav.No]]",
"additionalDefinition": []
},
"default": false
}
]
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"key": "showImage"
},
{
"property": {},
"value": {
"initializationData": {
"version": "1.0.0",
"constraints": {},
"properties": {
"default": false,
"true": {
"additionalDefinition": [],
"label": "[[PTC.AccessApp.Yes]]"
},
"false": {
"additionalDefinition": [],
"label": "[[PTC.AccessApp.No]]"
}
}
},
"elementVersion": "1.0.0",
"elementName": "PTC.Nav.DynamicForm.Toggle"
},
"mandatory": false,
"key": "showSecondaryIcon"
}
]
}