Skip to content

Commit

Permalink
Replace enums
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuznik committed Dec 2, 2024
1 parent 96a77f4 commit 6143a2e
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import pl.ateam.disasteralerts.disaster.DisasterFacade;
import pl.ateam.disasteralerts.disaster.DisasterType;
import pl.ateam.disasteralerts.util.enums.DisasterType;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.util.CitiesInPoland;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/pl/ateam/disasteralerts/disaster/Disaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.EntityAudit;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.time.LocalDateTime;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.security.AppUser;
import pl.ateam.disasteralerts.util.enums.DisasterType;

@RestController
@RequestMapping(DisasterController.DISASTERS_BASE_URL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.springframework.validation.annotation.Validated;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package pl.ateam.disasteralerts.disaster;

import org.springframework.data.jpa.repository.JpaRepository;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.validation.annotation.Validated;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import pl.ateam.disasteralerts.alert.dto.AlertAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.*;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import pl.ateam.disasteralerts.disaster.DisasterType;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pl.ateam.disasteralerts.disaster.dto;

import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.disaster.DisasterType;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.time.LocalDateTime;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.ateam.disasteralerts.disaster.enums;
package pl.ateam.disasteralerts.util.enums;

public enum DisasterStatus {
ACTIVE, FINISHED, FAKE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pl.ateam.disasteralerts.disaster;
package pl.ateam.disasteralerts.util.enums;

public enum DisasterType {
STORM("Burza"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import pl.ateam.disasteralerts.disaster.DisasterFacade;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.disaster.DisasterType;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterType;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.security.AppUser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;
import pl.ateam.disasteralerts.disaster.DisasterType;
import pl.ateam.disasteralerts.util.enums.DisasterType;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.util.CitiesInPoland;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.security.AppUser;
import pl.ateam.disasteralerts.user.dto.UserDTO;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import pl.ateam.disasteralerts.alert.AlertFacade;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.time.LocalDateTime;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import pl.ateam.disasteralerts.alert.AlertFacade;
import pl.ateam.disasteralerts.disaster.dto.DisasterAddDTO;
import pl.ateam.disasteralerts.disaster.dto.DisasterDTO;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.time.LocalDateTime;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import pl.ateam.disasteralerts.API.WeatherMonitoringFacade;
import pl.ateam.disasteralerts.disaster.enums.DisasterStatus;
import pl.ateam.disasteralerts.util.enums.DisasterStatus;
import pl.ateam.disasteralerts.security.AppUser;
import pl.ateam.disasteralerts.user.UserFacade;
import pl.ateam.disasteralerts.user.dto.UserDTO;
import pl.ateam.disasteralerts.util.enums.DisasterType;

import java.util.List;
import java.util.UUID;
Expand Down

0 comments on commit 6143a2e

Please sign in to comment.