From fb299896d2d45756a181c5cad3783280ca058b33 Mon Sep 17 00:00:00 2001 From: "CITE\\spapacharalampous" Date: Tue, 27 Aug 2024 10:53:28 +0300 Subject: [PATCH] fixes --- .../java/org/opencdmp/data/DescriptionWorkflowEntity.java | 2 +- .../descriptionworkflow/DescriptionWorkflowBuilder.java | 5 +++++ .../DescriptionWorkflowDefinitionBuilder.java | 5 +++++ .../descriptionworkflow/DescriptionWorkflowServiceImpl.java | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/core/src/main/java/org/opencdmp/data/DescriptionWorkflowEntity.java b/backend/core/src/main/java/org/opencdmp/data/DescriptionWorkflowEntity.java index 9f1f57a13..c2af39f0e 100644 --- a/backend/core/src/main/java/org/opencdmp/data/DescriptionWorkflowEntity.java +++ b/backend/core/src/main/java/org/opencdmp/data/DescriptionWorkflowEntity.java @@ -11,7 +11,7 @@ import java.time.Instant; import java.util.UUID; @Entity -@Table(name = "\"DescriptionWorkflowEntity\"") +@Table(name = "\"DescriptionWorkflow\"") public class DescriptionWorkflowEntity extends TenantScopedBaseEntity { @Id @Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false) diff --git a/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowBuilder.java b/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowBuilder.java index dbcef644d..389d4a9cd 100644 --- a/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowBuilder.java +++ b/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowBuilder.java @@ -14,9 +14,14 @@ import org.opencdmp.data.DescriptionWorkflowEntity; import org.opencdmp.model.builder.BaseBuilder; import org.opencdmp.model.descriptionworkflow.DescriptionWorkflow; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; import java.util.*; +@Component +@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class DescriptionWorkflowBuilder extends BaseBuilder { private EnumSet authorize = EnumSet.of(AuthorizationFlags.None); diff --git a/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowDefinitionBuilder.java b/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowDefinitionBuilder.java index 895b6f1b3..b66edb10e 100644 --- a/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowDefinitionBuilder.java +++ b/backend/core/src/main/java/org/opencdmp/model/builder/descriptionworkflow/DescriptionWorkflowDefinitionBuilder.java @@ -16,10 +16,15 @@ import org.opencdmp.model.descriptionstatus.DescriptionStatus; import org.opencdmp.model.descriptionworkflow.DescriptionWorkflowDefinition; import org.opencdmp.query.DescriptionStatusQuery; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Component; import java.util.*; import java.util.stream.Collectors; +@Component +@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class DescriptionWorkflowDefinitionBuilder extends BaseBuilder { diff --git a/backend/core/src/main/java/org/opencdmp/service/descriptionworkflow/DescriptionWorkflowServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/descriptionworkflow/DescriptionWorkflowServiceImpl.java index 87bf747c7..a2429a28d 100644 --- a/backend/core/src/main/java/org/opencdmp/service/descriptionworkflow/DescriptionWorkflowServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/descriptionworkflow/DescriptionWorkflowServiceImpl.java @@ -81,6 +81,7 @@ public class DescriptionWorkflowServiceImpl implements DescriptionWorkflowServic data.setCreatedAt(Instant.now()); } + data.setUpdatedAt(Instant.now()); data.setName(model.getName()); data.setDescription(model.getDescription()); data.setDescription(this.xmlHandlingService.toXmlSafe(this.buildDescriptionWorkflowDefinitionEntity(model.getDefinition())));