diff --git a/backend/src/main/java/de/hft/geotime/user/UserController.java b/backend/src/main/java/de/hft/geotime/controllers/UserController.java similarity index 92% rename from backend/src/main/java/de/hft/geotime/user/UserController.java rename to backend/src/main/java/de/hft/geotime/controllers/UserController.java index 0bb15d6..1aa5494 100644 --- a/backend/src/main/java/de/hft/geotime/user/UserController.java +++ b/backend/src/main/java/de/hft/geotime/controllers/UserController.java @@ -1,5 +1,7 @@ -package de.hft.geotime.user; +package de.hft.geotime.controllers; +import de.hft.geotime.entities.TimetrackUser; +import de.hft.geotime.repositories.TimetrackUserRepository; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; diff --git a/backend/src/main/java/de/hft/geotime/record/RecordType.java b/backend/src/main/java/de/hft/geotime/entities/RecordType.java similarity index 60% rename from backend/src/main/java/de/hft/geotime/record/RecordType.java rename to backend/src/main/java/de/hft/geotime/entities/RecordType.java index 0adab48..481ff09 100644 --- a/backend/src/main/java/de/hft/geotime/record/RecordType.java +++ b/backend/src/main/java/de/hft/geotime/entities/RecordType.java @@ -1,4 +1,4 @@ -package de.hft.geotime.record; +package de.hft.geotime.entities; public enum RecordType { diff --git a/backend/src/main/java/de/hft/geotime/role/Role.java b/backend/src/main/java/de/hft/geotime/entities/Role.java similarity index 93% rename from backend/src/main/java/de/hft/geotime/role/Role.java rename to backend/src/main/java/de/hft/geotime/entities/Role.java index f887577..235137a 100644 --- a/backend/src/main/java/de/hft/geotime/role/Role.java +++ b/backend/src/main/java/de/hft/geotime/entities/Role.java @@ -1,4 +1,4 @@ -package de.hft.geotime.role; +package de.hft.geotime.entities; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java b/backend/src/main/java/de/hft/geotime/entities/TimeRecord.java similarity index 85% rename from backend/src/main/java/de/hft/geotime/record/TimeRecord.java rename to backend/src/main/java/de/hft/geotime/entities/TimeRecord.java index 1405cf6..8a54422 100644 --- a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java +++ b/backend/src/main/java/de/hft/geotime/entities/TimeRecord.java @@ -1,6 +1,5 @@ -package de.hft.geotime.record; +package de.hft.geotime.entities; -import de.hft.geotime.timetrackaccount.TimetrackAccount; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java b/backend/src/main/java/de/hft/geotime/entities/TimetrackAccount.java similarity index 83% rename from backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java rename to backend/src/main/java/de/hft/geotime/entities/TimetrackAccount.java index 5f95ff4..9ee6191 100644 --- a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java +++ b/backend/src/main/java/de/hft/geotime/entities/TimetrackAccount.java @@ -1,6 +1,5 @@ -package de.hft.geotime.timetrackaccount; +package de.hft.geotime.entities; -import de.hft.geotime.user.TimetrackUser; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java b/backend/src/main/java/de/hft/geotime/entities/TimetrackUser.java similarity index 85% rename from backend/src/main/java/de/hft/geotime/user/TimetrackUser.java rename to backend/src/main/java/de/hft/geotime/entities/TimetrackUser.java index d8b7d32..4b81905 100644 --- a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java +++ b/backend/src/main/java/de/hft/geotime/entities/TimetrackUser.java @@ -1,8 +1,8 @@ -package de.hft.geotime.user; +package de.hft.geotime.entities; import com.fasterxml.jackson.annotation.JsonIgnore; -import de.hft.geotime.role.Role; -import de.hft.geotime.timetrackaccount.TimetrackAccount; +import de.hft.geotime.entities.Role; +import de.hft.geotime.entities.TimetrackAccount; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/backend/src/main/java/de/hft/geotime/timetrackaccount/AccountWithUserProjection.java b/backend/src/main/java/de/hft/geotime/entities/projections/AccountWithUserProjection.java similarity index 66% rename from backend/src/main/java/de/hft/geotime/timetrackaccount/AccountWithUserProjection.java rename to backend/src/main/java/de/hft/geotime/entities/projections/AccountWithUserProjection.java index d2f2f79..06f5862 100644 --- a/backend/src/main/java/de/hft/geotime/timetrackaccount/AccountWithUserProjection.java +++ b/backend/src/main/java/de/hft/geotime/entities/projections/AccountWithUserProjection.java @@ -1,6 +1,7 @@ -package de.hft.geotime.timetrackaccount; +package de.hft.geotime.entities.projections; -import de.hft.geotime.user.TimetrackUser; +import de.hft.geotime.entities.TimetrackAccount; +import de.hft.geotime.entities.TimetrackUser; import org.springframework.data.rest.core.config.Projection; @Projection(name = "withUser", types = TimetrackAccount.class) diff --git a/backend/src/main/java/de/hft/geotime/user/BasicUserProjection.java b/backend/src/main/java/de/hft/geotime/entities/projections/UserWithRoleProjection.java similarity index 70% rename from backend/src/main/java/de/hft/geotime/user/BasicUserProjection.java rename to backend/src/main/java/de/hft/geotime/entities/projections/UserWithRoleProjection.java index 815a62d..9f6576a 100644 --- a/backend/src/main/java/de/hft/geotime/user/BasicUserProjection.java +++ b/backend/src/main/java/de/hft/geotime/entities/projections/UserWithRoleProjection.java @@ -1,10 +1,11 @@ -package de.hft.geotime.user; +package de.hft.geotime.entities.projections; +import de.hft.geotime.entities.TimetrackUser; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.rest.core.config.Projection; @Projection(name = "withRole", types = TimetrackUser.class) -public interface BasicUserProjection { +public interface UserWithRoleProjection { String getFirstname(); diff --git a/backend/src/main/java/de/hft/geotime/record/RecordRepository.java b/backend/src/main/java/de/hft/geotime/repositories/RecordRepository.java similarity index 63% rename from backend/src/main/java/de/hft/geotime/record/RecordRepository.java rename to backend/src/main/java/de/hft/geotime/repositories/RecordRepository.java index 22b7906..b185c6f 100644 --- a/backend/src/main/java/de/hft/geotime/record/RecordRepository.java +++ b/backend/src/main/java/de/hft/geotime/repositories/RecordRepository.java @@ -1,5 +1,6 @@ -package de.hft.geotime.record; +package de.hft.geotime.repositories; +import de.hft.geotime.entities.TimeRecord; import org.springframework.data.repository.CrudRepository; public interface RecordRepository extends CrudRepository { diff --git a/backend/src/main/java/de/hft/geotime/role/RoleRepository.java b/backend/src/main/java/de/hft/geotime/repositories/RoleRepository.java similarity index 64% rename from backend/src/main/java/de/hft/geotime/role/RoleRepository.java rename to backend/src/main/java/de/hft/geotime/repositories/RoleRepository.java index 7e26fa7..2e9cdfd 100644 --- a/backend/src/main/java/de/hft/geotime/role/RoleRepository.java +++ b/backend/src/main/java/de/hft/geotime/repositories/RoleRepository.java @@ -1,5 +1,6 @@ -package de.hft.geotime.role; +package de.hft.geotime.repositories; +import de.hft.geotime.entities.Role; import org.springframework.data.repository.CrudRepository; public interface RoleRepository extends CrudRepository { diff --git a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccountRepository.java b/backend/src/main/java/de/hft/geotime/repositories/TimetrackAccountRepository.java similarity index 82% rename from backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccountRepository.java rename to backend/src/main/java/de/hft/geotime/repositories/TimetrackAccountRepository.java index 4d5ccab..81075a5 100644 --- a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccountRepository.java +++ b/backend/src/main/java/de/hft/geotime/repositories/TimetrackAccountRepository.java @@ -1,5 +1,6 @@ -package de.hft.geotime.timetrackaccount; +package de.hft.geotime.repositories; +import de.hft.geotime.entities.TimetrackAccount; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; diff --git a/backend/src/main/java/de/hft/geotime/user/TimetrackUserRepository.java b/backend/src/main/java/de/hft/geotime/repositories/TimetrackUserRepository.java similarity index 88% rename from backend/src/main/java/de/hft/geotime/user/TimetrackUserRepository.java rename to backend/src/main/java/de/hft/geotime/repositories/TimetrackUserRepository.java index 815a191..382a0a6 100644 --- a/backend/src/main/java/de/hft/geotime/user/TimetrackUserRepository.java +++ b/backend/src/main/java/de/hft/geotime/repositories/TimetrackUserRepository.java @@ -1,5 +1,6 @@ -package de.hft.geotime.user; +package de.hft.geotime.repositories; +import de.hft.geotime.entities.TimetrackUser; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.data.rest.core.annotation.RestResource; diff --git a/backend/src/main/java/de/hft/geotime/user/UserDetailsServiceImpl.java b/backend/src/main/java/de/hft/geotime/security/UserDetailsServiceImpl.java similarity index 89% rename from backend/src/main/java/de/hft/geotime/user/UserDetailsServiceImpl.java rename to backend/src/main/java/de/hft/geotime/security/UserDetailsServiceImpl.java index 365b6f8..c27003c 100644 --- a/backend/src/main/java/de/hft/geotime/user/UserDetailsServiceImpl.java +++ b/backend/src/main/java/de/hft/geotime/security/UserDetailsServiceImpl.java @@ -1,5 +1,7 @@ -package de.hft.geotime.user; +package de.hft.geotime.security; +import de.hft.geotime.entities.TimetrackUser; +import de.hft.geotime.repositories.TimetrackUserRepository; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; diff --git a/backend/src/main/java/de/hft/geotime/security/WebSecurity.java b/backend/src/main/java/de/hft/geotime/security/WebSecurity.java index 63c3213..92ab43d 100644 --- a/backend/src/main/java/de/hft/geotime/security/WebSecurity.java +++ b/backend/src/main/java/de/hft/geotime/security/WebSecurity.java @@ -1,6 +1,5 @@ package de.hft.geotime.security; -import de.hft.geotime.user.UserDetailsServiceImpl; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;