BuildConfiguration.pattern.metamodel 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. {
  2. "types": {
  3. "__pAConfiguration": [
  4. {
  5. "name": "__pLabel",
  6. "type": "string",
  7. "default": ""
  8. },
  9. {
  10. "name": "__pMatchSubtypes",
  11. "type": "boolean",
  12. "default": false
  13. },
  14. {
  15. "name": "enabled",
  16. "type": "code",
  17. "default": "getAttr()"
  18. }
  19. ],
  20. "__pHTTPDebugger": [
  21. {
  22. "name": "__pLabel",
  23. "type": "string",
  24. "default": ""
  25. },
  26. {
  27. "name": "__pMatchSubtypes",
  28. "type": "boolean",
  29. "default": false
  30. },
  31. {
  32. "name": "serverAddr",
  33. "type": "code",
  34. "default": "getAttr()"
  35. },
  36. {
  37. "name": "enabled",
  38. "type": "code",
  39. "default": "getAttr()"
  40. }
  41. ],
  42. "__pCustom": [
  43. {
  44. "name": "__pLabel",
  45. "type": "string",
  46. "default": ""
  47. },
  48. {
  49. "name": "__pMatchSubtypes",
  50. "type": "boolean",
  51. "default": false
  52. },
  53. {
  54. "name": "options",
  55. "type": "code",
  56. "default": "getAttr()"
  57. },
  58. {
  59. "name": "enabled",
  60. "type": "code",
  61. "default": "getAttr()"
  62. }
  63. ],
  64. "__pHTTPPerfMonitor": [
  65. {
  66. "name": "__pLabel",
  67. "type": "string",
  68. "default": ""
  69. },
  70. {
  71. "name": "__pMatchSubtypes",
  72. "type": "boolean",
  73. "default": false
  74. },
  75. {
  76. "name": "serverAddr",
  77. "type": "code",
  78. "default": "getAttr()"
  79. },
  80. {
  81. "name": "enabled",
  82. "type": "code",
  83. "default": "getAttr()"
  84. }
  85. ]
  86. },
  87. "constraints": [
  88. {
  89. "name": "noAbstractInstances",
  90. "event": "pre-create",
  91. "code": "/* comment next line to enable this constraint */\nthrow \"IgnoredConstraint\"\nfalse",
  92. "targetType": "AConfiguration"
  93. }
  94. ],
  95. "actions": [
  96. {
  97. "name": "distinctPLabels",
  98. "event": "post-create",
  99. "code": "if( getAttr(\"__pLabel\") == \"\" )\n{\n\tvar pLabels = getAllNodes().\n\t\t\t\t\t\t\tfilter( function(n) {return hasAttr(\"__pLabel\",n);} ).\n\t\t\t\t\t\t\t\tmap( function(n) {return getAttr(\"__pLabel\",n);} ),\n\t\t i\t\t\t= \"0\";\n\n\twhile( _utils.contains(pLabels,i) )\n\t\ti = String(parseInt(i)+1);\n\tsetAttr(\"__pLabel\",i);\n}",
  100. "targetType": "*"
  101. }
  102. ],
  103. "cardinalities": {
  104. "__pAConfiguration": [],
  105. "__pHTTPDebugger": [],
  106. "__pCustom": [],
  107. "__pHTTPPerfMonitor": []
  108. },
  109. "legalConnections": {},
  110. "connectorTypes": {},
  111. "types2parentTypes": {
  112. "__pAConfiguration": [],
  113. "__pHTTPDebugger": [
  114. "__pAConfiguration"
  115. ],
  116. "__pCustom": [
  117. "__pAConfiguration"
  118. ],
  119. "__pHTTPPerfMonitor": [
  120. "__pAConfiguration"
  121. ]
  122. }
  123. }