Fixing issues on annotation service
This commit is contained in:
parent
e3ac2394c2
commit
2cbb6297cb
|
@ -2,16 +2,24 @@ package gr.cite.annotation.common.validation;
|
||||||
|
|
||||||
import gr.cite.annotation.convention.ConventionService;
|
import gr.cite.annotation.convention.ConventionService;
|
||||||
import gr.cite.annotation.errorcode.ErrorThesaurusProperties;
|
import gr.cite.annotation.errorcode.ErrorThesaurusProperties;
|
||||||
|
import gr.cite.annotation.integrationevent.inbox.annotationentitytouch.AnnotationEntityTouchedIntegrationEvent;
|
||||||
import gr.cite.tools.validation.specification.Specification;
|
import gr.cite.tools.validation.specification.Specification;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@Component(UuidValidator.ValidatorName)
|
||||||
|
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||||
public class UuidValidator extends BaseValidator<UUID> {
|
public class UuidValidator extends BaseValidator<UUID> {
|
||||||
|
|
||||||
|
public static final String ValidatorName = "UuidValidator";
|
||||||
|
|
||||||
private final MessageSource messageSource;
|
private final MessageSource messageSource;
|
||||||
|
|
||||||
protected UuidValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource) {
|
protected UuidValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource) {
|
||||||
|
|
|
@ -19,7 +19,6 @@ public class AnnotationEntity {
|
||||||
|
|
||||||
public static final String _id = "id";
|
public static final String _id = "id";
|
||||||
|
|
||||||
@Id
|
|
||||||
@Column(name = "entity_id", columnDefinition = "uuid", nullable = false)
|
@Column(name = "entity_id", columnDefinition = "uuid", nullable = false)
|
||||||
private UUID entityId;
|
private UUID entityId;
|
||||||
|
|
||||||
|
|
|
@ -12,19 +12,17 @@ import java.util.UUID;
|
||||||
public class EntityUserEntity {
|
public class EntityUserEntity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false)
|
@Column(name = "\"id\"", columnDefinition = "uuid", updatable = false, nullable = false)
|
||||||
private UUID id;
|
private UUID id;
|
||||||
|
|
||||||
public static final String _id = "id";
|
public static final String _id = "id";
|
||||||
|
|
||||||
@Id
|
@Column(name = "\"entity_id\"", columnDefinition = "uuid", nullable = false)
|
||||||
@Column(name = "id", columnDefinition = "uuid", nullable = false)
|
|
||||||
private UUID entityId;
|
private UUID entityId;
|
||||||
|
|
||||||
public static final String _entityId = "entityId";
|
public static final String _entityId = "entityId";
|
||||||
|
|
||||||
@Id
|
@Column(name = "\"user_id\"", columnDefinition = "uuid", nullable = false)
|
||||||
@Column(name = "id", columnDefinition = "uuid", nullable = false)
|
|
||||||
private UUID userId;
|
private UUID userId;
|
||||||
|
|
||||||
public static final String _userId = "userId";
|
public static final String _userId = "userId";
|
||||||
|
|
|
@ -4,6 +4,7 @@ import gr.cite.annotation.common.validation.BaseValidator;
|
||||||
import gr.cite.annotation.common.validation.UuidValidator;
|
import gr.cite.annotation.common.validation.UuidValidator;
|
||||||
import gr.cite.annotation.convention.ConventionService;
|
import gr.cite.annotation.convention.ConventionService;
|
||||||
import gr.cite.annotation.errorcode.ErrorThesaurusProperties;
|
import gr.cite.annotation.errorcode.ErrorThesaurusProperties;
|
||||||
|
import gr.cite.annotation.integrationevent.TrackedEvent;
|
||||||
import gr.cite.tools.validation.ValidatorFactory;
|
import gr.cite.tools.validation.ValidatorFactory;
|
||||||
import gr.cite.tools.validation.specification.Specification;
|
import gr.cite.tools.validation.specification.Specification;
|
||||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
|
@ -16,7 +17,7 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class AnnotationEntityTouchedIntegrationEvent {
|
public class AnnotationEntityTouchedIntegrationEvent extends TrackedEvent {
|
||||||
|
|
||||||
private UUID entityId;
|
private UUID entityId;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue