This commit is contained in:
CITE\spapacharalampous 2024-08-27 10:53:28 +03:00
parent 34490e268a
commit fb299896d2
4 changed files with 12 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import java.time.Instant;
import java.util.UUID; import java.util.UUID;
@Entity @Entity
@Table(name = "\"DescriptionWorkflowEntity\"") @Table(name = "\"DescriptionWorkflow\"")
public class DescriptionWorkflowEntity extends TenantScopedBaseEntity { public class DescriptionWorkflowEntity extends TenantScopedBaseEntity {
@Id @Id
@Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false) @Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false)

View File

@ -14,9 +14,14 @@ import org.opencdmp.data.DescriptionWorkflowEntity;
import org.opencdmp.model.builder.BaseBuilder; import org.opencdmp.model.builder.BaseBuilder;
import org.opencdmp.model.descriptionworkflow.DescriptionWorkflow; import org.opencdmp.model.descriptionworkflow.DescriptionWorkflow;
import org.slf4j.LoggerFactory; 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.*;
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class DescriptionWorkflowBuilder extends BaseBuilder<DescriptionWorkflow, DescriptionWorkflowEntity> { public class DescriptionWorkflowBuilder extends BaseBuilder<DescriptionWorkflow, DescriptionWorkflowEntity> {
private EnumSet<AuthorizationFlags> authorize = EnumSet.of(AuthorizationFlags.None); private EnumSet<AuthorizationFlags> authorize = EnumSet.of(AuthorizationFlags.None);

View File

@ -16,10 +16,15 @@ import org.opencdmp.model.descriptionstatus.DescriptionStatus;
import org.opencdmp.model.descriptionworkflow.DescriptionWorkflowDefinition; import org.opencdmp.model.descriptionworkflow.DescriptionWorkflowDefinition;
import org.opencdmp.query.DescriptionStatusQuery; import org.opencdmp.query.DescriptionStatusQuery;
import org.slf4j.LoggerFactory; 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.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class DescriptionWorkflowDefinitionBuilder extends BaseBuilder<DescriptionWorkflowDefinition, DescriptionWorkflowDefinitionEntity> { public class DescriptionWorkflowDefinitionBuilder extends BaseBuilder<DescriptionWorkflowDefinition, DescriptionWorkflowDefinitionEntity> {

View File

@ -81,6 +81,7 @@ public class DescriptionWorkflowServiceImpl implements DescriptionWorkflowServic
data.setCreatedAt(Instant.now()); data.setCreatedAt(Instant.now());
} }
data.setUpdatedAt(Instant.now());
data.setName(model.getName()); data.setName(model.getName());
data.setDescription(model.getDescription()); data.setDescription(model.getDescription());
data.setDescription(this.xmlHandlingService.toXmlSafe(this.buildDescriptionWorkflowDefinitionEntity(model.getDefinition()))); data.setDescription(this.xmlHandlingService.toXmlSafe(this.buildDescriptionWorkflowDefinitionEntity(model.getDefinition())));