Skip to content

Extension

File extension: *.extension

Overview

The *.extension files in the codbex platform are used to define extensions that contribute additional functionality or modifications to a specific extension point within the platform.

Here's an explanation of the example myextension.extension file and its properties:

{
  "location": "/my-project/extensions/myextension.extension",
  "module": "/my-project/extensions/myscript",
  "extensionPoint": "/my-project/extensions/myextensionpoint",
  "description": "My Extension",
  "createdBy": "admin",
  "createdAt": "2022-07-06T3:24:12+0000"
}

Properties:

  • location (String): Specifies the location or path of the extension file within the project. In this example, it is located at /my-project/extensions/myextension.extension.
  • module (String): Specifies the location or path of the module or script that provides the implementation of the extension. In this example, the module is /my-project/extensions/myscript.
  • extensionPoint (String): Represents the unique name or identifier of the extension point to which this extension contributes. It should match the name of an existing extension point. In this example, it is /my-project/extensions/myextensionpoint.
  • description (String): Provides a description of the extension, describing its purpose or functionality. In this example, the description is My Extension.
  • createdBy (String): Indicates the entity or user who created the extension. In this example, it is marked as admin.
  • createdAt (String): Represents the timestamp when the extension was created. The timestamp follows the ISO 8601 format. In this example, it is 2022-07-06T3:24:12+0000.

Example Usage:

The example test.extension file defines a test extension that contributes functionality to the myextension extension point within the platform.

Getting Started:

Create an Extension File:

Create a new `*.extension`` file or modify an existing one based on your specific extension requirements.

Configure Extension Properties:

Adjust the properties within the file to match the details of your extension. Update the location, module, extensionPoint, description, createdBy, and createdAt accordingly.

Implement Extension Logic:

Create the associated module or script (e.g., /my-project/extensions/myscript) to provide the implementation logic for the extension. This script should contain the functionality you want to contribute to the extension point.

Register Extension Point:

Ensure that the extension point specified in extensionPoint property exists and is registered within the platform. Extensions contribute to existing extension points.

Best Practices:

Clear Naming Conventions:

Follow clear and consistent naming conventions for extensions to ensure easy identification and reference.

Documentation and Comments:

Provide meaningful descriptions for extensions and document the purpose and usage of the contributed functionality. Additionally, add comments within the associated module or script to explain the implementation.

Conclusion:

The *.extension files in the codbex platform allow you to extend and enhance the functionality of the platform by contributing additional features or modifications to existing extension points. Customize extensions based on your specific requirements to enable modular and extensible applications.