Object Direct Callees

Draft

Get the list of direct callees for a specific object in an application.
All objects of transaction paths are considered, including start points, and end points.
A callee is an object refered in the code statements of the caller.
The callees are sorted by name.

URI

  • GET /rest/applications/{name}/objects/{id}/callees?select=parent&select=source-locations

Path Parameters

  • name (string):
    This parameter identifies the analyzed application.
    The application name must be properly encoded if it is required. Character back-quote is not allowed.
  • id (number):
    The unique identifier of the object from Imaging.
    This ID is used to retrieve the specific object within the application.

Query Parameters

  • select (string), optional:
    select=parent: The object parent type is added for each callee object. For some technologies (C++), when there are multiple parents, a single parent is added.
    select=source-locations: The source locations is added for each callee object. The response relies on the Source Code Service, it this service is disabled, or misconfigured then an HTTP 500 status code is returned.
  • includeEscalated (bool), optional, default: false :
    includeEscalated=true: Callees having both direct and Escalated/References links with the object are included in the response
    includeEscalated=false: Callees having only direct links with the object are included in the response

Responses

  • application/json:

    A list of callee objects.

Example:

[
     {
        "id": "4642",
        "linkType": "CALL",
        "name": "caculateOrder",
        "sourceLocations": [
          {
            "startLine": 218,
            "endLine": 397,
            "nbLines": 682,
            "fileId": -1454,
            "fileName": "OrderServiceImpl.java",
            "filePath": "C:\\ProgramData\\CAST\\AIP-Console-Standalone\\shared\\upload\\Shopizer 2.17.0\\main_sources\\sm-core\\src\\main\\java\\com\\salesmanager\\core\\business\\services\\order\\OrderServiceImpl.java",
            "relativePath": "sm-core\\src\\main\\java\\com\\salesmanager\\core\\business\\services\\order\\OrderServiceImpl.java"
          }
        ],
        "type": "Java Method",
        "typeId": "JV_METHOD"
      },
      {
        "id": "6375",
        "linkType": "CALL",
        "name": "getProducts",
        "sourceLocations": [
          {
            "startLine": 32,
            "endLine": 34,
            "nbLines": 55,
            "fileId": -1905,
            "fileName": "OrderSummary.java",
            "filePath": "C:\\ProgramData\\CAST\\AIP-Console-Standalone\\shared\\upload\\Shopizer 2.17.0\\main_sources\\sm-core-model\\src\\main\\java\\com\\salesmanager\\core\\model\\order\\OrderSummary.java",
            "relativePath": "sm-core-model\\src\\main\\java\\com\\salesmanager\\core\\model\\order\\OrderSummary.java"
          }
        ],
        "type": "Java Method",
        "typeId": "JV_METHOD"
      }
]

JSON Representation of an object

Property Type Description
id string The object ID
name string The object name
type string The object type for a display
typeId string The object type identifier is the type reference key
linkType string A link type identifier (see CALL Link Type), describe the call type between the caller object and the callee object.
parent.type string The object parent type for a display
parent.typeId string The object parent type reference key
sourceLocations[].fileId string The source file ID.
sourceLocations[].fileName string The source file short name.
sourceLocations[].filePath string The source file absolute path.
sourceLocations[].relativePath string The source file relative path to the delivery deployment folder itself deduced from the application original name.
sourceLocations[].nbLines integer The number of lines of the source file.
sourceLocations[].startLine integer The first line number of the object within the source file. Ex: 4 means the 4th line within the source file.
sourceLocations[].endLine integer The last line number of the object within the source file. Ex: 14 means the 14th line within the source file.