Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel
bgColor#F0F0F0

On this page:

Table of Contents


Info

Summary: this section provides information about the range of IDs that are reserved for the following items for use with custom extensions;:

  • Extensions
  • Objects
  • Quality Rules

Introduction

When:

  • creating custom extensions that create objects to be saved in the CAST Analysis Service schema or use custom Quality Rules

...

  • or when defining Architecture Checker models

you will need to manage the range of IDs that you assign to these items. For example:

...

Code Block
languagexml
<?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>

IDs for Architecture Checker models

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.

ID ranges available for use

...

  • A new page will be displayed containing two sections:
    • One to reserve Object ID ranges
    • One to reserve Quality Rule ID ranges (to be used for Architecture Checker models also)

  • To reserve an ID range click either Reserve Object ID Range or Reserve Rule ID Range, depending on the IDs you require:

...

  • Enter the required information as follows:
Extension ID

if you are reserving an ID range for an extension:

  • Enter the ID of your extension in the form com.castsoftware.uc.<name> / com.castsoftware.labs.<name> depending on the type of extension you are uploading. When you upload your extension, you need to ensure that the Extension ID you are using is identical to the Extension ID you enter here.

If you are reserving an ID range for an Architecture Checker model:

  • Enter the ID of your extension in the form com.castsoftware.uc.<free-form text>. Where <free-form text> can be any string that describes your initiative or your project.
Range amountChoose 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):

Code Block
languagexmlthemeDJango
<metaModel file_level="client" file_no="XXX">

file_level

file_level They should always be set as follows:

  • client  file_level="client" > for customers creating CAST User Community and CAST Labs extensions
  • file_no

...

  • > for a range of 1,000 IDs between 2,007,000 and 2,007,999, file_no should be set as follows (with file_level set to client (above 2,000,000)):
Code Block
languagexmlthemeDJango
<metaModel file_level="client" file_no="7">

...