Changeset bd46dbb for src/main/java/it/finki
- Timestamp:
- 01/08/21 23:47:41 (4 years ago)
- Branches:
- master
- Children:
- 297bd16
- Parents:
- bd38a55
- Location:
- src/main/java/it/finki/tinki
- Files:
-
- 10 added
- 5 deleted
- 14 edited
- 11 moved
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/TinkiApplication.java
rbd38a55 rbd46dbb 3 3 import org.springframework.boot.SpringApplication; 4 4 import org.springframework.boot.autoconfigure.SpringBootApplication; 5 import org.springframework.context.annotation.Bean; 5 6 6 7 @SpringBootApplication … … 10 11 SpringApplication.run(TinkiApplication.class, args); 11 12 } 12 13 13 } -
src/main/java/it/finki/tinki/bootstrap/DataHolder.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.bootstrap; 2 2 3 import it.finki.tinki.model. Jobs.Job;3 import it.finki.tinki.model.Work.Job; 4 4 import it.finki.tinki.model.Skill; 5 5 import it.finki.tinki.model.Users.Account; -
src/main/java/it/finki/tinki/model/EmbeddedMatchId.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.model; 2 2 3 import it.finki.tinki.model. Jobs.Work;3 import it.finki.tinki.model.Work.Work; 4 4 import it.finki.tinki.model.Users.User; 5 5 import lombok.Data; -
src/main/java/it/finki/tinki/model/Work/Internship.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model. Jobs;1 package it.finki.tinki.model.Work; 2 2 3 3 import it.finki.tinki.model.Skill; -
src/main/java/it/finki/tinki/model/Work/Job.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model. Jobs;1 package it.finki.tinki.model.Work; 2 2 3 3 import it.finki.tinki.model.Skill; -
src/main/java/it/finki/tinki/model/Work/Project.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model. Jobs;1 package it.finki.tinki.model.Work; 2 2 3 3 import it.finki.tinki.model.Skill; -
src/main/java/it/finki/tinki/model/Work/Work.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model. Jobs;1 package it.finki.tinki.model.Work; 2 2 3 3 import it.finki.tinki.model.Users.Account; -
src/main/java/it/finki/tinki/model/dto/register/account/AccountRegisterDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.register.account; 2 2 3 3 import lombok.Data; 4 4 5 5 @Data 6 public class TeamRegisterDTO {6 public class AccountRegisterDTO { 7 7 String email; 8 8 String password; 9 9 String name; 10 int members;11 10 } -
src/main/java/it/finki/tinki/model/dto/register/account/UserRegisterDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.register.account; 2 2 3 3 import lombok.Data; … … 6 6 7 7 @Data 8 public class UserRegisterDTO { 9 String email; 10 String password; 11 String name; 8 public class UserRegisterDTO extends AccountRegisterDTO { 12 9 String surname; 13 10 List<Long> retainedSkills; -
src/main/java/it/finki/tinki/model/dto/response/account/CompanyResponseDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.response.account; 2 2 3 3 import it.finki.tinki.model.Address; 4 import it.finki.tinki.model.dto.response.work.InternshipResponseDTO; 5 import it.finki.tinki.model.dto.response.work.JobResponseDTO; 4 6 import lombok.Data; 5 7 -
src/main/java/it/finki/tinki/model/dto/response/account/LoginResponseDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.response.account; 2 2 3 3 import it.finki.tinki.model.enumerator.AccountType; -
src/main/java/it/finki/tinki/model/dto/response/account/TeamResponseDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.response.account; 2 2 3 import it.finki.tinki.model.dto.response.work.JobResponseDTO; 4 import it.finki.tinki.model.dto.response.work.ProjectResponseDTO; 3 5 import lombok.Data; 4 6 … … 7 9 8 10 @Data 9 public class TeamResponseDTO extends LoginResponseDTO {11 public class TeamResponseDTO extends LoginResponseDTO { 10 12 private int members; 11 13 private List<JobResponseDTO> jobs; -
src/main/java/it/finki/tinki/model/dto/response/account/UserResponseDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.response.account; 2 2 3 3 import it.finki.tinki.model.Skill; 4 import it.finki.tinki.model.dto.response.work.InternshipResponseDTO; 5 import it.finki.tinki.model.dto.response.work.JobResponseDTO; 6 import it.finki.tinki.model.dto.response.work.ProjectResponseDTO; 4 7 import lombok.Data; 5 8 … … 8 11 9 12 @Data 10 public class UserResponseDTO extends LoginResponseDTO {13 public class UserResponseDTO extends LoginResponseDTO { 11 14 private String surname; 12 15 private List<Skill> retained; -
src/main/java/it/finki/tinki/model/dto/response/work/JobResponseDTO.java
rbd38a55 rbd46dbb 1 package it.finki.tinki.model.dto ;1 package it.finki.tinki.model.dto.response.work; 2 2 3 3 import it.finki.tinki.model.Address; 4 import it.finki.tinki.model. Jobs.Job;4 import it.finki.tinki.model.Work.Job; 5 5 import it.finki.tinki.model.Users.Company; 6 6 import it.finki.tinki.model.Users.Team; … … 9 9 10 10 @Data 11 public class JobResponseDTO { 12 Long id; 13 String title; 14 String description; 15 int salary; 16 String accountEmail; 17 String accountName; 18 AccountType accountType; 11 public class JobResponseDTO extends WorkResponseDTO { 19 12 Address accountAddress; 20 13 int members; 21 14 22 15 public JobResponseDTO(Job job){ 23 this.id = job.getId(); 24 this.title = job.getTitle(); 25 this.description = job.getDescription(); 26 this.salary = job.getSalary(); 27 this.accountEmail = job.getAccount().getEmail(); 28 this.accountName = job.getAccount().getName(); 29 this.accountType = job.getAccount().getAccountType(); 16 super(job.getId(), job.getTitle(), job.getDescription(), job.getSalary(), job.getAccount()); 30 17 if(job.getAccount().getAccountType()==AccountType.COMPANY){ 31 18 this.accountAddress = ((Company) job.getAccount()).getAddress(); -
src/main/java/it/finki/tinki/repository/InternshipRepository.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.repository; 2 2 3 import it.finki.tinki.model. Jobs.Internship;3 import it.finki.tinki.model.Work.Internship; 4 4 import org.springframework.data.jpa.repository.JpaRepository; 5 5 import org.springframework.stereotype.Repository; -
src/main/java/it/finki/tinki/repository/JobRepository.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.repository; 2 2 3 import it.finki.tinki.model. Jobs.Job;3 import it.finki.tinki.model.Work.Job; 4 4 import org.springframework.data.jpa.repository.JpaRepository; 5 5 import org.springframework.stereotype.Repository; -
src/main/java/it/finki/tinki/repository/ProjectRepository.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.repository; 2 2 3 import it.finki.tinki.model. Jobs.Project;3 import it.finki.tinki.model.Work.Project; 4 4 import org.springframework.data.jpa.repository.JpaRepository; 5 5 import org.springframework.stereotype.Repository; -
src/main/java/it/finki/tinki/service/MatchmakerService.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.service; 2 2 3 import it.finki.tinki.model. Jobs.Internship;4 import it.finki.tinki.model. Jobs.Job;5 import it.finki.tinki.model. Jobs.Project;3 import it.finki.tinki.model.Work.Internship; 4 import it.finki.tinki.model.Work.Job; 5 import it.finki.tinki.model.Work.Project; 6 6 import it.finki.tinki.model.Users.User; 7 7 -
src/main/java/it/finki/tinki/service/WorkService.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.service; 2 2 3 import it.finki.tinki.model. Jobs.Internship;4 import it.finki.tinki.model. Jobs.Job;5 import it.finki.tinki.model. Jobs.Project;3 import it.finki.tinki.model.Work.Internship; 4 import it.finki.tinki.model.Work.Job; 5 import it.finki.tinki.model.Work.Project; 6 6 import it.finki.tinki.model.enumerator.AccountType; 7 7 -
src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java
rbd38a55 rbd46dbb 2 2 3 3 import it.finki.tinki.model.Address; 4 import it.finki.tinki.model. Jobs.Internship;5 import it.finki.tinki.model. Jobs.Job;6 import it.finki.tinki.model. Jobs.Project;4 import it.finki.tinki.model.Work.Internship; 5 import it.finki.tinki.model.Work.Job; 6 import it.finki.tinki.model.Work.Project; 7 7 import it.finki.tinki.model.Skill; 8 8 import it.finki.tinki.model.Users.Account; -
src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java
rbd38a55 rbd46dbb 3 3 import it.finki.tinki.helper.Matchmaker; 4 4 import it.finki.tinki.model.EmbeddedMatchId; 5 import it.finki.tinki.model. Jobs.Internship;6 import it.finki.tinki.model. Jobs.Job;7 import it.finki.tinki.model. Jobs.Project;5 import it.finki.tinki.model.Work.Internship; 6 import it.finki.tinki.model.Work.Job; 7 import it.finki.tinki.model.Work.Project; 8 8 import it.finki.tinki.model.Match; 9 9 import it.finki.tinki.model.Skill; -
src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.service.impl; 2 2 3 import it.finki.tinki.model. Jobs.Internship;4 import it.finki.tinki.model. Jobs.Job;5 import it.finki.tinki.model. Jobs.Project;3 import it.finki.tinki.model.Work.Internship; 4 import it.finki.tinki.model.Work.Job; 5 import it.finki.tinki.model.Work.Project; 6 6 import it.finki.tinki.model.Skill; 7 7 import it.finki.tinki.model.Users.Account; -
src/main/java/it/finki/tinki/web/controller/AccountEditController.java
rbd38a55 rbd46dbb 2 2 3 3 import it.finki.tinki.model.Skill; 4 import it.finki.tinki.model.Users.Account;5 4 import it.finki.tinki.model.Users.Company; 6 5 import it.finki.tinki.model.Users.Team; 7 6 import it.finki.tinki.model.Users.User; 8 import it.finki.tinki.model.dto.*; 7 import it.finki.tinki.model.dto.register.account.CompanyRegisterDTO; 8 import it.finki.tinki.model.dto.register.account.TeamRegisterDTO; 9 import it.finki.tinki.model.dto.register.account.UserRegisterDTO; 10 import it.finki.tinki.model.dto.response.account.CompanyResponseDTO; 11 import it.finki.tinki.model.dto.response.account.TeamResponseDTO; 12 import it.finki.tinki.model.dto.response.account.UserResponseDTO; 9 13 import it.finki.tinki.model.enumerator.AccountType; 10 14 import it.finki.tinki.service.AccountService; 11 15 import it.finki.tinki.service.SkillService; 12 import org.springframework.web.bind.annotation.PathVariable; 13 import org.springframework.web.bind.annotation.RequestBody; 14 import org.springframework.web.bind.annotation.RequestMapping; 15 import org.springframework.web.bind.annotation.RestController; 16 import org.springframework.web.bind.annotation.*; 16 17 17 18 import java.util.List; … … 30 31 } 31 32 32 @ RequestMapping(path = "/user/{id}/{email}")33 @PostMapping(path = "/user/{id}/{email}") 33 34 public UserResponseDTO editUser(@PathVariable(name = "id") Long id, 34 35 @PathVariable(name = "email") String email, … … 48 49 userResponseDTO.setEmail(u.getEmail()); 49 50 userResponseDTO.setType(AccountType.USER); 51 userResponseDTO.setError(null); 50 52 userResponseDTO.setName(u.getName()); 51 53 userResponseDTO.setSurname(u.getSurname()); … … 59 61 } 60 62 61 @ RequestMapping(path = "/company/{id}/{email}")63 @PostMapping(path = "/company/{id}/{email}") 62 64 public CompanyResponseDTO editCompany(@PathVariable(name = "id") Long id, 63 65 @PathVariable(name = "email") String email, … … 73 75 companyResponseDTO.setId(c.getId()); 74 76 companyResponseDTO.setEmail(c.getEmail()); 77 companyResponseDTO.setError(null); 75 78 companyResponseDTO.setType(AccountType.COMPANY); 76 79 companyResponseDTO.setName(c.getName()); … … 83 86 } 84 87 85 @ RequestMapping(path = "/team/{id}/{email}")88 @PostMapping(path = "/team/{id}/{email}") 86 89 public TeamResponseDTO editTeam(@PathVariable(name = "id") Long id, 87 90 @PathVariable(name = "email") String email, … … 97 100 teamResponseDTO.setId(t.getId()); 98 101 teamResponseDTO.setEmail(t.getEmail()); 102 teamResponseDTO.setError(null); 99 103 teamResponseDTO.setType(AccountType.TEAM); 100 104 teamResponseDTO.setName(t.getName()); -
src/main/java/it/finki/tinki/web/controller/LoginController.java
rbd38a55 rbd46dbb 1 1 package it.finki.tinki.web.controller; 2 2 3 import it.finki.tinki.model. Jobs.Internship;4 import it.finki.tinki.model. Jobs.Job;5 import it.finki.tinki.model. Jobs.Project;3 import it.finki.tinki.model.Work.Internship; 4 import it.finki.tinki.model.Work.Job; 5 import it.finki.tinki.model.Work.Project; 6 6 import it.finki.tinki.model.Users.Account; 7 7 import it.finki.tinki.model.Users.Company; … … 9 9 import it.finki.tinki.model.Users.User; 10 10 import it.finki.tinki.model.dto.*; 11 import it.finki.tinki.model.dto.response.account.LoginResponseDTO; 12 import it.finki.tinki.model.dto.response.account.CompanyResponseDTO; 13 import it.finki.tinki.model.dto.response.account.TeamResponseDTO; 14 import it.finki.tinki.model.dto.response.account.UserResponseDTO; 15 import it.finki.tinki.model.dto.response.work.InternshipResponseDTO; 16 import it.finki.tinki.model.dto.response.work.JobResponseDTO; 17 import it.finki.tinki.model.dto.response.work.ProjectResponseDTO; 11 18 import it.finki.tinki.model.enumerator.AccountType; 12 19 import it.finki.tinki.service.AccountService; -
src/main/java/it/finki/tinki/web/controller/RegisterController.java
rbd38a55 rbd46dbb 3 3 import it.finki.tinki.model.Skill; 4 4 import it.finki.tinki.model.Users.Account; 5 import it.finki.tinki.model.dto. CompanyRegisterDTO;6 import it.finki.tinki.model.dto. TeamRegisterDTO;7 import it.finki.tinki.model.dto. UserRegisterDTO;5 import it.finki.tinki.model.dto.register.account.CompanyRegisterDTO; 6 import it.finki.tinki.model.dto.register.account.TeamRegisterDTO; 7 import it.finki.tinki.model.dto.register.account.UserRegisterDTO; 8 8 import it.finki.tinki.service.AccountService; 9 9 import it.finki.tinki.service.MatchmakerService;
Note:
See TracChangeset
for help on using the changeset viewer.