Summary: this section provides information about the range of IDs that are reserved for the following items for use with custom extensions;:
|
When:
you will need to manage the range of IDs that you assign to these items. For example:
For objects, you will have configured items in the XXXMetaModel.xml file as follows:
<type name="CAST_AngularJS_ModelVariable" id="1020010"> <description>AngularJS Model variable</description> <inheritedCategory name="CAST_AngularJS_Scope" /> <inheritedCategory name="UAObject" /> <inheritedCategory name="METRICABLE" /> <inheritedCategory name="HTML5" /> <attribute name="AUTO_FOLDER_THRESHOLD" intValue="1"/> <tree parent="CAST_HTML5_Enlighten" category="EnlightenTree" /> </type> <type name="CAST_AngularJS_ModelFunction" id="1020011"> <description>AngularJS Model function</description> <inheritedCategory name="CAST_AngularJS_Scope" /> <inheritedCategory name="UAObject" /> <inheritedCategory name="METRICABLE" /> <inheritedCategory name="HTML5" /> <attribute name="AUTO_FOLDER_THRESHOLD" intValue="1"/> <tree parent="CAST_HTML5_Enlighten" category="EnlightenTree" /> </type> |
For objects, you will have configured items as follows:
<?xml version='1.0' encoding='utf-8'?> <root> <metric id='1020500' type='quality-rule' originalName='Avoid the use of the default JavaScript implementation [].forEach in AngularJS web app' active='true' detached='false' ignored='false' /> <metric id='1020502' type='quality-rule' originalName='Avoid the use of JSON.parse and JSON.stringify in AngularJS web app' active='true' detached='false' ignored='false' /> <metric id='1020504' type='quality-rule' originalName='Avoid using the call of web service with AngularJS $http inside a loop' active='true' detached='false' ignored='false' /> </root> |
Starting from CAST AIP 8.3.2, a unique identifier for your Architecture Model must now be defined in the CAST Architecture Checker GUI for all models assigned to Applications. This ID is used to identify the Architecture Model throughout the CAST Management Studio and the CAST dashboards (the ID will be saved to a table in the CAST Management Service schema).
A positive and even number above 2,000,000 can be assigned as an ID for an Architecture Checker model and you should reserve an ID using the Quality Range Reservation option.
The following ID ranges are available for use. As a very general rule you will need to configure IDs above 1,500,000:
ID | Target clients | xxxmetamodel.xml file_level attribute |
---|---|---|
ID above 2,000,000 | Reserved for CAST User Community and CAST Labs extensions | client |
ID above 1,500,000 and below 2,000,000 | reserved for field consultants (legacy use only) | prepackaged |
ID above 1,000,000 and below 1,500,000 | reserved for built-in packages created by CAST (official CAST AIP extensions) | builtin |
ID above 0 and below 1,000,000 | reserved for CAST R&D and products (core CAST AIP range) | core |
It is not possible to reserve a specific range of IDs if you have already created an extension and defined the range of IDs for objects and/or Quality Rules in that extension - as stated above they are allocated on a first come, first served basis. However, if the range you have defined in the extension has not already been allocated (sign in to the CAST Extend website and click the ID Ranges option in the menu bar to view reserved IDs) it is possible to upload your extension and the ranges you are using will be automatically reserved for you.
Note that if you upload an extension without pre-reserving the ID ranges you have defined and the ranges have already been allocated to another extension, the extension will be rejected at the end of the upload process. In this situation, you will need to reserve a new range of IDs, modify your extension to use this new range, then upload the extension again. |
Before uploading your custom extension to share with the wider community, you must ensure that you reserve a range of IDs for use in your extension. To do so:
Extension ID | if you are reserving an ID range for an extension:
If you are reserving an ID range for an Architecture Checker model:
|
Range amount | Choose a number between 1 and 10. 1 corresponds to a range of 1000 IDs, therefore if you enter 3, you will be granted 3000 IDs. |
Once your ID range has been reserved, you can then use the allocated IDs when creating your extension. In essence this means assigning them in your xxxMetaModel.xml file. Take the example above where we have been allocated a range of 1,000 IDs between 2,007,000 and 2,007,999:
You need to declare the file_level and file_no attributes at the start of your xxxMetaModel.xml file (after the XML declaration):
<metaModel file_level="client" file_no="XXX"> |
They should always be set as follows:
<metaModel file_level="client" file_no="7"> |