Skip to content

Decorators

Overview

Module

Annotation for registering a class as a contribution to a named Dirigible extension point. The runtime stores an Extension metadata record that maps the extension-point name to the contributing class; consumers that query the extension point via ExtensionService.findByExtensionPoint will receive this record among the results.

The contributing class itself is instantiated on demand by the consumer — no specific interface is required.

Example Usage:

java
import java.util.List;
import java.util.Map;
import org.eclipse.dirigible.sdk.extensions.Extension;

@Extension(name = "my-menu-item", to = "ide-menu")
public class MyMenuItem {

    public List<Map<String, Object>> getItems() {
        return List.of(Map.of("label", "My Tool", "link", "/services/web/my-tool/"));
    }
}

@Extension

Marks a class as a contribution to a named extension point.

java
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Extension { ... }

Attributes

AttributeTypeDescription
nameStringLogical name of this extension contribution.
toStringName of the extension point this class contributes to.

Released under the EPL-2.0 License.