Commit 2f1f76a9d94f9897ea2b95795551422ff5f044d3

Authored by Geoffrey PREUD'HOMME
1 parent ec214b7d

Mise sous packages

Showing 18 changed files with 61 additions and 16 deletions   Show diff stats
src/main/java/etunicorn/Application.java
1 package etunicorn; 1 package etunicorn;
2 2
  3 +import etunicorn.entity.Permission;
  4 +import etunicorn.entity.Personne;
  5 +import etunicorn.entity.Role;
  6 +import etunicorn.entity.Session;
  7 +import etunicorn.repository.PermissionRepository;
  8 +import etunicorn.repository.PersonneRepository;
  9 +import etunicorn.repository.RoleRepository;
  10 +import etunicorn.repository.SessionRepository;
3 import org.springframework.boot.CommandLineRunner; 11 import org.springframework.boot.CommandLineRunner;
4 import org.springframework.boot.SpringApplication; 12 import org.springframework.boot.SpringApplication;
5 import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 13 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
src/main/java/etunicorn/SecurityInterceptor.java
1 package etunicorn; 1 package etunicorn;
2 2
  3 +import etunicorn.entity.Permission;
  4 +import etunicorn.entity.Session;
  5 +import etunicorn.repository.PermissionRepository;
  6 +import etunicorn.service.SessionService;
3 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.http.HttpStatus; 8 import org.springframework.http.HttpStatus;
5 import org.springframework.transaction.annotation.Transactional; 9 import org.springframework.transaction.annotation.Transactional;
src/main/java/etunicorn/BaseController.java renamed to src/main/java/etunicorn/controller/BaseController.java
1 -package etunicorn; 1 +package etunicorn.controller;
2 2
3 import com.fasterxml.jackson.annotation.JsonProperty; 3 import com.fasterxml.jackson.annotation.JsonProperty;
  4 +import etunicorn.entity.Permission;
  5 +import etunicorn.entity.Session;
  6 +import etunicorn.exception.EntityRequestMismatchException;
  7 +import etunicorn.exception.NotEnoughDataException;
  8 +import etunicorn.exception.ObjectNotFoundException;
  9 +import etunicorn.repository.PermissionRepository;
  10 +import etunicorn.service.SessionService;
4 import net.minidev.json.JSONObject; 11 import net.minidev.json.JSONObject;
5 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.data.repository.Repository; 13 import org.springframework.data.repository.Repository;
src/main/java/etunicorn/LoginController.java renamed to src/main/java/etunicorn/controller/LoginController.java
1 -package etunicorn; 1 +package etunicorn.controller;
2 2
  3 +import etunicorn.RestrictedTo;
  4 +import etunicorn.entity.Personne;
  5 +import etunicorn.entity.Session;
3 import etunicorn.generated.model.UpdateLoginRequest; 6 import etunicorn.generated.model.UpdateLoginRequest;
  7 +import etunicorn.repository.PersonneRepository;
  8 +import etunicorn.service.SessionService;
4 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.http.HttpStatus; 10 import org.springframework.http.HttpStatus;
6 import org.springframework.http.ResponseEntity; 11 import org.springframework.http.ResponseEntity;
src/main/java/etunicorn/PersonneController.java renamed to src/main/java/etunicorn/controller/PersonneController.java
1 -package etunicorn; 1 +package etunicorn.controller;
2 2
  3 +import etunicorn.RestrictedTo;
  4 +import etunicorn.entity.Personne;
  5 +import etunicorn.entity.Role;
  6 +import etunicorn.exception.EntityRequestMismatchException;
  7 +import etunicorn.exception.NotEnoughDataException;
  8 +import etunicorn.exception.ObjectNotFoundException;
3 import etunicorn.generated.model.UpdatePersonneByIdRequest; 9 import etunicorn.generated.model.UpdatePersonneByIdRequest;
4 import etunicorn.generated.model.UpdatePersonneRequest; 10 import etunicorn.generated.model.UpdatePersonneRequest;
  11 +import etunicorn.repository.PersonneRepository;
  12 +import etunicorn.repository.RoleRepository;
5 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.dao.DataIntegrityViolationException; 14 import org.springframework.dao.DataIntegrityViolationException;
7 import org.springframework.http.HttpStatus; 15 import org.springframework.http.HttpStatus;
src/main/java/etunicorn/RoleController.java renamed to src/main/java/etunicorn/controller/RoleController.java
1 -package etunicorn; 1 +package etunicorn.controller;
2 2
3 3
  4 +import etunicorn.RestrictedTo;
  5 +import etunicorn.entity.Permission;
  6 +import etunicorn.entity.Role;
