Skip to content

Commit

Permalink
NOD-690: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fparisitas committed Feb 8, 2024
1 parent a3f386c commit 60ae171
Show file tree
Hide file tree
Showing 43 changed files with 100 additions and 115 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync;
package it.gov.pagopa.node.cfgsync;

import com.azure.messaging.eventhubs.EventProcessorClient;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.client;
package it.gov.pagopa.node.cfgsync.client;

import feign.Headers;
import feign.Param;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.client;
package it.gov.pagopa.node.cfgsync.client;

import feign.Headers;
import feign.Param;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.messaging.eventhubs.EventHubClientBuilder;
import com.azure.messaging.eventhubs.EventHubProducerClient;
import com.azure.messaging.eventhubs.EventProcessorClient;
import com.azure.messaging.eventhubs.EventProcessorClientBuilder;
import com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import com.azure.spring.cloud.service.eventhubs.consumer.EventHubsErrorHandler;
import com.azure.spring.cloud.service.eventhubs.consumer.EventHubsRecordMessageListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;


import org.modelmapper.ModelMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
Expand All @@ -14,7 +14,7 @@
import java.util.Objects;
import java.util.Optional;

import it.gov.pagopa.node.cfg_sync.util.Constants;
import it.gov.pagopa.node.cfgsync.util.Constants;
import org.springdoc.core.customizers.OpenApiCustomiser;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import java.io.IOException;
import java.util.UUID;
Expand All @@ -10,7 +10,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import it.gov.pagopa.node.cfg_sync.util.Constants;
import it.gov.pagopa.node.cfgsync.util.Constants;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springframework.core.Ordered;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import it.gov.pagopa.node.cfg_sync.exception.AppException;
import it.gov.pagopa.node.cfgsync.exception.AppException;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package it.gov.pagopa.node.cfg_sync.config;
package it.gov.pagopa.node.cfgsync.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import it.gov.pagopa.node.cfg_sync.model.AppCorsConfiguration;
import it.gov.pagopa.node.cfgsync.model.AppCorsConfiguration;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.controller;
package it.gov.pagopa.node.cfgsync.controller;

import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package it.gov.pagopa.node.cfg_sync.controller;
package it.gov.pagopa.node.cfgsync.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import it.gov.pagopa.node.cfg_sync.model.ProblemJson;
import it.gov.pagopa.node.cfg_sync.model.RefreshResponse;
import it.gov.pagopa.node.cfg_sync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfg_sync.service.CacheServiceFactory;
import it.gov.pagopa.node.cfgsync.model.ProblemJson;
import it.gov.pagopa.node.cfgsync.model.RefreshResponse;
import it.gov.pagopa.node.cfgsync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfgsync.service.CacheServiceFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
Expand All @@ -21,7 +21,6 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.exception;
package it.gov.pagopa.node.cfgsync.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.exception;
package it.gov.pagopa.node.cfgsync.exception;

import java.util.Formatter;
import javax.validation.constraints.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package it.gov.pagopa.node.cfg_sync.exception;
package it.gov.pagopa.node.cfgsync.exception;

import it.gov.pagopa.node.cfg_sync.model.ProblemJson;
import it.gov.pagopa.node.cfgsync.model.ProblemJson;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.model;
package it.gov.pagopa.node.cfgsync.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.model;
package it.gov.pagopa.node.cfgsync.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AccessLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.model;
package it.gov.pagopa.node.cfgsync.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.model;
package it.gov.pagopa.node.cfgsync.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.model;
package it.gov.pagopa.node.cfgsync.model;

