diff --git a/sample-java-entity-decorators/demo/extension/ExtensionConsumer.java b/sample-java-entity-decorators/demo/extension/ExtensionConsumer.java deleted file mode 100644 index 9e9cedb..0000000 --- a/sample-java-entity-decorators/demo/extension/ExtensionConsumer.java +++ /dev/null @@ -1,34 +0,0 @@ -package demo.extension; - -import java.util.List; -import java.util.Map; - -import org.eclipse.dirigible.components.base.spring.BeanProvider; -import org.eclipse.dirigible.components.extensions.service.ExtensionService; -import org.eclipse.dirigible.engine.java.annotations.http.Controller; -import org.eclipse.dirigible.engine.java.annotations.http.Get; - -/** - * REST endpoint that queries the Dirigible extension registry to verify that - * {@link SampleContribution} was registered by {@code ExtensionClassConsumer} on publish. - * - *

- * {@code GET /services/java/sample-java-entity-decorators/demo/extension/ExtensionConsumer/contributions} - * returns a JSON array of {@code {name, module}} objects for every contribution registered against - * {@code "java-sample-extension-point"}. - */ -@Controller -public class ExtensionConsumer { - - static final String EXTENSION_POINT = "java-sample-extension-point"; - - @Get("/contributions") - public List> listContributions() { - ExtensionService extensionService = BeanProvider.getBean(ExtensionService.class); - return extensionService.findByExtensionPoint(EXTENSION_POINT) - .stream() - .map(e -> Map.of("name", e.getName(), "module", e.getModule())) - .toList(); - } - -} \ No newline at end of file diff --git a/sample-java-entity-decorators/demo/extension/SampleContribution.java b/sample-java-entity-decorators/demo/extension/SampleContribution.java deleted file mode 100644 index 2f3141b..0000000 --- a/sample-java-entity-decorators/demo/extension/SampleContribution.java +++ /dev/null @@ -1,18 +0,0 @@ -package demo.extension; - -import org.eclipse.dirigible.engine.java.annotations.Extension; - -/** - * Demonstrates {@code @Extension}: registers this class as a contribution to - * {@code "java-sample-extension-point"}. Consumers that query that extension point via - * {@code ExtensionService.findByExtensionPoint} will see this class listed and can instantiate it - * on demand to call {@link #describe()}. - */ -@Extension(name = "sample-contribution", to = "java-sample-extension-point") -public class SampleContribution { - - public String describe() { - return "Hello from SampleContribution!"; - } - -} \ No newline at end of file diff --git a/sample-java-entity-decorators/demo/listener/OrderListener.java b/sample-java-entity-decorators/demo/listener/OrderListener.java deleted file mode 100644 index 5ac29a1..0000000 --- a/sample-java-entity-decorators/demo/listener/OrderListener.java +++ /dev/null @@ -1,22 +0,0 @@ -package demo.listener; - -import org.eclipse.dirigible.engine.java.annotations.Listener; -import org.eclipse.dirigible.engine.java.annotations.ListenerKind; - -/** - * Demonstrates {@code @Listener}: connects to the ActiveMQ queue {@code "java-order-queue"} and - * logs every inbound text message. The companion {@code trigger.mjs} sends a test message that the - * integration test asserts on via the log output. - */ -@Listener(name = "java-order-queue", kind = ListenerKind.QUEUE) -public class OrderListener { - - public void onMessage(String message) { - System.out.println("OrderListener received: " + message); - } - - public void onError(String error) { - System.out.println("OrderListener error: " + error); - } - -} \ No newline at end of file diff --git a/sample-java-entity-decorators/demo/listener/trigger.mjs b/sample-java-entity-decorators/demo/listener/trigger.mjs deleted file mode 100644 index 03258bb..0000000 --- a/sample-java-entity-decorators/demo/listener/trigger.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import { producer } from "@aerokit/sdk/messaging"; - -producer.queue("java-order-queue").send("Hello from Java @Listener trigger!"); \ No newline at end of file diff --git a/sample-java-entity-decorators/demo/scheduled/CleanupJob.java b/sample-java-entity-decorators/demo/scheduled/CleanupJob.java deleted file mode 100644 index d561860..0000000 --- a/sample-java-entity-decorators/demo/scheduled/CleanupJob.java +++ /dev/null @@ -1,16 +0,0 @@ -package demo.scheduled; - -import org.eclipse.dirigible.engine.java.annotations.Scheduled; - -/** - * Demonstrates {@code @Scheduled}: fires every second via Quartz. Each execution logs a line that - * the integration test asserts on to confirm the job was picked up by the runtime. - */ -@Scheduled(expression = "* * * * * ?") -public class CleanupJob { - - public void run() { - System.out.println("CleanupJob executed!"); - } - -} \ No newline at end of file diff --git a/sample-java-entity-decorators/demo/websocket/ChatHandler.java b/sample-java-entity-decorators/demo/websocket/ChatHandler.java deleted file mode 100644 index 4e02a6e..0000000 --- a/sample-java-entity-decorators/demo/websocket/ChatHandler.java +++ /dev/null @@ -1,35 +0,0 @@ -package demo.websocket; - -import org.eclipse.dirigible.engine.java.annotations.Websocket; - -/** - * Demonstrates {@code @Websocket}: registers this class as the handler for the - * {@code "java-chat"} WebSocket endpoint. Clients connect via - * {@code ws:///websockets/stomp/java-chat}. - * - *

- * All four lifecycle methods are shown; any subset is valid — missing methods are silently skipped - * by the runtime. - */ -@Websocket(name = "Java Chat", endpoint = "java-chat") -public class ChatHandler { - - static final String ENDPOINT = "java-chat"; - - public void onOpen() { - System.out.println("ChatHandler: client connected"); - } - - public void onMessage(String message, String from) { - System.out.println("ChatHandler: " + from + " says: " + message); - } - - public void onError(String error) { - System.out.println("ChatHandler: error: " + error); - } - - public void onClose() { - System.out.println("ChatHandler: client disconnected"); - } - -} \ No newline at end of file diff --git a/sample-java-entity-decorators/demo/websocket/WebsocketStatus.java b/sample-java-entity-decorators/demo/websocket/WebsocketStatus.java deleted file mode 100644 index 0da7adb..0000000 --- a/sample-java-entity-decorators/demo/websocket/WebsocketStatus.java +++ /dev/null @@ -1,27 +0,0 @@ -package demo.websocket; - -import java.util.Map; - -import org.eclipse.dirigible.components.base.spring.BeanProvider; -import org.eclipse.dirigible.engine.java.annotations.http.Controller; -import org.eclipse.dirigible.engine.java.annotations.http.Get; -import org.eclipse.dirigible.engine.java.websocket.JavaWebsocketRegistry; - -/** - * REST endpoint that reports whether {@link ChatHandler} was registered in the - * {@code JavaWebsocketRegistry} after publish. - * - *

- * {@code GET /services/java/sample-java-entity-decorators/demo/websocket/WebsocketStatus/status} - * returns {@code {"registered": true}} when the {@code "java-chat"} handler is active. - */ -@Controller -public class WebsocketStatus { - - @Get("/status") - public Map status() { - JavaWebsocketRegistry registry = BeanProvider.getBean(JavaWebsocketRegistry.class); - return Map.of("registered", registry.contains(ChatHandler.ENDPOINT)); - } - -} \ No newline at end of file