4 import etunicorn.generated.model.UpdateRoleByIdRequest; 7 import etunicorn.generated.model.UpdateRoleByIdRequest;
5 import etunicorn.generated.model.UpdateRoleRequest; 8 import etunicorn.generated.model.UpdateRoleRequest;
  9 +import etunicorn.repository.PermissionRepository;
  10 +import etunicorn.repository.RoleRepository;
6 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.dao.DataIntegrityViolationException; 12 import org.springframework.dao.DataIntegrityViolationException;
8 import org.springframework.http.HttpStatus; 13 import org.springframework.http.HttpStatus;
src/main/java/etunicorn/Permission.java renamed to src/main/java/etunicorn/entity/Permission.java
1 -package etunicorn; 1 +package etunicorn.entity;
2 2
3 import javax.persistence.Entity; 3 import javax.persistence.Entity;
4 import javax.persistence.Id; 4 import javax.persistence.Id;
src/main/java/etunicorn/Personne.java renamed to src/main/java/etunicorn/entity/Personne.java
1 -package etunicorn; 1 +package etunicorn.entity;
2 2
3 import javax.persistence.*; 3 import javax.persistence.*;
4 import java.util.Date; 4 import java.util.Date;
src/main/java/etunicorn/Role.java renamed to src/main/java/etunicorn/entity/Role.java
1 -package etunicorn; 1 +package etunicorn.entity;
2 2
3 import javax.persistence.Column; 3 import javax.persistence.Column;
4 import javax.persistence.Entity; 4 import javax.persistence.Entity;
src/main/java/etunicorn/Session.java renamed to src/main/java/etunicorn/entity/Session.java
1 -package etunicorn; 1 +package etunicorn.entity;
2 2
3 import javax.persistence.Entity; 3 import javax.persistence.Entity;
4 import javax.persistence.Id; 4 import javax.persistence.Id;
src/main/java/etunicorn/EntityRequestMismatchException.java renamed to src/main/java/etunicorn/exception/EntityRequestMismatchException.java
1 -package etunicorn; 1 +package etunicorn.exception;
2 2
3 /** 3 /**
4 * etunicorn-server 4 * etunicorn-server
src/main/java/etunicorn/NotEnoughDataException.java renamed to src/main/java/etunicorn/exception/NotEnoughDataException.java
1 -package etunicorn; 1 +package etunicorn.exception;
2 2
3 /** 3 /**
4 * etunicorn-server 4 * etunicorn-server
src/main/java/etunicorn/ObjectNotFoundException.java renamed to src/main/java/etunicorn/exception/ObjectNotFoundException.java
1 -package etunicorn; 1 +package etunicorn.exception;
2 2
3 /** 3 /**
4 * etunicorn-server 4 * etunicorn-server
src/main/java/etunicorn/PermissionRepository.java renamed to src/main/java/etunicorn/repository/PermissionRepository.java
1 -package etunicorn; 1 +package etunicorn.repository;
2 2
  3 +import etunicorn.entity.Permission;
3 import org.springframework.data.repository.CrudRepository; 4 import org.springframework.data.repository.CrudRepository;
4 5
5 /** 6 /**
src/main/java/etunicorn/PersonneRepository.java renamed to src/main/java/etunicorn/repository/PersonneRepository.java
1 -package etunicorn; 1 +package etunicorn.repository;
2 2
  3 +import etunicorn.entity.Personne;
3 import org.springframework.data.repository.CrudRepository; 4 import org.springframework.data.repository.CrudRepository;
4 5
5 /** 6 /**
src/main/java/etunicorn/RoleRepository.java renamed to src/main/java/etunicorn/repository/RoleRepository.java
1 -package etunicorn; 1 +package etunicorn.repository;
2 2
  3 +import etunicorn.entity.Role;
3 import org.springframework.data.repository.CrudRepository; 4 import org.springframework.data.repository.CrudRepository;
4 5
5 /** 6 /**
src/main/java/etunicorn/SessionRepository.java renamed to src/main/java/etunicorn/repository/SessionRepository.java
1 -package etunicorn; 1 +package etunicorn.repository;
2 2
  3 +import etunicorn.entity.Session;
3 import org.springframework.data.repository.CrudRepository; 4 import org.springframework.data.repository.CrudRepository;
4 5
5 /** 6 /**
src/main/java/etunicorn/SessionService.java renamed to src/main/java/etunicorn/service/SessionService.java
1 -package etunicorn; 1 +package etunicorn.service;
2 2
  3 +import etunicorn.entity.Personne;
  4 +import etunicorn.entity.Session;
  5 +import etunicorn.repository.PersonneRepository;
  6 +import etunicorn.repository.SessionRepository;
3 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.stereotype.Service; 8 import org.springframework.stereotype.Service;
5 9