public enum TargetRefreshEnum {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.repository.config;
package it.gov.pagopa.node.cfgsync.repository.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.repository.config;
package it.gov.pagopa.node.cfgsync.repository.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package it.gov.pagopa.node.cfg_sync.repository.model;
package it.gov.pagopa.node.cfgsync.repository.model;

import antlr.ANTLRParser;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package it.gov.pagopa.node.cfgsync.repository.model.nexi;

import it.gov.pagopa.node.cfgsync.repository.model.Cache;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Table;

@Getter
@Setter
@Entity
@Table(name = "cache")
public class CacheNexiOracle extends Cache {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package it.gov.pagopa.node.cfgsync.repository.model.pagopa;

import it.gov.pagopa.node.cfgsync.repository.model.Cache;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Table;

@Getter
@Setter
@Entity
@Table(name = "cache")
public class CachePagoPA extends Cache {

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package it.gov.pagopa.node.cfg_sync.repository.nexi;
package it.gov.pagopa.node.cfgsync.repository.nexi;

import it.gov.pagopa.node.cfg_sync.repository.model.nexi.CacheNexiOracle;
import it.gov.pagopa.node.cfgsync.repository.model.nexi.CacheNexiOracle;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package it.gov.pagopa.node.cfg_sync.repository.pagopa;
package it.gov.pagopa.node.cfgsync.repository.pagopa;

import it.gov.pagopa.node.cfg_sync.repository.model.pagopa.CachePagoPA;
import it.gov.pagopa.node.cfgsync.repository.model.pagopa.CachePagoPA;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package it.gov.pagopa.node.cfg_sync.service;
package it.gov.pagopa.node.cfgsync.service;

import feign.Feign;
import feign.FeignException;
import feign.Response;
import it.gov.pagopa.node.cfg_sync.client.ApiConfigCacheClient;
import it.gov.pagopa.node.cfg_sync.exception.AppError;
import it.gov.pagopa.node.cfg_sync.exception.AppException;
import it.gov.pagopa.node.cfg_sync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfg_sync.repository.model.Cache;
import it.gov.pagopa.node.cfg_sync.repository.model.pagopa.CachePagoPA;
import it.gov.pagopa.node.cfg_sync.repository.pagopa.CacheNodoPagoPAPRepository;
import it.gov.pagopa.node.cfgsync.client.ApiConfigCacheClient;
import it.gov.pagopa.node.cfgsync.exception.AppError;
import it.gov.pagopa.node.cfgsync.exception.AppException;
import it.gov.pagopa.node.cfgsync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfgsync.repository.model.pagopa.CachePagoPA;
import it.gov.pagopa.node.cfgsync.repository.pagopa.CacheNodoPagoPAPRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package it.gov.pagopa.node.cfgsync.service;

import it.gov.pagopa.node.cfgsync.model.TargetRefreshEnum;

public interface CacheService {

TargetRefreshEnum getType();
void syncCache();
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package it.gov.pagopa.node.cfg_sync.service;
package it.gov.pagopa.node.cfgsync.service;

import it.gov.pagopa.node.cfg_sync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfgsync.model.TargetRefreshEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package it.gov.pagopa.node.cfg_sync.service;
package it.gov.pagopa.node.cfgsync.service;

import it.gov.pagopa.node.cfg_sync.exception.AppError;
import it.gov.pagopa.node.cfg_sync.exception.AppException;
import it.gov.pagopa.node.cfg_sync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfg_sync.repository.model.Cache;
import it.gov.pagopa.node.cfg_sync.util.Utils;
import it.gov.pagopa.node.cfgsync.exception.AppError;
import it.gov.pagopa.node.cfgsync.exception.AppException;
import it.gov.pagopa.node.cfgsync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfgsync.repository.model.Cache;
import it.gov.pagopa.node.cfgsync.util.Utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package it.gov.pagopa.node.cfg_sync.service;
package it.gov.pagopa.node.cfgsync.service;

import feign.Feign;
import feign.FeignException;
import it.gov.pagopa.node.cfg_sync.client.StandInManagerClient;
import it.gov.pagopa.node.cfg_sync.exception.AppError;
import it.gov.pagopa.node.cfg_sync.exception.AppException;
import it.gov.pagopa.node.cfg_sync.model.TargetRefreshEnum;
import it.gov.pagopa.node.cfgsync.client.StandInManagerClient;
import it.gov.pagopa.node.cfgsync.exception.AppError;
import it.gov.pagopa.node.cfgsync.exception.AppException;
import it.gov.pagopa.node.cfgsync.model.TargetRefreshEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.util;
package it.gov.pagopa.node.cfgsync.util;

import lombok.experimental.UtilityClass;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync.util;
package it.gov.pagopa.node.cfgsync.util;

import javax.persistence.Column;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.gov.pagopa.node.cfg_sync;
package it.gov.pagopa.node.cfgsync;

import static org.junit.jupiter.api.Assertions.assertTrue;

Expand Down
Loading

0 comments on commit 60ae171

Please sign in to comment.