Changeset 41:a43b92261966

Removed unused files
author unexist
date Mon, 19 Jul 2021 16:08:32 +0200
parents 60df6dec3288
children df228627fb75
files todo-service-camunda/src/main/java/dev/unexist/showcase/todo/infrastructure/health/SimpleHealthCheck.java todo-service-kogito/src/main/java/dev/unexist/showcase/todo/adapter/KogitoResource.java todo-service-kogito/src/main/java/dev/unexist/showcase/todo/adapter/tasks/CamundaTodoCheckTask.java todo-service-kogito/src/main/java/dev/unexist/showcase/todo/adapter/tasks/CamundaTodoTallyTask.java todo-service-kogito/src/main/java/dev/unexist/showcase/todo/infrastructure/health/SimpleHealthCheck.java
diffstat 5 files changed, 0 insertions(+), 223 deletions(-) [+]
line wrap: on
line diff
--- a/todo-service-camunda/src/main/java/dev/unexist/showcase/todo/infrastructure/health/SimpleHealthCheck.java	Fri Jul 16 16:51:54 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/**
- * @package Quarkus-Workflow-Showcase
- *
- * @file Simple health check
- * @copyright 2021 Christoph Kappel <christoph@unexist.dev>
- * @version $Id$
- *
- * This program can be distributed under the terms of the Apache License v2.0.
- * See the file LICENSE for details.
- **/
-
-package dev.unexist.showcase.todo.infrastructure.health;
-
-import org.eclipse.microprofile.health.HealthCheck;
-import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.eclipse.microprofile.health.Liveness;
-
-import javax.enterprise.context.ApplicationScoped;
-
-@Liveness
-@ApplicationScoped
-public class SimpleHealthCheck implements HealthCheck {
-
-    /**
-     * Call of the healthcheck
-     *
-     * @return
-     *      Reponse of the healthcheck
-     **/
-
-    @Override
-    public HealthCheckResponse call() {
-        return HealthCheckResponse.up("Simple health check");
-    }
-}
--- a/todo-service-kogito/src/main/java/dev/unexist/showcase/todo/adapter/KogitoResource.java	Fri Jul 16 16:51:54 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/**
- * @package Quarkus-Workflow-Showcase
- *
- * @file Camunda resource
- * @copyright 2021 Christoph Kappel <christoph@unexist.dev>
- * @version $Id$
- *
- * This program can be distributed under the terms of the Apache License v2.0.
- * See the file LICENSE for details.
- **/
-
-package dev.unexist.showcase.todo.adapter;
-
-import dev.unexist.showcase.todo.domain.todo.TodoBase;
-import dev.unexist.showcase.todo.infrastructure.camunda.CamundaEngine;
-import org.camunda.bpm.engine.ProcessEngine;
-import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.camunda.bpm.engine.variable.Variables;
-import org.camunda.bpm.engine.variable.value.ObjectValue;
-import org.eclipse.microprofile.openapi.annotations.Operation;
-import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
-import org.eclipse.microprofile.openapi.annotations.responses.APIResponses;
-import org.eclipse.microprofile.openapi.annotations.tags.Tag;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.inject.Inject;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import java.net.URI;
-
-@Path("/camunda")
-public class KogitoResource {
-    private static final Logger LOGGER = LoggerFactory.getLogger(KogitoResource.class);
-
-    @Inject
-    CamundaEngine camundaEngine;
-
-    @POST
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    @Operation(summary = "Create new todo")
-    @Tag(name = "Todo")
-    @APIResponses({
-            @APIResponse(responseCode = "201", description = "Todo created"),
-            @APIResponse(responseCode = "406", description = "Bad data"),
-            @APIResponse(responseCode = "500", description = "Server error")
-    })
-    public Response create(TodoBase base, @Context UriInfo info) {
-        ProcessEngine ProcEngine = this.camundaEngine.getProcessEngine();
-
-        ObjectValue todoAsJson = Variables.objectValue(base)
-                        .serializationDataFormat("application/json").create();
-
-        ProcessInstance processInstance = ProcEngine.getRuntimeService()
-                .createProcessInstanceByKey("todo")
-                .setVariable("todo", todoAsJson)
-                .executeWithVariablesInReturn();
-
-        String id = processInstance.getId();
-
-        URI uri = info.getAbsolutePathBuilder().path("/" + id).build();
-
-        LOGGER.info("Process {} started", id);
-
-        return Response.created(uri).build();
-    }
-}
--- a/todo-service-kogito/src/main/java/dev/unexist/showcase/todo/adapter/tasks/CamundaTodoCheckTask.java	Fri Jul 16 16:51:54 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/**
- * @package Quarkus-Workflow-Showcase
- *
- * @file Camunda todo check task
- * @copyright 2021 Christoph Kappel <christoph@unexist.dev>
- * @version $Id$
- *
- * This program can be distributed under the terms of the Apache License v2.0.
- * See the file LICENSE for details.
- **/
-
-package dev.unexist.showcase.todo.adapter.tasks;
-
-import dev.unexist.showcase.todo.domain.todo.TodoBase;
-import dev.unexist.showcase.todo.domain.todo.TodoService;
-import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.camunda.bpm.engine.delegate.JavaDelegate;
-import org.camunda.bpm.engine.variable.VariableMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.enterprise.context.Dependent;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-@Dependent
-@Named
-public class CamundaTodoCheckTask implements JavaDelegate {
-    private static final Logger LOGGER = LoggerFactory.getLogger(CamundaTodoCheckTask.class);
-
-    @Inject
-    TodoService todoService;
-
-    @Override
-    public void execute(DelegateExecution execution) throws Exception {
-        VariableMap varMap = execution.getVariablesTyped();
-
-        final TodoBase todo = varMap.getValue("todo", TodoBase.class);
-
-        LOGGER.info("Todo check task: {}, total: {}", todo, this.todoService);
-    }
-}
--- a/todo-service-kogito/src/main/java/dev/unexist/showcase/todo/adapter/tasks/CamundaTodoTallyTask.java	Fri Jul 16 16:51:54 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/**
- * @package Quarkus-Workflow-Showcase
- *
- * @file Camunda todo tally task
- * @copyright 2021 Christoph Kappel <christoph@unexist.dev>
- * @version $Id$
- *
- * This program can be distributed under the terms of the Apache License v2.0.
- * See the file LICENSE for details.
- **/
-
-package dev.unexist.showcase.todo.adapter.tasks;
-
-import dev.unexist.showcase.todo.domain.todo.TodoBase;
-import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.camunda.bpm.engine.delegate.JavaDelegate;
-import org.camunda.bpm.engine.variable.VariableMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.enterprise.context.Dependent;
-import javax.inject.Named;
-
-@Dependent
-@Named
-public class CamundaTodoTallyTask implements JavaDelegate {
-    private static final Logger LOGGER = LoggerFactory.getLogger(CamundaTodoTallyTask.class);
-
-    @Override
-    public void execute(DelegateExecution execution) throws Exception {
-        VariableMap varMap = execution.getVariablesTyped();
-
-        final TodoBase todo = varMap.getValue("todo", TodoBase.class);
-
-        LOGGER.info("Todo tally task: {}", todo);
-    }
-}
--- a/todo-service-kogito/src/main/java/dev/unexist/showcase/todo/infrastructure/health/SimpleHealthCheck.java	Fri Jul 16 16:51:54 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/**
- * @package Quarkus-Workflow-Showcase
- *
- * @file Simple health check
- * @copyright 2021 Christoph Kappel <christoph@unexist.dev>
- * @version $Id$
- *
- * This program can be distributed under the terms of the Apache License v2.0.
- * See the file LICENSE for details.
- **/
-
-package dev.unexist.showcase.todo.infrastructure.health;
-
-import org.eclipse.microprofile.health.HealthCheck;
-import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.eclipse.microprofile.health.Liveness;
-
-import javax.enterprise.context.ApplicationScoped;
-
-@Liveness
-@ApplicationScoped
-public class SimpleHealthCheck implements HealthCheck {
-
-    /**
-     * Call of the healthcheck
-     *
-     * @return
-     *      Reponse of the healthcheck
-     **/
-
-    @Override
-    public HealthCheckResponse call() {
-        return HealthCheckResponse.up("Simple health check");
-    }
-}