From 6350dae57e9b136f0e298faccefc9a25899b715d Mon Sep 17 00:00:00 2001 From: masoudarvishian Date: Fri, 10 May 2024 16:34:02 +0200 Subject: [PATCH] Refactor --- .../{rest => application}/config/ClockConfig.java | 2 +- .../config/TimedAspectConfig.java | 2 +- .../{rest => rest_api}/controller/JobController.java | 10 +++++----- .../{rest => rest_api}/controller/ShiftController.java | 6 +++--- .../challenge/{rest => rest_api}/dto/ResponseDto.java | 2 +- .../dto/job/CancelJobRequestDto.java | 2 +- .../dto/job/RequestJobRequestDto.java | 2 +- .../dto/job/RequestJobResponseDto.java | 2 +- .../dto/shift/BookTalentRequestDto.java | 2 +- .../dto/shift/CancelShiftForTalentRequestDto.java | 2 +- .../dto/shift/CancelShiftRequestDto.java | 2 +- .../dto/shift/GetShiftsResponseDto.java | 2 +- .../{rest => rest_api}/dto/shift/ShiftResponseDto.java | 2 +- .../exceptionhandler/ErrorResponseDto.java | 2 +- .../exceptionhandler/GlobalExceptionHandler.java | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) rename src/main/java/com/zenjob/challenge/{rest => application}/config/ClockConfig.java (87%) rename src/main/java/com/zenjob/challenge/{rest => application}/config/TimedAspectConfig.java (90%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/controller/JobController.java (80%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/controller/ShiftController.java (93%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/ResponseDto.java (70%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/job/CancelJobRequestDto.java (78%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/job/RequestJobRequestDto.java (92%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/job/RequestJobResponseDto.java (75%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/shift/BookTalentRequestDto.java (77%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/shift/CancelShiftForTalentRequestDto.java (80%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/shift/CancelShiftRequestDto.java (77%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/shift/GetShiftsResponseDto.java (77%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/dto/shift/ShiftResponseDto.java (84%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/exceptionhandler/ErrorResponseDto.java (74%) rename src/main/java/com/zenjob/challenge/{rest => rest_api}/exceptionhandler/GlobalExceptionHandler.java (97%) diff --git a/src/main/java/com/zenjob/challenge/rest/config/ClockConfig.java b/src/main/java/com/zenjob/challenge/application/config/ClockConfig.java similarity index 87% rename from src/main/java/com/zenjob/challenge/rest/config/ClockConfig.java rename to src/main/java/com/zenjob/challenge/application/config/ClockConfig.java index b49734a..af798f8 100644 --- a/src/main/java/com/zenjob/challenge/rest/config/ClockConfig.java +++ b/src/main/java/com/zenjob/challenge/application/config/ClockConfig.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.config; +package com.zenjob.challenge.application.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/com/zenjob/challenge/rest/config/TimedAspectConfig.java b/src/main/java/com/zenjob/challenge/application/config/TimedAspectConfig.java similarity index 90% rename from src/main/java/com/zenjob/challenge/rest/config/TimedAspectConfig.java rename to src/main/java/com/zenjob/challenge/application/config/TimedAspectConfig.java index 47fb0cf..635fc89 100644 --- a/src/main/java/com/zenjob/challenge/rest/config/TimedAspectConfig.java +++ b/src/main/java/com/zenjob/challenge/application/config/TimedAspectConfig.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.config; +package com.zenjob.challenge.application.config; import io.micrometer.core.aop.TimedAspect; import io.micrometer.core.instrument.MeterRegistry; diff --git a/src/main/java/com/zenjob/challenge/rest/controller/JobController.java b/src/main/java/com/zenjob/challenge/rest_api/controller/JobController.java similarity index 80% rename from src/main/java/com/zenjob/challenge/rest/controller/JobController.java rename to src/main/java/com/zenjob/challenge/rest_api/controller/JobController.java index f5dd5f6..24c8517 100644 --- a/src/main/java/com/zenjob/challenge/rest/controller/JobController.java +++ b/src/main/java/com/zenjob/challenge/rest_api/controller/JobController.java @@ -1,9 +1,9 @@ -package com.zenjob.challenge.rest.controller; +package com.zenjob.challenge.rest_api.controller; -import com.zenjob.challenge.rest.dto.job.CancelJobRequestDto; -import com.zenjob.challenge.rest.dto.job.RequestJobRequestDto; -import com.zenjob.challenge.rest.dto.job.RequestJobResponseDto; -import com.zenjob.challenge.rest.dto.ResponseDto; +import com.zenjob.challenge.rest_api.dto.job.CancelJobRequestDto; +import com.zenjob.challenge.rest_api.dto.job.RequestJobRequestDto; +import com.zenjob.challenge.rest_api.dto.job.RequestJobResponseDto; +import com.zenjob.challenge.rest_api.dto.ResponseDto; import com.zenjob.challenge.domain.entity.Job; import com.zenjob.challenge.application.interfaces.JobService; import javassist.NotFoundException; diff --git a/src/main/java/com/zenjob/challenge/rest/controller/ShiftController.java b/src/main/java/com/zenjob/challenge/rest_api/controller/ShiftController.java similarity index 93% rename from src/main/java/com/zenjob/challenge/rest/controller/ShiftController.java rename to src/main/java/com/zenjob/challenge/rest_api/controller/ShiftController.java index d184e5c..fea750d 100644 --- a/src/main/java/com/zenjob/challenge/rest/controller/ShiftController.java +++ b/src/main/java/com/zenjob/challenge/rest_api/controller/ShiftController.java @@ -1,8 +1,8 @@ -package com.zenjob.challenge.rest.controller; +package com.zenjob.challenge.rest_api.controller; import com.zenjob.challenge.application.interfaces.ShiftService; -import com.zenjob.challenge.rest.dto.ResponseDto; -import com.zenjob.challenge.rest.dto.shift.*; +import com.zenjob.challenge.rest_api.dto.ResponseDto; +import com.zenjob.challenge.rest_api.dto.shift.*; import javassist.NotFoundException; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/ResponseDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/ResponseDto.java similarity index 70% rename from src/main/java/com/zenjob/challenge/rest/dto/ResponseDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/ResponseDto.java index 1f8c18c..d006798 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/ResponseDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/ResponseDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto; +package com.zenjob.challenge.rest_api.dto; import lombok.Builder; import lombok.Data; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/job/CancelJobRequestDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/job/CancelJobRequestDto.java similarity index 78% rename from src/main/java/com/zenjob/challenge/rest/dto/job/CancelJobRequestDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/job/CancelJobRequestDto.java index a4f3a31..8da76a5 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/job/CancelJobRequestDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/job/CancelJobRequestDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.job; +package com.zenjob.challenge.rest_api.dto.job; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/job/RequestJobRequestDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/job/RequestJobRequestDto.java similarity index 92% rename from src/main/java/com/zenjob/challenge/rest/dto/job/RequestJobRequestDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/job/RequestJobRequestDto.java index d7cff25..1974f96 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/job/RequestJobRequestDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/job/RequestJobRequestDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.job; +package com.zenjob.challenge.rest_api.dto.job; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/job/RequestJobResponseDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/job/RequestJobResponseDto.java similarity index 75% rename from src/main/java/com/zenjob/challenge/rest/dto/job/RequestJobResponseDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/job/RequestJobResponseDto.java index aa391b1..123113a 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/job/RequestJobResponseDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/job/RequestJobResponseDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.job; +package com.zenjob.challenge.rest_api.dto.job; import lombok.Builder; import lombok.Data; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/shift/BookTalentRequestDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/BookTalentRequestDto.java similarity index 77% rename from src/main/java/com/zenjob/challenge/rest/dto/shift/BookTalentRequestDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/shift/BookTalentRequestDto.java index 17e0bcb..95d45f5 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/shift/BookTalentRequestDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/BookTalentRequestDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.shift; +package com.zenjob.challenge.rest_api.dto.shift; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/shift/CancelShiftForTalentRequestDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/CancelShiftForTalentRequestDto.java similarity index 80% rename from src/main/java/com/zenjob/challenge/rest/dto/shift/CancelShiftForTalentRequestDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/shift/CancelShiftForTalentRequestDto.java index 806d0e3..8cf9a5f 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/shift/CancelShiftForTalentRequestDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/CancelShiftForTalentRequestDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.shift; +package com.zenjob.challenge.rest_api.dto.shift; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/shift/CancelShiftRequestDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/CancelShiftRequestDto.java similarity index 77% rename from src/main/java/com/zenjob/challenge/rest/dto/shift/CancelShiftRequestDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/shift/CancelShiftRequestDto.java index e2dfc44..dbc25f0 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/shift/CancelShiftRequestDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/CancelShiftRequestDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.shift; +package com.zenjob.challenge.rest_api.dto.shift; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/shift/GetShiftsResponseDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/GetShiftsResponseDto.java similarity index 77% rename from src/main/java/com/zenjob/challenge/rest/dto/shift/GetShiftsResponseDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/shift/GetShiftsResponseDto.java index 76dc4ed..cdaf807 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/shift/GetShiftsResponseDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/GetShiftsResponseDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.shift; +package com.zenjob.challenge.rest_api.dto.shift; import lombok.Builder; import lombok.Data; diff --git a/src/main/java/com/zenjob/challenge/rest/dto/shift/ShiftResponseDto.java b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/ShiftResponseDto.java similarity index 84% rename from src/main/java/com/zenjob/challenge/rest/dto/shift/ShiftResponseDto.java rename to src/main/java/com/zenjob/challenge/rest_api/dto/shift/ShiftResponseDto.java index f572391..a49962b 100644 --- a/src/main/java/com/zenjob/challenge/rest/dto/shift/ShiftResponseDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/dto/shift/ShiftResponseDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.dto.shift; +package com.zenjob.challenge.rest_api.dto.shift; import lombok.Builder; import lombok.Data; diff --git a/src/main/java/com/zenjob/challenge/rest/exceptionhandler/ErrorResponseDto.java b/src/main/java/com/zenjob/challenge/rest_api/exceptionhandler/ErrorResponseDto.java similarity index 74% rename from src/main/java/com/zenjob/challenge/rest/exceptionhandler/ErrorResponseDto.java rename to src/main/java/com/zenjob/challenge/rest_api/exceptionhandler/ErrorResponseDto.java index 352b0f4..5f33c4a 100644 --- a/src/main/java/com/zenjob/challenge/rest/exceptionhandler/ErrorResponseDto.java +++ b/src/main/java/com/zenjob/challenge/rest_api/exceptionhandler/ErrorResponseDto.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.exceptionhandler; +package com.zenjob.challenge.rest_api.exceptionhandler; import lombok.*; diff --git a/src/main/java/com/zenjob/challenge/rest/exceptionhandler/GlobalExceptionHandler.java b/src/main/java/com/zenjob/challenge/rest_api/exceptionhandler/GlobalExceptionHandler.java similarity index 97% rename from src/main/java/com/zenjob/challenge/rest/exceptionhandler/GlobalExceptionHandler.java rename to src/main/java/com/zenjob/challenge/rest_api/exceptionhandler/GlobalExceptionHandler.java index ec78ddf..519603c 100644 --- a/src/main/java/com/zenjob/challenge/rest/exceptionhandler/GlobalExceptionHandler.java +++ b/src/main/java/com/zenjob/challenge/rest_api/exceptionhandler/GlobalExceptionHandler.java @@ -1,4 +1,4 @@ -package com.zenjob.challenge.rest.exceptionhandler; +package com.zenjob.challenge.rest_api.exceptionhandler; import com.zenjob.challenge.domain.exceptions.InvalidActionException; import com.zenjob.challenge.domain.exceptions.InvalidEndDateException;