From ce0707368765d220768f3871ba3f79cdcba5800d Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Fri, 24 May 2024 10:30:59 +0300 Subject: [PATCH] fix validators --- .../actionconfirmation/RemoveCredentialRequest.java | 12 ------------ .../ExternalIdentifierPersist.java | 3 +++ .../persist/descriptionproperties/FieldPersist.java | 3 +++ .../PropertyDefinitionFieldSetItemPersist.java | 3 +++ .../PropertyDefinitionFieldSetPersist.java | 3 +++ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/core/src/main/java/org/opencdmp/model/actionconfirmation/RemoveCredentialRequest.java b/backend/core/src/main/java/org/opencdmp/model/actionconfirmation/RemoveCredentialRequest.java index 55165c379..a46bf11ab 100644 --- a/backend/core/src/main/java/org/opencdmp/model/actionconfirmation/RemoveCredentialRequest.java +++ b/backend/core/src/main/java/org/opencdmp/model/actionconfirmation/RemoveCredentialRequest.java @@ -1,17 +1,5 @@ package org.opencdmp.model.actionconfirmation; -import org.opencdmp.commons.validation.BaseValidator; -import gr.cite.tools.validation.specification.Specification; -import org.opencdmp.convention.ConventionService; -import org.opencdmp.errorcode.ErrorThesaurusProperties; -import org.springframework.beans.factory.config.ConfigurableBeanFactory; -import org.springframework.context.MessageSource; -import org.springframework.context.annotation.Scope; -import org.springframework.context.i18n.LocaleContextHolder; -import org.springframework.stereotype.Component; - -import java.util.Arrays; -import java.util.List; import java.util.UUID; public class RemoveCredentialRequest { diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/ExternalIdentifierPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/ExternalIdentifierPersist.java index e545f637e..3c4512f4c 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/ExternalIdentifierPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/ExternalIdentifierPersist.java @@ -4,7 +4,9 @@ import org.opencdmp.commons.validation.BaseValidator; import org.opencdmp.convention.ConventionService; import org.opencdmp.errorcode.ErrorThesaurusProperties; import gr.cite.tools.validation.specification.Specification; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Scope; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Component; @@ -36,6 +38,7 @@ public class ExternalIdentifierPersist { } @Component(PersistValidator.ValidatorName) + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public static class PersistValidator extends BaseValidator { public static final String ValidatorName = "Description.ExternalIdentifierPersistPersistValidator"; diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java index 580e18ee8..8665dfaeb 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java @@ -12,7 +12,9 @@ import org.opencdmp.errorcode.ErrorThesaurusProperties; import org.opencdmp.model.persist.ReferencePersist; import org.opencdmp.model.persist.TagPersist; import org.opencdmp.service.visibility.VisibilityService; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Scope; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Component; @@ -114,6 +116,7 @@ public class FieldPersist { } @Component(PersistValidator.ValidatorName) + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public static class PersistValidator extends BaseValidator { public static final String ValidatorName = "Description.FieldPersistValidator"; diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java index 9ed85a282..1cf180d86 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java @@ -10,7 +10,9 @@ import org.opencdmp.errorcode.ErrorThesaurusProperties; import org.opencdmp.service.visibility.VisibilityService; import gr.cite.tools.validation.ValidatorFactory; import gr.cite.tools.validation.specification.Specification; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Scope; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Component; @@ -54,6 +56,7 @@ public class PropertyDefinitionFieldSetItemPersist { } @Component(PersistValidator.ValidatorName) + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public static class PersistValidator extends BaseValidator { public static final String ValidatorName = "Description.PropertyDefinitionFieldSetItemPersistValidator"; diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java index 5124a136b..d313917ff 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java @@ -9,7 +9,9 @@ import org.opencdmp.errorcode.ErrorThesaurusProperties; import org.opencdmp.service.visibility.VisibilityService; import gr.cite.tools.validation.ValidatorFactory; import gr.cite.tools.validation.specification.Specification; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Scope; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Component; @@ -30,6 +32,7 @@ public class PropertyDefinitionFieldSetPersist { } @Component(PersistValidator.ValidatorName) + @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public static class PersistValidator extends BaseValidator { public static final String ValidatorName = "Description.PropertyDefinitionFieldSetPersistValidator";