├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── src ├── main │ ├── java │ │ └── hrms │ │ │ └── humanResourcesManagementSystem │ │ │ ├── business │ │ │ ├── abstracts │ │ │ │ ├── EmailService.java │ │ │ │ ├── GenderService.java │ │ │ │ ├── UserValidationService.java │ │ │ │ ├── JobTypeService.java │ │ │ │ ├── JobStyleService.java │ │ │ │ ├── LanguageService.java │ │ │ │ ├── UserService.java │ │ │ │ ├── CityService.java │ │ │ │ ├── JobTitleService.java │ │ │ │ ├── SystemPersonnelConfirmService.java │ │ │ │ ├── VerificationCodeService.java │ │ │ │ ├── LanguageProficiencyService.java │ │ │ │ ├── EmployerService.java │ │ │ │ ├── SystemPersonnelService.java │ │ │ │ ├── EducationDegreeService.java │ │ │ │ ├── EducationSchoolService.java │ │ │ │ ├── JobSeekerService.java │ │ │ │ ├── JobSeekerCVSkillService.java │ │ │ │ ├── JobSeekerCVWebSiteService.java │ │ │ │ ├── SystemPersonnelConfirmOfEmployerService.java │ │ │ │ ├── EducationFacultyService.java │ │ │ │ ├── SystemPersonnelConfirmOfJobAdvertService.java │ │ │ │ ├── EducationStudyFieldService.java │ │ │ │ ├── JobSeekerCVImageService.java │ │ │ │ ├── JobSeekerCVService.java │ │ │ │ ├── AuthService.java │ │ │ │ ├── JobSeekerCVExperienceService.java │ │ │ │ ├── JobSeekerCVEducationService.java │ │ │ │ ├── JobSeekerCVLanguageService.java │ │ │ │ └── JobAdvertService.java │ │ │ ├── validationRules │ │ │ │ ├── JobSeekerValidator.java │ │ │ │ └── EmployerValidator.java │ │ │ ├── concretes │ │ │ │ ├── GenderManager.java │ │ │ │ ├── LanguageManager.java │ │ │ │ ├── LanguageProficiencyManager.java │ │ │ │ ├── JobTypeManager.java │ │ │ │ ├── JobStyleManager.java │ │ │ │ ├── SystemPersonnelConfirmManager.java │ │ │ │ ├── UserManager.java │ │ │ │ ├── CityManager.java │ │ │ │ ├── JobTitleManager.java │ │ │ │ ├── VerificationCodeManager.java │ │ │ │ ├── EducationSchoolManager.java │ │ │ │ ├── EducationDegreeManager.java │ │ │ │ ├── JobSeekerCVSkillManager.java │ │ │ │ ├── JobSeekerCVWebSiteManager.java │ │ │ │ ├── EducationFacultyManager.java │ │ │ │ ├── EducationStudyFieldManager.java │ │ │ │ ├── SystemPersonnelManager.java │ │ │ │ ├── SystemPersonnelConfirmOfEmployerManager.java │ │ │ │ ├── JobSeekerCVManager.java │ │ │ │ ├── SystemPersonnelConfirmOfJobAdvertManager.java │ │ │ │ ├── EmployerManager.java │ │ │ │ ├── JobSeekerCVLanguageManager.java │ │ │ │ ├── JobSeekerCVExperienceManager.java │ │ │ │ ├── JobSeekerCVEducationManager.java │ │ │ │ └── JobSeekerCVImageManager.java │ │ │ ├── configurations │ │ │ │ └── ProjectConfigurations.java │ │ │ └── loggers │ │ │ │ └── EmailLogger.java │ │ │ ├── core │ │ │ ├── utilities │ │ │ │ └── results │ │ │ │ │ ├── ErrorResult.java │ │ │ │ │ ├── SuccessResult.java │ │ │ │ │ ├── cloudOperations │ │ │ │ │ ├── CloudService.java │ │ │ │ │ └── CloudinaryManager.java │ │ │ │ │ ├── DataResult.java │ │ │ │ │ ├── ErrorDataResult.java │ │ │ │ │ ├── SuccessDataResult.java │ │ │ │ │ └── Result.java │ │ │ ├── RegexEmailChecker.java │ │ │ ├── RandomStringGenerator.java │ │ │ ├── adapters │ │ │ │ └── MernisServiceAdapter.java │ │ │ ├── entities │ │ │ │ └── User.java │ │ │ └── exceptionHandlers │ │ │ │ └── ExcptnHandler.java │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ ├── UserDao.java │ │ │ │ ├── CityDao.java │ │ │ │ ├── GenderDao.java │ │ │ │ ├── JobTypeDao.java │ │ │ │ ├── EmployerDao.java │ │ │ │ ├── JobStyleDao.java │ │ │ │ ├── JobTitleDao.java │ │ │ │ ├── LanguageDao.java │ │ │ │ ├── JobSeekerDao.java │ │ │ │ ├── EducationDegreeDao.java │ │ │ │ ├── JobSeekerCVImageDao.java │ │ │ │ ├── JobSeekerCVSkillDao.java │ │ │ │ ├── SystemPersonnelDao.java │ │ │ │ ├── EducationSchoolDao.java │ │ │ │ ├── JobSeekerCVWebSiteDao.java │ │ │ │ ├── LanguageProficiencyDao.java │ │ │ │ ├── SystemPersonnelConfirmDao.java │ │ │ │ ├── VerificationCodeDao.java │ │ │ │ ├── JobSeekerCVDao.java │ │ │ │ ├── EducationFacultyDao.java │ │ │ │ ├── EducationStudyFieldDao.java │ │ │ │ ├── JobSeekerCVExperienceDao.java │ │ │ │ ├── JobSeekerCVEducationDao.java │ │ │ │ ├── SystemPersonnelConfirmOfEmployerDao.java │ │ │ │ ├── SystemPersonnelConfirmOfJobAdvertDao.java │ │ │ │ ├── JobSeekerCVLanguageDao.java │ │ │ │ └── JobAdvertDao.java │ │ │ ├── entities │ │ │ ├── dtos │ │ │ │ ├── JobSeekerCVAddDto.java │ │ │ │ ├── JobSeekerCVLanguageGetDto.java │ │ │ │ ├── JobSeekerCVExperienceAddDto.java │ │ │ │ ├── JobAdvertGetDto.java │ │ │ │ ├── JobAdvertAddDto.java │ │ │ │ └── JobSeekerCVEducationAddDto.java │ │ │ └── concretes │ │ │ │ ├── SystemPersonnel.java │ │ │ │ ├── SystemPersonnelConfirmOfEmployer.java │ │ │ │ ├── JobType.java │ │ │ │ ├── Gender.java │ │ │ │ ├── JobStyle.java │ │ │ │ ├── Language.java │ │ │ │ ├── EducationDegree.java │ │ │ │ ├── SystemPersonnelConfirmOfJobAdvert.java │ │ │ │ ├── LanguageProficiency.java │ │ │ │ ├── EducationFaculty.java │ │ │ │ ├── EducationStudyField.java │ │ │ │ ├── JobSeeker.java │ │ │ │ ├── City.java │ │ │ │ ├── EducationSchool.java │ │ │ │ ├── JobSeekerCVLanguage.java │ │ │ │ ├── JobSeekerCVSkill.java │ │ │ │ ├── SystemPersonnelConfirm.java │ │ │ │ ├── VerificationCode.java │ │ │ │ ├── JobTitle.java │ │ │ │ ├── JobSeekerCVWebSite.java │ │ │ │ ├── JobSeekerCVImage.java │ │ │ │ ├── Employer.java │ │ │ │ ├── JobSeekerCVExperience.java │ │ │ │ ├── JobSeekerCV.java │ │ │ │ ├── JobAdvert.java │ │ │ │ └── JobSeekerCVEducation.java │ │ │ ├── consoleUI │ │ │ └── Main.java │ │ │ ├── HumanResourcesManagementSystemApplication.java │ │ │ └── api │ │ │ └── controllers │ │ │ ├── CitiesController.java │ │ │ ├── GendersController.java │ │ │ ├── JobTypesController.java │ │ │ ├── JobStylesController.java │ │ │ ├── LanguagesController.java │ │ │ ├── EducationDegreesController.java │ │ │ ├── EducationSchoolsController.java │ │ │ ├── LanguageProficienciesController.java │ │ │ ├── EmployersController.java │ │ │ ├── EducationFacultiesController.java │ │ │ ├── EducationStudyFieldsController.java │ │ │ ├── JobSeekerCVSkillsController.java │ │ │ ├── JobSeekerCVImageController.java │ │ │ ├── JobSeekersController.java │ │ │ ├── JobTitlesController.java │ │ │ ├── JobSeekerCVWebSitesController.java │ │ │ ├── SystemPersonnelsController.java │ │ │ ├── JobSeekerCVExperienceController.java │ │ │ ├── JobSeekerCVLanguagesController.java │ │ │ ├── JobSeekerCVController.java │ │ │ ├── JobSeekerCVEducationController.java │ │ │ └── AuthController.java │ └── resources │ │ ├── application.properties │ │ └── Mernis.wsdl └── test │ └── java │ └── hrms │ └── humanResourcesManagementSystem │ └── HumanResourcesManagementSystemApplicationTests.java └── .gitignore /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kenanatasoy/humanResourcesManagementSystem/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/EmailService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | public interface EmailService { 4 | void sendSimpleMessage(String from, String to, String subject, String text); 5 | void sendSimpleMessage(String to, String subject, String text); 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results; 2 | 3 | public class ErrorResult extends Result{ 4 | 5 | public ErrorResult() { 6 | super(true); 7 | } 8 | 9 | public ErrorResult(String message) { 10 | super(false, message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results; 2 | 3 | public class SuccessResult extends Result{ 4 | 5 | public SuccessResult() { 6 | super(true); 7 | } 8 | 9 | public SuccessResult(String message) { 10 | super(true, message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.core.entities.User; 6 | 7 | public interface UserDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/CityDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.City; 6 | 7 | public interface CityDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/GenderDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.Gender; 6 | 7 | public interface GenderDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobTypeDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobType; 6 | 7 | public interface JobTypeDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/EmployerDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 6 | 7 | public interface EmployerDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobStyleDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobStyle; 6 | 7 | public interface JobStyleDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobTitleDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobTitle; 6 | 7 | public interface JobTitleDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/LanguageDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.Language; 6 | 7 | public interface LanguageDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 6 | 7 | public interface JobSeekerDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/test/java/hrms/humanResourcesManagementSystem/HumanResourcesManagementSystemApplicationTests.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HumanResourcesManagementSystemApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/EducationDegreeDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationDegree; 6 | 7 | public interface EducationDegreeDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVImageDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVImage; 6 | 7 | public interface JobSeekerCVImageDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVSkillDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVSkill; 6 | 7 | public interface JobSeekerCVSkillDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/SystemPersonnelDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnel; 6 | 7 | public interface SystemPersonnelDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/cloudOperations/CloudService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results.cloudOperations; 2 | 3 | import org.springframework.web.multipart.MultipartFile; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | 7 | public interface CloudService { 8 | DataResult save(MultipartFile file); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/EducationSchoolDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationSchool; 6 | 7 | public interface EducationSchoolDao extends JpaRepository{ 8 | 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVWebSiteDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVWebSite; 6 | 7 | public interface JobSeekerCVWebSiteDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/LanguageProficiencyDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.LanguageProficiency; 6 | 7 | public interface LanguageProficiencyDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/SystemPersonnelConfirmDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirm; 6 | 7 | public interface SystemPersonnelConfirmDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/GenderService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.entities.concretes.Gender; 7 | 8 | public interface GenderService { 9 | 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/dtos/JobSeekerCVAddDto.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class JobSeekerCVAddDto { 11 | 12 | private Integer jobSeekerId; 13 | private String coverLetter; 14 | private Boolean active; 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/dtos/JobSeekerCVLanguageGetDto.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class JobSeekerCVLanguageGetDto { 11 | 12 | private Integer id; 13 | private String language; 14 | private String proficiency; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/VerificationCodeDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.VerificationCode; 6 | 7 | public interface VerificationCodeDao extends JpaRepository{ 8 | 9 | VerificationCode getByUserId(int userId); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/UserValidationService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.rmi.RemoteException; 4 | 5 | import hrms.humanResourcesManagementSystem.core.entities.User; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | 8 | 9 | public interface UserValidationService { 10 | 11 | Result validate(T t) throws RemoteException; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCV; 8 | 9 | public interface JobSeekerCVDao extends JpaRepository { 10 | 11 | List getByJobSeekerId(int jobSeekerId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/EducationFacultyDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationFaculty; 8 | 9 | public interface EducationFacultyDao extends JpaRepository{ 10 | 11 | List getByUniversityIdAndActiveTrue(int schoolId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/EducationStudyFieldDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationStudyField; 8 | 9 | public interface EducationStudyFieldDao extends JpaRepository{ 10 | 11 | List getByFacultyIdAndActiveTrue(int facultyId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/SystemPersonnel.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | 4 | import javax.persistence.Entity; 5 | import javax.persistence.Table; 6 | 7 | import hrms.humanResourcesManagementSystem.core.entities.User; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | 11 | 12 | @Data 13 | @EqualsAndHashCode(callSuper = false) 14 | @Entity 15 | @Table(name = "system_personnels") 16 | public class SystemPersonnel extends User{ 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results; 2 | 3 | public class DataResult extends Result { 4 | 5 | private T data; 6 | 7 | public DataResult(T data, boolean success, String message) { 8 | super(success, message); 9 | this.data = data; 10 | } 11 | 12 | public DataResult(T data, boolean success) { 13 | super(success); 14 | this.data = data; 15 | } 16 | 17 | public T getData() { 18 | return this.data; 19 | } 20 | 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVExperienceDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVExperience; 8 | 9 | public interface JobSeekerCVExperienceDao extends JpaRepository{ 10 | 11 | List findAllByJobSeekerCVIdOrderByEndingDateDesc(int jobSeekerCVId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobTypeService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | import java.util.List; 3 | 4 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 6 | import hrms.humanResourcesManagementSystem.entities.concretes.JobType; 7 | 8 | public interface JobTypeService { 9 | 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | Result add(JobType jobType); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results; 2 | 3 | public class ErrorDataResult extends DataResult { 4 | 5 | public ErrorDataResult(T data, String message) { 6 | super(data, false, message); 7 | } 8 | 9 | public ErrorDataResult(T data) { 10 | super(data, false); 11 | } 12 | 13 | public ErrorDataResult(String message) { 14 | super(null, false, message); 15 | } 16 | 17 | public ErrorDataResult() { 18 | super(null, false); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results; 2 | 3 | public class SuccessDataResult extends DataResult{ 4 | 5 | public SuccessDataResult(T data, String message) { 6 | super(data, true, message); 7 | } 8 | 9 | public SuccessDataResult(T data) { 10 | super(data, true); 11 | } 12 | 13 | public SuccessDataResult(String message) { 14 | super(null, true, message); 15 | } 16 | 17 | public SuccessDataResult() { 18 | super(null, true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVEducationDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVEducation; 8 | 9 | public interface JobSeekerCVEducationDao extends JpaRepository{ 10 | 11 | List findAllByJobSeekerCV_IdOrderByGraduationDateDesc(int jobSeekerCVId); 12 | 13 | } 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobStyleService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobStyle; 8 | 9 | public interface JobStyleService { 10 | 11 | DataResult> getAll(); 12 | DataResult get(int id); 13 | Result add(JobStyle jobStyle); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/consoleUI/Main.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.consoleUI; 2 | 3 | import java.time.LocalDate; 4 | 5 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 6 | 7 | 8 | public class Main { 9 | 10 | public static void main(String[] args) { 11 | 12 | 13 | JobSeeker jobSeeker = new JobSeeker(); 14 | jobSeeker.setNationalIdNo("29875715284"); 15 | jobSeeker.setFirstName("Kenan"); 16 | jobSeeker.setLastName("Atasoy"); 17 | jobSeeker.setBirthDate(LocalDate.of(1997, 07, 10)); 18 | 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results; 2 | 3 | public class Result { 4 | 5 | private boolean success; 6 | private String message; 7 | 8 | public Result(boolean success) { 9 | this.success = success; 10 | } 11 | 12 | public Result(boolean success, String message) { 13 | this(success); 14 | this.message = message; 15 | } 16 | 17 | public boolean isSuccess() { 18 | return success; 19 | } 20 | 21 | public String getMessage() { 22 | return message; 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/LanguageService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.entities.concretes.Language; 7 | 8 | public interface LanguageService { 9 | 10 | DataResult> getAll(); 11 | DataResult get(Integer id); 12 | // Result add(Language language); 13 | // Result update(Language language); 14 | // Result delete(Language language); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/SystemPersonnelConfirmOfEmployerDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.Optional; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirmOfEmployer; 8 | 9 | public interface SystemPersonnelConfirmOfEmployerDao extends JpaRepository { 10 | 11 | Optional findByEmployerId(int employerId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.entities.User; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 7 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 8 | 9 | public interface UserService { 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | Result add(User user); 13 | Result update(User user); 14 | Result delete(int userId); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/SystemPersonnelConfirmOfJobAdvertDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.Optional; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirmOfJobAdvert; 8 | 9 | public interface SystemPersonnelConfirmOfJobAdvertDao extends JpaRepository{ 10 | 11 | Optional findByJobAdvertId(int jobAdvertId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/CityService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.City; 8 | 9 | public interface CityService { 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | Result add(City city); 13 | Result update(City city); 14 | Result delete(City city); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/dtos/JobSeekerCVExperienceAddDto.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.dtos; 2 | 3 | import java.time.LocalDate; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class JobSeekerCVExperienceAddDto { 13 | 14 | private Integer jobSeekerCVId; 15 | private Integer jobTitleId; 16 | private Integer cityId; 17 | private String institutionName; 18 | private LocalDate startingDate; 19 | private LocalDate endingDate; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/RegexEmailChecker.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | public class RegexEmailChecker { 7 | public static boolean match(String email){ 8 | String regex = "^[a-zA-Z0-9_!#$%&'*?`~^.-]+@[a-zA-Z-]+.[a-zA-Z]+$"; 9 | Pattern pattern = Pattern.compile(regex); 10 | Matcher matcher = pattern.matcher(email); 11 | if(!matcher.matches()) { 12 | System.out.println(email + " email adresi, RegEx doğrulamasından geçemedi"); 13 | } 14 | return matcher.matches(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobTitleService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobTitle; 8 | 9 | public interface JobTitleService { 10 | 11 | DataResult> getAll(); 12 | DataResult get(Integer id); 13 | Result add(JobTitle jobTitle); 14 | // Result update(JobTitle jobTitle); 15 | // Result delete(JobTitle jobTitle); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/SystemPersonnelConfirmService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirm; 8 | 9 | public interface SystemPersonnelConfirmService { 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | Result add(SystemPersonnelConfirm systemPersonnelConfirm); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/VerificationCodeService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.VerificationCode; 8 | 9 | public interface VerificationCodeService { 10 | 11 | DataResult> getAll(); 12 | DataResult get(int id); 13 | DataResult getByUserId(int userId); 14 | Result add(VerificationCode verificationCode); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/LanguageProficiencyService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.entities.concretes.LanguageProficiency; 7 | 8 | public interface LanguageProficiencyService { 9 | DataResult> getAll(); 10 | DataResult get(Integer id); 11 | // Result add(LanguageProficiency languageProficiency); 12 | // Result update(LanguageProficiency languageProficiency); 13 | // Result delete(LanguageProficiency languageProficiency); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/EmployerService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.rmi.RemoteException; 4 | import java.util.List; 5 | 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 7 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 8 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 9 | 10 | public interface EmployerService { 11 | 12 | DataResult> getAll(); 13 | DataResult get(int id); 14 | Result add(Employer employer) throws RemoteException; 15 | Result update(Employer employer); 16 | Result delete(Employer employer); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/dtos/JobAdvertGetDto.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.dtos; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class JobAdvertGetDto { 13 | 14 | // Mapped with Jpql Query in JobAdvertDao 15 | private Integer id; 16 | private String companyName; 17 | private String title; 18 | private String city; 19 | private String jobDefinition; 20 | private Integer numberOfOpenPositions; 21 | private LocalDateTime publishedDateTime; 22 | private LocalDateTime deadLineForAppeal; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/SystemPersonnelService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnel; 8 | 9 | public interface SystemPersonnelService { 10 | 11 | DataResult> getAll(); 12 | DataResult get(int id); 13 | Result add(SystemPersonnel systemPersonnel); 14 | Result update(SystemPersonnel systemPersonnel); 15 | Result delete(int systemPersonnelId); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/EducationDegreeService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationDegree; 8 | 9 | public interface EducationDegreeService { 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | Result add (EducationDegree educationDegree); 13 | Result update(EducationDegree educationDegree); 14 | Result delete(EducationDegree educationDegree); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/EducationSchoolService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationSchool; 8 | 9 | public interface EducationSchoolService { 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | Result add (EducationSchool educationSchool); 13 | Result update(EducationSchool educationSchool); 14 | Result delete(EducationSchool educationSchool); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.rmi.RemoteException; 4 | import java.util.List; 5 | 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 7 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 8 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 9 | 10 | public interface JobSeekerService { 11 | 12 | DataResult> getAll(); 13 | DataResult get(int id); 14 | Result add (JobSeeker jobSeeker) throws RemoteException; 15 | Result update(JobSeeker jobSeeker); 16 | Result delete(JobSeeker jobSeeker); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVSkillService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVSkill; 8 | 9 | public interface JobSeekerCVSkillService { 10 | 11 | DataResult> getAll(); 12 | DataResult get(int id); 13 | Result add(JobSeekerCVSkill jobSeekerCVSkill); 14 | Result update(JobSeekerCVSkill jobSeekerCVSkill); 15 | Result delete(JobSeekerCVSkill jobSeekerCVSkill); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/SystemPersonnelConfirmOfEmployer.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Table; 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.NoArgsConstructor; 11 | 12 | @Data 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | @EqualsAndHashCode(callSuper = false) 16 | @Entity 17 | @Table(name = "system_personnel_confirms_of_employers") 18 | public class SystemPersonnelConfirmOfEmployer extends SystemPersonnelConfirm{ 19 | 20 | @Column(name = "employer_id") 21 | private Integer employerId; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVWebSiteService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVWebSite; 8 | 9 | public interface JobSeekerCVWebSiteService { 10 | DataResult> getAll(); 11 | DataResult get(Integer id); 12 | Result add(JobSeekerCVWebSite jobSeekerCVWebSite); 13 | Result update(JobSeekerCVWebSite jobSeekerCVWebSite); 14 | Result deleteById(Integer jobSeekerCVWebSiteId); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/dtos/JobAdvertAddDto.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.dtos; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class JobAdvertAddDto { 13 | 14 | // Mapped with Constructor 15 | private Integer cityId; 16 | private Integer jobTitleId; 17 | private Integer employerId; 18 | private Integer jobTypeId; 19 | private Integer jobStyleId; 20 | private String jobDefinition; 21 | private Integer minSalary; 22 | private Integer maxSalary; 23 | private Integer numberOfOpenPositions; 24 | private LocalDateTime deadLineForAppeal; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobType.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "job_types") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class JobType { 20 | 21 | @Id 22 | @Column(name="id") 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | private Integer id; 25 | 26 | @Column(name= "name") 27 | private String name; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/Gender.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "genders") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class Gender { 20 | 21 | @Id 22 | @Column(name="id") 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | private Integer id; 25 | 26 | @Column(name= "gender") 27 | private String gender; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobStyle.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "job_styles") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class JobStyle { 20 | 21 | @Id 22 | @Column(name="id") 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | private Integer id; 25 | 26 | @Column(name= "name") 27 | private String name; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/Language.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "languages") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class Language { 20 | 21 | @Id 22 | @Column(name = "id") 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | private Integer id; 25 | 26 | @Column(name = "language") 27 | private String language; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/SystemPersonnelConfirmOfEmployerService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirmOfEmployer; 8 | 9 | public interface SystemPersonnelConfirmOfEmployerService { 10 | DataResult> getAll(); 11 | DataResult get(int id); 12 | DataResult findByEmployerId(int employerId); 13 | Result add(SystemPersonnelConfirmOfEmployer systemPersonnelConfirmOfEmployer); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/EducationFacultyService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationFaculty; 8 | 9 | public interface EducationFacultyService { 10 | DataResult> getAll(); 11 | DataResult> getAllByUniversityIdAndActiveTrue(int schoolId); 12 | DataResult get(int id); 13 | Result add (EducationFaculty educationFaculty); 14 | Result update(EducationFaculty educationFaculty); 15 | Result delete(EducationFaculty educationFaculty); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/EducationDegree.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "education_degrees") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class EducationDegree { 20 | 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | @Column(name = "id") 24 | private Integer id; 25 | 26 | @Column(name = "name") 27 | private String name; 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/SystemPersonnelConfirmOfJobAdvertService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirmOfJobAdvert; 8 | 9 | public interface SystemPersonnelConfirmOfJobAdvertService { 10 | 11 | DataResult> getAll(); 12 | DataResult get(int id); 13 | DataResult findByJobAdvertId(int jobAdvertId); 14 | Result add(SystemPersonnelConfirmOfJobAdvert systemPersonnelConfirmOfJobAdvert); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/dtos/JobSeekerCVEducationAddDto.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.dtos; 2 | 3 | import java.time.LocalDate; 4 | 5 | import com.fasterxml.jackson.annotation.JsonFormat; 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | public class JobSeekerCVEducationAddDto { 15 | 16 | private Integer degreeId; 17 | private Integer schoolId; 18 | private Integer facultyId; 19 | private Integer studyFieldId; 20 | @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") 21 | private LocalDate startingDate; 22 | @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") 23 | private LocalDate graduationDate; 24 | private Integer jobSeekerCVId; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect 2 | spring.jpa.hibernate.ddl-auto=validate 3 | spring.jpa.hibernate.show-sql=true 4 | spring.datasource.url=jdbc:postgresql://localhost:5432/Hrms2 5 | spring.datasource.username=postgres 6 | spring.datasource.password=0123456789 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | 9 | 10 | spring.mail.host=smtp.gmail.com 11 | spring.mail.port=587 12 | spring.mail.username=kenatasl@gmail.com 13 | spring.mail.password=mxcitvzhzfqmxjzd 14 | spring.mail.properties.mail.smtp.auth=true 15 | spring.mail.properties.mail.smtp.starttls.enable=true 16 | 17 | 18 | cld.access-key=448283534751646 19 | cld.secret-key=xlYagox9LyZ5OC4d_ftqkFnwOfA 20 | spring.servlet.multipart.max-file-size=50MB 21 | spring.servlet.multipart.max-request-size=50MB 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/SystemPersonnelConfirmOfJobAdvert.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Table; 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.NoArgsConstructor; 11 | 12 | @Data 13 | @EqualsAndHashCode(callSuper = false) 14 | @Table(name = "system_personnel_confirms_of_job_adverts") 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Entity 18 | public class SystemPersonnelConfirmOfJobAdvert extends SystemPersonnelConfirm { 19 | 20 | @Column(name = "job_advert_id") 21 | private Integer jobAdvertId; 22 | 23 | // @OneToOne() 24 | // @JoinColumn(name = "job_advert_id") 25 | // private JobAdvert jobAdvert; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/EducationStudyFieldService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationStudyField; 8 | 9 | public interface EducationStudyFieldService { 10 | 11 | DataResult> getAll(); 12 | DataResult> getByFacultyIdAndActiveTrue(int facultyId); 13 | DataResult get(int id); 14 | Result add (EducationStudyField educationStudyField); 15 | Result update(EducationStudyField educationStudyField); 16 | Result delete(EducationStudyField educationStudyField); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVImageService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 8 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 9 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVImage; 10 | 11 | public interface JobSeekerCVImageService { 12 | 13 | DataResult> getAll(); 14 | DataResult get(int id); 15 | // Result add(JobSeekerCVImage jobSeekerCVImage); 16 | Result saveImage(MultipartFile file, int jobSeekerCVImageId); 17 | Result update(JobSeekerCVImage jobSeekerCVImage); 18 | Result delete(JobSeekerCVImage jobSeekerCVImage); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCV; 8 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVAddDto; 9 | 10 | public interface JobSeekerCVService { 11 | 12 | DataResult> getAll(); 13 | DataResult> getByJobSeekerId(int jobSeekerId); 14 | DataResult get(int id); 15 | Result add(JobSeekerCVAddDto jobSeekerCVAddDto); 16 | Result add(JobSeekerCV jobSeekerCV); 17 | Result update(JobSeekerCV jobSeekerCV); 18 | Result delete(JobSeekerCV jobSeekerCV); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/LanguageProficiency.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.EqualsAndHashCode; 13 | import lombok.NoArgsConstructor; 14 | 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @EqualsAndHashCode(callSuper = false) 19 | @Entity 20 | @Table(name = "language_proficiencies") 21 | public class LanguageProficiency { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name = "id") 26 | Integer id; 27 | 28 | @Column(name = "proficiency") 29 | String proficiency; 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/AuthService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.rmi.RemoteException; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 6 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 8 | 9 | public interface AuthService { 10 | 11 | Result registerJobSeeker(JobSeeker jobSeeker) throws RemoteException; 12 | Result registerEmployer(Employer employer) throws RemoteException; 13 | Result login(String email, String password); 14 | Result verifyJobSeeker(String userVCode, int jobSeekerId); 15 | Result verifyEmployer(String userVCode, int employerId); 16 | Result systemPersonnelConfirmOfEmployer(int systemPersonnelId, int employerId); 17 | Result systemPersonnelConfirmOfJobAdvert(int systemPersonnelId, int jobAdvertId); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/EducationFaculty.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Entity 18 | @Table(name = "education_faculties") 19 | public class EducationFaculty { 20 | 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | @Column(name = "id") 24 | private Integer id; 25 | 26 | @Column(name = "name") 27 | private String name; 28 | 29 | @Column(name = "university_id") 30 | private Integer universityId; 31 | 32 | @Column(name = "is_active") 33 | private Boolean active; 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVExperienceService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVExperience; 8 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVExperienceAddDto; 9 | 10 | public interface JobSeekerCVExperienceService { 11 | 12 | DataResult> getAll(); 13 | DataResult> getAllByJobSeekerCVIdOrderByEndingDateDesc(int jobSeekerCVId); 14 | DataResult get(int id); 15 | Result add(JobSeekerCVExperienceAddDto jobSeekerCVExperienceAddDto); 16 | Result update(JobSeekerCVExperience jobSeekerCVExperience); 17 | Result delete(JobSeekerCVExperience jobSeekerCVExperience); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVEducationService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVEducation; 8 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVEducationAddDto; 9 | 10 | public interface JobSeekerCVEducationService { 11 | 12 | DataResult> getAll(); 13 | DataResult> getAllByJobSeekerCVIdOrderByGraduationDateDesc(int jobSeekerCVId); 14 | DataResult get(int id); 15 | Result add(JobSeekerCVEducationAddDto jobSeekerCVEducationAddDto); 16 | Result add(JobSeekerCVEducation jobSeekerCVEducation); 17 | Result update(JobSeekerCVEducation jobSeekerCVEducation); 18 | Result delete(JobSeekerCVEducation jobSeekerCVEducation); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobSeekerCVLanguageService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVLanguage; 8 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVLanguageGetDto; 9 | 10 | public interface JobSeekerCVLanguageService { 11 | 12 | // DataResult> getAll(); 13 | // DataResult get(Integer id); 14 | DataResult> getJobSeekerCVLanguagesGetDtos(); 15 | DataResult getJobSeekerCVLanguagesGetDtoById(Integer jobSeekerCVLanguageId); 16 | Result add(JobSeekerCVLanguage jobSeekerCVLanguage); 17 | Result update(JobSeekerCVLanguage jobSeekerCVLanguage); 18 | Result deleteById(Integer jobSeekerCVLanguageId); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/EducationStudyField.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "education_study_fields") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class EducationStudyField { 20 | 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | @Column(name = "id") 24 | private Integer id; 25 | 26 | @Column(name = "name") 27 | private String name; 28 | 29 | @Column(name = "university_id") 30 | private Integer universityId; 31 | 32 | @Column(name = "faculty_id") 33 | private Integer facultyId; 34 | 35 | @Column(name = "is_active") 36 | private Boolean active; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/validationRules/JobSeekerValidator.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.validationRules; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import hrms.humanResourcesManagementSystem.business.abstracts.UserValidationService; 6 | import hrms.humanResourcesManagementSystem.core.RegexEmailChecker; 7 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorResult; 8 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 10 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 11 | 12 | @Component("JobSeekerV") 13 | public class JobSeekerValidator implements UserValidationService { 14 | 15 | 16 | @Override 17 | public Result validate(JobSeeker jobSeeker) { 18 | 19 | if (!RegexEmailChecker.match(jobSeeker.getEmailAddress())) { 20 | return new ErrorResult("E-posta, e-posta formatında olmalıdır."); 21 | } 22 | 23 | return new SuccessResult(); 24 | 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/GenderManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.GenderService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 11 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.GenderDao; 12 | import hrms.humanResourcesManagementSystem.entities.concretes.Gender; 13 | 14 | @Service 15 | public class GenderManager implements GenderService{ 16 | 17 | @Autowired 18 | private GenderDao genderDao; 19 | 20 | @Override 21 | public DataResult> getAll() { 22 | return new SuccessDataResult>(this.genderDao.findAll()); 23 | } 24 | 25 | @Override 26 | public DataResult get(int id) { 27 | return new SuccessDataResult(this.genderDao.getOne(id)); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeeker.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.Table; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | 11 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 12 | 13 | import hrms.humanResourcesManagementSystem.core.entities.User; 14 | import lombok.Data; 15 | import lombok.EqualsAndHashCode; 16 | 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Entity 20 | @Table(name = "job_seekers") 21 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","jobSeekerCVs"}) 22 | public class JobSeeker extends User{ 23 | 24 | @NotNull 25 | @NotBlank 26 | @Column(name = "national_id_no", unique = true) 27 | private String nationalIdNo; 28 | 29 | @NotNull 30 | @Column(name = "birth_date") 31 | private LocalDate birthDate; 32 | 33 | // @OneToMany(mappedBy = "jobSeeker") 34 | // private List jobSeekerCVs; 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/LanguageManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.LanguageService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 11 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.LanguageDao; 12 | import hrms.humanResourcesManagementSystem.entities.concretes.Language; 13 | 14 | @Service 15 | public class LanguageManager implements LanguageService{ 16 | 17 | @Autowired 18 | private LanguageDao languageDao; 19 | 20 | @Override 21 | public DataResult> getAll() { 22 | return new SuccessDataResult>(this.languageDao.findAll()); 23 | } 24 | 25 | @Override 26 | public DataResult get(Integer id) { 27 | return new SuccessDataResult(this.languageDao.getOne(id)); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/HumanResourcesManagementSystemApplication.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | @SpringBootApplication 13 | @EnableSwagger2 14 | public class HumanResourcesManagementSystemApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(HumanResourcesManagementSystemApplication.class, args); 18 | } 19 | 20 | @Bean 21 | public Docket api() { 22 | return new Docket(DocumentationType.SWAGGER_2) 23 | .select() 24 | .apis(RequestHandlerSelectors.basePackage("hrms.humanResourcesManagementSystem")) 25 | .build(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/City.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Table(name = "cities") 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | @Entity 24 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","jobAdverts"}) 25 | public class City { 26 | 27 | @Id 28 | @Column(name = "id") 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | private Integer id; 31 | 32 | @Column(name = "name") 33 | private String name; 34 | 35 | @OneToMany(mappedBy = "city") 36 | private List jobAdverts; 37 | 38 | // @OneToMany(mappedBy = "educationSchool") 39 | // private List educationSchools; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/RandomStringGenerator.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core; 2 | 3 | public class RandomStringGenerator { 4 | 5 | 6 | // function to generate a random string of length n 7 | public static String getRandomAlphaNumericString() 8 | { 9 | 10 | // chose a Character random from this String 11 | String AlphaNumericString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 12 | + "0123456789" 13 | + "abcdefghijklmnopqrstuvxyz"; 14 | 15 | // create StringBuffer size of AlphaNumericString 16 | StringBuilder sb = new StringBuilder(10); 17 | 18 | for (int i = 0; i < 10; i++) { 19 | 20 | // generate a random number between 21 | // 0 to AlphaNumericString variable length 22 | int index 23 | = (int)(AlphaNumericString.length() 24 | * Math.random()); 25 | 26 | // add Character one by one in end of sb 27 | sb.append(AlphaNumericString 28 | .charAt(index)); 29 | } 30 | 31 | 32 | return sb.toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/EducationSchool.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.ManyToOne; 10 | import javax.persistence.Table; 11 | 12 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 13 | 14 | import lombok.AllArgsConstructor; 15 | import lombok.Data; 16 | import lombok.NoArgsConstructor; 17 | 18 | @Data 19 | @Table(name = "education_schools") 20 | @AllArgsConstructor 21 | @NoArgsConstructor 22 | @Entity 23 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","educationFaculties"}) 24 | public class EducationSchool { 25 | 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | @Column(name = "id") 29 | private Integer id; 30 | 31 | // @Column(name = "city_id") 32 | // private int cityId; 33 | 34 | @Column(name = "name") 35 | private String name; 36 | 37 | @Column(name = "is_active") 38 | private Boolean active; 39 | 40 | @ManyToOne() 41 | @JoinColumn(name = "city_id") 42 | private City city; 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCVLanguage.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.Table; 11 | 12 | import lombok.AllArgsConstructor; 13 | import lombok.Data; 14 | import lombok.NoArgsConstructor; 15 | 16 | @Data 17 | @Table(name = "job_seeker_cv_langugages") 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @Entity 21 | public class JobSeekerCVLanguage { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name = "id") 26 | private Integer id; 27 | 28 | @Column(name = "job_seeker_CV_id") 29 | private Integer jobSeekerCVId; 30 | 31 | @Column(name = "language_id") 32 | private Integer languageId; 33 | 34 | @Column(name = "proficiency_id") 35 | private Integer proficiencyId; 36 | 37 | @Column(name = "added_date_time") 38 | private LocalDateTime addedDateTime = LocalDateTime.now(); 39 | 40 | // @JsonIgnore 41 | // @ManyToOne 42 | // @JoinColumn(name = "job_seeker_cv_id") 43 | // private JobSeekerCV jobSeekerCV; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/LanguageProficiencyManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.LanguageProficiencyService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 11 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.LanguageProficiencyDao; 12 | import hrms.humanResourcesManagementSystem.entities.concretes.LanguageProficiency; 13 | 14 | @Service 15 | public class LanguageProficiencyManager implements LanguageProficiencyService { 16 | 17 | @Autowired 18 | private LanguageProficiencyDao languageProficiencyDao; 19 | 20 | @Override 21 | public DataResult> getAll() { 22 | return new SuccessDataResult>(this.languageProficiencyDao.findAll()); 23 | } 24 | 25 | @Override 26 | public DataResult get(Integer id) { 27 | return new SuccessDataResult(this.languageProficiencyDao.getOne(id)); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/abstracts/JobAdvertService.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 6 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 7 | import hrms.humanResourcesManagementSystem.entities.concretes.JobAdvert; 8 | import hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertAddDto; 9 | import hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertGetDto; 10 | 11 | public interface JobAdvertService { 12 | 13 | DataResult> getConfirmedJobAdvertDtosByActiveTrue(); 14 | DataResult> getConfirmedJobAdvertDtosByPublishedDateTimeAndActiveTrue(); 15 | DataResult> getConfirmedJobAdvertDtosByEmployerIdAndActiveTrue(int employerId); 16 | DataResult getConfirmedJobAdvertDtoByIdAndActiveTrue(int jobAdvertId); 17 | DataResult> getAll(); 18 | DataResult get(int id); 19 | Result add (JobAdvertAddDto jobAdvertAddDto); 20 | Result add (JobAdvert jobAdvert); 21 | Result update(JobAdvert jobAdvert); 22 | Result delete(JobAdvert jobAdvert); 23 | Result toggleJobAdActivePassive(Integer jobAdvertId, boolean isActivated); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobTypeManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobTypeService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobTypeDao; 13 | import hrms.humanResourcesManagementSystem.entities.concretes.JobType; 14 | 15 | @Service 16 | public class JobTypeManager implements JobTypeService { 17 | 18 | @Autowired 19 | private JobTypeDao jobTypeDao; 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | return new SuccessDataResult>(this.jobTypeDao.findAll()); 24 | } 25 | 26 | @Override 27 | public DataResult get(int id) { 28 | return new SuccessDataResult(this.jobTypeDao.getOne(id)); 29 | } 30 | 31 | @Override 32 | public Result add(JobType jobType) { 33 | // TODO Auto-generated method stub 34 | return null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/configurations/ProjectConfigurations.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.configurations; 2 | 3 | import org.modelmapper.ModelMapper; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import com.cloudinary.Cloudinary; 9 | import com.cloudinary.utils.ObjectUtils; 10 | 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.cloudOperations.CloudService; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.cloudOperations.CloudinaryManager; 13 | 14 | @Configuration 15 | public class ProjectConfigurations { 16 | 17 | @Value("${cld.access-key}") 18 | String apiAccessKey; 19 | @Value("${cld.secret-key}") 20 | String apiSecretKey; 21 | 22 | @Bean 23 | public Cloudinary cloudinaryUser() { 24 | return new Cloudinary(ObjectUtils.asMap( 25 | "cloud_name", "da9ahn6im", 26 | "api_key", apiAccessKey, 27 | "api_secret", apiSecretKey 28 | )); 29 | } 30 | 31 | @Bean 32 | public CloudService cloudService() { 33 | return new CloudinaryManager(cloudinaryUser()); 34 | } 35 | 36 | @Bean 37 | public ModelMapper modelMapper() { 38 | return new ModelMapper(); 39 | } 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCVSkill.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Table(name = "job_seeker_cv_skills") 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @Entity 25 | public class JobSeekerCVSkill { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private Integer id; 31 | 32 | // @Column(name = "job_seeker_CV_id") 33 | // private int jobSeekerCVid; 34 | 35 | @Column(name = "name") 36 | private String name; 37 | 38 | @Column(name = "added_date_time") 39 | private LocalDateTime addedDateTime; 40 | 41 | @JsonIgnoreProperties("jobSeekerCVSkills") 42 | @ManyToOne() 43 | @JoinColumn(name = "job_seeker_cv_id") 44 | private JobSeekerCV jobSeekerCV; 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/SystemPersonnelConfirm.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.Inheritance; 11 | import javax.persistence.InheritanceType; 12 | import javax.persistence.Table; 13 | 14 | import com.sun.istack.Nullable; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.EqualsAndHashCode; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @EqualsAndHashCode(callSuper = false) 25 | @Entity 26 | @Table(name = "system_personnel_confirms") 27 | @Inheritance(strategy = InheritanceType.JOINED) 28 | public class SystemPersonnelConfirm { 29 | 30 | @Id 31 | @GeneratedValue(strategy = GenerationType.IDENTITY) 32 | @Column(name = "id") 33 | private Integer id; 34 | 35 | @Nullable 36 | @Column(name = "system_personnel_id") 37 | private Integer systemPersonnelId; 38 | 39 | @Column(name = "did_confirm") 40 | private Boolean didConfirm; 41 | 42 | @Column(name = "confirm_date_time") 43 | private LocalDateTime confirmDateTime; 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobStyleManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobStyleService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobStyleDao; 13 | import hrms.humanResourcesManagementSystem.entities.concretes.JobStyle; 14 | 15 | @Service 16 | public class JobStyleManager implements JobStyleService { 17 | 18 | @Autowired 19 | private JobStyleDao jobStyleDao; 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | return new SuccessDataResult>(this.jobStyleDao.findAll()); 24 | } 25 | 26 | @Override 27 | public DataResult get(int id) { 28 | return new SuccessDataResult(this.jobStyleDao.getOne(id)); 29 | } 30 | 31 | @Override 32 | public Result add(JobStyle jobStyle) { 33 | // TODO Auto-generated method stub 34 | return null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/loggers/EmailLogger.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.loggers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.mail.SimpleMailMessage; 5 | import org.springframework.mail.javamail.JavaMailSender; 6 | import org.springframework.stereotype.Component; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.EmailService; 9 | 10 | @Component("EmailSender") 11 | public class EmailLogger implements EmailService{ 12 | 13 | @Autowired 14 | private JavaMailSender emailSender; 15 | 16 | @Override 17 | public void sendSimpleMessage(String from, String to, String subject, String text) { 18 | 19 | 20 | // TODO: Java'da fonksiyon parametrelerine nasıl default değerler verilebileceği araştırılacak, henüz araştırılmadı. 21 | 22 | SimpleMailMessage message = new SimpleMailMessage(); 23 | message.setFrom(from); 24 | message.setTo(to); 25 | message.setSubject(subject); 26 | message.setText(text); 27 | emailSender.send(message); 28 | 29 | } 30 | 31 | @Override 32 | public void sendSimpleMessage(String to, String subject, String text) { 33 | 34 | 35 | SimpleMailMessage message = new SimpleMailMessage(); 36 | message.setTo(to); 37 | message.setSubject(subject); 38 | message.setText(text); 39 | emailSender.send(message); 40 | 41 | } 42 | 43 | 44 | } -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/utilities/results/cloudOperations/CloudinaryManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.utilities.results.cloudOperations; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.web.multipart.MultipartFile; 9 | 10 | import com.cloudinary.Cloudinary; 11 | import com.cloudinary.utils.ObjectUtils; 12 | 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorDataResult; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 16 | 17 | @Service 18 | public class CloudinaryManager implements CloudService{ 19 | 20 | private Cloudinary cloudinary; 21 | 22 | @Autowired 23 | public CloudinaryManager(Cloudinary cloudinary) { 24 | super(); 25 | this.cloudinary = cloudinary; 26 | } 27 | 28 | 29 | @Override 30 | public DataResult save(MultipartFile file) { 31 | 32 | try { 33 | Map cloudinaryUploader = cloudinary.uploader().upload(file.getBytes(), 34 | ObjectUtils.emptyMap()); 35 | return new SuccessDataResult(cloudinaryUploader); 36 | } 37 | 38 | catch (IOException e) { 39 | e.printStackTrace(); 40 | } 41 | return new ErrorDataResult(); 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/VerificationCode.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.Table; 11 | 12 | import lombok.AllArgsConstructor; 13 | import lombok.Data; 14 | import lombok.EqualsAndHashCode; 15 | import lombok.NoArgsConstructor; 16 | 17 | @Data 18 | @EqualsAndHashCode(callSuper = false) 19 | @Entity 20 | @Table(name = "verification_codes") 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | public class VerificationCode { 24 | 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | @Column(name = "id") 28 | private Integer id; 29 | 30 | @Column(name = "code", unique = true) 31 | private String code; 32 | 33 | @Column(name = "is_verified") 34 | private Boolean isVerified = false; 35 | 36 | @Column(name = "user_id") 37 | private Integer userId; 38 | 39 | @Column(name = "created_date_time") 40 | private LocalDateTime createdDateTime = LocalDateTime.now(); 41 | 42 | @Column(name = "confirm_date_time") 43 | private LocalDateTime confirmDateTime; 44 | 45 | @Column(name = "expiration_date_time") 46 | private LocalDateTime expirationDateTime = LocalDateTime.now().plusHours(24); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobTitle.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.PrePersist; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotBlank; 14 | 15 | import com.fasterxml.jackson.annotation.JsonIgnore; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.EqualsAndHashCode; 20 | import lombok.NoArgsConstructor; 21 | 22 | @Data 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | @EqualsAndHashCode(callSuper = false) 26 | @Entity 27 | @Table(name = "job_titles") 28 | //@JsonIgnoreProperties({"hibernateLazyInitializer","handler","jobAdverts"}) 29 | public class JobTitle { 30 | 31 | @Id 32 | @GeneratedValue(strategy = GenerationType.IDENTITY) 33 | @Column(name = "id") 34 | private Integer id; 35 | 36 | @NotBlank 37 | @Column(name = "title", unique = true) 38 | private String title; 39 | 40 | @PrePersist 41 | void trimTitle() { 42 | title = title.trim(); 43 | } 44 | 45 | //@JsonIgnoreProperties({"jobType", "jobStyle", "jobTitle"}) => TODO: İşe yaramıyor 46 | @JsonIgnore 47 | @OneToMany(mappedBy = "jobTitle") 48 | private List jobAdverts; 49 | 50 | 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCVWebSite.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Table(name = "job_seeker_cv_web_sites") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Entity 19 | public class JobSeekerCVWebSite { 20 | 21 | @Id 22 | @Column(name = "id") 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | private Integer id; 25 | 26 | @Column(name = "job_seeker_cv_id") 27 | private Integer jobSeekerCVId; 28 | 29 | @Column(name = "github_address") 30 | private String githubAddress; 31 | 32 | @Column(name = "linkedin_address") 33 | private String linkedInAddress; 34 | 35 | @Column(name = "hackerrank_address") 36 | private String hackerRankAddress; 37 | 38 | @Column(name = "leetcode_address") 39 | private String leetCodeAddress; 40 | 41 | @Column(name = "coderbyte_address") 42 | private String coderByteAddress; 43 | 44 | @Column(name = "codility_address") 45 | private String codilityAddress; 46 | 47 | @Column(name = "algoexpert_address") 48 | private String algoExpertAddress; 49 | 50 | @Column(name = "personal_web_site") 51 | private String personalWebSite; 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/SystemPersonnelConfirmManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.SystemPersonnelConfirmService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 12 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.SystemPersonnelConfirmDao; 13 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirm; 14 | 15 | @Service 16 | public class SystemPersonnelConfirmManager implements SystemPersonnelConfirmService{ 17 | 18 | @Autowired 19 | private SystemPersonnelConfirmDao systemPersonnelConfirmDao; 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | // TODO Auto-generated method stub 24 | return null; 25 | } 26 | 27 | @Override 28 | public DataResult get(int id) { 29 | // TODO Auto-generated method stub 30 | return null; 31 | } 32 | 33 | @Override 34 | public Result add(SystemPersonnelConfirm systemPersonnelConfirm) { 35 | this.systemPersonnelConfirmDao.saveAndFlush(systemPersonnelConfirm); 36 | return new SuccessResult(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobSeekerCVLanguageDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVLanguage; 9 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVLanguageGetDto; 10 | 11 | public interface JobSeekerCVLanguageDao extends JpaRepository { 12 | @Query("select new hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVLanguageGetDto" 13 | + "(jSCVL.id, l.language, lP.proficiency)" 14 | + " from JobSeekerCVLanguage jSCVL" 15 | + " inner join Language l on l.id=jSCVL.languageId" 16 | + " inner join LanguageProficiency lP on lP.id=jSCVL.proficiencyId") 17 | List getJobSeekerCVLanguagesGetDtos(); 18 | 19 | @Query("select new hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVLanguageGetDto" 20 | + "(jSCVL.id, l.language, lP.proficiency)" 21 | + " from JobSeekerCVLanguage jSCVL" 22 | + " inner join Language l on l.id=jSCVL.languageId" 23 | + " inner join LanguageProficiency lP on lP.id=jSCVL.proficiencyId" 24 | + " where jSCVL.id=:jobSeekerCVLanguageId") 25 | JobSeekerCVLanguageGetDto getJobSeekerCVLanguagesGetDtoById(Integer jobSeekerCVLanguageId); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.UserService; 9 | import hrms.humanResourcesManagementSystem.core.entities.User; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.UserDao; 14 | 15 | @Service 16 | public class UserManager implements UserService{ 17 | 18 | @Autowired 19 | private UserDao userDao; 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | return new SuccessDataResult>(this.userDao.findAll()); 24 | } 25 | 26 | @Override 27 | public DataResult get(int id) { 28 | return new SuccessDataResult(this.userDao.getOne(id)); 29 | } 30 | 31 | @Override 32 | public Result add(User user) { 33 | // TODO Auto-generated method stub 34 | return null; 35 | } 36 | 37 | @Override 38 | public Result update(User user) { 39 | // TODO Auto-generated method stub 40 | return null; 41 | } 42 | 43 | @Override 44 | public Result delete(int userId) { 45 | // TODO Auto-generated method stub 46 | return null; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/CityManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.CityService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.CityDao; 13 | import hrms.humanResourcesManagementSystem.entities.concretes.City; 14 | 15 | @Service 16 | public class CityManager implements CityService { 17 | 18 | @Autowired 19 | private CityDao cityDao; 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | return new SuccessDataResult>(this.cityDao.findAll()); 24 | } 25 | 26 | @Override 27 | public DataResult get(int id) { 28 | return new SuccessDataResult(this.cityDao.getOne(id)); 29 | } 30 | 31 | @Override 32 | public Result add(City city) { 33 | // TODO Auto-generated method stub 34 | return null; 35 | } 36 | 37 | @Override 38 | public Result update(City city) { 39 | // TODO Auto-generated method stub 40 | return null; 41 | } 42 | 43 | @Override 44 | public Result delete(City city) { 45 | // TODO Auto-generated method stub 46 | return null; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCVImage.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.util.Date; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.Table; 11 | import javax.persistence.Temporal; 12 | import javax.persistence.TemporalType; 13 | 14 | import org.hibernate.annotations.CreationTimestamp; 15 | import org.hibernate.annotations.UpdateTimestamp; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @Table(name = "job_seeker_cv_images") 25 | @Entity 26 | public class JobSeekerCVImage { 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private Integer id; 32 | 33 | // @Column(name = "job_seeker_CV_id") 34 | // private int jobSeekerCVId; 35 | 36 | @Column(name = "image_url") 37 | private String imageUrl; 38 | 39 | @CreationTimestamp 40 | @Temporal(TemporalType.TIMESTAMP) 41 | @Column(name = "added_date_time", updatable = false) 42 | private Date createdDateTime; 43 | 44 | @UpdateTimestamp 45 | @Temporal(TemporalType.TIMESTAMP) 46 | @Column(name = "last_updated_date_time", insertable = false) 47 | private Date lastUpdatedDateTime; 48 | 49 | // @OneToOne() 50 | // @JoinColumn(name = "job_seeker_CV_id", referencedColumnName = "id") 51 | // private JobSeekerCV jobSeekerCV; 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/CitiesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.CityService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.City; 15 | 16 | @RestController 17 | @RequestMapping("/api/cities/") 18 | @CrossOrigin 19 | public class CitiesController { 20 | 21 | @Autowired 22 | private CityService cityService; 23 | 24 | @GetMapping("getall") 25 | public ResponseEntity getAll(){ 26 | 27 | DataResult> dataResult = this.cityService.getAll(); 28 | 29 | if (dataResult.isSuccess()) { 30 | return ResponseEntity.ok(dataResult); 31 | } 32 | else { 33 | return ResponseEntity.badRequest().body(dataResult); 34 | } 35 | } 36 | 37 | @GetMapping("getbyid") 38 | public ResponseEntity get(Integer id) { 39 | 40 | DataResult dataResult = this.cityService.get(id); 41 | 42 | if (dataResult.isSuccess()) { 43 | return ResponseEntity.ok(dataResult); 44 | } 45 | else { 46 | return ResponseEntity.badRequest().body(dataResult); 47 | } 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/GendersController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.GenderService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.Gender; 15 | 16 | @RestController 17 | @RequestMapping("/api/genders/") 18 | @CrossOrigin 19 | public class GendersController { 20 | 21 | @Autowired 22 | private GenderService genderService; 23 | 24 | @GetMapping("getall") 25 | public ResponseEntity getAll(){ 26 | 27 | DataResult> dataResult = this.genderService.getAll(); 28 | 29 | if (dataResult.isSuccess()) { 30 | return ResponseEntity.ok(dataResult); 31 | } 32 | else { 33 | return ResponseEntity.badRequest().body(dataResult); 34 | } 35 | } 36 | 37 | @GetMapping("getbyid") 38 | public ResponseEntity get(Integer id) { 39 | 40 | DataResult dataResult = this.genderService.get(id); 41 | 42 | if (dataResult.isSuccess()) { 43 | return ResponseEntity.ok(dataResult); 44 | } 45 | else { 46 | return ResponseEntity.badRequest().body(dataResult); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobTypesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.JobTypeService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobType; 15 | 16 | @RestController 17 | @RequestMapping("/api/jobtypes/") 18 | @CrossOrigin 19 | public class JobTypesController { 20 | 21 | @Autowired 22 | private JobTypeService jobTypeService; 23 | 24 | @GetMapping("getall") 25 | public ResponseEntity getAll(){ 26 | 27 | DataResult> dataResult = this.jobTypeService.getAll(); 28 | 29 | if (dataResult.isSuccess()) { 30 | return ResponseEntity.ok(dataResult); 31 | } 32 | else { 33 | return ResponseEntity.badRequest().body(dataResult); 34 | } 35 | } 36 | 37 | @GetMapping("getbyid") 38 | public ResponseEntity get(Integer id) { 39 | 40 | DataResult dataResult = this.jobTypeService.get(id); 41 | 42 | if (dataResult.isSuccess()) { 43 | return ResponseEntity.ok(dataResult); 44 | } 45 | else { 46 | return ResponseEntity.badRequest().body(dataResult); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobStylesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.JobStyleService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobStyle; 15 | 16 | @RestController 17 | @RequestMapping("/api/jobstyles/") 18 | @CrossOrigin 19 | public class JobStylesController { 20 | 21 | @Autowired 22 | private JobStyleService jobStyleService; 23 | 24 | @GetMapping("getall") 25 | public ResponseEntity getAll(){ 26 | 27 | DataResult> dataResult = this.jobStyleService.getAll(); 28 | 29 | if (dataResult.isSuccess()) { 30 | return ResponseEntity.ok(dataResult); 31 | } 32 | else { 33 | return ResponseEntity.badRequest().body(dataResult); 34 | } 35 | } 36 | 37 | @GetMapping("getbyid") 38 | public ResponseEntity get(Integer id) { 39 | 40 | DataResult dataResult = this.jobStyleService.get(id); 41 | 42 | if (dataResult.isSuccess()) { 43 | return ResponseEntity.ok(dataResult); 44 | } 45 | else { 46 | return ResponseEntity.badRequest().body(dataResult); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/LanguagesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.LanguageService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.Language; 15 | 16 | @RestController 17 | @RequestMapping("/api/languages/") 18 | @CrossOrigin 19 | public class LanguagesController { 20 | 21 | @Autowired 22 | private LanguageService languageService; 23 | 24 | @GetMapping("getall") 25 | public ResponseEntity getAll(){ 26 | 27 | DataResult> dataResult = this.languageService.getAll(); 28 | 29 | if (dataResult.isSuccess()) { 30 | return ResponseEntity.ok(dataResult); 31 | } 32 | else { 33 | return ResponseEntity.badRequest().body(dataResult); 34 | } 35 | } 36 | 37 | @GetMapping("getbyid") 38 | public ResponseEntity get(Integer id) { 39 | 40 | DataResult dataResult = this.languageService.get(id); 41 | 42 | if (dataResult.isSuccess()) { 43 | return ResponseEntity.ok(dataResult); 44 | } 45 | else { 46 | return ResponseEntity.badRequest().body(dataResult); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/Employer.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.OneToMany; 5 | 6 | import java.util.List; 7 | 8 | import javax.persistence.Column; 9 | import javax.persistence.Table; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnore; 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import hrms.humanResourcesManagementSystem.core.entities.User; 17 | import lombok.Data; 18 | import lombok.EqualsAndHashCode; 19 | 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | @Entity 23 | @Table(name = "employers") 24 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","jobAdverts"}) 25 | public class Employer extends User { 26 | 27 | @NotNull 28 | @NotBlank 29 | @Column(name = "company_name") 30 | private String companyName; 31 | 32 | // TODO: Anostasyonlar ile custom validation konusunu öğrenince işverenin web sitesi ile 33 | // aynı domain'e sahip e-posta girmesi koşulunu yazıcağız 34 | 35 | @NotNull 36 | @NotBlank 37 | // @Pattern(regexp = "(www)?\\.?[a-zA-Z0-9]+\\.?[a-zA-Z]{2,}") 38 | @Column(name = "company_web_site") 39 | private String webSite; 40 | 41 | @NotNull 42 | @NotBlank 43 | // @Pattern(regexp = "^(\\d{3}[- .]?){2}\\d{4}$", message = "Telefon numarasını lütfen doğru giriniz.(Ör:--** )") 44 | @Column(name = "phone_number") 45 | private String phoneNumber; 46 | 47 | @JsonIgnore 48 | @OneToMany(mappedBy = "employer") 49 | private List jobAdverts; 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobTitleManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobTitleService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobTitleDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobTitle; 15 | 16 | @Service 17 | public class JobTitleManager implements JobTitleService { 18 | 19 | 20 | @Autowired 21 | private JobTitleDao jobTitleDao; 22 | 23 | 24 | @Override 25 | public DataResult> getAll() { 26 | return new SuccessDataResult>(this.jobTitleDao.findAll()); 27 | } 28 | 29 | @Override 30 | public DataResult get(Integer id) { 31 | return new SuccessDataResult(this.jobTitleDao.getOne(id)); 32 | } 33 | 34 | @Override 35 | public Result add(JobTitle jobTitle) { 36 | this.jobTitleDao.saveAndFlush(jobTitle); 37 | return new SuccessResult(); 38 | } 39 | 40 | // @Override 41 | // public Result update(JobTitle jobTitle) { 42 | // return new SuccessResult(); 43 | // } 44 | // 45 | // @Override 46 | // public Result delete(JobTitle jobTitle) { 47 | // return new SuccessResult(); 48 | // } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/EducationDegreesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationDegreeService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationDegree; 15 | 16 | @RestController 17 | @RequestMapping("/api/educationdegrees/") 18 | @CrossOrigin 19 | public class EducationDegreesController { 20 | 21 | @Autowired 22 | private EducationDegreeService educationDegreeService; 23 | 24 | 25 | @GetMapping("getall") 26 | public ResponseEntity getAll(){ 27 | 28 | DataResult> dataResult = this.educationDegreeService.getAll(); 29 | 30 | if (dataResult.isSuccess()) { 31 | return ResponseEntity.ok(dataResult); 32 | } 33 | else { 34 | return ResponseEntity.badRequest().body(dataResult); 35 | } 36 | } 37 | 38 | @GetMapping("getbyid") 39 | public ResponseEntity get(Integer id) { 40 | 41 | DataResult dataResult = this.educationDegreeService.get(id); 42 | 43 | if (dataResult.isSuccess()) { 44 | return ResponseEntity.ok(dataResult); 45 | } 46 | else { 47 | return ResponseEntity.badRequest().body(dataResult); 48 | } 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/EducationSchoolsController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationSchoolService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationSchool; 15 | 16 | @RestController 17 | @RequestMapping("/api/educationschools/") 18 | @CrossOrigin 19 | public class EducationSchoolsController { 20 | 21 | @Autowired 22 | private EducationSchoolService educationSchoolService; 23 | 24 | 25 | @GetMapping("getall") 26 | public ResponseEntity getAll(){ 27 | 28 | DataResult> dataResult = this.educationSchoolService.getAll(); 29 | 30 | if (dataResult.isSuccess()) { 31 | return ResponseEntity.ok(dataResult); 32 | } 33 | else { 34 | return ResponseEntity.badRequest().body(dataResult); 35 | } 36 | } 37 | 38 | @GetMapping("getbyid") 39 | public ResponseEntity get(Integer id) { 40 | 41 | DataResult dataResult = this.educationSchoolService.get(id); 42 | 43 | if (dataResult.isSuccess()) { 44 | return ResponseEntity.ok(dataResult); 45 | } 46 | else { 47 | return ResponseEntity.badRequest().body(dataResult); 48 | } 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/adapters/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.adapters; 2 | 3 | import java.net.MalformedURLException; 4 | import java.net.URI; 5 | import java.net.URL; 6 | 7 | import org.springframework.stereotype.Component; 8 | 9 | import hrms.humanResourcesManagementSystem.business.abstracts.UserValidationService; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorResult; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 12 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 13 | import tr.gov.nvi.tckimlik.ws.KPSPublic; 14 | import tr.gov.nvi.tckimlik.ws.KPSPublicSoap; 15 | 16 | 17 | @Component("MernisV") 18 | public class MernisServiceAdapter implements UserValidationService{ 19 | 20 | @Override 21 | public Result validate(JobSeeker jobSeeker) { 22 | 23 | 24 | String endpoint = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 25 | 26 | URL url = null; 27 | 28 | try { 29 | url = URI.create(endpoint).toURL(); 30 | } catch (MalformedURLException e) { 31 | return new ErrorResult(); 32 | } 33 | 34 | KPSPublic service = new KPSPublic(url); 35 | KPSPublicSoap port = service.getPort(KPSPublicSoap.class); 36 | 37 | 38 | /* 39 | * String stringSayi = "53532423"; 40 | * long sayi1 = Long.valueOf(stringSayi); 41 | * long sayi2 = Long.parseLong(stringSayi); 42 | */ 43 | 44 | 45 | long nationalIdNoL = Long.parseLong(jobSeeker.getNationalIdNo()); 46 | 47 | 48 | 49 | return new Result(port.tcKimlikNoDogrula(nationalIdNoL, jobSeeker.getFirstName().toUpperCase(), 50 | jobSeeker.getLastName().toUpperCase(), jobSeeker.getBirthDate().getYear())); 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/LanguageProficienciesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.LanguageProficiencyService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.LanguageProficiency; 15 | 16 | @RestController 17 | @RequestMapping("/api/languageproficiencies/") 18 | @CrossOrigin 19 | public class LanguageProficienciesController { 20 | 21 | @Autowired 22 | private LanguageProficiencyService languageProficiencyService; 23 | 24 | @GetMapping("getall") 25 | public ResponseEntity getAll(){ 26 | 27 | DataResult> dataResult = this.languageProficiencyService.getAll(); 28 | 29 | if (dataResult.isSuccess()) { 30 | return ResponseEntity.ok(dataResult); 31 | } 32 | else { 33 | return ResponseEntity.badRequest().body(dataResult); 34 | } 35 | } 36 | 37 | @GetMapping("getbyid") 38 | public ResponseEntity get(Integer id) { 39 | 40 | DataResult dataResult = this.languageProficiencyService.get(id); 41 | 42 | if (dataResult.isSuccess()) { 43 | return ResponseEntity.ok(dataResult); 44 | } 45 | else { 46 | return ResponseEntity.badRequest().body(dataResult); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/validationRules/EmployerValidator.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.validationRules; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import hrms.humanResourcesManagementSystem.business.abstracts.UserValidationService; 6 | import hrms.humanResourcesManagementSystem.core.RegexEmailChecker; 7 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorResult; 8 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 10 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 11 | 12 | @Component("EmployerV") 13 | public class EmployerValidator implements UserValidationService { 14 | 15 | @Override 16 | public Result validate(Employer employer) { 17 | 18 | 19 | if (!RegexEmailChecker.match(employer.getEmailAddress())) { 20 | return new ErrorResult("E-posta, e-posta formatında olmalıdır."); 21 | } 22 | 23 | 24 | String[] splitStringArr1 = employer.getEmailAddress().split("@"); 25 | String[] splitStringArr2 = employer.getWebSite().split("\\."); 26 | 27 | // TODO: Buralar iş koduna çevrilecek 28 | 29 | if( !splitStringArr1[1].equals(splitStringArr2[1] + "." + splitStringArr2[2]) ) { 30 | return new ErrorResult("E-posta domain'i ile web sitesi domain'i aynı olmalıdır."); 31 | } 32 | 33 | 34 | System.out.println(splitStringArr1[0] + " " + splitStringArr1[1]); 35 | 36 | System.out.println(splitStringArr2[0] + " " + splitStringArr2[1] + " " + splitStringArr2[2]); 37 | 38 | System.out.println(String.format("%s %s", splitStringArr1[0], splitStringArr1[1])); 39 | 40 | return new SuccessResult(); 41 | 42 | } 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/VerificationCodeManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.VerificationCodeService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.VerificationCodeDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.VerificationCode; 15 | 16 | @Service 17 | public class VerificationCodeManager implements VerificationCodeService{ 18 | 19 | @Autowired 20 | private VerificationCodeDao verificationDao; 21 | 22 | 23 | @Override 24 | public Result add(VerificationCode verificationCode) { 25 | this.verificationDao.saveAndFlush(verificationCode); 26 | return new SuccessResult(); 27 | } 28 | 29 | @Override 30 | public DataResult get(int id) { 31 | return new SuccessDataResult(this.verificationDao.getOne(id)); 32 | } 33 | 34 | @Override 35 | public DataResult getByUserId(int userId){ 36 | return new SuccessDataResult(this.verificationDao.getByUserId(userId)); 37 | } 38 | 39 | @Override 40 | public DataResult> getAll() { 41 | return new SuccessDataResult>(this.verificationDao.findAll()); 42 | } 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/entities/User.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.entities; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Inheritance; 9 | import javax.persistence.InheritanceType; 10 | import javax.persistence.Table; 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.NotNull; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnore; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | @Entity 24 | @Table(name = "users") 25 | @Inheritance(strategy = InheritanceType.JOINED) 26 | public class User { 27 | 28 | @JsonIgnore 29 | @Id 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | @Column(name = "id") 32 | private Integer id; 33 | 34 | @NotNull 35 | @NotBlank 36 | @Column(name = "first_name") 37 | private String firstName; 38 | 39 | @NotNull 40 | @NotBlank 41 | @Column(name = "last_name") 42 | private String lastName; 43 | 44 | @Column(name = "gender_id") 45 | private Integer genderId; 46 | 47 | @NotNull 48 | @NotBlank 49 | // @Email 50 | @Column(name = "email_address", unique = true) 51 | private String emailAddress; 52 | 53 | // TODO: Anostasyonlar ile custom validation konusunu öğrenince işverenin web sitesi ile 54 | // aynı domain'e sahip e-posta girmesi koşulunu yazıcağız, ve e-posta formatını doğrulamayı geliştiriceğiz, düzelticeğiz 55 | 56 | @NotNull 57 | @NotBlank 58 | @Column(name = "password") 59 | private String password; 60 | 61 | // TODO: Şifre tekrarı mevzusu back-end'te nasıl hâlledilir 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/EducationSchoolManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationSchoolService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.EducationSchoolDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationSchool; 15 | 16 | @Service 17 | public class EducationSchoolManager implements EducationSchoolService{ 18 | 19 | @Autowired 20 | private EducationSchoolDao educationSchoolDao; 21 | 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.educationSchoolDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult get(int id) { 30 | return new SuccessDataResult(this.educationSchoolDao.getOne(id)); 31 | } 32 | 33 | @Override 34 | public Result add(EducationSchool educationSchool) { 35 | this.educationSchoolDao.saveAndFlush(educationSchool); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public Result update(EducationSchool educationSchool) { 41 | // TODO Auto-generated method stub 42 | return null; 43 | } 44 | 45 | @Override 46 | public Result delete(EducationSchool educationSchool) { 47 | // TODO Auto-generated method stub 48 | return null; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/EducationDegreeManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationDegreeService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.EducationDegreeDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationDegree; 15 | 16 | @Service 17 | public class EducationDegreeManager implements EducationDegreeService{ 18 | 19 | @Autowired 20 | private EducationDegreeDao educationDegreeDao; 21 | 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.educationDegreeDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult get(int id) { 30 | return new SuccessDataResult(this.educationDegreeDao.getOne(id)); 31 | } 32 | 33 | @Override 34 | public Result add(EducationDegree educationDegree) { 35 | this.educationDegreeDao.saveAndFlush(educationDegree); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public Result update(EducationDegree educationDegree) { 41 | // TODO Auto-generated method stub 42 | return null; 43 | } 44 | 45 | @Override 46 | public Result delete(EducationDegree educationDegree) { 47 | // TODO Auto-generated method stub 48 | return null; 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVSkillManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVSkillService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVSkillDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVSkill; 15 | 16 | @Service 17 | public class JobSeekerCVSkillManager implements JobSeekerCVSkillService { 18 | 19 | @Autowired 20 | private JobSeekerCVSkillDao jobSeekerCVSkillDao; 21 | 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.jobSeekerCVSkillDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult get(int id) { 30 | return new SuccessDataResult(this.jobSeekerCVSkillDao.getOne(id)); 31 | } 32 | 33 | @Override 34 | public Result add(JobSeekerCVSkill jobSeekerCVSkill) { 35 | this.jobSeekerCVSkillDao.saveAndFlush(jobSeekerCVSkill); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public Result update(JobSeekerCVSkill jobSeekerCVSkill) { 41 | // TODO Auto-generated method stub 42 | return null; 43 | } 44 | 45 | @Override 46 | public Result delete(JobSeekerCVSkill jobSeekerCVSkill) { 47 | // TODO Auto-generated method stub 48 | return null; 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVWebSiteManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVWebSiteService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVWebSiteDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVWebSite; 15 | 16 | @Service 17 | public class JobSeekerCVWebSiteManager implements JobSeekerCVWebSiteService{ 18 | 19 | @Autowired 20 | private JobSeekerCVWebSiteDao jobSeekerCVWebSiteDao; 21 | 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.jobSeekerCVWebSiteDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult get(Integer id) { 30 | return new SuccessDataResult(this.jobSeekerCVWebSiteDao.getOne(id)); 31 | } 32 | 33 | @Override 34 | public Result add(JobSeekerCVWebSite jobSeekerCVWebSite) { 35 | this.jobSeekerCVWebSiteDao.saveAndFlush(jobSeekerCVWebSite); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public Result update(JobSeekerCVWebSite jobSeekerCVWebSite) { 41 | // TODO Auto-generated method stub 42 | return null; 43 | } 44 | 45 | @Override 46 | public Result deleteById(Integer jobSeekerCVWebSiteId) { 47 | this.jobSeekerCVWebSiteDao.deleteById(jobSeekerCVWebSiteId); 48 | return new SuccessResult(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/EmployersController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.EmployerService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 15 | 16 | @RestController 17 | @RequestMapping("/api/employers/") 18 | @CrossOrigin 19 | public class EmployersController { 20 | 21 | @Autowired 22 | private EmployerService employerService; 23 | 24 | 25 | @GetMapping("getall") 26 | public ResponseEntity getAll(){ 27 | 28 | DataResult> dataResult = this.employerService.getAll(); 29 | 30 | if (dataResult.isSuccess()) { 31 | return ResponseEntity.ok(dataResult); 32 | } 33 | else { 34 | return ResponseEntity.badRequest().body(dataResult); 35 | } 36 | } 37 | 38 | @GetMapping("getbyid") 39 | public ResponseEntity get(Integer id) { 40 | 41 | DataResult dataResult = this.employerService.get(id); 42 | 43 | if (dataResult.isSuccess()) { 44 | return ResponseEntity.ok(dataResult); 45 | } 46 | else { 47 | return ResponseEntity.badRequest().body(dataResult); 48 | } 49 | 50 | } 51 | 52 | // @PostMapping("add") 53 | // public ResponseEntity add(@RequestBody Employer employer){ 54 | // 55 | // Result result = this.employerService.add(jobSeeker); 56 | // 57 | // if (result.isSuccess()) { 58 | // return ResponseEntity.ok(result); 59 | // } 60 | // else { 61 | // return ResponseEntity.badRequest().body(result); 62 | // } 63 | // 64 | // } 65 | 66 | 67 | 68 | 69 | } 70 | 71 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/EducationFacultyManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationFacultyService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.EducationFacultyDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationFaculty; 15 | 16 | @Service 17 | public class EducationFacultyManager implements EducationFacultyService { 18 | 19 | @Autowired 20 | private EducationFacultyDao educationFacultyDao; 21 | 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.educationFacultyDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult> getAllByUniversityIdAndActiveTrue(int schoolId){ 30 | return new SuccessDataResult>(this.educationFacultyDao 31 | .getByUniversityIdAndActiveTrue(schoolId)); 32 | } 33 | 34 | @Override 35 | public DataResult get(int id) { 36 | return new SuccessDataResult(this.educationFacultyDao.getOne(id)); 37 | } 38 | 39 | @Override 40 | public Result add(EducationFaculty educationFaculty) { 41 | this.educationFacultyDao.saveAndFlush(educationFaculty); 42 | return new SuccessResult(); 43 | } 44 | 45 | @Override 46 | public Result update(EducationFaculty educationFaculty) { 47 | // TODO Auto-generated method stub 48 | return null; 49 | } 50 | 51 | @Override 52 | public Result delete(EducationFaculty educationFaculty) { 53 | // TODO Auto-generated method stub 54 | return null; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/EducationFacultiesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationFacultyService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationFaculty; 15 | 16 | @RestController 17 | @RequestMapping("/api/educationfaculties/") 18 | @CrossOrigin 19 | public class EducationFacultiesController { 20 | 21 | @Autowired 22 | private EducationFacultyService educationFacultyService; 23 | 24 | 25 | @GetMapping("getall") 26 | public ResponseEntity getAll(){ 27 | 28 | DataResult> dataResult = this.educationFacultyService.getAll(); 29 | 30 | if (dataResult.isSuccess()) { 31 | return ResponseEntity.ok(dataResult); 32 | } 33 | else { 34 | return ResponseEntity.badRequest().body(dataResult); 35 | } 36 | } 37 | 38 | @GetMapping("getAllByUniversityIdAndActiveTrue") 39 | public ResponseEntity getAllByUniversityIdAndActiveTrue(int schoolId){ 40 | 41 | DataResult> dataResult = this.educationFacultyService 42 | .getAllByUniversityIdAndActiveTrue(schoolId); 43 | 44 | if (dataResult.isSuccess()) { 45 | return ResponseEntity.ok(dataResult); 46 | } 47 | else { 48 | return ResponseEntity.badRequest().body(dataResult); 49 | } 50 | } 51 | 52 | @GetMapping("getbyid") 53 | public ResponseEntity get(Integer id) { 54 | 55 | DataResult dataResult = this.educationFacultyService.get(id); 56 | 57 | if (dataResult.isSuccess()) { 58 | return ResponseEntity.ok(dataResult); 59 | } 60 | else { 61 | return ResponseEntity.badRequest().body(dataResult); 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/EducationStudyFieldManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationStudyFieldService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.EducationStudyFieldDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationStudyField; 15 | 16 | @Service 17 | public class EducationStudyFieldManager implements EducationStudyFieldService{ 18 | 19 | @Autowired 20 | private EducationStudyFieldDao educationStudyFieldDao; 21 | 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.educationStudyFieldDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult> getByFacultyIdAndActiveTrue(int facultyId){ 30 | return new SuccessDataResult>(this.educationStudyFieldDao 31 | .getByFacultyIdAndActiveTrue(facultyId)); 32 | } 33 | 34 | @Override 35 | public DataResult get(int id) { 36 | return new SuccessDataResult(this.educationStudyFieldDao.getOne(id)); 37 | } 38 | 39 | @Override 40 | public Result add(EducationStudyField educationStudyField) { 41 | this.educationStudyFieldDao.saveAndFlush(educationStudyField); 42 | return new SuccessResult(); 43 | } 44 | 45 | @Override 46 | public Result update(EducationStudyField educationStudyField) { 47 | // TODO Auto-generated method stub 48 | return null; 49 | } 50 | 51 | @Override 52 | public Result delete(EducationStudyField educationStudyField) { 53 | // TODO Auto-generated method stub 54 | return null; 55 | } 56 | 57 | 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/SystemPersonnelManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.EmailService; 9 | import hrms.humanResourcesManagementSystem.business.abstracts.SystemPersonnelService; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 14 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.SystemPersonnelDao; 15 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnel; 16 | 17 | @Service 18 | public class SystemPersonnelManager implements SystemPersonnelService { 19 | 20 | 21 | @Autowired 22 | private SystemPersonnelDao systemPersonnelDao; 23 | 24 | @Autowired 25 | private EmailService emailLogger; 26 | 27 | 28 | @Override 29 | public DataResult> getAll() { 30 | return new SuccessDataResult>(this.systemPersonnelDao.findAll()); 31 | } 32 | 33 | @Override 34 | public DataResult get(int id) { 35 | return new SuccessDataResult(this.systemPersonnelDao.getOne(id)); 36 | } 37 | 38 | @Override 39 | public Result add(SystemPersonnel systemPersonnel) { 40 | this.systemPersonnelDao.saveAndFlush(systemPersonnel); 41 | this.emailLogger.sendSimpleMessage(systemPersonnel.getEmailAddress(), 42 | "System Personnel Registration Notice", 43 | "Sistem personeli olarak sisteme başarılı bir şekilde kaydoldunuz."); 44 | return new SuccessResult(); 45 | } 46 | 47 | @Override 48 | public Result update(SystemPersonnel systemPersonnel) { 49 | return new SuccessResult(); 50 | } 51 | 52 | @Override 53 | public Result delete(int systemPersonnelId) { 54 | this.systemPersonnelDao.deleteById(systemPersonnelId); 55 | return new SuccessResult(); 56 | } 57 | 58 | 59 | 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/EducationStudyFieldsController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.EducationStudyFieldService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.EducationStudyField; 15 | 16 | @RestController 17 | @RequestMapping("/api/educationstudyfields/") 18 | @CrossOrigin 19 | public class EducationStudyFieldsController { 20 | 21 | @Autowired 22 | private EducationStudyFieldService educationStudyFieldService; 23 | 24 | 25 | @GetMapping("getall") 26 | public ResponseEntity getAll(){ 27 | 28 | DataResult> dataResult = this.educationStudyFieldService.getAll(); 29 | 30 | if (dataResult.isSuccess()) { 31 | return ResponseEntity.ok(dataResult); 32 | } 33 | else { 34 | return ResponseEntity.badRequest().body(dataResult); 35 | } 36 | 37 | } 38 | 39 | @GetMapping("getByFacultyIdAndActiveTrue") 40 | public ResponseEntity getByFacultyIdAndActiveTrue(Integer facultyId) { 41 | 42 | DataResult> dataResult = this.educationStudyFieldService 43 | .getByFacultyIdAndActiveTrue(facultyId); 44 | 45 | if (dataResult.isSuccess()) { 46 | return ResponseEntity.ok(dataResult); 47 | } 48 | else { 49 | return ResponseEntity.badRequest().body(dataResult); 50 | } 51 | 52 | } 53 | 54 | @GetMapping("getbyid") 55 | public ResponseEntity get(Integer id) { 56 | 57 | DataResult dataResult = this.educationStudyFieldService.get(id); 58 | 59 | if (dataResult.isSuccess()) { 60 | return ResponseEntity.ok(dataResult); 61 | } 62 | else { 63 | return ResponseEntity.badRequest().body(dataResult); 64 | } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVSkillsController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVSkillService; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 17 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVSkill; 18 | 19 | @RestController 20 | @RequestMapping("/api/jobseekercvskills/") 21 | @CrossOrigin 22 | public class JobSeekerCVSkillsController { 23 | 24 | @Autowired 25 | private JobSeekerCVSkillService jobSeekerCVSkillService; 26 | 27 | 28 | @GetMapping("getall") 29 | public ResponseEntity getAll(){ 30 | 31 | DataResult> dataResult = this.jobSeekerCVSkillService.getAll(); 32 | 33 | if (dataResult.isSuccess()) { 34 | return ResponseEntity.ok(dataResult); 35 | } 36 | else { 37 | return ResponseEntity.badRequest().body(dataResult); 38 | } 39 | } 40 | 41 | @GetMapping("getbyid") 42 | public ResponseEntity get(Integer id) { 43 | 44 | DataResult dataResult = this.jobSeekerCVSkillService.get(id); 45 | 46 | if (dataResult.isSuccess()) { 47 | return ResponseEntity.ok(dataResult); 48 | } 49 | else { 50 | return ResponseEntity.badRequest().body(dataResult); 51 | } 52 | 53 | } 54 | 55 | @PostMapping("add") 56 | public ResponseEntity add(@RequestBody JobSeekerCVSkill jobSeekerCVSkill){ 57 | 58 | Result result = this.jobSeekerCVSkillService.add(jobSeekerCVSkill); 59 | 60 | if (result.isSuccess()) { 61 | return ResponseEntity.ok(result); 62 | } 63 | else { 64 | return ResponseEntity.badRequest().body(result); 65 | } 66 | 67 | } 68 | 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/SystemPersonnelConfirmOfEmployerManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.SystemPersonnelConfirmOfEmployerService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorDataResult; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 14 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.SystemPersonnelConfirmOfEmployerDao; 15 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirmOfEmployer; 16 | 17 | @Service 18 | public class SystemPersonnelConfirmOfEmployerManager implements SystemPersonnelConfirmOfEmployerService { 19 | 20 | @Autowired 21 | private SystemPersonnelConfirmOfEmployerDao systemPersonnelConfirmOfEmployerDao; 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | // TODO Auto-generated method stub 26 | return null; 27 | } 28 | 29 | @Override 30 | public DataResult get(int id) { 31 | // TODO Auto-generated method stub 32 | return null; 33 | } 34 | 35 | @Override 36 | public DataResult findByEmployerId(int employerId) { 37 | SystemPersonnelConfirmOfEmployer systemPersonnelConfirmOfEmployer = 38 | this.systemPersonnelConfirmOfEmployerDao.findByEmployerId(employerId).orElse(null); 39 | if (systemPersonnelConfirmOfEmployer == null) { 40 | return new ErrorDataResult(); 41 | } 42 | 43 | return new SuccessDataResult(systemPersonnelConfirmOfEmployer); 44 | } 45 | 46 | @Override 47 | public Result add(SystemPersonnelConfirmOfEmployer systemPersonnelConfirmOfEmployer) { 48 | this.systemPersonnelConfirmOfEmployerDao.saveAndFlush(systemPersonnelConfirmOfEmployer); 49 | return new SuccessResult(); 50 | } 51 | 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCV; 15 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVAddDto; 16 | 17 | @Service 18 | public class JobSeekerCVManager implements JobSeekerCVService { 19 | 20 | @Autowired 21 | private JobSeekerCVDao jobSeekerCVDao; 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.jobSeekerCVDao.findAll()); 26 | } 27 | 28 | @Override 29 | public DataResult> getByJobSeekerId(int jobSeekerId){ 30 | return new SuccessDataResult>(this.jobSeekerCVDao.getByJobSeekerId(jobSeekerId)); 31 | } 32 | 33 | @Override 34 | public DataResult get(int id) { 35 | return new SuccessDataResult(this.jobSeekerCVDao.findById(id).orElse(null)); 36 | } 37 | 38 | @Override 39 | public Result add(JobSeekerCVAddDto jobSeekerCVAddDto) { 40 | JobSeekerCV jobSeekerCV = new JobSeekerCV(jobSeekerCVAddDto.getJobSeekerId(), 41 | jobSeekerCVAddDto.getCoverLetter(), jobSeekerCVAddDto.getActive()); 42 | 43 | this.jobSeekerCVDao.save(jobSeekerCV); 44 | return new SuccessResult(); 45 | } 46 | 47 | @Override 48 | public Result add(JobSeekerCV jobSeekerCV) { 49 | this.jobSeekerCVDao.save(jobSeekerCV); 50 | return new SuccessResult(); 51 | } 52 | 53 | @Override 54 | public Result update(JobSeekerCV jobSeekerCV) { 55 | // TODO Auto-generated method stub 56 | return null; 57 | } 58 | 59 | @Override 60 | public Result delete(JobSeekerCV jobSeekerCV) { 61 | // TODO Auto-generated method stub 62 | return null; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVImageController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.CrossOrigin; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | import org.springframework.web.multipart.MultipartFile; 12 | 13 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVImageService; 14 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 16 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVImage; 17 | 18 | @RestController 19 | @RequestMapping("/api/jobseekercvimages/") 20 | @CrossOrigin 21 | public class JobSeekerCVImageController { 22 | 23 | @Autowired 24 | private JobSeekerCVImageService jobSeekerCVImageService; 25 | 26 | 27 | // @GetMapping("getallimages") 28 | // public ResponseEntity getAll(){ 29 | // 30 | // DataResult> dataResult = this.jobSeekerCVImageService.getAll(); 31 | // 32 | // if (dataResult.isSuccess()) { 33 | // return ResponseEntity.ok(dataResult); 34 | // } 35 | // else { 36 | // return ResponseEntity.badRequest().body(dataResult); 37 | // } 38 | // 39 | // } 40 | 41 | @GetMapping("getbyid") 42 | public ResponseEntity get(Integer id) { 43 | 44 | DataResult dataResult = this.jobSeekerCVImageService.get(id); 45 | 46 | if (dataResult.isSuccess()) { 47 | return ResponseEntity.ok(dataResult); 48 | } 49 | else { 50 | return ResponseEntity.badRequest().body(dataResult); 51 | } 52 | 53 | } 54 | 55 | @PostMapping("uploadimage") 56 | public ResponseEntity add(@RequestBody MultipartFile multipartFile, Integer jobSeekerCVId) { 57 | 58 | Result result = this.jobSeekerCVImageService.saveImage(multipartFile, jobSeekerCVId); 59 | 60 | if (result.isSuccess()) { 61 | return ResponseEntity.ok(result); 62 | } 63 | else { 64 | return ResponseEntity.badRequest().body(result); 65 | } 66 | 67 | } 68 | 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekersController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 15 | 16 | @RestController 17 | @RequestMapping("/api/jobseekers/") 18 | @CrossOrigin 19 | public class JobSeekersController { 20 | 21 | @Autowired 22 | private JobSeekerService jobSeekerService; 23 | 24 | 25 | @GetMapping("getall") 26 | public ResponseEntity getAll(){ 27 | 28 | DataResult> dataResult = this.jobSeekerService.getAll(); 29 | 30 | if (dataResult.isSuccess()) { 31 | return ResponseEntity.ok(dataResult); 32 | } 33 | else { 34 | return ResponseEntity.badRequest().body(dataResult); 35 | } 36 | 37 | } 38 | 39 | @GetMapping("getbyid") 40 | public ResponseEntity get(Integer id) { 41 | 42 | DataResult dataResult = this.jobSeekerService.get(id); 43 | 44 | if (dataResult.isSuccess()) { 45 | return ResponseEntity.ok(dataResult); 46 | } 47 | else { 48 | return ResponseEntity.badRequest().body(dataResult); 49 | } 50 | 51 | } 52 | 53 | // @PostMapping("add") 54 | // public ResponseEntity add(@RequestBody JobSeeker jobSeeker) throws RemoteException{ 55 | // 56 | // Result result = this.jobSeekerService.add(jobSeeker); 57 | // 58 | // 59 | // if (result.isSuccess()) { 60 | // return ResponseEntity.ok(result); 61 | // } 62 | // else { 63 | // return ResponseEntity.badRequest().body(result); 64 | // } 65 | // 66 | // } 67 | 68 | // @PostMapping("update") 69 | // public ResponseEntity update(@RequestBody JobSeeker jobSeeker){ 70 | // 71 | // Result result = this.jobSeekerService.update(jobSeeker); 72 | // 73 | // if (result.isSuccess()) { 74 | // return ResponseEntity.ok(result); 75 | // } 76 | // else { 77 | // return ResponseEntity.badRequest().body(result); 78 | // } 79 | // 80 | // } 81 | 82 | 83 | 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/SystemPersonnelConfirmOfJobAdvertManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.SystemPersonnelConfirmOfJobAdvertService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorDataResult; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 14 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.SystemPersonnelConfirmOfJobAdvertDao; 15 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnelConfirmOfJobAdvert; 16 | 17 | @Service 18 | public class SystemPersonnelConfirmOfJobAdvertManager implements SystemPersonnelConfirmOfJobAdvertService{ 19 | 20 | @Autowired 21 | private SystemPersonnelConfirmOfJobAdvertDao systemPersonnelConfirmOfJobAdvertDao; 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult> 26 | (this.systemPersonnelConfirmOfJobAdvertDao.findAll()); 27 | } 28 | 29 | @Override 30 | public DataResult get(int id) { 31 | return new SuccessDataResult 32 | (this.systemPersonnelConfirmOfJobAdvertDao.getOne(id)); 33 | } 34 | 35 | @Override 36 | public DataResult findByJobAdvertId(int jobAdvertId) { 37 | SystemPersonnelConfirmOfJobAdvert systemPersonnelConfirmOfJobAdvert = 38 | this.systemPersonnelConfirmOfJobAdvertDao.findByJobAdvertId(jobAdvertId).orElse(null); 39 | if (systemPersonnelConfirmOfJobAdvert == null) { 40 | return new ErrorDataResult(); 41 | } 42 | 43 | return new SuccessDataResult(systemPersonnelConfirmOfJobAdvert); 44 | } 45 | 46 | @Override 47 | public Result add(SystemPersonnelConfirmOfJobAdvert systemPersonnelConfirmOfJobAdvert) { 48 | this.systemPersonnelConfirmOfJobAdvertDao.saveAndFlush(systemPersonnelConfirmOfJobAdvert); 49 | return new SuccessResult(); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/EmployerManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.rmi.RemoteException; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.beans.factory.annotation.Qualifier; 8 | import org.springframework.stereotype.Service; 9 | 10 | import hrms.humanResourcesManagementSystem.business.abstracts.EmployerService; 11 | import hrms.humanResourcesManagementSystem.business.abstracts.UserValidationService; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorResult; 14 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 17 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.EmployerDao; 18 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 19 | 20 | @Service 21 | public class EmployerManager implements EmployerService { 22 | 23 | private EmployerDao employerDao; 24 | private UserValidationService employerValidator; 25 | 26 | @Autowired 27 | public EmployerManager(EmployerDao employerDao, 28 | @Qualifier("EmployerV") UserValidationService employerValidator) { 29 | super(); 30 | this.employerDao = employerDao; 31 | this.employerValidator = employerValidator; 32 | } 33 | 34 | @Override 35 | public DataResult> getAll() { 36 | return new SuccessDataResult>(this.employerDao.findAll(), "Tüm işverenler listelendi"); 37 | } 38 | 39 | @Override 40 | public DataResult get(int id) { 41 | return new SuccessDataResult(this.employerDao.getOne(id)); 42 | } 43 | 44 | @Override 45 | public Result add(Employer employer) throws RemoteException { 46 | if(!this.employerValidator.validate(employer).isSuccess()) { 47 | return new ErrorResult(this.employerValidator.validate(employer).getMessage()); 48 | } 49 | this.employerDao.saveAndFlush(employer); 50 | return new SuccessResult(); 51 | } 52 | 53 | @Override 54 | public Result update(Employer employer) { 55 | return new SuccessResult(); 56 | } 57 | 58 | @Override 59 | public Result delete(Employer employer) { 60 | return new SuccessResult(); 61 | } 62 | 63 | 64 | // boolean stat = (1 == 1) ? true : false; 65 | 66 | 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobTitlesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import javax.validation.Valid; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.CrossOrigin; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | import org.springframework.web.bind.annotation.PostMapping; 12 | import org.springframework.web.bind.annotation.RequestBody; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import hrms.humanResourcesManagementSystem.business.abstracts.JobTitleService; 17 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 18 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 19 | import hrms.humanResourcesManagementSystem.entities.concretes.JobTitle; 20 | 21 | @RestController 22 | @RequestMapping("/api/jobtitles/") 23 | @CrossOrigin 24 | public class JobTitlesController { 25 | 26 | @Autowired 27 | private JobTitleService jobTitleService; 28 | 29 | 30 | @GetMapping("getall") 31 | public ResponseEntity getAll() { 32 | 33 | DataResult> dataResult = this.jobTitleService.getAll(); 34 | 35 | if (dataResult.isSuccess()) { 36 | return ResponseEntity.ok(dataResult); 37 | } 38 | else { 39 | return ResponseEntity.badRequest().body(dataResult); 40 | } 41 | 42 | } 43 | 44 | @GetMapping("getbyid") 45 | public ResponseEntity get(Integer id) { 46 | 47 | DataResult dataResult = this.jobTitleService.get(id); 48 | 49 | if (dataResult.isSuccess()) { 50 | return ResponseEntity.ok(dataResult); 51 | } 52 | else { 53 | return ResponseEntity.badRequest().body(dataResult); 54 | } 55 | } 56 | 57 | @PostMapping("add") 58 | public ResponseEntity add(@Valid @RequestBody JobTitle jobTitle) { 59 | 60 | Result result = this.jobTitleService.add(jobTitle); 61 | 62 | if (result.isSuccess()) { 63 | return ResponseEntity.ok(result); 64 | } 65 | else { 66 | return ResponseEntity.badRequest().body(result); 67 | } 68 | } 69 | 70 | 71 | 72 | // @PostMapping("update") 73 | // public Result update(JobTitle jobTitle) { 74 | // return this.jobTitleService.update(jobTitle); 75 | // } 76 | 77 | // @PostMapping("delete") 78 | // public Result delete(JobTitle jobTitle) { 79 | // return this.jobTitleService.delete(jobTitle); 80 | // } 81 | 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVLanguageManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVLanguageService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVLanguageDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVLanguage; 15 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVLanguageGetDto; 16 | 17 | @Service 18 | public class JobSeekerCVLanguageManager implements JobSeekerCVLanguageService{ 19 | 20 | @Autowired 21 | private JobSeekerCVLanguageDao jobSeekerCVLanguageDao; 22 | 23 | 24 | // @Override 25 | // public DataResult> getAll() { 26 | // return new SuccessDataResult>(this.jobSeekerCVLanguageDao.findAll()); 27 | // } 28 | 29 | // @Override 30 | // public DataResult get(Integer id) { 31 | // return new SuccessDataResult(this.jobSeekerCVLanguageDao.getOne(id)); 32 | // } 33 | 34 | @Override 35 | public DataResult> getJobSeekerCVLanguagesGetDtos() { 36 | return new SuccessDataResult> 37 | (this.jobSeekerCVLanguageDao.getJobSeekerCVLanguagesGetDtos()); 38 | } 39 | 40 | @Override 41 | public DataResult getJobSeekerCVLanguagesGetDtoById(Integer jobSeekerCVLanguageId) { 42 | return new SuccessDataResult 43 | (this.jobSeekerCVLanguageDao.getJobSeekerCVLanguagesGetDtoById(jobSeekerCVLanguageId)); 44 | } 45 | 46 | @Override 47 | public Result add(JobSeekerCVLanguage jobSeekerCVLanguage) { 48 | this.jobSeekerCVLanguageDao.saveAndFlush(jobSeekerCVLanguage); 49 | return new SuccessResult(); 50 | } 51 | 52 | @Override 53 | public Result update(JobSeekerCVLanguage jobSeekerCVLanguage) { 54 | // TODO Auto-generated method stub 55 | return null; 56 | } 57 | 58 | @Override 59 | public Result deleteById(Integer jobSeekerCVLanguageId) { 60 | this.jobSeekerCVLanguageDao.deleteById(jobSeekerCVLanguageId); 61 | return new SuccessResult(); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVWebSitesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.DeleteMapping; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVWebSiteService; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 17 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 18 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVWebSite; 19 | 20 | @RestController 21 | @RequestMapping("/api/jobseekercvwebsites/") 22 | @CrossOrigin 23 | public class JobSeekerCVWebSitesController { 24 | 25 | @Autowired 26 | private JobSeekerCVWebSiteService jobSeekerCVWebSiteService; 27 | 28 | @GetMapping("getall") 29 | public ResponseEntity getAll(){ 30 | 31 | DataResult> dataResult = this.jobSeekerCVWebSiteService.getAll(); 32 | 33 | if (dataResult.isSuccess()) { 34 | return ResponseEntity.ok(dataResult); 35 | } 36 | else { 37 | return ResponseEntity.badRequest().body(dataResult); 38 | } 39 | } 40 | 41 | @GetMapping("getbyid") 42 | public ResponseEntity get(Integer id) { 43 | 44 | DataResult dataResult = this.jobSeekerCVWebSiteService.get(id); 45 | 46 | if (dataResult.isSuccess()) { 47 | return ResponseEntity.ok(dataResult); 48 | } 49 | else { 50 | return ResponseEntity.badRequest().body(dataResult); 51 | } 52 | 53 | } 54 | 55 | @PostMapping("add") 56 | public ResponseEntity add(@RequestBody JobSeekerCVWebSite jobSeekerCVWebSite){ 57 | 58 | Result result = this.jobSeekerCVWebSiteService.add(jobSeekerCVWebSite); 59 | 60 | if (result.isSuccess()) { 61 | return ResponseEntity.ok(result); 62 | } 63 | else { 64 | return ResponseEntity.badRequest().body(result); 65 | } 66 | 67 | } 68 | 69 | @DeleteMapping("deletebyid") 70 | public ResponseEntity deleteById(Integer jobSeekerCVLanguageId){ 71 | 72 | Result result = this.jobSeekerCVWebSiteService.deleteById(jobSeekerCVLanguageId); 73 | 74 | if (result.isSuccess()) { 75 | return ResponseEntity.ok(result); 76 | } 77 | else { 78 | return ResponseEntity.badRequest().body(result); 79 | } 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVExperienceManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVExperienceService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVExperienceDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVExperience; 15 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVExperienceAddDto; 16 | 17 | @Service 18 | public class JobSeekerCVExperienceManager implements JobSeekerCVExperienceService { 19 | 20 | @Autowired 21 | private JobSeekerCVExperienceDao jobSeekerCVExperienceDao; 22 | 23 | 24 | @Override 25 | public DataResult> getAll() { 26 | return new SuccessDataResult>(this.jobSeekerCVExperienceDao.findAll()); 27 | } 28 | 29 | @Override 30 | public DataResult> getAllByJobSeekerCVIdOrderByEndingDateDesc(int jobSeekerCVId){ 31 | return new SuccessDataResult> 32 | (this.jobSeekerCVExperienceDao.findAllByJobSeekerCVIdOrderByEndingDateDesc(jobSeekerCVId)); 33 | } 34 | 35 | @Override 36 | public DataResult get(int id) { 37 | return new SuccessDataResult(this.jobSeekerCVExperienceDao.getOne(id)); 38 | } 39 | 40 | @Override 41 | public Result add(JobSeekerCVExperienceAddDto jobSeekerCVExperienceAddDto) { 42 | 43 | JobSeekerCVExperience jobSeekerCVExperience = new JobSeekerCVExperience( 44 | jobSeekerCVExperienceAddDto.getJobSeekerCVId(), 45 | jobSeekerCVExperienceAddDto.getJobTitleId(), 46 | jobSeekerCVExperienceAddDto.getCityId(), 47 | jobSeekerCVExperienceAddDto.getInstitutionName(), 48 | jobSeekerCVExperienceAddDto.getStartingDate(), 49 | jobSeekerCVExperienceAddDto.getEndingDate()); 50 | 51 | this.jobSeekerCVExperienceDao.saveAndFlush(jobSeekerCVExperience); 52 | return new SuccessResult(); 53 | } 54 | 55 | @Override 56 | public Result update(JobSeekerCVExperience jobSeekerCVExperience) { 57 | // TODO Auto-generated method stub 58 | return null; 59 | } 60 | 61 | @Override 62 | public Result delete(JobSeekerCVExperience jobSeekerCVExperience) { 63 | // TODO Auto-generated method stub 64 | return null; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVEducationManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVEducationService; 9 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 10 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 11 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 12 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 13 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVEducationDao; 14 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVEducation; 15 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVEducationAddDto; 16 | 17 | @Service 18 | public class JobSeekerCVEducationManager implements JobSeekerCVEducationService { 19 | 20 | @Autowired 21 | private JobSeekerCVEducationDao jobSeekerCVEducationDao; 22 | 23 | 24 | @Override 25 | public DataResult> getAll() { 26 | return new SuccessDataResult>(this.jobSeekerCVEducationDao.findAll()); 27 | } 28 | 29 | @Override 30 | public DataResult> 31 | getAllByJobSeekerCVIdOrderByGraduationDateDesc(int jobSeekerCVId) { 32 | return new SuccessDataResult>(this.jobSeekerCVEducationDao 33 | .findAllByJobSeekerCV_IdOrderByGraduationDateDesc(jobSeekerCVId)); 34 | } 35 | 36 | @Override 37 | public DataResult get(int id) { 38 | return new SuccessDataResult(this.jobSeekerCVEducationDao.getOne(id)); 39 | } 40 | 41 | @Override 42 | public Result add(JobSeekerCVEducationAddDto jobSeekerCVEducationAddDto) { 43 | 44 | JobSeekerCVEducation jobSeekerCVEducation = new JobSeekerCVEducation(jobSeekerCVEducationAddDto.getDegreeId(), 45 | jobSeekerCVEducationAddDto.getSchoolId(), jobSeekerCVEducationAddDto.getFacultyId(), 46 | jobSeekerCVEducationAddDto.getStudyFieldId(), jobSeekerCVEducationAddDto.getStartingDate(), 47 | jobSeekerCVEducationAddDto.getGraduationDate(), jobSeekerCVEducationAddDto.getJobSeekerCVId()); 48 | 49 | this.jobSeekerCVEducationDao.save(jobSeekerCVEducation); 50 | return new SuccessResult(); 51 | } 52 | 53 | @Override 54 | public Result add(JobSeekerCVEducation jobSeekerCVEducation) { 55 | this.jobSeekerCVEducationDao.save(jobSeekerCVEducation); 56 | return new SuccessResult(); 57 | } 58 | 59 | @Override 60 | public Result update(JobSeekerCVEducation jobSeekerCVEducation) { 61 | // TODO Auto-generated method stub 62 | return null; 63 | } 64 | 65 | @Override 66 | public Result delete(JobSeekerCVEducation jobSeekerCVEducation) { 67 | // TODO Auto-generated method stub 68 | return null; 69 | } 70 | 71 | 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/SystemPersonnelsController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import hrms.humanResourcesManagementSystem.business.abstracts.SystemPersonnelService; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 17 | import hrms.humanResourcesManagementSystem.entities.concretes.SystemPersonnel; 18 | 19 | @RestController 20 | @RequestMapping("/api/systempersonnels/") 21 | @CrossOrigin 22 | public class SystemPersonnelsController { 23 | 24 | @Autowired 25 | private SystemPersonnelService systemPersonnelService; 26 | 27 | 28 | @GetMapping("getall") 29 | public ResponseEntity getAll() { 30 | 31 | DataResult> dataResult = this.systemPersonnelService.getAll(); 32 | 33 | if (dataResult.isSuccess()) { 34 | return ResponseEntity.ok(dataResult); 35 | } 36 | else { 37 | return ResponseEntity.badRequest().body(dataResult); 38 | } 39 | } 40 | 41 | @GetMapping("getbyid") 42 | public ResponseEntity get(Integer id) { 43 | 44 | DataResult dataResult = this.systemPersonnelService.get(id); 45 | 46 | if (dataResult.isSuccess()) { 47 | return ResponseEntity.ok(dataResult); 48 | } 49 | else { 50 | return ResponseEntity.badRequest().body(dataResult); 51 | } 52 | } 53 | 54 | @PostMapping("add") 55 | public ResponseEntity add(@RequestBody SystemPersonnel systemPersonnel) { 56 | 57 | Result result = this.systemPersonnelService.add(systemPersonnel); 58 | 59 | if (result.isSuccess()) { 60 | return ResponseEntity.ok(result); 61 | } 62 | else { 63 | return ResponseEntity.badRequest().body(result); 64 | } 65 | 66 | } 67 | 68 | @PostMapping("update") 69 | public ResponseEntity update(@RequestBody SystemPersonnel systemPersonnel) { 70 | 71 | Result result = this.systemPersonnelService.update(systemPersonnel); 72 | 73 | if (result.isSuccess()) { 74 | return ResponseEntity.ok(result); 75 | } 76 | else { 77 | return ResponseEntity.badRequest().body(result); 78 | } 79 | } 80 | 81 | @PostMapping("delete") 82 | public ResponseEntity delete(Integer systemPersonnelId) { 83 | 84 | Result result = this.systemPersonnelService.delete(systemPersonnelId); 85 | 86 | if (result.isSuccess()) { 87 | return ResponseEntity.ok(result); 88 | } 89 | else { 90 | return ResponseEntity.badRequest().body(result); 91 | } 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVExperienceController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVExperienceService; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 17 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVExperience; 18 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVExperienceAddDto; 19 | 20 | @RestController 21 | @RequestMapping("/api/jobseekercvexperiences/") 22 | @CrossOrigin 23 | public class JobSeekerCVExperienceController { 24 | 25 | @Autowired 26 | private JobSeekerCVExperienceService jobSeekerCVExperienceService; 27 | 28 | 29 | // @GetMapping("getall") 30 | // public ResponseEntity getAll(){ 31 | // 32 | // DataResult> dataResult = this.jobSeekerCVExperienceService.getAll(); 33 | // 34 | // if (dataResult.isSuccess()) { 35 | // return ResponseEntity.ok(dataResult); 36 | // } 37 | // else { 38 | // return ResponseEntity.badRequest().body(dataResult); 39 | // } 40 | // 41 | // } 42 | 43 | @GetMapping("getAllByJobSeekerCVIdOrderByEndingDateDesc") 44 | public ResponseEntity getAllByJobSeekerCVIdOrderByEndingDateDesc(Integer jobSeekerCVId){ 45 | 46 | DataResult> dataResult = this.jobSeekerCVExperienceService 47 | .getAllByJobSeekerCVIdOrderByEndingDateDesc(jobSeekerCVId); 48 | 49 | if (dataResult.isSuccess()) { 50 | return ResponseEntity.ok(dataResult); 51 | } 52 | else { 53 | return ResponseEntity.badRequest().body(dataResult); 54 | } 55 | 56 | } 57 | 58 | @GetMapping("getbyid") 59 | public ResponseEntity get(Integer id) { 60 | 61 | DataResult dataResult = this.jobSeekerCVExperienceService.get(id); 62 | 63 | if (dataResult.isSuccess()) { 64 | return ResponseEntity.ok(dataResult); 65 | } 66 | else { 67 | return ResponseEntity.badRequest().body(dataResult); 68 | } 69 | 70 | } 71 | 72 | @PostMapping("add") 73 | public ResponseEntity add(@RequestBody JobSeekerCVExperienceAddDto jobSeekerCVExperienceAddDto){ 74 | 75 | Result result = this.jobSeekerCVExperienceService.add(jobSeekerCVExperienceAddDto); 76 | 77 | if (result.isSuccess()) { 78 | return ResponseEntity.ok(result); 79 | } 80 | else { 81 | return ResponseEntity.badRequest().body(result); 82 | } 83 | 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCVExperience.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.time.LocalDateTime; 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.PrePersist; 13 | import javax.persistence.Table; 14 | 15 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @Table(name = "job_seeker_cv_experiences") 25 | @Entity 26 | public class JobSeekerCVExperience { 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private Integer id; 32 | 33 | // @Column(name = "job_seeker_CV_id") 34 | // private int jobSeekerCVId; 35 | 36 | @Column(name = "job_title_id") 37 | private Integer jobTitleId; 38 | 39 | @Column(name = "city_id") 40 | private Integer cityId; 41 | 42 | @Column(name = "institution_name") 43 | private String institutionName; 44 | 45 | @Column(name = "starting_date") 46 | private LocalDate statingDate; 47 | 48 | @Column(name = "ending_date") 49 | private LocalDate endingDate; 50 | 51 | @Column(name = "status") 52 | private String status; 53 | 54 | @PrePersist 55 | void setStatus() { 56 | 57 | if(endingDate != null) { 58 | this.status = "Tamamlanmış"; 59 | } 60 | if(endingDate == null){ 61 | this.status = "Devam Ediyor"; 62 | } 63 | } 64 | 65 | @Column(name = "added_date_time") 66 | private LocalDateTime addedDateTime = LocalDateTime.now(); 67 | 68 | // @JsonIgnore 69 | @JsonIgnoreProperties({"jobSeekerCVExperiences", "githubAddress", "linkedInAddress", 70 | "coverLetter", "createdDateTime", "lastUpdatedDateTime", "jobSeekerCVSkills", 71 | "jobSeekerCVLanguages", "jobSeekerCVEducations", "jobSeekerCVImage"}) 72 | @ManyToOne() 73 | @JoinColumn(name = "job_seeker_cv_id") 74 | private JobSeekerCV jobSeekerCV; 75 | 76 | // @JsonIgnore 77 | // @ManyToOne() 78 | // @JoinColumn(name = "job_title_id") 79 | // private JobTitle jobTitle; 80 | 81 | public JobSeekerCVExperience(Integer jobSeekerCVId, Integer jobTitleId, Integer cityId, 82 | String institutionName, LocalDate startingDate, LocalDate endingDate) { 83 | 84 | this.jobSeekerCV = new JobSeekerCV(); 85 | this.jobSeekerCV.setId(jobSeekerCVId); 86 | 87 | this.jobTitleId = jobTitleId; 88 | 89 | this.cityId = cityId; 90 | 91 | this.institutionName = institutionName; 92 | 93 | this.statingDate = startingDate; 94 | 95 | this.endingDate = endingDate; 96 | 97 | // this.jobTitle = new JobTitle(); 98 | // this.jobTitle.setId(jobTitleId); 99 | 100 | } 101 | 102 | 103 | 104 | } 105 | 106 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/core/exceptionHandlers/ExcptnHandler.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.core.exceptionHandlers; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import org.springframework.http.HttpStatus; 7 | import org.springframework.http.ResponseEntity; 8 | import org.springframework.http.converter.HttpMessageNotReadableException; 9 | import org.springframework.web.bind.MethodArgumentNotValidException; 10 | import org.springframework.web.bind.annotation.ControllerAdvice; 11 | import org.springframework.web.bind.annotation.ExceptionHandler; 12 | 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorDataResult; 14 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorResult; 15 | 16 | @ControllerAdvice 17 | public class ExcptnHandler { 18 | 19 | // Ctrl + Shift + O 20 | // Ctrl + Shift + - 21 | @ExceptionHandler(MethodArgumentNotValidException.class) 22 | public ResponseEntity> handleValidationExceptions(MethodArgumentNotValidException exceptions) { 23 | Map validationErrors = new HashMap<>(); 24 | 25 | exceptions.getBindingResult().getFieldErrors() 26 | .forEach(fieldError -> { 27 | validationErrors 28 | .put(fieldError.getField(), fieldError.getDefaultMessage()); 29 | validationErrors 30 | .put(fieldError.getField() + " rejectedValue", fieldError.getRejectedValue().toString()); 31 | } 32 | // System.out.println(fieldError.getRejectedValue()) 33 | // validationErrors 34 | // .put(fieldError.getField(), fieldError.getDefaultMessage()) 35 | ); 36 | 37 | return ResponseEntity.badRequest().body(new ErrorDataResult<>(validationErrors, "Validation Errors")); 38 | } 39 | 40 | @ExceptionHandler(HttpMessageNotReadableException.class) 41 | public ResponseEntity handleJsonExceptions(HttpMessageNotReadableException ex) { 42 | if(ex.getMessage().contains("birthDate")){ 43 | return new ResponseEntity<>( 44 | new ErrorResult("Wrong birth date format. Pattern should be like 2015-05-20 (YYYY-mm-dd)"), 45 | HttpStatus.NOT_ACCEPTABLE 46 | ); 47 | } 48 | return new ResponseEntity<>(new ErrorResult(ex.getMessage()), 49 | HttpStatus.NOT_ACCEPTABLE); 50 | } 51 | 52 | 53 | // @ExceptionHandler(MethodArgumentNotValidException.class) 54 | // @ResponseStatus(HttpStatus.BAD_REQUEST) 55 | // public ErrorDataResult handleValidationException(MethodArgumentNotValidException exceptions) { 56 | // Map validationErrors = new HashMap(); 57 | // for(FieldError fieldError : exceptions.getBindingResult().getFieldErrors()) { 58 | // validationErrors.put(fieldError.getField(), fieldError.getDefaultMessage()); 59 | // } 60 | // 61 | // ErrorDataResult errors 62 | // = new ErrorDataResult(validationErrors,"Doğrulama hataları"); 63 | // return errors; 64 | // 65 | // } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVLanguagesController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.DeleteMapping; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVLanguageService; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 17 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 18 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVLanguage; 19 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVLanguageGetDto; 20 | 21 | @RestController 22 | @RequestMapping("/api/jobseekercvlanguages/") 23 | @CrossOrigin 24 | public class JobSeekerCVLanguagesController { 25 | 26 | @Autowired 27 | private JobSeekerCVLanguageService jobSeekerCVLanguageService; 28 | 29 | 30 | @GetMapping("getJobSeekerCVLanguagesGetDtos") 31 | public ResponseEntity getJobSeekerCVLanguagesGetDtos(){ 32 | 33 | DataResult> dataResult = 34 | this.jobSeekerCVLanguageService.getJobSeekerCVLanguagesGetDtos(); 35 | 36 | if (dataResult.isSuccess()) { 37 | return ResponseEntity.ok(dataResult); 38 | } 39 | else { 40 | return ResponseEntity.badRequest().body(dataResult); 41 | } 42 | } 43 | 44 | @GetMapping("getJobSeekerCVLanguagesGetDtoById") 45 | public ResponseEntity getJobSeekerCVLanguagesGetDtoById(Integer id) { 46 | 47 | DataResult dataResult = 48 | this.jobSeekerCVLanguageService.getJobSeekerCVLanguagesGetDtoById(id); 49 | 50 | if (dataResult.isSuccess()) { 51 | return ResponseEntity.ok(dataResult); 52 | } 53 | else { 54 | return ResponseEntity.badRequest().body(dataResult); 55 | } 56 | 57 | } 58 | 59 | @PostMapping("add") 60 | public ResponseEntity add(@RequestBody JobSeekerCVLanguage jobSeekerCVLanguage){ 61 | 62 | Result result = this.jobSeekerCVLanguageService.add(jobSeekerCVLanguage); 63 | 64 | if (result.isSuccess()) { 65 | return ResponseEntity.ok(result); 66 | } 67 | else { 68 | return ResponseEntity.badRequest().body(result); 69 | } 70 | 71 | } 72 | 73 | @DeleteMapping("deletebyid") 74 | public ResponseEntity deleteById(Integer jobSeekerCVLanguageId){ 75 | 76 | Result result = this.jobSeekerCVLanguageService.deleteById(jobSeekerCVLanguageId); 77 | 78 | if (result.isSuccess()) { 79 | return ResponseEntity.ok(result); 80 | } 81 | else { 82 | return ResponseEntity.badRequest().body(result); 83 | } 84 | 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVService; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 17 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCV; 18 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVAddDto; 19 | 20 | @RestController 21 | @RequestMapping("/api/jobseekercvs/") 22 | @CrossOrigin 23 | public class JobSeekerCVController { 24 | 25 | @Autowired 26 | private JobSeekerCVService jobSeekerCVService; 27 | 28 | 29 | @GetMapping("getall") 30 | public ResponseEntity getAll() { 31 | 32 | DataResult> dataResult = this.jobSeekerCVService.getAll(); 33 | 34 | if (dataResult.isSuccess()) { 35 | return ResponseEntity.ok(dataResult); 36 | } else { 37 | return ResponseEntity.badRequest().body(dataResult); 38 | } 39 | 40 | } 41 | 42 | @GetMapping("getByJobSeekerId") 43 | public ResponseEntity getByJobSeekerId(Integer jobSeekerId){ 44 | 45 | DataResult> dataResult = this.jobSeekerCVService.getByJobSeekerId(jobSeekerId); 46 | 47 | if (dataResult.isSuccess()) { 48 | return ResponseEntity.ok(dataResult); 49 | } else { 50 | return ResponseEntity.badRequest().body(dataResult); 51 | } 52 | 53 | } 54 | 55 | @GetMapping("getbyid") 56 | public ResponseEntity get(Integer id) { 57 | 58 | DataResult dataResult = this.jobSeekerCVService.get(id); 59 | 60 | if (dataResult.isSuccess()) { 61 | return ResponseEntity.ok(dataResult); 62 | } else { 63 | return ResponseEntity.badRequest().body(dataResult); 64 | } 65 | 66 | } 67 | 68 | @PostMapping("add") 69 | public ResponseEntity add(@RequestBody JobSeekerCVAddDto jobSeekerCVAddDto) { 70 | 71 | Result result = this.jobSeekerCVService.add(jobSeekerCVAddDto); 72 | 73 | if (result.isSuccess()) { 74 | return ResponseEntity.ok(result); 75 | } 76 | else { 77 | return ResponseEntity.badRequest().body(result); 78 | } 79 | 80 | } 81 | 82 | @PostMapping("addRawJobSekerCV") 83 | public ResponseEntity addRawJobSeekerCV(@RequestBody JobSeekerCV jobSeekerCV) { 84 | 85 | Result result = this.jobSeekerCVService.add(jobSeekerCV); 86 | 87 | if (result.isSuccess()) { 88 | return ResponseEntity.ok(result); 89 | } 90 | else { 91 | return ResponseEntity.badRequest().body(result); 92 | } 93 | 94 | } 95 | 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/dataAccess/abstracts/JobAdvertDao.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | import org.springframework.stereotype.Repository; 8 | 9 | import hrms.humanResourcesManagementSystem.entities.concretes.JobAdvert; 10 | import hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertGetDto; 11 | 12 | @Repository 13 | public interface JobAdvertDao extends JpaRepository { 14 | 15 | @Query("select new hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertGetDto" 16 | + "(jA.id, e.companyName, jT.title, c.name, jA.jobDefinition," 17 | + " jA.numberOfOpenPositions, jA.publishedDateTime, jA.deadLineForAppeal)" 18 | + " from Employer e" 19 | + " inner join e.jobAdverts jA inner join jA.jobTitle jT inner join jA.city c" 20 | + " inner join SystemPersonnelConfirmOfJobAdvert sPCOJA on sPCOJA.jobAdvertId=jA.id" 21 | + " where jA.active = true and sPCOJA.didConfirm = true") 22 | List getConfirmedJobAdvertDtosByActiveTrue(); 23 | 24 | 25 | @Query("select new hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertGetDto" 26 | + "(jA.id, e.companyName, jT.title, c.name, jA.jobDefinition, jA.numberOfOpenPositions," 27 | + " jA.publishedDateTime, jA.deadLineForAppeal) from Employer e" 28 | + " inner join e.jobAdverts jA inner join jA.jobTitle jT inner join jA.city" 29 | + " c inner join SystemPersonnelConfirmOfJobAdvert sPCOJA on sPCOJA.jobAdvertId=jA.id" 30 | + " where jA.active = true and sPCOJA.didConfirm = true and jA.id=:jobAdvertId") 31 | JobAdvertGetDto getConfirmedJobAdvertDtoByIdAndActiveTrue(int jobAdvertId); 32 | 33 | @Query("select new hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertGetDto" 34 | + "(jA.id, e.companyName, jT.title, c.name, jA.jobDefinition, jA.numberOfOpenPositions," 35 | + " jA.publishedDateTime, jA.deadLineForAppeal) from Employer e" 36 | + " inner join e.jobAdverts jA inner join jA.jobTitle jT inner join jA.city c" 37 | + " inner join SystemPersonnelConfirmOfJobAdvert sPCOJA on sPCOJA.jobAdvertId=jA.id" 38 | + " where jA.active = true and sPCOJA.didConfirm = true" 39 | + " order by jA.publishedDateTime desc") 40 | List getConfirmedJobAdvertDtosByPublishedDateTimeAndActiveTrue(); 41 | 42 | @Query("select new hrms.humanResourcesManagementSystem.entities.dtos.JobAdvertGetDto" 43 | + "(jA.id, e.companyName, jT.title, c.name, jA.jobDefinition, jA.numberOfOpenPositions," 44 | + " jA.publishedDateTime, jA.deadLineForAppeal) from Employer e" 45 | + " inner join e.jobAdverts jA inner join jA.jobTitle jT inner join jA.city c" 46 | + " inner join SystemPersonnelConfirmOfJobAdvert sPCOJA on sPCOJA.jobAdvertId=jA.id" 47 | + " where jA.active = true and sPCOJA.didConfirm = true and e.id=:employerId") 48 | List getConfirmedJobAdvertDtosByEmployerIdAndActiveTrue(int employerId); 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/JobSeekerCVEducationController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVEducationService; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 17 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVEducation; 18 | import hrms.humanResourcesManagementSystem.entities.dtos.JobSeekerCVEducationAddDto; 19 | 20 | @RestController 21 | @RequestMapping("/api/jobseekercveducations/") 22 | @CrossOrigin 23 | public class JobSeekerCVEducationController { 24 | 25 | @Autowired 26 | private JobSeekerCVEducationService jobSeekerCVEducationService; 27 | 28 | 29 | // @GetMapping("getall") 30 | // public ResponseEntity getAll() { 31 | // 32 | // DataResult> dataResult = this.jobSeekerCVEducationService.getAll(); 33 | // 34 | // if (dataResult.isSuccess()) { 35 | // return ResponseEntity.ok(dataResult); 36 | // } else { 37 | // return ResponseEntity.badRequest().body(dataResult); 38 | // } 39 | // 40 | // } 41 | 42 | @GetMapping("getAllByJobSeekerCVIdOrderByGraduationDateDesc") 43 | public ResponseEntity findAllByJobSeekerCVIdOrderByGraduationDateDesc(Integer jobSeekerCVId) { 44 | 45 | DataResult> dataResult = this.jobSeekerCVEducationService 46 | .getAllByJobSeekerCVIdOrderByGraduationDateDesc(jobSeekerCVId); 47 | 48 | if (dataResult.isSuccess()) { 49 | return ResponseEntity.ok(dataResult); 50 | } 51 | else { 52 | return ResponseEntity.badRequest().body(dataResult); 53 | } 54 | 55 | } 56 | 57 | @GetMapping("getbyid") 58 | public ResponseEntity get(Integer id) { 59 | 60 | DataResult dataResult = this.jobSeekerCVEducationService.get(id); 61 | 62 | if (dataResult.isSuccess()) { 63 | return ResponseEntity.ok(dataResult); 64 | } else { 65 | return ResponseEntity.badRequest().body(dataResult); 66 | } 67 | 68 | } 69 | 70 | @PostMapping("add") 71 | public ResponseEntity add(@RequestBody JobSeekerCVEducationAddDto jobSeekerCVEducationAddDto) { 72 | 73 | Result result = this.jobSeekerCVEducationService.add(jobSeekerCVEducationAddDto); 74 | 75 | if (result.isSuccess()) { 76 | return ResponseEntity.ok(result); 77 | } else { 78 | return ResponseEntity.badRequest().body(result); 79 | } 80 | 81 | } 82 | 83 | @PostMapping("addRaw") 84 | public ResponseEntity addRaw(@RequestBody JobSeekerCVEducation jobSeekerCVEducation) { 85 | 86 | Result result = this.jobSeekerCVEducationService.add(jobSeekerCVEducation); 87 | 88 | if (result.isSuccess()) { 89 | return ResponseEntity.ok(result); 90 | } else { 91 | return ResponseEntity.badRequest().body(result); 92 | } 93 | 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /src/main/resources/Mernis.wsdl: -------------------------------------------------------------------------------- 1 | 12 | 13 | 15 | 16 | 17 | 18 | 20 | 22 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 70 | 72 | 73 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 88 | 89 | 91 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCV.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import javax.persistence.CascadeType; 7 | import javax.persistence.Column; 8 | import javax.persistence.Entity; 9 | import javax.persistence.GeneratedValue; 10 | import javax.persistence.GenerationType; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.OneToMany; 14 | import javax.persistence.OneToOne; 15 | import javax.persistence.Table; 16 | import javax.persistence.Temporal; 17 | import javax.persistence.TemporalType; 18 | 19 | import org.hibernate.annotations.CreationTimestamp; 20 | import org.hibernate.annotations.UpdateTimestamp; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 23 | 24 | import lombok.AllArgsConstructor; 25 | import lombok.Data; 26 | import lombok.NoArgsConstructor; 27 | 28 | @Data 29 | @Table(name = "job_seeker_cvs") 30 | @AllArgsConstructor 31 | @NoArgsConstructor 32 | @Entity 33 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","jobAdverts"}) 34 | public class JobSeekerCV { 35 | 36 | @Id 37 | @GeneratedValue(strategy = GenerationType.IDENTITY) 38 | @Column(name = "id") 39 | private Integer id; 40 | 41 | @Column(name = "job_seeker_id") 42 | private Integer jobSeekerId; 43 | 44 | @Column(name = "cover_letter") 45 | private String coverLetter; 46 | 47 | @CreationTimestamp 48 | @Temporal(TemporalType.TIMESTAMP) 49 | @Column(name = "created_date_time", updatable = false) 50 | private Date createdDateTime; 51 | 52 | @UpdateTimestamp 53 | @Temporal(TemporalType.TIMESTAMP) 54 | @Column(name = "last_updated_date_time", insertable = false) 55 | private Date lastUpdatedDateTime; 56 | 57 | @Column(name = "is_active") 58 | private Boolean active; 59 | 60 | // @Column(name = "job_seeker_CV_image_id") 61 | // private int jobSeekerCVImageId; 62 | 63 | // @ManyToOne() 64 | // @JoinColumn(name = "job_seeker_id") 65 | // private JobSeeker jobSeeker; 66 | 67 | 68 | @OneToMany(mappedBy = "jobSeekerCV", cascade = CascadeType.ALL) 69 | private List jobSeekerCVSkills; 70 | 71 | // @OneToMany(mappedBy = "jobSeekerCV", cascade = CascadeType.ALL) 72 | // private List jobSeekerCVLanguages; 73 | 74 | @OneToMany(mappedBy = "jobSeekerCV", cascade = CascadeType.ALL) 75 | private List jobSeekerCVExperiences; 76 | 77 | @OneToMany(mappedBy = "jobSeekerCV", cascade = CascadeType.ALL) 78 | private List jobSeekerCVEducations; 79 | 80 | @OneToOne(cascade = CascadeType.ALL) 81 | @JoinColumn(name = "job_seeker_CV_image_id") 82 | private JobSeekerCVImage jobSeekerCVImage; 83 | 84 | 85 | 86 | 87 | public JobSeekerCV(int jobSeekerId, String coverLetter, boolean active) { 88 | 89 | super(); 90 | this.jobSeekerId = jobSeekerId; 91 | this.coverLetter = coverLetter; 92 | this.active = active; 93 | // this.jobSeekerCVImage = new JobSeekerCVImage(); 94 | // this.jobSeekerCVImage.setId(jobSeekerCVImageId); 95 | // this.jobSeekerCVImage = new JobSeekerCVImage(); 96 | // this.jobSeekerCVSkills = new ArrayList(); 97 | // this.jobSeekerCVLanguages = new ArrayList(); 98 | // this.jobSeekerCVExperiences = new ArrayList(); 99 | // this.jobSeekerCVEducations = new ArrayList(); 100 | 101 | 102 | } 103 | 104 | 105 | 106 | } 107 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/business/concretes/JobSeekerCVImageManager.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.business.concretes; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.web.multipart.MultipartFile; 10 | 11 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVImageService; 12 | import hrms.humanResourcesManagementSystem.business.abstracts.JobSeekerCVService; 13 | import hrms.humanResourcesManagementSystem.core.utilities.results.DataResult; 14 | import hrms.humanResourcesManagementSystem.core.utilities.results.ErrorResult; 15 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 16 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessDataResult; 17 | import hrms.humanResourcesManagementSystem.core.utilities.results.SuccessResult; 18 | import hrms.humanResourcesManagementSystem.core.utilities.results.cloudOperations.CloudService; 19 | import hrms.humanResourcesManagementSystem.dataAccess.abstracts.JobSeekerCVImageDao; 20 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCV; 21 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeekerCVImage; 22 | 23 | @Service 24 | public class JobSeekerCVImageManager implements JobSeekerCVImageService { 25 | 26 | @Autowired 27 | private JobSeekerCVImageDao jobSeekerCVImageDao; 28 | @Autowired 29 | private CloudService cloudService; 30 | @Autowired 31 | private JobSeekerCVService jobSeekerCVService; 32 | 33 | @Override 34 | public DataResult> getAll() { 35 | return new SuccessDataResult>(this.jobSeekerCVImageDao.findAll()); 36 | } 37 | 38 | @Override 39 | public DataResult get(int id) { 40 | return new SuccessDataResult(this.jobSeekerCVImageDao.getOne(id)); 41 | } 42 | 43 | // @Override 44 | // public Result add(JobSeekerCVImage jobSeekerCVImage) { 45 | // this.jobSeekerCVImageDao.saveAndFlush(jobSeekerCVImage); 46 | // return new SuccessResult(); 47 | // } 48 | 49 | @Override 50 | public Result saveImage(MultipartFile file, int jobSeekerCVId) { 51 | 52 | Map uploader = (Map) cloudService.save(file).getData(); 53 | String imageUrl = uploader.get("url"); 54 | JobSeekerCV jobSeekerCV = jobSeekerCVService.get(jobSeekerCVId).getData(); 55 | if (jobSeekerCV == null) { 56 | return new ErrorResult("Fotoğraf eklemek istediğiniz CV mevcut değil"); 57 | } 58 | 59 | if(jobSeekerCV.getJobSeekerCVImage() == null) { 60 | JobSeekerCVImage jobSeekerCVImage = new JobSeekerCVImage(); 61 | jobSeekerCVImage.setImageUrl(imageUrl); 62 | jobSeekerCV.setJobSeekerCVImage(jobSeekerCVImage); 63 | } else { 64 | jobSeekerCV.getJobSeekerCVImage().setImageUrl(imageUrl); 65 | } 66 | 67 | jobSeekerCV.setLastUpdatedDateTime(new Date()); 68 | 69 | jobSeekerCVService.add(jobSeekerCV); 70 | //jobSeekerCVImageDao.saveAndFlush(jobSeekerCVImage); 71 | return new SuccessResult("Fotoğrafı başarıyla eklediniz"); 72 | 73 | } 74 | 75 | @Override 76 | public Result update(JobSeekerCVImage jobSeekerCVImage) { 77 | // TODO Auto-generated method stub 78 | return null; 79 | } 80 | 81 | @Override 82 | public Result delete(JobSeekerCVImage jobSeekerCVImage) { 83 | // TODO Auto-generated method stub 84 | return null; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/api/controllers/AuthController.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.api.controllers; 2 | 3 | import java.rmi.RemoteException; 4 | 5 | import javax.validation.Valid; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.CrossOrigin; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import hrms.humanResourcesManagementSystem.business.abstracts.AuthService; 17 | import hrms.humanResourcesManagementSystem.core.utilities.results.Result; 18 | import hrms.humanResourcesManagementSystem.entities.concretes.Employer; 19 | import hrms.humanResourcesManagementSystem.entities.concretes.JobSeeker; 20 | 21 | @RestController 22 | @RequestMapping("/api/auth/") 23 | @CrossOrigin 24 | public class AuthController { 25 | 26 | @Autowired 27 | private AuthService authService; 28 | 29 | @PostMapping("registerjobseeker") 30 | public ResponseEntity registerJobSeeker(@Valid @RequestBody JobSeeker jobSeeker) throws RemoteException { 31 | 32 | Result result = this.authService.registerJobSeeker(jobSeeker); 33 | 34 | if (result.isSuccess()) { 35 | return ResponseEntity.ok(result); 36 | } else { 37 | return ResponseEntity.badRequest().body(result); 38 | } 39 | } 40 | 41 | @PostMapping("registeremployer") 42 | public ResponseEntity registerEmployer(@Valid @RequestBody Employer employer) throws RemoteException { 43 | 44 | Result result = this.authService.registerEmployer(employer); 45 | 46 | if (result.isSuccess()) { 47 | return ResponseEntity.ok(result); 48 | } else { 49 | return ResponseEntity.badRequest().body(result); 50 | } 51 | } 52 | 53 | @PostMapping("verifyjobseeker") 54 | public ResponseEntity verifyJobSeeker(String userVCode, Integer jobSeekerId) { 55 | 56 | Result result = this.authService.verifyJobSeeker(userVCode, jobSeekerId); 57 | 58 | if (result.isSuccess()) { 59 | return ResponseEntity.ok(result); 60 | } else { 61 | return ResponseEntity.badRequest().body(result); 62 | } 63 | } 64 | 65 | @PostMapping("verifyemployer") 66 | public ResponseEntity verifyEmployer(String userVCode, Integer employerId) { 67 | 68 | Result result = this.authService.verifyEmployer(userVCode, employerId); 69 | 70 | if (result.isSuccess()) { 71 | return ResponseEntity.ok(result); 72 | } else { 73 | return ResponseEntity.badRequest().body(result); 74 | } 75 | } 76 | 77 | @PostMapping("systemPersonnelConfirmOfEmployer") 78 | public ResponseEntity confirmEmployer(@Valid @RequestParam Integer systemPersonnelId, @Valid @RequestParam Integer employerId) { 79 | 80 | Result result = this.authService.systemPersonnelConfirmOfEmployer(systemPersonnelId, employerId); 81 | 82 | if (result.isSuccess()) { 83 | return ResponseEntity.ok(result); 84 | } else { 85 | return ResponseEntity.badRequest().body(result); 86 | } 87 | 88 | } 89 | 90 | @PostMapping("systemPersonnelConfirmOfJobAdvert") 91 | public ResponseEntity systemPersonnelConfirmOfJobAdvert(@Valid @RequestParam Integer systemPersonnelId, @Valid @RequestParam Integer jobAdvertId) { 92 | 93 | Result result = this.authService.systemPersonnelConfirmOfJobAdvert(systemPersonnelId, jobAdvertId); 94 | 95 | if (result.isSuccess()) { 96 | return ResponseEntity.ok(result); 97 | } else { 98 | return ResponseEntity.badRequest().body(result); 99 | } 100 | 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobAdvert.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDateTime; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotBlank; 14 | 15 | import org.springframework.lang.Nullable; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "job_adverts") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class JobAdvert { 27 | 28 | @Id 29 | @Column(name = "id") 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | private Integer id; 32 | 33 | // @Column(name = "job_type_id") 34 | // private Integer jobTypeId; 35 | // 36 | // @Column(name = "job_style_id") 37 | // private Integer jobStyleId; 38 | // 39 | // @Column(name = "city_id") 40 | // private Integer cityId; 41 | // 42 | // @Column(name = "job_title_id") 43 | // private Integer jobTitleId; 44 | // 45 | // @Column(name = "employer_id") 46 | // private Integer employerId; 47 | 48 | @NotBlank 49 | @Column(name = "job_definition") 50 | private String jobDefinition; 51 | 52 | @Nullable 53 | @Column(name = "min_salary") 54 | private Integer minSalary; 55 | 56 | @Nullable 57 | @Column(name = "max_salary") 58 | private Integer maxSalary; 59 | 60 | @NotBlank 61 | @Column(name = "number_of_open_positions") 62 | private Integer numberOfOpenPositions; 63 | 64 | @Column(name = "published_date_time") 65 | private LocalDateTime publishedDateTime; 66 | 67 | @NotBlank 68 | @Column(name = "deadline_for_appeal") 69 | private LocalDateTime deadLineForAppeal; 70 | 71 | @Column(name = "is_active") 72 | private Boolean active = true; 73 | 74 | @NotBlank 75 | @ManyToOne() 76 | @JoinColumn(name = "city_id") 77 | private City city; 78 | 79 | @NotBlank 80 | @ManyToOne() 81 | @JoinColumn(name = "job_title_id") 82 | private JobTitle jobTitle; 83 | 84 | @NotBlank 85 | @ManyToOne() 86 | @JoinColumn(name = "employer_id") 87 | private Employer employer; 88 | 89 | @NotBlank 90 | @ManyToOne() 91 | @JoinColumn(name = "job_type_id") 92 | private JobType jobType; 93 | 94 | @NotBlank 95 | @ManyToOne() 96 | @JoinColumn(name = "job_style_id") 97 | private JobStyle jobStyle; 98 | 99 | // @OneToOne(mappedBy = "jobAdvert") 100 | // private SystemPersonnelConfirmOfJobAdvert systemPersonnelConfirmOfJobAdvert; 101 | 102 | 103 | 104 | 105 | public JobAdvert(Integer cityId, Integer jobTitleId, Integer employerId, Integer jobTypeId, 106 | Integer jobStyleId, String jobDefinition, Integer minSalary, Integer maxSalary, 107 | int numberOfOpenPositions, LocalDateTime deadLineForAppeal) { 108 | // JobAdvertAddDto Constructor 109 | 110 | super(); 111 | 112 | this.jobDefinition = jobDefinition; 113 | 114 | this.minSalary = minSalary; 115 | this.maxSalary = maxSalary; 116 | 117 | this.numberOfOpenPositions = numberOfOpenPositions; 118 | this.deadLineForAppeal = deadLineForAppeal; 119 | 120 | this.city = new City(); 121 | this.city.setId(cityId); 122 | 123 | this.jobTitle = new JobTitle(); 124 | this.jobTitle.setId(jobTitleId); 125 | 126 | this.employer = new Employer(); 127 | this.employer.setId(employerId); 128 | 129 | this.jobType = new JobType(); 130 | this.jobType.setId(jobTypeId); 131 | 132 | this.jobStyle = new JobStyle(); 133 | this.jobStyle.setId(jobStyleId); 134 | 135 | } 136 | 137 | 138 | } 139 | -------------------------------------------------------------------------------- /src/main/java/hrms/humanResourcesManagementSystem/entities/concretes/JobSeekerCVEducation.java: -------------------------------------------------------------------------------- 1 | package hrms.humanResourcesManagementSystem.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.time.LocalDateTime; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.OneToOne; 14 | import javax.persistence.PrePersist; 15 | import javax.persistence.Table; 16 | 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | 20 | import lombok.AllArgsConstructor; 21 | import lombok.Data; 22 | import lombok.NoArgsConstructor; 23 | 24 | @Data 25 | @Table(name = "job_seeker_cv_educations") 26 | @AllArgsConstructor 27 | @NoArgsConstructor 28 | @Entity 29 | public class JobSeekerCVEducation { 30 | 31 | @Id 32 | @GeneratedValue(strategy = GenerationType.IDENTITY) 33 | @Column(name = "id") 34 | private Integer id; 35 | 36 | // @Column(name = "job_seeker_cv_id") 37 | // private int jobSekeerCVId; 38 | // 39 | // @Column(name = "degree_id") 40 | // private int degreeId; 41 | 42 | // @Column(name = "school_id") 43 | // private int schoolId; 44 | 45 | // @Column(name = "faculty_id") 46 | // private int facultyId; 47 | 48 | // @Column(name = "study_field_id") 49 | // private int studyFieldId; 50 | 51 | @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") 52 | @Column(name = "starting_date") 53 | private LocalDate startingDate; 54 | 55 | @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") 56 | @Column(name = "graduation_date") 57 | private LocalDate graduationDate; 58 | 59 | @Column(name = "added_date_time") 60 | private LocalDateTime addedDateTime = LocalDateTime.now(); 61 | 62 | @Column(name = "status") 63 | private String status; 64 | 65 | @PrePersist 66 | void setStatus() { 67 | 68 | if(graduationDate != null) { 69 | this.status = "Tamamlanmış"; 70 | } 71 | if(graduationDate == null){ 72 | this.status = "Devam Ediyor"; 73 | } 74 | } 75 | 76 | // @JsonIgnore 77 | @JsonIgnoreProperties({"jobSeekerCVEducations", "githubAddress", "linkedInAddress", 78 | "coverLetter", "active", "jobSeekerCVSkills", 79 | "jobSeekerCVLanguages", "jobSeekerCVExperiences", "jobSeekerCVImage"}) 80 | @ManyToOne() 81 | @JoinColumn(name = "job_seeker_cv_id") 82 | private JobSeekerCV jobSeekerCV; 83 | 84 | @OneToOne() 85 | @JoinColumn(name = "degree_id") 86 | private EducationDegree educationDegree; 87 | 88 | @OneToOne() 89 | @JoinColumn(name = "school_id") 90 | private EducationSchool educationSchool; 91 | 92 | @OneToOne() 93 | @JoinColumn(name = "faculty_id") 94 | private EducationFaculty educationFaculty; 95 | 96 | @OneToOne() 97 | @JoinColumn(name = "study_field_id") 98 | private EducationStudyField educationStudyField; 99 | 100 | 101 | public JobSeekerCVEducation(Integer degreeId, Integer schoolId, Integer facultyId, 102 | Integer studyFieldId, LocalDate startingDate, LocalDate graduationDate, 103 | Integer jobSeekerCVId) { 104 | 105 | this.educationDegree = new EducationDegree(); 106 | this.educationDegree.setId(degreeId); 107 | 108 | this.educationSchool = new EducationSchool(); 109 | this.educationSchool.setId(schoolId); 110 | 111 | this.educationFaculty = new EducationFaculty(); 112 | this.educationFaculty.setId(facultyId); 113 | 114 | this.educationStudyField = new EducationStudyField(); 115 | this.educationStudyField.setId(studyFieldId); 116 | 117 | // this.jobSekeerCVId = jobSeekerCVId; 118 | 119 | this.jobSeekerCV = new JobSeekerCV(); 120 | this.jobSeekerCV.setId(jobSeekerCVId); 121 | 122 | this.startingDate = startingDate; 123 | 124 | this.graduationDate = graduationDate; 125 | 126 | } 127 | 128 | 129 | 130 | 131 | } 132 | --------------------------------------------------------------------------------