Skip to content

Commit

Permalink
Remove obsolete files and dependencies
Browse files Browse the repository at this point in the history
Deleted unused Java classes and test config files to streamline the codebase and improve project organization. This cleanup helps maintain a leaner structure and eliminates redundant components.
  • Loading branch information
krharum committed Aug 15, 2024
1 parent ad5265f commit 0da783c
Show file tree
Hide file tree
Showing 63 changed files with 149 additions and 1,415 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,24 @@ private static String getNavCallId() {
public Flux<Arbeidsforhold> call() {

return webClient
.get()
.uri(builder -> builder
.path("/{miljoe}/api/v1/arbeidstaker/arbeidsforhold")
.queryParam("arbeidsforholdtype", "forenkletOppgjoersordning",
"frilanserOppdragstakerHonorarPersonerMm", "maritimtArbeidsforhold",
"ordinaertArbeidsforhold")
.build(miljoe))
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
.header(NAV_PERSON_IDENT, ident)
.header(NavHeaders.NAV_CONSUMER_ID, CONSUMER)
.header(NavHeaders.NAV_CALL_ID, getNavCallId())
.retrieve()
.bodyToFlux(Arbeidsforhold.class)
.retryWhen(Retry
.backoff(3, Duration.ofSeconds(5))
.filter(WebClientFilter::is5xxException))
.onErrorResume(WebClientResponseException.NotFound.class, error -> Mono.empty())
.onErrorResume(WebClientResponseException.class, error -> {
WebClientFilter.logErrorMessage(error);
return Mono.empty();
});
.get()
.uri(builder -> builder
.path("/{miljoe}/api/v1/arbeidstaker/arbeidsforhold")
.queryParam("arbeidsforholdtype", "forenkletOppgjoersordning",
"frilanserOppdragstakerHonorarPersonerMm", "maritimtArbeidsforhold",
"ordinaertArbeidsforhold")
.build(miljoe))
.header(HttpHeaders.AUTHORIZATION, "Bearer " + token)
.header(NAV_PERSON_IDENT, ident)
.header(NavHeaders.NAV_CONSUMER_ID, CONSUMER)
.header(NavHeaders.NAV_CALL_ID, getNavCallId())
.retrieve()
.bodyToFlux(Arbeidsforhold.class)
.retryWhen(Retry
.backoff(3, Duration.ofSeconds(5))
.filter(WebClientFilter::is5xxException))
.doOnError(WebClientFilter::logErrorMessage)
.onErrorResume(WebClientResponseException.NotFound.class, error -> Mono.empty())
.onErrorResume(WebClientResponseException.class, error -> Mono.empty());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public Mono<ResponseEntity<Void>> call() {
.retrieve()
.toBodilessEntity()
.retryWhen(Retry.backoff(3, Duration.ofSeconds(5))
.filter(WebClientFilter::is5xxException));
.filter(WebClientFilter::is5xxException))
.doOnError(WebClientFilter::logErrorMessage);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler;
package no.nav.testnav.levendearbeidsforholdscheduler;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.config;
package no.nav.testnav.levendearbeidsforholdscheduler.config;

import no.nav.testnav.libs.servletcore.config.ApplicationCoreConfig;
import no.nav.testnav.libs.servletsecurity.config.SecureOAuth2ServerToServerConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.config;
package no.nav.testnav.levendearbeidsforholdscheduler.config;

import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.registre.testnorge.levendearbeidsforhold.config;
package no.nav.testnav.levendearbeidsforholdscheduler.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.registre.testnorge.levendearbeidsforhold.config;
package no.nav.testnav.levendearbeidsforholdscheduler.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
Expand All @@ -7,15 +7,14 @@
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import no.nav.testnav.libs.servletcore.config.ApplicationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Arrays;

import no.nav.testnav.libs.servletcore.config.ApplicationProperties;

@Configuration
public class OpenApiConfig implements WebMvcConfigurer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.config;
package no.nav.testnav.levendearbeidsforholdscheduler.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.config;
package no.nav.testnav.levendearbeidsforholdscheduler.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package no.nav.levendearbeidsforholdscheduler.consumer;
package no.nav.testnav.levendearbeidsforholdscheduler.consumer;

import no.nav.levendearbeidsforholdscheduler.config.Consumers;
import no.nav.levendearbeidsforholdscheduler.consumer.command.AnsettelsesCommand;
import no.nav.testnav.levendearbeidsforholdscheduler.config.Consumers;
import no.nav.testnav.levendearbeidsforholdscheduler.consumer.command.AnsettelsesCommand;
import no.nav.testnav.libs.securitycore.domain.ServerProperties;
import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.consumer.command;
package no.nav.testnav.levendearbeidsforholdscheduler.consumer.command;

import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.nav.levendearbeidsforholdscheduler.controller;
package no.nav.testnav.levendearbeidsforholdscheduler.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import no.nav.levendearbeidsforholdscheduler.domain.StatusRespons;
import no.nav.levendearbeidsforholdscheduler.scheduler.JobbScheduler;
import no.nav.testnav.levendearbeidsforholdscheduler.domain.StatusRespons;
import no.nav.testnav.levendearbeidsforholdscheduler.scheduler.JobbScheduler;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -15,7 +15,7 @@

import java.util.Optional;

import static no.nav.levendearbeidsforholdscheduler.utils.Utils.sifferTilHeltall;
import static no.nav.testnav.levendearbeidsforholdscheduler.utils.Utils.sifferTilHeltall;

@Slf4j
@RestController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.domain;
package no.nav.testnav.levendearbeidsforholdscheduler.domain;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package no.nav.levendearbeidsforholdscheduler.scheduler;
package no.nav.testnav.levendearbeidsforholdscheduler.scheduler;

import lombok.RequiredArgsConstructor;
import no.nav.levendearbeidsforholdscheduler.consumer.AnsettelseConsumer;
import no.nav.testnav.levendearbeidsforholdscheduler.consumer.AnsettelseConsumer;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class AnsettelsesService {

private final AnsettelseConsumer ansettelseConsumer;

public void hent(){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.scheduler;
package no.nav.testnav.levendearbeidsforholdscheduler.scheduler;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand All @@ -13,8 +13,8 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;

import static no.nav.levendearbeidsforholdscheduler.utils.Utils.beregnEkstraDelayNaa;
import static no.nav.levendearbeidsforholdscheduler.utils.Utils.hentKalender;
import static no.nav.testnav.levendearbeidsforholdscheduler.utils.Utils.beregnEkstraDelayNaa;
import static no.nav.testnav.levendearbeidsforholdscheduler.utils.Utils.hentKalender;

@Slf4j
@Component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler.utils;
package no.nav.testnav.levendearbeidsforholdscheduler.utils;

import java.util.Calendar;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.levendearbeidsforholdscheduler;
package no.nav.testnav.levendearbeidsforholdscheduler;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package no.nav.levendearbeidsforholdscheduler.scheduler;
package no.nav.testnav.levendearbeidsforholdscheduler.scheduler;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

import static no.nav.levendearbeidsforholdscheduler.scheduler.JobbScheduler.sjekkGyldigTidsrom;
import static no.nav.testnav.levendearbeidsforholdscheduler.scheduler.JobbScheduler.sjekkGyldigTidsrom;

@Slf4j
class JobbSchedulerTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package no.nav.levendearbeidsforholdscheduler.utils;
package no.nav.testnav.levendearbeidsforholdscheduler.utils;

import org.junit.jupiter.api.Test;

import static no.nav.levendearbeidsforholdscheduler.utils.Utils.beregnEkstraDelay;
import static org.junit.jupiter.api.Assertions.*;
import static no.nav.testnav.levendearbeidsforholdscheduler.utils.Utils.beregnEkstraDelay;

class UtilsTest {

Expand Down
1 change: 1 addition & 0 deletions apps/levende-arbeidsforhold-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ dependencies {
implementation 'no.nav.testnav.libs:servlet-insecure-security'
implementation 'no.nav.testnav.libs:servlet-core'
implementation 'no.nav.testnav.libs:reactive-core'
implementation 'no.nav.testnav.libs:data-transfer-objects'

implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-web'
Expand Down
1 change: 1 addition & 0 deletions apps/levende-arbeidsforhold-service/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ includeBuild '../../libs/security-core'
includeBuild '../../libs/servlet-core'
includeBuild '../../libs/reactive-core'
includeBuild '../../libs/servlet-insecure-security'
includeBuild '../../libs/data-transfer-objects'
includeBuild '../../.github/workflows'

develocity {
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0da783c

Please sign in to comment.