├── Database Details ├── db.png └── README.md ├── Project's Images ├── api.png └── ss.png ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ ├── maven-wrapper.properties │ └── MavenWrapperDownloader.java ├── Apple-Asset-inanimate-insanity-39617874-159-184.png.crdownload ├── src ├── main │ ├── java │ │ └── kodlamaio │ │ │ └── humanResourcesProject │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ ├── ISkillDao.java │ │ │ │ ├── ILanguageDao.java │ │ │ │ ├── ISystemUserDao.java │ │ │ │ ├── ICityDao.java │ │ │ │ ├── IPhotoDao.java │ │ │ │ ├── IUserDao.java │ │ │ │ ├── IEmployerDao.java │ │ │ │ ├── IJobPositionDao.java │ │ │ │ ├── IEmailValidationDao.java │ │ │ │ ├── IJobSeekerPositionDao.java │ │ │ │ ├── IStaffValidationDao.java │ │ │ │ ├── IJobSeekerReferenceDao.java │ │ │ │ ├── IJobSeekerDao.java │ │ │ │ ├── IJobSeekerFavoriteDao.java │ │ │ │ ├── IJobSeekerCertificateDao.java │ │ │ │ ├── IJobSeekerSchoolDao.java │ │ │ │ ├── IJobSeekerLanguageDao.java │ │ │ │ ├── IJobSeekerExperienceDao.java │ │ │ │ ├── IJobAdvertisementRequireSkillDao.java │ │ │ │ ├── IJobSeekerSkillDao.java │ │ │ │ └── IJobAdvertisementDao.java │ │ │ ├── core │ │ │ ├── Security │ │ │ │ └── Mernis │ │ │ │ │ ├── KPSPublicSoap.java │ │ │ │ │ ├── KPSPublic.java │ │ │ │ │ ├── KPSPublicSoapProxy.java │ │ │ │ │ ├── KPSPublicLocator.java │ │ │ │ │ └── KPSPublicSoapStub.java │ │ │ ├── utilities │ │ │ │ └── results │ │ │ │ │ ├── ErrorResult.java │ │ │ │ │ ├── SuccessResult.java │ │ │ │ │ ├── DataResult.java │ │ │ │ │ ├── ErrorDataResult.java │ │ │ │ │ ├── SuccessDataResult.java │ │ │ │ │ └── Result.java │ │ │ ├── uploadService │ │ │ │ └── imageUplad │ │ │ │ │ ├── ImageUploaderService.java │ │ │ │ │ └── ImageUploaderManager.java │ │ │ └── exceptionHandler │ │ │ │ └── HandleValidationExceptions.java │ │ │ ├── entities │ │ │ ├── dtos │ │ │ │ ├── JobSeekerCoverLetterDto.java │ │ │ │ ├── JobSeekerSkillDetailsDto.java │ │ │ │ ├── JobSeekerLinksDto.java │ │ │ │ └── CvDto.java │ │ │ └── concretes │ │ │ │ ├── SystemUser.java │ │ │ │ ├── EmailValidation.java │ │ │ │ ├── Photo.java │ │ │ │ ├── JobSeekerPosition.java │ │ │ │ ├── JobSeekerCertificate.java │ │ │ │ ├── StaffValidation.java │ │ │ │ ├── JobSeekerSkill.java │ │ │ │ ├── JobAdvertisementRequireSkill.java │ │ │ │ ├── JobSeekerSchool.java │ │ │ │ ├── Skill.java │ │ │ │ ├── JobSeekerLanguage.java │ │ │ │ ├── JobSeekerFavorite.java │ │ │ │ ├── Language.java │ │ │ │ ├── JobSeekerReference.java │ │ │ │ ├── User.java │ │ │ │ ├── JobSeekerExperience.java │ │ │ │ ├── Employer.java │ │ │ │ ├── JobPosition.java │ │ │ │ ├── City.java │ │ │ │ ├── JobSeeker.java │ │ │ │ └── JobAdvertisement.java │ │ │ ├── business │ │ │ ├── validations │ │ │ │ └── mernis │ │ │ │ │ ├── IMernisCheckService.java │ │ │ │ │ └── MernisCheckManager.java │ │ │ ├── abstracts │ │ │ │ ├── ISkillService.java │ │ │ │ ├── ICityService.java │ │ │ │ ├── ISystemUserService.java │ │ │ │ ├── ILanguageService.java │ │ │ │ ├── IPhotoService.java │ │ │ │ ├── IJobSeekerFavoriteService.java │ │ │ │ ├── IJobPositionService.java │ │ │ │ ├── IJobSeekerReferenceService.java │ │ │ │ ├── IJobSeekerSkillService.java │ │ │ │ ├── IEmployerService.java │ │ │ │ ├── IJobSeekerPositionService.java │ │ │ │ ├── IJobSeekerCertificateService.java │ │ │ │ ├── IUserService.java │ │ │ │ ├── IStaffValidationService.java │ │ │ │ ├── IJobSeekerSchoolService.java │ │ │ │ ├── IJobSeekerLanguageService.java │ │ │ │ ├── IJobSeekerExperienceService.java │ │ │ │ ├── IEmailValidationService.java │ │ │ │ ├── IJobSeekerService.java │ │ │ │ ├── IJobAdvertisementRequireSkillService.java │ │ │ │ └── IJobAdvertisementService.java │ │ │ └── concretes │ │ │ │ ├── SystemUserManager.java │ │ │ │ ├── CityManager.java │ │ │ │ ├── JobSeekerFavoriteManager.java │ │ │ │ ├── JobSeekerReferenceManager.java │ │ │ │ ├── JobSeekerCertificateManager.java │ │ │ │ ├── UserManager.java │ │ │ │ ├── JobSeekerPositionManager.java │ │ │ │ ├── JobSeekerSkillManager.java │ │ │ │ ├── JobSeekerExperienceManager.java │ │ │ │ ├── JobSeekerSchoolManager.java │ │ │ │ ├── JobSeekerLanguageManager.java │ │ │ │ ├── EmailValidationManager.java │ │ │ │ ├── PhotoManager.java │ │ │ │ ├── StaffValidationManager.java │ │ │ │ ├── SkillManager.java │ │ │ │ ├── JobAdvertisementRequireSkillManager.java │ │ │ │ ├── LanguageManager.java │ │ │ │ ├── JobPositionManager.java │ │ │ │ ├── EmployerManager.java │ │ │ │ ├── JobAdvertisementManager.java │ │ │ │ └── JobSeekerManager.java │ │ │ ├── config │ │ │ └── AppConfig.java │ │ │ ├── HumanResourcesProjectApplication.java │ │ │ └── api │ │ │ ├── CityController.java │ │ │ ├── PhotoController.java │ │ │ ├── SkillController.java │ │ │ ├── SystemUserController.java │ │ │ ├── LanguageController.java │ │ │ ├── JobSeekerReferenceController.java │ │ │ ├── JobSeekerFavoriteController.java │ │ │ ├── JobSeekerSchoolController.java │ │ │ ├── JobSeekerCertificateController.java │ │ │ ├── JobSeekerLanguageController.java │ │ │ ├── JobSeekerExperienceController.java │ │ │ ├── EmailValidationController.java │ │ │ ├── JobSeekerSkillController.java │ │ │ ├── JobSeekerPositionController.java │ │ │ ├── JobPositionsController.java │ │ │ ├── StaffValidationController.java │ │ │ ├── UserController.java │ │ │ ├── JobSeekerController.java │ │ │ ├── JobAdvertisementRequireSkillController.java │ │ │ ├── EmployerController.java │ │ │ └── JobAdvertisementController.java │ └── resources │ │ └── application.properties └── test │ └── java │ └── kodlamaio │ └── humanResourcesProject │ └── HumanResourcesProjectApplicationTests.java ├── README.md ├── .gitignore ├── pom.xml ├── mvnw.cmd └── mvnw /Database Details/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/HRMSProject/HEAD/Database Details/db.png -------------------------------------------------------------------------------- /Project's Images/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/HRMSProject/HEAD/Project's Images/api.png -------------------------------------------------------------------------------- /Project's Images/ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/HRMSProject/HEAD/Project's Images/ss.png -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/HRMSProject/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /Database Details/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Apple-Asset-inanimate-insanity-39617874-159-184.png.crdownload: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/erhangocen/HRMSProject/HEAD/Apple-Asset-inanimate-insanity-39617874-159-184.png.crdownload -------------------------------------------------------------------------------- /.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/kodlamaio/humanResourcesProject/dataAccess/abstracts/ISkillDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.Skill; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface ISkillDao extends JpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/Security/Mernis/KPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.Security.Mernis; 2 | 3 | public interface KPSPublicSoap extends java.rmi.Remote { 4 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException; 5 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/ILanguageDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.Language; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface ILanguageDao extends JpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/ISystemUserDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.SystemUser; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface ISystemUserDao extends JpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/kodlamaio/humanResourcesProject/HumanResourcesProjectApplicationTests.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HumanResourcesProjectApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.utilities.results; 2 | 3 | public class ErrorResult extends Result{ 4 | 5 | public ErrorResult(String message) { 6 | super(message, false); 7 | } 8 | 9 | public ErrorResult(){ 10 | super(false); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.utilities.results; 2 | 3 | public class SuccessResult extends Result{ 4 | 5 | public SuccessResult(String message) { 6 | super(message, true); 7 | } 8 | 9 | public SuccessResult(){ 10 | super(true); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/ICityDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.City; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface ICityDao extends JpaRepository { 7 | City findById(int id); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IPhotoDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.Photo; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface IPhotoDao extends JpaRepository { 7 | Photo findByUserId(int id); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/dtos/JobSeekerCoverLetterDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @NoArgsConstructor 9 | @AllArgsConstructor 10 | public class JobSeekerCoverLetterDto { 11 | private int userId; 12 | private String coverLetter; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect 2 | spring.jpa.hibernate.ddl-auto=update 3 | spring.jpa.hibernate.show-sql=true 4 | spring.datasource.url=jdbc:postgresql://localhost:5432/HumanResources 5 | spring.datasource.username=postgres 6 | spring.datasource.password=12345 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | server.port = 5050 -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/validations/mernis/IMernisCheckService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.validations.mernis; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeeker; 5 | 6 | public interface IMernisCheckService { 7 | Result checkIfRealPerson(JobSeeker jobSeeker) throws Exception; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IUserDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IUserDao extends JpaRepository { 9 | List findByEmail(String email); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/Security/Mernis/KPSPublic.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.Security.Mernis; 2 | 3 | public interface KPSPublic extends javax.xml.rpc.Service { 4 | public java.lang.String getKPSPublicSoapAddress(); 5 | 6 | public KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException; 7 | 8 | public KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; 9 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IEmployerDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.Employer; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IEmployerDao extends JpaRepository { 9 | List findByPhoneNumber(String phoneNumber); 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## AYT'den çıktıktan sonra koşa koşa gelip bitireceğim... (BİTİRDİM!) 3 | 4 | # Proje Kodları: Src > Main > Java 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/dtos/JobSeekerSkillDetailsDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @NoArgsConstructor 9 | @AllArgsConstructor 10 | public class JobSeekerSkillDetailsDto { 11 | private int id; 12 | private int skillId; 13 | private int userId; 14 | private String skillName; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobPositionDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobPosition; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobPositionDao extends JpaRepository { 9 | List findByPositionName(String positionName); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IEmailValidationDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface IEmailValidationDao extends JpaRepository { 7 | EmailValidation findByUserId(int userId); 8 | EmailValidation findById(int id); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerPositionDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerPosition; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerPositionDao extends JpaRepository { 9 | List findByUserId(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IStaffValidationDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.StaffValidation; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface IStaffValidationDao extends JpaRepository { 7 | StaffValidation findByUserId(int userId); 8 | StaffValidation findById(int id); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/uploadService/imageUplad/ImageUploaderService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.uploadService.imageUplad; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 6 | import org.springframework.web.multipart.MultipartFile; 7 | 8 | public interface ImageUploaderService { 9 | 10 | DataResult uploadImageFile(MultipartFile imageFile); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerReferenceDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerReference; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerReferenceDao extends JpaRepository { 9 | List findByUserId(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeeker; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerDao extends JpaRepository { 9 | List findByNationalId(String nationalId); 10 | JobSeeker findById(int id); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerFavoriteDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerFavorite; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerFavoriteDao extends JpaRepository { 9 | List findByUserIdOrderByAddDateDesc(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/dtos/JobSeekerLinksDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @NoArgsConstructor 9 | @AllArgsConstructor 10 | public class JobSeekerLinksDto { 11 | private int userId; 12 | private String githubLink; 13 | private String linkedinLink; 14 | private String instagramLink; 15 | private String twitterLink; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerCertificateDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerCertificate; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerCertificateDao extends JpaRepository { 9 | List findByUserIdOrderByCertificateYearDesc(int userId); 10 | } 11 | -------------------------------------------------------------------------------- /.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/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerSchoolDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSchool; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerSchoolDao extends JpaRepository { 9 | List findByUserId(int id); 10 | List findByUserIdOrderByStartYearDesc(int id); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerLanguageDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerLanguage; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerLanguageDao extends JpaRepository { 9 | List findByUserId(int id); 10 | List findByUserIdOrderByLevelDesc(int id); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerExperienceDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerExperience; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface IJobSeekerExperienceDao extends JpaRepository { 9 | List findByUserId(int id); 10 | List findByUserIdOrderByStartDateDesc(int id); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.utilities.results; 2 | 3 | public class DataResult extends Result { 4 | 5 | private T data; 6 | 7 | public DataResult(T data, String message, boolean success) { 8 | super(message, success); 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 data; 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/ISkillService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.Skill; 6 | 7 | import java.util.List; 8 | 9 | public interface ISkillService { 10 | Result add(Skill skill); 11 | Result delete(Skill skill); 12 | DataResult> getAll(); 13 | DataResult> getNoHaveUser(int userId); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.utilities.results; 2 | 3 | public class ErrorDataResult extends DataResult{ 4 | 5 | public ErrorDataResult(T data, String message) { 6 | super(data, message, false); 7 | } 8 | 9 | public ErrorDataResult(T data){ 10 | super(data,false); 11 | } 12 | 13 | public ErrorDataResult(String message){ 14 | super(null,message,false); 15 | } 16 | 17 | public ErrorDataResult(){ 18 | super(null,null,false); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.utilities.results; 2 | 3 | public class SuccessDataResult extends DataResult{ 4 | 5 | public SuccessDataResult(T data, String message) { 6 | super(data, message, true); 7 | } 8 | 9 | public SuccessDataResult(T data){ 10 | super(data,true); 11 | } 12 | 13 | public SuccessDataResult(String message){ 14 | super(null,message,true); 15 | } 16 | 17 | public SuccessDataResult(){ 18 | super(null,null,true); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/ICityService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.City; 6 | import lombok.Data; 7 | 8 | import java.util.List; 9 | 10 | public interface ICityService { 11 | 12 | Result add(City city); 13 | Result delete(City city); 14 | 15 | DataResult> getAll(); 16 | DataResult getById(int id); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/SystemUser.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.Entity; 8 | import javax.persistence.PrimaryKeyJoinColumn; 9 | import javax.persistence.Table; 10 | 11 | @PrimaryKeyJoinColumn(name = "user_id", referencedColumnName = "user_id") 12 | @Data 13 | @EqualsAndHashCode(callSuper=false) 14 | @Entity 15 | @NoArgsConstructor 16 | @Table(name = "system_users") 17 | public class SystemUser extends User { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/ISystemUserService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.SystemUser; 6 | import org.w3c.dom.ls.LSInput; 7 | 8 | import java.util.List; 9 | 10 | public interface ISystemUserService { 11 | Result add(SystemUser systemUser); 12 | Result delete(SystemUser systemUser); 13 | DataResult> getAll(); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.utilities.results; 2 | 3 | public class Result { 4 | private boolean success; 5 | private String message; 6 | 7 | public Result(boolean success) { 8 | this.success = success; 9 | } 10 | 11 | public Result(String message, boolean success) { 12 | this(success); 13 | this.message = message; 14 | } 15 | 16 | public boolean isSuccess() { 17 | return success; 18 | } 19 | 20 | 21 | public String getMessage() { 22 | return message; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/ILanguageService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.Language; 6 | 7 | import java.util.List; 8 | 9 | public interface ILanguageService { 10 | Result add(Language language); 11 | Result delete(Language language); 12 | 13 | DataResult> getAll(); 14 | DataResult> getNoHaveLanguages(int userId); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IPhotoService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.Photo; 6 | import org.springframework.web.multipart.MultipartFile; 7 | 8 | public interface IPhotoService { 9 | Result add(Photo photo); 10 | Result update(int userId, MultipartFile multipartFile); 11 | Result delete(Photo photo); 12 | 13 | DataResult getByUserId(int id); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerFavoriteService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerFavorite; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerFavoriteService { 10 | Result add(JobSeekerFavorite jobSeekerFavorite); 11 | Result delete(JobSeekerFavorite jobSeekerFavorite); 12 | DataResult> getByUserId(int id); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobPositionService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobPosition; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobPositionService { 10 | 11 | Result add(JobPosition jobPosition); 12 | Result delete(JobPosition jobPosition); 13 | DataResult> getAll(); 14 | DataResult> getNoHavePositions(int userId); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerReferenceService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerReference; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerReferenceService { 10 | 11 | Result add(JobSeekerReference jobSeekerReference); 12 | Result delete(JobSeekerReference jobSeekerReference); 13 | 14 | DataResult> getAllReferencesByUserId(int id); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerSkillService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSkill; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerSkillService { 10 | Result add(JobSeekerSkill jobSeekerSkill); 11 | Result delete(JobSeekerSkill jobSeekerSkill); 12 | DataResult> getAll(); 13 | DataResult> getByUserId(int id); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IEmployerService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.City; 6 | import kodlamaio.humanResourcesProject.entities.concretes.Employer; 7 | 8 | import java.util.List; 9 | 10 | public interface IEmployerService { 11 | 12 | Result add(Employer employer); 13 | Result update(Employer employer); 14 | Result delete(Employer employer); 15 | DataResult> getAll(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobAdvertisementRequireSkillDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisementRequireSkill; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobAdvertisementRequireSkillDao extends JpaRepository { 10 | List findBySkillId(int id); 11 | List findByJobAdvertisementsId(int id); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerPositionService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerPosition; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerPositionService { 10 | 11 | Result add(JobSeekerPosition jobSeekerPosition); 12 | Result delete(JobSeekerPosition jobSeekerPosition); 13 | DataResult> getAll(); 14 | DataResult> getByUserId(int id); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobSeekerSkillDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSkill; 4 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerSkillDetailsDto; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.Query; 8 | 9 | import java.util.List; 10 | 11 | public interface IJobSeekerSkillDao extends JpaRepository { 12 | List findByUserId(int id, Pageable pageable); 13 | List findByUserId(int id); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerCertificateService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerCertificate; 6 | 7 | import java.security.cert.Certificate; 8 | import java.util.List; 9 | 10 | public interface IJobSeekerCertificateService { 11 | Result add(JobSeekerCertificate jobSeekerCertificate); 12 | Result delete(JobSeekerCertificate jobSeekerCertificate); 13 | 14 | DataResult> getAllCertificatesByUserId(int id); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IUserService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 6 | import kodlamaio.humanResourcesProject.entities.concretes.User; 7 | 8 | import java.util.List; 9 | 10 | public interface IUserService { 11 | 12 | DataResult getByUserId(int id); 13 | DataResult> getAllUser(); 14 | 15 | Result checkEmail(User user); 16 | Result validate(EmailValidation emailValidation); 17 | Result delete(User user); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IStaffValidationService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.StaffValidation; 6 | 7 | import java.util.List; 8 | 9 | public interface IStaffValidationService { 10 | 11 | Result add(StaffValidation staffValidation); 12 | Result validate(int employerId, int systemUserId); 13 | Result delete(StaffValidation staffValidation); 14 | DataResult> getAll(); 15 | DataResult getByUserId(int id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerSchoolService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSchool; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerSchoolService { 10 | Result add(JobSeekerSchool jobSeekerSchool); 11 | Result delete(JobSeekerSchool jobSeekerSchool); 12 | 13 | DataResult> getAll(); 14 | DataResult> getByUserId(int id); 15 | 16 | DataResult> getByUserIdOrderByStartYearDesc(int id); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerLanguageService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerLanguage; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerLanguageService { 10 | Result add(JobSeekerLanguage jobSeekerLanguage); 11 | Result delete(JobSeekerLanguage jobSeekerLanguage); 12 | 13 | DataResult> getAll(); 14 | DataResult> getByUserId(int id); 15 | DataResult> getByUserIdOrderByLevelDesc(int id); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerExperienceService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerExperience; 6 | 7 | import java.util.List; 8 | 9 | public interface IJobSeekerExperienceService { 10 | Result add(JobSeekerExperience jobSeekerExperience); 11 | Result delete(JobSeekerExperience jobSeekerExperience); 12 | 13 | DataResult> getAll(); 14 | DataResult> getByUserId(int id); 15 | 16 | DataResult> getByUserIdOrderByStartDateDesc(int id); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IEmailValidationService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.City; 6 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 7 | import kodlamaio.humanResourcesProject.entities.concretes.Employer; 8 | 9 | import java.util.List; 10 | 11 | public interface IEmailValidationService { 12 | Result add(EmailValidation emailValidation); 13 | Result delete(EmailValidation emailValidation); 14 | Result validate(int userId); 15 | DataResult> getAll(); 16 | DataResult getByUserId(int id); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/config/AppConfig.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.config; 2 | 3 | import org.modelmapper.ModelMapper; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | import com.cloudinary.Cloudinary; 8 | import com.cloudinary.utils.ObjectUtils; 9 | 10 | import java.util.Map; 11 | 12 | @Configuration 13 | public class AppConfig { 14 | @Bean 15 | public ModelMapper modelMapper() { 16 | return new ModelMapper(); 17 | } 18 | 19 | @Bean // instance oluşturuyor. 20 | public Cloudinary cloudinary() { 21 | 22 | return new Cloudinary(ObjectUtils.asMap( 23 | "cloud_name", "dbzf16o0x", 24 | "api_key", "984229161941283", 25 | "api_secret", "zENnZeCqMoC1KwBVp8L6GtWeHcQ" 26 | )); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/EmailValidation.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | import javax.validation.constraints.Null; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "email_validation") 17 | public class EmailValidation { 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | @Column(name = "id") 22 | private int id; 23 | 24 | @NotBlank 25 | @NotNull 26 | @Column(name = "user_id") 27 | private int userId; 28 | 29 | @Column(name = "is_valid") 30 | private boolean isValid; 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/dtos/CvDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.dtos; 2 | 3 | import kodlamaio.humanResourcesProject.entities.concretes.*; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.util.List; 9 | 10 | @Data 11 | @NoArgsConstructor 12 | @AllArgsConstructor 13 | public class CvDto { 14 | private JobSeeker jobSeeker; 15 | private Photo photo; 16 | private List jobSeekerCertificates; 17 | private List jobSeekerReferences; 18 | private List jobSeekerSkills; 19 | private List jobSeekerExperiences; 20 | private List jobSeekerPositions; 21 | private List jobSeekerLanguages; 22 | private List jobSeekerSchools; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/dataAccess/abstracts/IJobAdvertisementDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.dataAccess.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import java.util.List; 9 | 10 | public interface IJobAdvertisementDao extends JpaRepository { 11 | JobAdvertisement findById(int id); 12 | List findByIsActiveTrue(); 13 | List findByEmployer_UserIdAndIsActiveTrue(int employerId); 14 | List findByIsActiveTrueOrderByApplicationDeadlineAsc(); 15 | List findByIsActiveTrueOrderByApplicationDeadlineDesc(); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/Photo.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import javax.persistence.*; 9 | import javax.validation.constraints.NotBlank; 10 | import javax.validation.constraints.NotNull; 11 | 12 | @Entity 13 | @Data 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "photos") 17 | public class Photo { 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | @Column(name = "id") 21 | private int id; 22 | 23 | @NotBlank 24 | @NotNull 25 | @Column(name = "photo_url") 26 | private String photoUrl; 27 | 28 | @NotBlank 29 | @NotNull 30 | @Column(name = "user_id") 31 | private int userId; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerPosition.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.NoArgsConstructor; 7 | 8 | import javax.persistence.*; 9 | import javax.validation.constraints.NotBlank; 10 | import javax.validation.constraints.NotNull; 11 | 12 | @Data 13 | @Entity 14 | @EqualsAndHashCode(callSuper=false) 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Table(name = "job_seeker_positions") 18 | public class JobSeekerPosition { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | @Column(name = "id") 23 | private int id; 24 | 25 | @NotNull 26 | @Column(name = "user_id") 27 | private int userId; 28 | 29 | @NotNull 30 | @ManyToOne(fetch = FetchType.LAZY) 31 | @JoinColumn(name = "job_position_id") 32 | private JobPosition jobPosition; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerCertificate.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | 11 | @Entity 12 | @Data 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | @Table(name = "job_seeker_certificates") 16 | public class JobSeekerCertificate { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | @Column(name = "id") 21 | private int id; 22 | 23 | @NotNull 24 | @NotBlank 25 | @Column(name = "certificate_title") 26 | private String certificateTitle; 27 | 28 | @NotNull 29 | @Column(name = "certificate_year") 30 | private int certificateYear; 31 | 32 | @NotNull 33 | @Column(name= "user_id") 34 | private int userId; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/StaffValidation.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import javax.persistence.*; 9 | import javax.validation.constraints.NotBlank; 10 | import javax.validation.constraints.NotNull; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "staff_validation") 17 | public class StaffValidation { 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | @Column(name = "id") 22 | private int id; 23 | 24 | @NotBlank 25 | @NotNull 26 | @Column(name = "employer_id") 27 | private int userId; 28 | 29 | @Column(name = "system_user_id") 30 | private int systemUserId; 31 | 32 | @Column(name = "is_valid") 33 | private boolean isValid; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobSeekerService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeeker; 6 | import kodlamaio.humanResourcesProject.entities.dtos.CvDto; 7 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerCoverLetterDto; 8 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerLinksDto; 9 | 10 | import java.util.List; 11 | 12 | public interface IJobSeekerService { 13 | Result add(JobSeeker jobSeeker) throws Exception; 14 | Result delete(JobSeeker jobSeeker); 15 | DataResult getCv(int userId); 16 | Result updateLinks(JobSeekerLinksDto jobSeekerLinksDto); 17 | Result updateCoverLetter(JobSeekerCoverLetterDto jobSeekerCoverLetterDto); 18 | DataResult> getAll(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerSkill.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import javax.persistence.*; 9 | import javax.validation.constraints.NotBlank; 10 | import javax.validation.constraints.NotNull; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "job_seeker_skills") 17 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) 18 | public class JobSeekerSkill { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | @Column(name = "id") 23 | private int id; 24 | 25 | @NotNull 26 | @JoinColumn(name = "skill_id") 27 | @ManyToOne(fetch = FetchType.LAZY) 28 | private Skill skill; 29 | 30 | 31 | @NotNull 32 | @Column(name = "user_id") 33 | private int userId; 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobAdvertisementRequireSkillService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.City; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 7 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisementRequireSkill; 8 | 9 | import java.util.List; 10 | 11 | public interface IJobAdvertisementRequireSkillService { 12 | Result add(JobAdvertisementRequireSkill jobAdvertisementRequireSkill); 13 | Result delete(JobAdvertisementRequireSkill jobAdvertisementRequireSkill); 14 | DataResult> getAll(); 15 | DataResult> getBySkillId(int id); 16 | DataResult> getByJobAdvertisementId(int id); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobAdvertisementRequireSkill.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | 13 | @Data 14 | @Entity 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Table(name = "job_advertisements_require_skills") 18 | public class JobAdvertisementRequireSkill { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | @Column(name = "id") 23 | private int id; 24 | 25 | @NotBlank 26 | @NotNull 27 | @Column(name = "job_advertisements_id") 28 | private int jobAdvertisementsId; 29 | 30 | @NotBlank 31 | @NotNull 32 | @Column(name = "skill_id") 33 | private int skillId; 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerSchool.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | 11 | @Data 12 | @Entity 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | @Table(name = "job_seeker_schools") 16 | public class JobSeekerSchool { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | @Column(name = "id") 21 | private int id; 22 | 23 | @NotBlank 24 | @NotNull 25 | @Column(name = "school_name") 26 | private String schoolName; 27 | 28 | 29 | @Column(name = "department_name") 30 | private String departmentName; 31 | 32 | @NotNull 33 | @Column(name = "start_year") 34 | private int startYear; 35 | 36 | 37 | @Column(name = "finish_year") 38 | private int finishYear; 39 | 40 | @NotNull 41 | @Column(name = "user_id") 42 | private int userId; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/Skill.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | import java.util.List; 13 | 14 | @Data 15 | @Entity 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Table(name = "skills") 19 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) 20 | public class Skill { 21 | 22 | @Id 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | @Column(name = "id") 25 | private int id; 26 | 27 | 28 | @NotNull 29 | @Column(name = "skill_name") 30 | private String skillName; 31 | 32 | @JsonIgnore(value = true) 33 | @OneToMany(mappedBy = "skill", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 34 | private List jobSeekerSkills; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerLanguage.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.hibernate.validator.constraints.Length; 7 | 8 | import javax.persistence.*; 9 | import javax.validation.constraints.Max; 10 | import javax.validation.constraints.Min; 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.NotNull; 13 | 14 | @Data 15 | @Entity 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Table(name = "job_seeker_languages") 19 | public class JobSeekerLanguage { 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | @Column(name = "id") 23 | private int id; 24 | 25 | @NotNull 26 | @JoinColumn(name = "language_id") 27 | @ManyToOne(fetch = FetchType.LAZY) 28 | private Language language; 29 | 30 | @NotNull 31 | @Min(1) 32 | @Max(5) 33 | @Column(name = "level") 34 | private int level; 35 | 36 | @NotNull 37 | @Column(name = "user_id") 38 | private int userId; 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/abstracts/IJobAdvertisementService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.abstracts; 2 | 3 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 5 | import kodlamaio.humanResourcesProject.entities.concretes.City; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 7 | 8 | import java.util.List; 9 | 10 | public interface IJobAdvertisementService { 11 | Result add(JobAdvertisement jobAdvertisement); 12 | Result delete(JobAdvertisement jobAdvertisement); 13 | Result advertisementActiveFalse(int jobAdvertisementId); 14 | Result advertisementActiveTrue(int jobAdvertisementId); 15 | DataResult> getAll(); 16 | DataResult> getActiveAdvertisements(); 17 | 18 | DataResult> getActiveAdvertisementsByEmployer(int employerId); 19 | DataResult> getActiveAdvertisementsByDeadlineAsc(); 20 | DataResult> getActiveAdvertisementsByDeadlineDesc(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerFavorite.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.apache.tomcat.jni.Local; 7 | 8 | import javax.persistence.*; 9 | import javax.validation.constraints.NotBlank; 10 | import javax.validation.constraints.NotNull; 11 | import javax.validation.constraints.Null; 12 | import java.time.LocalDateTime; 13 | import java.util.Date; 14 | 15 | @Entity 16 | @Data 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | @Table(name = "job_seeker_favorites") 20 | public class JobSeekerFavorite { 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | @Column(name = "id") 24 | private int id; 25 | 26 | @NotBlank 27 | @NotNull 28 | @Column(name = "job_advertisement_id") 29 | private int jobAdvertisementId; 30 | 31 | @NotBlank 32 | @NotNull 33 | @Column(name = "user_id") 34 | private int userId; 35 | 36 | @NotBlank 37 | @Null 38 | @Column(name = "add_date") 39 | private LocalDateTime addDate = LocalDateTime.now(); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/Language.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | import java.util.List; 13 | 14 | @Data 15 | @Entity 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @Table(name = "languages") 19 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) 20 | public class Language { 21 | 22 | @Id 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | @Column(name = "id") 25 | private int id; 26 | 27 | @NotBlank 28 | @NotNull 29 | @Column(name = "language_name") 30 | private String languageName; 31 | 32 | @JsonIgnore(value = true) 33 | @OneToMany(mappedBy = "language", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 34 | private List jobSeekerLanguages; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/HumanResourcesProjectApplication.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject; 2 | 3 | import com.cloudinary.Cloudinary; 4 | import com.cloudinary.utils.ObjectUtils; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.context.annotation.Bean; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.spi.DocumentationType; 10 | import springfox.documentation.spring.web.plugins.Docket; 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 | 13 | import java.io.File; 14 | import java.io.IOException; 15 | import java.util.Map; 16 | 17 | @SpringBootApplication 18 | @EnableSwagger2 19 | public class HumanResourcesProjectApplication { 20 | 21 | public static void main(String[] args) { 22 | SpringApplication.run(HumanResourcesProjectApplication.class, args); 23 | } 24 | 25 | @Bean 26 | public Docket api() { 27 | return new Docket(DocumentationType.SWAGGER_2) 28 | .select() 29 | .apis(RequestHandlerSelectors.basePackage("kodlamaio.humanResourcesProject")) 30 | .build(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerReference.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | import javax.validation.constraints.Email; 9 | import javax.validation.constraints.NotBlank; 10 | import javax.validation.constraints.NotNull; 11 | import javax.validation.constraints.Pattern; 12 | 13 | @Entity 14 | @Data 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @Table(name = "job_seeker_references") 18 | public class JobSeekerReference { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | @Column(name = "id") 23 | private int id; 24 | 25 | @NotNull 26 | @Column(name = "user_id") 27 | private int userId; 28 | 29 | @NotNull 30 | @NotBlank 31 | @Column(name = "reference_title") 32 | private String referenceTitle; 33 | 34 | @NotNull 35 | @NotBlank 36 | @Column(name = "reference_name") 37 | private String referenceName; 38 | 39 | @Pattern(regexp = "^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+$") 40 | @Email 41 | @NotNull 42 | @NotBlank 43 | @Column(name = "reference_mail") 44 | private String referenceMail; 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/CityController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.ICityService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.City; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.validation.Valid; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/api/city/") 16 | @CrossOrigin 17 | public class CityController { 18 | private ICityService _cityService; 19 | 20 | @Autowired 21 | public CityController(ICityService cityService) { 22 | this._cityService = cityService; 23 | } 24 | 25 | @GetMapping("getAll") 26 | public ResponseEntity getAll(){ 27 | return ResponseEntity.ok(_cityService.getAll()); 28 | } 29 | 30 | @PostMapping("add") 31 | public ResponseEntity add(@Valid @RequestBody City city){ 32 | return ResponseEntity.ok(_cityService.add(city)); 33 | } 34 | 35 | @DeleteMapping("delete") 36 | public ResponseEntity delete(@RequestBody City city){ 37 | return ResponseEntity.ok(_cityService.delete(city)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/PhotoController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IPhotoService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.Photo; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | import org.springframework.web.multipart.MultipartFile; 9 | 10 | import javax.validation.Valid; 11 | 12 | @RestController 13 | @RequestMapping("/api/photo/") 14 | @CrossOrigin 15 | public class PhotoController { 16 | private IPhotoService _photoService; 17 | 18 | @Autowired 19 | public PhotoController(IPhotoService photoService) { 20 | this._photoService = photoService; 21 | } 22 | 23 | @GetMapping("getByUserId") 24 | public ResponseEntity getByUserId(int id){ 25 | return ResponseEntity.ok(_photoService.getByUserId(id)); 26 | } 27 | 28 | @PostMapping("add") 29 | public ResponseEntity add(@Valid @RequestParam(value = "userId") int userId,@Valid @RequestParam(value = "imageFile") MultipartFile photoFile) { 30 | return ResponseEntity.ok(_photoService.update(userId,photoFile)); 31 | } 32 | 33 | @PostMapping("delete") 34 | public ResponseEntity delete(@RequestBody Photo photo) { 35 | return ResponseEntity.ok(_photoService.delete(photo)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.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.Inheritance; 9 | import javax.persistence.InheritanceType; 10 | import javax.persistence.Table; 11 | import javax.validation.constraints.Email; 12 | import javax.validation.constraints.NotBlank; 13 | import javax.validation.constraints.NotNull; 14 | import javax.validation.constraints.Pattern; 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @NoArgsConstructor 22 | @AllArgsConstructor 23 | @Inheritance(strategy = InheritanceType.JOINED) 24 | @Table(name = "users") 25 | public class User{ 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "user_id") 30 | private int userId; 31 | 32 | 33 | @Pattern(regexp = "^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+$") 34 | @NotNull 35 | @Column(name = "email") 36 | @NotBlank 37 | @Email 38 | private String email; 39 | 40 | @NotBlank 41 | @NotNull 42 | @Column(name = "phone_number") 43 | private String phoneNumber; 44 | 45 | @Column(name = "password") 46 | private String password; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/SkillController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.ISkillService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.Skill; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/skill/") 13 | @CrossOrigin 14 | public class SkillController { 15 | private ISkillService _skillService; 16 | 17 | @Autowired 18 | public SkillController(ISkillService skillService) { 19 | this._skillService = skillService; 20 | } 21 | 22 | @GetMapping("getAll") 23 | public ResponseEntity getAll(){ 24 | return ResponseEntity.ok(_skillService.getAll()); 25 | } 26 | 27 | @GetMapping("getNoHaveSkills") 28 | public ResponseEntity getNoHaveSkills(@RequestParam int userId){ 29 | return ResponseEntity.ok(_skillService.getNoHaveUser(userId)); 30 | } 31 | 32 | @PostMapping("add") 33 | public ResponseEntity add(@Valid @RequestBody Skill skill){ 34 | return ResponseEntity.ok(_skillService.add(skill)); 35 | } 36 | 37 | @DeleteMapping("delete") 38 | public ResponseEntity delete(Skill skill){ 39 | return ResponseEntity.ok(_skillService.delete(skill)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/validations/mernis/MernisCheckManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.validations.mernis; 2 | 3 | import kodlamaio.humanResourcesProject.business.validations.mernis.IMernisCheckService; 4 | import kodlamaio.humanResourcesProject.core.Security.Mernis.KPSPublicSoapProxy; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.ErrorResult; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeeker; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.Locale; 12 | 13 | @Service 14 | public class MernisCheckManager implements IMernisCheckService { 15 | 16 | @Override 17 | public Result checkIfRealPerson(JobSeeker jobSeeker) throws Exception { 18 | KPSPublicSoapProxy kpsPublicSoapProxy = new KPSPublicSoapProxy(); 19 | 20 | boolean result = kpsPublicSoapProxy.TCKimlikNoDogrula(Long.parseLong(jobSeeker.getNationalId()), 21 | jobSeeker.getFirstName().toUpperCase(new Locale("tr","TR")), 22 | jobSeeker.getLastName().toUpperCase(new Locale("tr","TR")), 23 | Integer.parseInt(jobSeeker.getBirthYear())); 24 | 25 | if(!result) { 26 | return new ErrorResult("Your identity authentication is incorrect"); 27 | } 28 | return new SuccessResult(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeekerExperience.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | import java.util.Date; 13 | 14 | @Data 15 | @Entity 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @EqualsAndHashCode(callSuper=false) 19 | @Table(name = "job_seeker_experiences") 20 | public class JobSeekerExperience { 21 | 22 | @Id 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | @Column(name = "id") 25 | private int id; 26 | 27 | 28 | @NotNull 29 | @ManyToOne(fetch = FetchType.LAZY) 30 | @JoinColumn(name = "position_id") 31 | private JobPosition jobPosition; 32 | 33 | @NotBlank 34 | @NotNull 35 | @Column(name = "workplace_name") 36 | private String workplaceName; 37 | 38 | @NotBlank 39 | @NotNull 40 | @Column(name = "experience_explanation") 41 | private String experienceExplanation; 42 | 43 | @NotNull 44 | @Column(name = "start_date") 45 | private Date startDate; 46 | 47 | @Column(name = "finish_date") 48 | private Date finishDate; 49 | 50 | @NotNull 51 | @Column(name = "user_id") 52 | private int userId; 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/exceptionHandler/HandleValidationExceptions.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.exceptionHandler; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import kodlamaio.humanResourcesProject.core.utilities.results.ErrorDataResult; 7 | import org.springframework.http.HttpStatus; 8 | import org.springframework.validation.FieldError; 9 | import org.springframework.web.bind.MethodArgumentNotValidException; 10 | import org.springframework.web.bind.annotation.ControllerAdvice; 11 | import org.springframework.web.bind.annotation.ExceptionHandler; 12 | import org.springframework.web.bind.annotation.ResponseStatus; 13 | import org.springframework.web.bind.annotation.RestControllerAdvice; 14 | 15 | @ControllerAdvice 16 | @RestControllerAdvice 17 | public class HandleValidationExceptions { 18 | 19 | @ExceptionHandler(MethodArgumentNotValidException.class) 20 | @ResponseStatus(HttpStatus.BAD_REQUEST) 21 | public ErrorDataResult handleValidationException(MethodArgumentNotValidException exceptions){ 22 | 23 | Map validationErrors = new HashMap(); 24 | 25 | for(FieldError fieldError : exceptions.getBindingResult().getFieldErrors()) { 26 | validationErrors.put(fieldError.getField(), fieldError.getDefaultMessage()); 27 | } 28 | 29 | ErrorDataResult errors = new ErrorDataResult(validationErrors, "Doğrulama hataları"); 30 | 31 | return errors; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/Employer.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.NotNull; 13 | import java.util.List; 14 | 15 | @PrimaryKeyJoinColumn(name = "user_id", referencedColumnName = "user_id") 16 | @Data 17 | @EqualsAndHashCode(callSuper=false) 18 | @Entity 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | @Table(name = "employers") 22 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","employers","cities","job","job_advertisments","jobAdvertisments"}) 23 | public class Employer extends User { 24 | 25 | @NotBlank 26 | @NotNull 27 | @Column(name = "company_name") 28 | private String companyName; 29 | 30 | @NotBlank 31 | @NotNull 32 | @Column(name = "web_address") 33 | private String webAddress; 34 | 35 | @NotBlank 36 | @NotNull 37 | @ManyToOne(fetch = FetchType.LAZY) 38 | @JoinColumn(name = "city_id") 39 | private City city; 40 | 41 | @JsonIgnore 42 | @OneToMany(mappedBy = "employer", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 43 | private List jobAdvertisements; 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/SystemUserController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.ISystemUserService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.SystemUser; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.validation.Valid; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/api/systemUser/") 16 | @CrossOrigin 17 | public class SystemUserController { 18 | 19 | private ISystemUserService _systemUserService; 20 | 21 | @Autowired 22 | public SystemUserController(ISystemUserService _systemUserService) { 23 | this._systemUserService = _systemUserService; 24 | } 25 | 26 | @GetMapping("getAll") 27 | public ResponseEntity getAll(){ 28 | return ResponseEntity.ok(_systemUserService.getAll()); 29 | } 30 | 31 | @PostMapping("add") 32 | public ResponseEntity add(@Valid @RequestBody SystemUser systemUser){ 33 | return ResponseEntity.ok(_systemUserService.add(systemUser)); 34 | } 35 | 36 | @DeleteMapping("delete") 37 | public ResponseEntity delete(SystemUser systemUser){ 38 | return ResponseEntity.ok(_systemUserService.delete(systemUser)); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/LanguageController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.ILanguageService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.Language; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/language/") 13 | @CrossOrigin 14 | public class LanguageController { 15 | 16 | private ILanguageService _languageService; 17 | 18 | @Autowired 19 | public LanguageController(ILanguageService languageService) { 20 | this._languageService = languageService; 21 | } 22 | 23 | @GetMapping("getAll") 24 | public ResponseEntity getAll(){ 25 | return ResponseEntity.ok(_languageService.getAll()); 26 | } 27 | 28 | @GetMapping("getNoHaveLanguages") 29 | public ResponseEntity getNoHaveLanguages(@RequestParam int userId){ 30 | return ResponseEntity.ok(_languageService.getNoHaveLanguages(userId)); 31 | } 32 | 33 | @PostMapping("add") 34 | public ResponseEntity add(@Valid @RequestBody Language language){ 35 | return ResponseEntity.ok(_languageService.add(language)); 36 | } 37 | 38 | @DeleteMapping("delete") 39 | public ResponseEntity delete(@RequestBody Language language){ 40 | return ResponseEntity.ok(_languageService.delete(language)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/uploadService/imageUplad/ImageUploaderManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.uploadService.imageUplad; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | 6 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.ErrorDataResult; 8 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.web.multipart.MultipartFile; 12 | 13 | import com.cloudinary.Cloudinary; 14 | import com.cloudinary.utils.ObjectUtils; 15 | 16 | @Service 17 | public class ImageUploaderManager implements ImageUploaderService{ 18 | 19 | 20 | private Cloudinary cloudinary; 21 | 22 | @Autowired 23 | public ImageUploaderManager(Cloudinary cloudinary) { 24 | 25 | this.cloudinary =cloudinary; 26 | } 27 | 28 | @Override 29 | public DataResult uploadImageFile(MultipartFile imageFile) { 30 | 31 | try { 32 | @SuppressWarnings("unchecked") 33 | Map resultMap =(Map) cloudinary.uploader().upload(imageFile.getBytes(), ObjectUtils.emptyMap()); 34 | 35 | return new SuccessDataResult(resultMap); 36 | } catch (IOException e) { 37 | 38 | e.printStackTrace(); 39 | } 40 | 41 | return new ErrorDataResult("Cannot added !"); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerReferenceController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerReferenceService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerCertificate; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerReference; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/jobSeekerReference/") 13 | @CrossOrigin 14 | public class JobSeekerReferenceController { 15 | 16 | private IJobSeekerReferenceService _jobSeekerReferenceService; 17 | 18 | public JobSeekerReferenceController(IJobSeekerReferenceService jobSeekerReferenceService) { 19 | this._jobSeekerReferenceService = jobSeekerReferenceService; 20 | } 21 | 22 | @GetMapping("getByUserId") 23 | public ResponseEntity getByUserId(@RequestParam int id){ 24 | return ResponseEntity.ok(_jobSeekerReferenceService.getAllReferencesByUserId(id)); 25 | } 26 | 27 | @PostMapping("add") 28 | public ResponseEntity add(@Valid @RequestBody JobSeekerReference jobSeekerReference){ 29 | return ResponseEntity.ok(_jobSeekerReferenceService.add(jobSeekerReference)); 30 | } 31 | 32 | @DeleteMapping("delete") 33 | public ResponseEntity delete(@RequestBody JobSeekerReference jobSeekerCertificate){ 34 | return ResponseEntity.ok(_jobSeekerReferenceService.add(jobSeekerCertificate)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerFavoriteController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerFavoriteService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerFavorite; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerLanguage; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.http.ResponseEntity; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import javax.validation.Valid; 11 | 12 | @RestController 13 | @RequestMapping("/api/jobSeekerFavorite/") 14 | @CrossOrigin 15 | public class JobSeekerFavoriteController { 16 | private IJobSeekerFavoriteService _jobSeekerFavoriteService; 17 | 18 | @Autowired 19 | public JobSeekerFavoriteController(IJobSeekerFavoriteService jobSeekerFavoriteService) { 20 | this._jobSeekerFavoriteService = jobSeekerFavoriteService; 21 | } 22 | 23 | @GetMapping("getByUserId") 24 | public ResponseEntity getByUserId(int id){ 25 | return ResponseEntity.ok(_jobSeekerFavoriteService.getByUserId(id)); 26 | } 27 | 28 | @PostMapping("add") 29 | public ResponseEntity add(@Valid @RequestBody JobSeekerFavorite jobSeekerFavorite){ 30 | return ResponseEntity.ok(_jobSeekerFavoriteService.add(jobSeekerFavorite)); 31 | } 32 | 33 | @PostMapping("delete") 34 | public ResponseEntity delete(@RequestBody JobSeekerFavorite jobSeekerFavorite){ 35 | return ResponseEntity.ok(_jobSeekerFavoriteService.delete(jobSeekerFavorite)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/SystemUserManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.ISystemUserService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.ISystemUserDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.SystemUser; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class SystemUserManager implements ISystemUserService { 17 | 18 | private ISystemUserDao _systemUserDao; 19 | 20 | @Autowired 21 | public SystemUserManager(ISystemUserDao systemUserDao) { 22 | _systemUserDao = systemUserDao; 23 | } 24 | 25 | 26 | @Override 27 | public Result add(SystemUser systemUser) { 28 | _systemUserDao.save(systemUser); 29 | return new SuccessResult(); 30 | } 31 | 32 | @Override 33 | public Result delete(SystemUser systemUser) { 34 | _systemUserDao.delete(systemUser); 35 | return new SuccessResult(); 36 | } 37 | 38 | @Override 39 | public DataResult> getAll() { 40 | return new SuccessDataResult>(_systemUserDao.findAll()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/CityManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.ICityService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.ICityDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.City; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class CityManager implements ICityService { 17 | 18 | private ICityDao _cityDao; 19 | 20 | @Autowired 21 | public CityManager(ICityDao cityDao) { 22 | _cityDao = cityDao; 23 | } 24 | 25 | @Override 26 | public Result add(City city) { 27 | _cityDao.save(city); 28 | return new SuccessResult(); 29 | } 30 | 31 | @Override 32 | public Result delete(City city) { 33 | _cityDao.delete(city); 34 | return new SuccessResult(); 35 | } 36 | 37 | @Override 38 | public DataResult> getAll() { 39 | return new SuccessDataResult>(_cityDao.findAll()); 40 | } 41 | 42 | @Override 43 | public DataResult getById(int id) { 44 | return new SuccessDataResult(_cityDao.findById(id)); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobPosition.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | import java.util.List; 13 | 14 | @Data 15 | @Entity 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @Table(name = "job_positions") 19 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","employers","cities","job","job_advertisments","jobAdvertisments"}) 20 | public class JobPosition { 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | @Column(name = "id") 24 | private int id; 25 | 26 | @NotBlank 27 | @NotNull 28 | @Column(name = "position_name") 29 | private String positionName; 30 | 31 | @JsonIgnore 32 | @OneToMany(mappedBy = "jobPosition", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 33 | private List jobAdvertisements; 34 | 35 | @JsonIgnore 36 | @OneToMany(mappedBy = "jobPosition", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 37 | private List jobSeekerExperiences; 38 | 39 | @JsonIgnore(value = true) 40 | @OneToMany(mappedBy = "jobPosition", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 41 | private List jobSeekerPositions; 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerSchoolController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerSchoolService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSchool; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/jobSeekerSchool/") 13 | @CrossOrigin 14 | public class JobSeekerSchoolController { 15 | 16 | private IJobSeekerSchoolService _jobSeekerSchoolService; 17 | 18 | @Autowired 19 | public JobSeekerSchoolController(IJobSeekerSchoolService jobSeekerSchoolService) { 20 | this._jobSeekerSchoolService = jobSeekerSchoolService; 21 | } 22 | 23 | @GetMapping("getAll") 24 | public ResponseEntity getAll(){ 25 | return ResponseEntity.ok(_jobSeekerSchoolService.getAll()); 26 | } 27 | 28 | @GetMapping("getByUserId") 29 | public ResponseEntity getByUserId(int id){ 30 | return ResponseEntity.ok(_jobSeekerSchoolService.getByUserId(id)); 31 | } 32 | 33 | @PostMapping("add") 34 | public ResponseEntity add(@Valid @RequestBody JobSeekerSchool jobSeekerSchool){ 35 | return ResponseEntity.ok(_jobSeekerSchoolService.add(jobSeekerSchool)); 36 | } 37 | 38 | @DeleteMapping("delete") 39 | public ResponseEntity delete(@RequestBody JobSeekerSchool jobSeekerSchool){ 40 | return ResponseEntity.ok(_jobSeekerSchoolService.delete(jobSeekerSchool)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerCertificateController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerCertificateService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobPosition; 5 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerCertificate; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.http.ResponseEntity; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import javax.validation.Valid; 11 | 12 | @RestController 13 | @RequestMapping("/api/jobSeekerCertificate/") 14 | @CrossOrigin 15 | public class JobSeekerCertificateController { 16 | private IJobSeekerCertificateService _jobSeekerCertificateService; 17 | 18 | @Autowired 19 | public JobSeekerCertificateController(IJobSeekerCertificateService jobSeekerCertificateService) { 20 | this._jobSeekerCertificateService = jobSeekerCertificateService; 21 | } 22 | 23 | @GetMapping("getByUserId") 24 | public ResponseEntity getByUserId(@RequestParam int id){ 25 | return ResponseEntity.ok(_jobSeekerCertificateService.getAllCertificatesByUserId(id)); 26 | } 27 | 28 | @PostMapping("add") 29 | public ResponseEntity add(@Valid @RequestBody JobSeekerCertificate jobSeekerCertificate){ 30 | return ResponseEntity.ok(_jobSeekerCertificateService.add(jobSeekerCertificate)); 31 | } 32 | 33 | @DeleteMapping("delete") 34 | public ResponseEntity delete(@RequestBody JobSeekerCertificate jobSeekerCertificate){ 35 | return ResponseEntity.ok(_jobSeekerCertificateService.delete(jobSeekerCertificate)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerLanguageController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerLanguageService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerLanguage; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/jobSeekerLanguage/") 13 | @CrossOrigin 14 | public class JobSeekerLanguageController { 15 | 16 | private IJobSeekerLanguageService _jobSeekerLanguageService; 17 | 18 | @Autowired 19 | public JobSeekerLanguageController(IJobSeekerLanguageService jobSeekerLanguageService) { 20 | this._jobSeekerLanguageService = jobSeekerLanguageService; 21 | } 22 | 23 | @GetMapping("getAll") 24 | public ResponseEntity getAll(){ 25 | return ResponseEntity.ok(_jobSeekerLanguageService.getAll()); 26 | } 27 | 28 | @GetMapping("getByUserId") 29 | public ResponseEntity getByUserId(int id){ 30 | return ResponseEntity.ok(_jobSeekerLanguageService.getByUserId(id)); 31 | } 32 | 33 | @PostMapping("add") 34 | public ResponseEntity add(@Valid @RequestBody JobSeekerLanguage jobSeekerLanguage){ 35 | return ResponseEntity.ok(_jobSeekerLanguageService.add(jobSeekerLanguage)); 36 | } 37 | 38 | @DeleteMapping("delete") 39 | public ResponseEntity delete(@RequestBody JobSeekerLanguage jobSeekerLanguage){ 40 | return ResponseEntity.ok(_jobSeekerLanguageService.delete(jobSeekerLanguage)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/City.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | import java.util.List; 13 | 14 | @Data 15 | @Entity 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @Table(name = "cities") 19 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","employers","cities","job","job_advertisments","jobAdvertisments"}) 20 | public class City { 21 | 22 | @Id 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | @Column(name = "id") 25 | private int id; 26 | 27 | @NotBlank 28 | @NotNull 29 | @Column(name = "city_name") 30 | private String cityName; 31 | 32 | @NotBlank 33 | @NotNull 34 | @Column(name = "country_name") 35 | private String countryName; 36 | 37 | @JsonIgnore(value = true) 38 | @OneToMany(mappedBy = "city", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 39 | private List jobAdvertisements; 40 | 41 | @JsonIgnore(value = true) 42 | @OneToMany(mappedBy = "city", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 43 | private List jobSeekers; 44 | 45 | @JsonIgnore(value = true) 46 | @OneToMany(mappedBy = "city", orphanRemoval = true, cascade = CascadeType.ALL, fetch = FetchType.LAZY) 47 | private List employers; 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerFavoriteManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerFavoriteService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerFavoriteDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerFavorite; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | public class JobSeekerFavoriteManager implements IJobSeekerFavoriteService { 16 | 17 | private IJobSeekerFavoriteDao _jobSeekerFavoriteDao; 18 | 19 | public JobSeekerFavoriteManager(IJobSeekerFavoriteDao jobSeekerFavoriteDao) { 20 | _jobSeekerFavoriteDao = jobSeekerFavoriteDao; 21 | } 22 | 23 | @Override 24 | public Result add(JobSeekerFavorite jobSeekerFavorite) { 25 | _jobSeekerFavoriteDao.save(jobSeekerFavorite); 26 | return new SuccessResult(); 27 | } 28 | 29 | @Override 30 | public Result delete(JobSeekerFavorite jobSeekerFavorite) { 31 | _jobSeekerFavoriteDao.delete(jobSeekerFavorite); 32 | return new SuccessResult(); 33 | } 34 | 35 | @Override 36 | public DataResult> getByUserId(int id) { 37 | return new SuccessDataResult>(_jobSeekerFavoriteDao.findByUserIdOrderByAddDateDesc(id)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerExperienceController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerExperienceService; 4 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerExperience; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import javax.validation.Valid; 10 | 11 | @RestController 12 | @RequestMapping("/api/jobSeekerExperience/") 13 | @CrossOrigin 14 | public class JobSeekerExperienceController { 15 | 16 | private IJobSeekerExperienceService _jobSeekerExperienceService; 17 | 18 | @Autowired 19 | public JobSeekerExperienceController(IJobSeekerExperienceService jobSeekerExperienceService) { 20 | this._jobSeekerExperienceService = jobSeekerExperienceService; 21 | } 22 | 23 | @GetMapping("getAll") 24 | public ResponseEntity getAll(){ 25 | return ResponseEntity.ok(_jobSeekerExperienceService.getAll()); 26 | } 27 | 28 | @GetMapping("getByUserId") 29 | public ResponseEntity getByUserId(int id){ 30 | return ResponseEntity.ok(_jobSeekerExperienceService.getByUserId(id)); 31 | } 32 | 33 | @PostMapping("add") 34 | public ResponseEntity add(@Valid @RequestBody JobSeekerExperience jobSeekerExperience){ 35 | return ResponseEntity.ok(_jobSeekerExperienceService.add(jobSeekerExperience)); 36 | } 37 | 38 | @DeleteMapping("delete") 39 | public ResponseEntity delete(@RequestBody JobSeekerExperience jobSeekerExperience){ 40 | return ResponseEntity.ok(_jobSeekerExperienceService.delete(jobSeekerExperience)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobSeeker.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | import javax.validation.constraints.NotBlank; 12 | import javax.validation.constraints.NotNull; 13 | import java.util.List; 14 | 15 | @PrimaryKeyJoinColumn(name = "user_id", referencedColumnName = "user_id") 16 | @Data 17 | @EqualsAndHashCode(callSuper=false) 18 | @Entity 19 | @NoArgsConstructor 20 | @AllArgsConstructor 21 | @Table(name = "job_seekers") 22 | public class JobSeeker extends User { 23 | 24 | @NotBlank 25 | @NotNull 26 | @Column(name = "first_name") 27 | private String firstName; 28 | 29 | @NotBlank 30 | @NotNull 31 | @Column(name = "last_name") 32 | private String lastName; 33 | 34 | @NotBlank 35 | @NotNull 36 | @Column(name = "national_id") 37 | private String nationalId; 38 | 39 | @NotBlank 40 | @NotNull 41 | @Column(name = "birth_year") 42 | private String birthYear; 43 | 44 | @Column(name = "linkedin_link") 45 | private String linkedinLink; 46 | 47 | @Column(name = "github_link") 48 | private String githubLink; 49 | 50 | @Column(name = "instagram_link") 51 | private String instagramLink; 52 | 53 | @Column(name = "twitter_link") 54 | private String twitterLink; 55 | 56 | @Column(name = "cover_letter") 57 | private String coverLetter; 58 | 59 | @NotNull 60 | @ManyToOne(fetch = FetchType.LAZY) 61 | @JoinColumn(name = "city_id") 62 | private City city; 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerReferenceManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerReferenceService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerReferenceDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerReference; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class JobSeekerReferenceManager implements IJobSeekerReferenceService { 17 | 18 | private IJobSeekerReferenceDao _jobSeekerReferenceDao; 19 | 20 | @Autowired 21 | public JobSeekerReferenceManager(IJobSeekerReferenceDao jobSeekerReferenceDao) { 22 | _jobSeekerReferenceDao = jobSeekerReferenceDao; 23 | } 24 | 25 | @Override 26 | public Result add(JobSeekerReference jobSeekerReference) { 27 | _jobSeekerReferenceDao.save(jobSeekerReference); 28 | return new SuccessResult(); 29 | } 30 | 31 | @Override 32 | public Result delete(JobSeekerReference jobSeekerReference) { 33 | _jobSeekerReferenceDao.delete(jobSeekerReference); 34 | return new SuccessResult(); 35 | } 36 | 37 | @Override 38 | public DataResult> getAllReferencesByUserId(int id) { 39 | return new SuccessDataResult>(_jobSeekerReferenceDao.findByUserId(id)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/EmailValidationController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IEmailValidationService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.validation.Valid; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/api/emailValidation/") 16 | @CrossOrigin 17 | public class EmailValidationController { 18 | 19 | private IEmailValidationService _emailValidationService; 20 | 21 | @Autowired 22 | public EmailValidationController(IEmailValidationService emailValidationService) { 23 | this._emailValidationService = emailValidationService; 24 | } 25 | 26 | @PostMapping("add") 27 | public ResponseEntity add(@Valid @RequestBody EmailValidation emailValidation){ 28 | return ResponseEntity.ok(_emailValidationService.add(emailValidation)); 29 | } 30 | 31 | @DeleteMapping("delete") 32 | public ResponseEntity delete(@RequestBody EmailValidation emailValidation){ 33 | return ResponseEntity.ok(_emailValidationService.delete(emailValidation)); 34 | } 35 | 36 | @PostMapping("validate") 37 | public ResponseEntity validate(@RequestParam int userId){ 38 | return ResponseEntity.ok(_emailValidationService.validate(userId)); 39 | } 40 | 41 | @GetMapping("getAll") 42 | public ResponseEntity getAll(){ 43 | return ResponseEntity.ok(_emailValidationService.getAll()); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerSkillController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerSkillService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerPosition; 7 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSkill; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import javax.validation.Valid; 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping("/api/jobSeekerSkill/") 17 | @CrossOrigin 18 | public class JobSeekerSkillController { 19 | private IJobSeekerSkillService _jobSeekerSkillService; 20 | 21 | @Autowired 22 | public JobSeekerSkillController(IJobSeekerSkillService jobSeekerSkillService) { 23 | this._jobSeekerSkillService = jobSeekerSkillService; 24 | } 25 | 26 | @GetMapping("getAll") 27 | public ResponseEntity getAll(){ 28 | return ResponseEntity.ok(_jobSeekerSkillService.getAll()); 29 | } 30 | 31 | @GetMapping("getByUserId") 32 | public ResponseEntity getByUserId(int id){ 33 | return ResponseEntity.ok(_jobSeekerSkillService.getByUserId(id)); 34 | } 35 | 36 | @PostMapping("add") 37 | public ResponseEntity add(@Valid @RequestBody JobSeekerSkill jobSeekerSkill){ 38 | return ResponseEntity.ok(_jobSeekerSkillService.add(jobSeekerSkill)); 39 | } 40 | 41 | @DeleteMapping("delete") 42 | public ResponseEntity delete(JobSeekerSkill jobSeekerSkill){ 43 | return ResponseEntity.ok(_jobSeekerSkillService.delete(jobSeekerSkill)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerPositionController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerPositionService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerPosition; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.validation.Valid; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/api/jobSeekerPosition/") 16 | @CrossOrigin 17 | public class JobSeekerPositionController { 18 | 19 | private IJobSeekerPositionService _jobSeekerPositionService; 20 | 21 | @Autowired 22 | public JobSeekerPositionController(IJobSeekerPositionService _jobSeekerPositionService) { 23 | this._jobSeekerPositionService = _jobSeekerPositionService; 24 | } 25 | 26 | @GetMapping("getAll") 27 | public ResponseEntity getAll(){ 28 | return ResponseEntity.ok(_jobSeekerPositionService.getAll()); 29 | } 30 | 31 | @GetMapping("getByUserId") 32 | public ResponseEntity getByUserId(int id){ 33 | return ResponseEntity.ok(_jobSeekerPositionService.getByUserId(id)); 34 | } 35 | 36 | @PostMapping("add") 37 | public ResponseEntity add(@Valid @RequestBody JobSeekerPosition jobSeekerPosition){ 38 | return ResponseEntity.ok(_jobSeekerPositionService.add(jobSeekerPosition)); 39 | } 40 | 41 | @DeleteMapping("delete") 42 | public ResponseEntity delete(@RequestBody JobSeekerPosition jobSeekerPosition){ 43 | return ResponseEntity.ok(_jobSeekerPositionService.delete(jobSeekerPosition)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobPositionsController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobPositionService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 7 | import kodlamaio.humanResourcesProject.entities.concretes.JobPosition; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import javax.validation.Valid; 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping("/api/jobPosition/") 17 | @CrossOrigin 18 | public class JobPositionsController { 19 | 20 | private final IJobPositionService _jobPositionService; 21 | 22 | @Autowired 23 | public JobPositionsController(IJobPositionService _jobPositionService) { 24 | this._jobPositionService = _jobPositionService; 25 | } 26 | 27 | @GetMapping("getAll") 28 | public ResponseEntity getAll(){ 29 | return ResponseEntity.ok(_jobPositionService.getAll()); 30 | } 31 | 32 | @GetMapping("getNoHavePositions") 33 | public ResponseEntity getNoHavePositions(@RequestParam int userId){ 34 | return ResponseEntity.ok(_jobPositionService.getNoHavePositions(userId)); 35 | } 36 | 37 | @PostMapping("add") 38 | public ResponseEntity add(@Valid @RequestBody JobPosition jobPosition){ 39 | return ResponseEntity.ok(_jobPositionService.add(jobPosition)); 40 | } 41 | 42 | @DeleteMapping("delete") 43 | public ResponseEntity delete(@RequestBody JobPosition jobPosition){ 44 | return ResponseEntity.ok(_jobPositionService.delete(jobPosition)); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/StaffValidationController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IStaffValidationService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.StaffValidation; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.validation.Valid; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/api/staffValidation/") 16 | @CrossOrigin 17 | public class StaffValidationController { 18 | 19 | private IStaffValidationService _staffValidationService; 20 | 21 | @Autowired 22 | public StaffValidationController(IStaffValidationService _staffValidationService) { 23 | this._staffValidationService = _staffValidationService; 24 | } 25 | 26 | @GetMapping("getAll") 27 | public ResponseEntity getAll(){ 28 | return ResponseEntity.ok(_staffValidationService.getAll()); 29 | } 30 | 31 | @PostMapping("add") 32 | public ResponseEntity add(@Valid @RequestBody StaffValidation staffValidation){ 33 | return ResponseEntity.ok(_staffValidationService.add(staffValidation)); 34 | } 35 | 36 | @PostMapping("validate") 37 | public ResponseEntity validate(@RequestParam int employerId,@RequestParam int systemUserId){ 38 | return ResponseEntity.ok(_staffValidationService.validate(employerId,systemUserId)); 39 | } 40 | 41 | @DeleteMapping("delete") 42 | public ResponseEntity delete(StaffValidation staffValidation){ 43 | return ResponseEntity.ok(_staffValidationService.delete(staffValidation)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/UserController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IUserService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 8 | import kodlamaio.humanResourcesProject.entities.concretes.SystemUser; 9 | import kodlamaio.humanResourcesProject.entities.concretes.User; 10 | import org.apache.axis.constants.Use; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.http.ResponseEntity; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import java.util.List; 16 | 17 | @RestController 18 | @RequestMapping("/api/user/") 19 | @CrossOrigin 20 | public class UserController { 21 | 22 | private IUserService _userService; 23 | 24 | @Autowired 25 | public UserController(IUserService _userService) { 26 | this._userService = _userService; 27 | } 28 | 29 | @GetMapping("getAll") 30 | public ResponseEntity getAll(){ 31 | return ResponseEntity.ok(_userService.getAllUser()); 32 | } 33 | 34 | @GetMapping("getById") 35 | public ResponseEntity getById(@RequestParam int id){ 36 | return ResponseEntity.ok(_userService.getByUserId(id)); 37 | } 38 | 39 | @PostMapping("validate") 40 | public ResponseEntity validation(@RequestBody EmailValidation emailValidation){ 41 | return ResponseEntity.ok(_userService.validate(emailValidation)); 42 | } 43 | 44 | @DeleteMapping("delete") 45 | public ResponseEntity delete(@RequestBody User user){ 46 | return ResponseEntity.ok(_userService.delete(user)); 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/Security/Mernis/KPSPublicSoapProxy.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.Security.Mernis; 2 | 3 | public class KPSPublicSoapProxy implements KPSPublicSoap { 4 | private String _endpoint = null; 5 | private KPSPublicSoap kPSPublicSoap = null; 6 | 7 | public KPSPublicSoapProxy() { 8 | _initKPSPublicSoapProxy(); 9 | } 10 | 11 | public KPSPublicSoapProxy(String endpoint) { 12 | _endpoint = endpoint; 13 | _initKPSPublicSoapProxy(); 14 | } 15 | 16 | private void _initKPSPublicSoapProxy() { 17 | try { 18 | kPSPublicSoap = (new KPSPublicLocator()).getKPSPublicSoap(); 19 | if (kPSPublicSoap != null) { 20 | if (_endpoint != null) 21 | ((javax.xml.rpc.Stub)kPSPublicSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); 22 | else 23 | _endpoint = (String)((javax.xml.rpc.Stub)kPSPublicSoap)._getProperty("javax.xml.rpc.service.endpoint.address"); 24 | } 25 | 26 | } 27 | catch (javax.xml.rpc.ServiceException serviceException) {} 28 | } 29 | 30 | public String getEndpoint() { 31 | return _endpoint; 32 | } 33 | 34 | public void setEndpoint(String endpoint) { 35 | _endpoint = endpoint; 36 | if (kPSPublicSoap != null) 37 | ((javax.xml.rpc.Stub)kPSPublicSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); 38 | 39 | } 40 | 41 | public KPSPublicSoap getKPSPublicSoap() { 42 | if (kPSPublicSoap == null) 43 | _initKPSPublicSoapProxy(); 44 | return kPSPublicSoap; 45 | } 46 | 47 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException{ 48 | if (kPSPublicSoap == null) 49 | _initKPSPublicSoapProxy(); 50 | return kPSPublicSoap.TCKimlikNoDogrula(TCKimlikNo, ad, soyad, dogumYili); 51 | } 52 | 53 | 54 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerCertificateManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerCertificateService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerCertificateDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerCertificate; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.security.cert.Certificate; 14 | import java.util.List; 15 | 16 | @Service 17 | public class JobSeekerCertificateManager implements IJobSeekerCertificateService { 18 | 19 | private IJobSeekerCertificateDao _jobSeekerCertificateDao; 20 | 21 | @Autowired 22 | public JobSeekerCertificateManager(IJobSeekerCertificateDao jobSeekerCertificateDao) { 23 | _jobSeekerCertificateDao = jobSeekerCertificateDao; 24 | } 25 | 26 | 27 | @Override 28 | public Result add(JobSeekerCertificate jobSeekerCertificate) { 29 | _jobSeekerCertificateDao.save(jobSeekerCertificate); 30 | return new SuccessResult(); 31 | } 32 | 33 | @Override 34 | public Result delete(JobSeekerCertificate jobSeekerCertificate) { 35 | _jobSeekerCertificateDao.delete(jobSeekerCertificate); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public DataResult> getAllCertificatesByUserId(int id) { 41 | return new SuccessDataResult>(_jobSeekerCertificateDao.findByUserIdOrderByCertificateYearDesc(id)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IUserService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 5 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IEmailValidationDao; 6 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IUserDao; 7 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 8 | import kodlamaio.humanResourcesProject.entities.concretes.User; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service 14 | public class UserManager implements IUserService { 15 | 16 | private IUserDao _userDao; 17 | private IEmailValidationDao _emailValidationDao; 18 | 19 | public UserManager(IUserDao userDao, IEmailValidationDao emailValidationDao) { 20 | _userDao = userDao; 21 | _emailValidationDao = emailValidationDao; 22 | } 23 | 24 | @Override 25 | public DataResult getByUserId(int id) { 26 | return new SuccessDataResult(_userDao.findById(id).get()); 27 | } 28 | 29 | @Override 30 | public DataResult> getAllUser() { 31 | return new SuccessDataResult>(_userDao.findAll()); 32 | } 33 | 34 | @Override 35 | public Result checkEmail(User user) { 36 | List users = _userDao.findByEmail(user.getEmail()); 37 | if (users.isEmpty()){ 38 | return new SuccessResult(); 39 | } 40 | return new ErrorResult("this email already exists in system"); 41 | } 42 | 43 | @Override 44 | public Result validate(EmailValidation emailValidation) { 45 | _emailValidationDao.save(emailValidation); 46 | return new SuccessResult(); 47 | } 48 | 49 | @Override 50 | public Result delete(User user) { 51 | _userDao.delete(user); 52 | return new SuccessResult(); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerPositionManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerPositionService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerPositionDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerPosition; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class JobSeekerPositionManager implements IJobSeekerPositionService { 17 | 18 | private IJobSeekerPositionDao _jobSeekerPositionDao; 19 | 20 | @Autowired 21 | public JobSeekerPositionManager(IJobSeekerPositionDao jobSeekerPositionDao) { 22 | super(); 23 | _jobSeekerPositionDao = jobSeekerPositionDao; 24 | } 25 | 26 | @Override 27 | public Result add(JobSeekerPosition jobSeekerPosition) { 28 | _jobSeekerPositionDao.save(jobSeekerPosition); 29 | return new SuccessResult(); 30 | } 31 | 32 | @Override 33 | public Result delete(JobSeekerPosition jobSeekerPosition) { 34 | _jobSeekerPositionDao.delete(jobSeekerPosition); 35 | return new SuccessResult(); 36 | } 37 | 38 | @Override 39 | public DataResult> getAll() { 40 | return new SuccessDataResult>(_jobSeekerPositionDao.findAll()); 41 | } 42 | 43 | @Override 44 | public DataResult> getByUserId(int id) { 45 | return new SuccessDataResult>(_jobSeekerPositionDao.findByUserId(id)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerSkillManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerSkillService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerSkillDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSkill; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.domain.PageRequest; 12 | import org.springframework.data.domain.Pageable; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.List; 16 | 17 | @Service 18 | public class JobSeekerSkillManager implements IJobSeekerSkillService { 19 | 20 | private IJobSeekerSkillDao _jobSeekerSkillDao; 21 | 22 | @Autowired 23 | public JobSeekerSkillManager(IJobSeekerSkillDao jobSeekerSkillDao) { 24 | _jobSeekerSkillDao = jobSeekerSkillDao; 25 | } 26 | 27 | @Override 28 | public Result add(JobSeekerSkill jobSeekerSkill) { 29 | _jobSeekerSkillDao.save(jobSeekerSkill); 30 | return new SuccessResult(); 31 | } 32 | 33 | @Override 34 | public Result delete(JobSeekerSkill jobSeekerSkill) { 35 | _jobSeekerSkillDao.delete(jobSeekerSkill); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public DataResult> getAll() { 41 | return new SuccessDataResult>(_jobSeekerSkillDao.findAll()); 42 | } 43 | 44 | @Override 45 | public DataResult> getByUserId(int id) { 46 | return new SuccessDataResult>(_jobSeekerSkillDao.findByUserId(id)); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerExperienceManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerExperienceService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 5 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerExperienceDao; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerExperience; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service 13 | public class JobSeekerExperienceManager implements IJobSeekerExperienceService { 14 | 15 | private IJobSeekerExperienceDao _jobSeekerExperienceDao; 16 | 17 | @Autowired 18 | public JobSeekerExperienceManager(IJobSeekerExperienceDao jobSeekerExperienceDao) { 19 | _jobSeekerExperienceDao = jobSeekerExperienceDao; 20 | } 21 | 22 | @Override 23 | public Result add(JobSeekerExperience jobSeekerExperience) { 24 | _jobSeekerExperienceDao.save(jobSeekerExperience); 25 | return new SuccessResult(); 26 | } 27 | 28 | @Override 29 | public Result delete(JobSeekerExperience jobSeekerExperience) { 30 | _jobSeekerExperienceDao.delete(jobSeekerExperience); 31 | return new SuccessResult(); 32 | } 33 | 34 | @Override 35 | public DataResult> getAll() { 36 | return new SuccessDataResult>(_jobSeekerExperienceDao.findAll()); 37 | } 38 | 39 | @Override 40 | public DataResult> getByUserId(int id) { 41 | return new SuccessDataResult>(_jobSeekerExperienceDao.findByUserId(id)); 42 | } 43 | 44 | @Override 45 | public DataResult> getByUserIdOrderByStartDateDesc(int id) { 46 | return new SuccessDataResult>(_jobSeekerExperienceDao.findByUserIdOrderByStartDateDesc(id)); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerSchoolManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerSchoolService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerSchoolDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSchool; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class JobSeekerSchoolManager implements IJobSeekerSchoolService { 17 | 18 | private IJobSeekerSchoolDao _jobSeekerSchoolDao; 19 | 20 | @Autowired 21 | public JobSeekerSchoolManager(IJobSeekerSchoolDao jobSeekerSchoolDao) { 22 | _jobSeekerSchoolDao = jobSeekerSchoolDao; 23 | } 24 | 25 | 26 | @Override 27 | public Result add(JobSeekerSchool jobSeekerSchool) { 28 | _jobSeekerSchoolDao.save(jobSeekerSchool); 29 | return new SuccessResult(); 30 | } 31 | 32 | @Override 33 | public Result delete(JobSeekerSchool jobSeekerSchool) { 34 | _jobSeekerSchoolDao.delete(jobSeekerSchool); 35 | return new SuccessResult(); 36 | } 37 | 38 | @Override 39 | public DataResult> getAll() { 40 | return new SuccessDataResult>(_jobSeekerSchoolDao.findAll()); 41 | } 42 | 43 | @Override 44 | public DataResult> getByUserId(int id) { 45 | return new SuccessDataResult>(_jobSeekerSchoolDao.findByUserId(id)); 46 | } 47 | 48 | @Override 49 | public DataResult> getByUserIdOrderByStartYearDesc(int id) { 50 | return new SuccessDataResult>(_jobSeekerSchoolDao.findByUserIdOrderByStartYearDesc(id)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerLanguageManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerLanguageService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerLanguageDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerLanguage; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class JobSeekerLanguageManager implements IJobSeekerLanguageService { 17 | 18 | private IJobSeekerLanguageDao _jobSeekerLanguageDao; 19 | 20 | @Autowired 21 | public JobSeekerLanguageManager(IJobSeekerLanguageDao jobSeekerLanguageDao) { 22 | _jobSeekerLanguageDao = jobSeekerLanguageDao; 23 | } 24 | 25 | @Override 26 | public Result add(JobSeekerLanguage jobSeekerLanguage) { 27 | _jobSeekerLanguageDao.save(jobSeekerLanguage); 28 | return new SuccessResult(); 29 | } 30 | 31 | @Override 32 | public Result delete(JobSeekerLanguage jobSeekerLanguage) { 33 | _jobSeekerLanguageDao.delete(jobSeekerLanguage); 34 | return new SuccessResult(); 35 | } 36 | 37 | @Override 38 | public DataResult> getAll() { 39 | return new SuccessDataResult>(_jobSeekerLanguageDao.findAll()); 40 | } 41 | 42 | @Override 43 | public DataResult> getByUserId(int id) { 44 | return new SuccessDataResult>(_jobSeekerLanguageDao.findByUserId(id)); 45 | } 46 | 47 | @Override 48 | public DataResult> getByUserIdOrderByLevelDesc(int id) { 49 | return new SuccessDataResult>(_jobSeekerLanguageDao.findByUserIdOrderByLevelDesc(id)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/EmailValidationManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IEmailValidationService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IEmailValidationDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class EmailValidationManager implements IEmailValidationService { 17 | 18 | private IEmailValidationDao _emailValidationDao; 19 | 20 | @Autowired 21 | public EmailValidationManager(IEmailValidationDao emailValidationDao) { 22 | _emailValidationDao = emailValidationDao; 23 | } 24 | 25 | @Override 26 | public Result add(EmailValidation emailValidation) { 27 | _emailValidationDao.save(emailValidation); 28 | return new SuccessResult(); 29 | } 30 | 31 | @Override 32 | public Result delete(EmailValidation emailValidation) { 33 | _emailValidationDao.delete(emailValidation); 34 | return new SuccessResult(); 35 | } 36 | 37 | @Override 38 | public Result validate(int userId) { 39 | EmailValidation emailValidation = _emailValidationDao.findByUserId(userId); 40 | emailValidation.setValid(true); 41 | _emailValidationDao.save(emailValidation); 42 | return new SuccessResult("Email validation success"); 43 | } 44 | 45 | @Override 46 | public DataResult> getAll() { 47 | return new SuccessDataResult>(_emailValidationDao.findAll()); 48 | } 49 | 50 | @Override 51 | public DataResult getByUserId(int id) { 52 | return new SuccessDataResult(_emailValidationDao.findByUserId(id)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/PhotoManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IPhotoService; 4 | import kodlamaio.humanResourcesProject.business.abstracts.IUserService; 5 | import kodlamaio.humanResourcesProject.core.uploadService.imageUplad.ImageUploaderService; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 7 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IPhotoDao; 8 | import kodlamaio.humanResourcesProject.entities.concretes.Photo; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.web.multipart.MultipartFile; 12 | 13 | import java.util.Map; 14 | 15 | @Service 16 | public class PhotoManager implements IPhotoService { 17 | 18 | private IPhotoDao _photoDao; 19 | private ImageUploaderService _imageUploaderService; 20 | private IUserService _userService; 21 | 22 | @Autowired 23 | public PhotoManager(IPhotoDao photoDao, ImageUploaderService imageUploaderService, IUserService userService) { 24 | _photoDao = photoDao; 25 | _imageUploaderService = imageUploaderService; 26 | _userService = userService; 27 | } 28 | 29 | @Override 30 | public Result add(Photo photo) { 31 | _photoDao.save(photo); 32 | return new SuccessResult(); 33 | } 34 | 35 | @Override 36 | public Result update(int userId, MultipartFile multipartFile) { 37 | Map uploadImage = _imageUploaderService.uploadImageFile(multipartFile).getData(); 38 | Photo photo = _photoDao.findByUserId(userId); 39 | photo.setPhotoUrl(uploadImage.get("url")); 40 | _photoDao.save(photo); 41 | return new SuccessResult("yes"); 42 | } 43 | 44 | @Override 45 | public Result delete(Photo photo) { //photo id sistemine gecilebilir 46 | photo.setPhotoUrl("https://res.cloudinary.com/dbzf16o0x/image/upload/v1657832793/Ec6ferCXYAA6XB__ednbzx.jpg"); 47 | _photoDao.save(photo); 48 | return new SuccessResult(); 49 | } 50 | 51 | @Override 52 | public DataResult getByUserId(int id) { 53 | return new SuccessDataResult(_photoDao.findByUserId(id)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/entities/concretes/JobAdvertisement.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.entities.concretes; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import javax.persistence.*; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | import javax.validation.constraints.Null; 13 | import java.time.LocalDate; 14 | import java.time.LocalDateTime; 15 | import java.util.Date; 16 | 17 | @Data 18 | @Entity 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | @Table(name="job_advertisements") 22 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler"}) 23 | public class JobAdvertisement { 24 | 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | @Column(name = "id") 28 | private int id; 29 | 30 | @NotBlank 31 | @NotNull 32 | @Column(name = "title") 33 | private String title; 34 | 35 | @NotBlank 36 | @NotNull 37 | @Column(name = "description") 38 | private String description; 39 | 40 | @NotBlank 41 | @Column(name = "min_salary") 42 | private int minSalary; 43 | 44 | @NotBlank 45 | @Column(name = "max_salary") 46 | private int maxSalary; 47 | 48 | @NotBlank 49 | @NotNull 50 | @Column(name = "application_deadline") 51 | private Date applicationDeadline; 52 | 53 | @NotBlank 54 | @Null 55 | @Column(name = "release_date") 56 | private LocalDateTime releaseDate = LocalDateTime.now(); 57 | 58 | @NotBlank 59 | @Null 60 | @Column(name = "is_active") 61 | private boolean isActive = true; 62 | 63 | @NotBlank 64 | @NotNull 65 | @Column(name = "open_position_count") 66 | private int openPositionCount; 67 | 68 | @NotBlank 69 | @NotNull 70 | @ManyToOne(fetch = FetchType.LAZY) 71 | @JoinColumn(name = "city_id") 72 | private City city; 73 | 74 | @NotBlank 75 | @NotNull 76 | @ManyToOne(fetch = FetchType.LAZY) 77 | @JoinColumn(name = "employer_id") 78 | private Employer employer; 79 | 80 | @NotBlank 81 | @NotNull 82 | @ManyToOne(fetch = FetchType.LAZY) 83 | @JoinColumn(name = "job_position_id") 84 | private JobPosition jobPosition; 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/StaffValidationManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IStaffValidationService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IStaffValidationDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.StaffValidation; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class StaffValidationManager implements IStaffValidationService { 17 | 18 | private IStaffValidationDao _staffValidationDao; 19 | 20 | @Autowired 21 | public StaffValidationManager(IStaffValidationDao _staffValidationDao) { 22 | super(); 23 | _staffValidationDao = _staffValidationDao; 24 | } 25 | 26 | @Override 27 | public Result add(StaffValidation staffValidation) { 28 | _staffValidationDao.save(staffValidation); 29 | return new SuccessResult(); 30 | } 31 | 32 | @Override 33 | public Result validate(int employerId,int systemUserId) { 34 | StaffValidation staffValidation = _staffValidationDao.findByUserId(employerId); 35 | staffValidation.setValid(true); 36 | staffValidation.setSystemUserId(systemUserId); 37 | _staffValidationDao.save(staffValidation); 38 | return new SuccessResult("Staff validation success"); 39 | } 40 | 41 | @Override 42 | public Result delete(StaffValidation staffValidation) { 43 | _staffValidationDao.delete(staffValidation); 44 | return new SuccessResult(); 45 | } 46 | 47 | @Override 48 | public DataResult> getAll() { 49 | return new SuccessDataResult>(_staffValidationDao.findAll()); 50 | } 51 | 52 | @Override 53 | public DataResult getByUserId(int id) { 54 | return new SuccessDataResult(_staffValidationDao.findByUserId(id)); 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobSeekerController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeeker; 7 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerCoverLetterDto; 8 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerLinksDto; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.http.ResponseEntity; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import javax.validation.Valid; 14 | import java.util.List; 15 | 16 | 17 | @RestController 18 | @RequestMapping("/api/jobSeeker/") 19 | @CrossOrigin 20 | public class JobSeekerController { 21 | 22 | private IJobSeekerService _jobSeekerService; 23 | 24 | @Autowired 25 | public JobSeekerController(IJobSeekerService _jobSeekerService) { 26 | this._jobSeekerService = _jobSeekerService; 27 | } 28 | 29 | @GetMapping("getAll") 30 | public ResponseEntity getAll(){ 31 | return ResponseEntity.ok(_jobSeekerService.getAll()); 32 | } 33 | 34 | @GetMapping("getCv") 35 | public ResponseEntity getCv(@RequestParam int userId){ 36 | return ResponseEntity.ok(_jobSeekerService.getCv(userId)); 37 | } 38 | 39 | @PostMapping("add") 40 | public ResponseEntity add(@Valid @RequestBody JobSeeker jobSeeker) throws Exception{ 41 | return ResponseEntity.ok(_jobSeekerService.add(jobSeeker)); 42 | } 43 | 44 | @DeleteMapping("delete") 45 | public ResponseEntity delete(@RequestBody JobSeeker jobSeeker){ 46 | return ResponseEntity.ok(_jobSeekerService.delete(jobSeeker)); 47 | } 48 | 49 | @PostMapping("updateLinks") 50 | public ResponseEntity updateLinks(@RequestBody JobSeekerLinksDto jobSeekerLinksDto){ 51 | return ResponseEntity.ok(_jobSeekerService.updateLinks(jobSeekerLinksDto)); 52 | } 53 | 54 | @PostMapping("updateCoverLetter") 55 | public ResponseEntity updateCoverLetter(@RequestBody JobSeekerCoverLetterDto jobSeekerCoverLetterDto){ 56 | return ResponseEntity.ok(_jobSeekerService.updateCoverLetter(jobSeekerCoverLetterDto)); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/SkillManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerSkillService; 4 | import kodlamaio.humanResourcesProject.business.abstracts.ISkillService; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 8 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 9 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.ISkillDao; 10 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerSkill; 11 | import kodlamaio.humanResourcesProject.entities.concretes.Skill; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | @Service 19 | public class SkillManager implements ISkillService { 20 | 21 | private ISkillDao _skillDao; 22 | private IJobSeekerSkillService _jobSeekerSkillService; 23 | 24 | @Autowired 25 | public SkillManager(ISkillDao skillDao, IJobSeekerSkillService jobSeekerSkillService) { 26 | _skillDao = skillDao; 27 | _jobSeekerSkillService = jobSeekerSkillService; 28 | } 29 | 30 | @Override 31 | public Result add(Skill skill) { 32 | _skillDao.save(skill); 33 | return new SuccessResult(); 34 | } 35 | 36 | @Override 37 | public Result delete(Skill skill) { 38 | _skillDao.delete(skill); 39 | return new SuccessResult(); 40 | } 41 | 42 | @Override 43 | public DataResult> getAll() { 44 | return new SuccessDataResult>(_skillDao.findAll()); 45 | } 46 | 47 | @Override 48 | public DataResult> getNoHaveUser(int userId) { 49 | List skills1 = _jobSeekerSkillService.getByUserId(userId).getData(); 50 | List haveSkills = new ArrayList<>();; 51 | for (JobSeekerSkill skill : skills1){ 52 | haveSkills.add(skill.getSkill()); 53 | } 54 | List noHaveSkills = _skillDao.findAll(); 55 | noHaveSkills.removeAll(haveSkills); 56 | return new SuccessDataResult>(noHaveSkills); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobAdvertisementRequireSkillController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobAdvertisementRequireSkillService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 7 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisementRequireSkill; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import javax.validation.Valid; 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping("/api/jobAdvertisementRequireSkill/") 17 | @CrossOrigin 18 | public class JobAdvertisementRequireSkillController { 19 | private IJobAdvertisementRequireSkillService _jobAdvertisementRequireSkillService; 20 | 21 | @Autowired 22 | public JobAdvertisementRequireSkillController(IJobAdvertisementRequireSkillService jobAdvertisementRequireSkillService) { 23 | this._jobAdvertisementRequireSkillService = jobAdvertisementRequireSkillService; 24 | } 25 | 26 | @PostMapping("add") 27 | public ResponseEntity add(@Valid @RequestBody JobAdvertisementRequireSkill jobAdvertisementRequireSkill){ 28 | return ResponseEntity.ok(_jobAdvertisementRequireSkillService.add(jobAdvertisementRequireSkill)); 29 | } 30 | 31 | @DeleteMapping("delete") 32 | public ResponseEntity delete(@RequestBody JobAdvertisementRequireSkill jobAdvertisementRequireSkill){ 33 | return ResponseEntity.ok(_jobAdvertisementRequireSkillService.delete(jobAdvertisementRequireSkill)); 34 | } 35 | 36 | @GetMapping("getAll") 37 | public ResponseEntity getAll(){ 38 | return ResponseEntity.ok(_jobAdvertisementRequireSkillService.getAll()); 39 | } 40 | 41 | @GetMapping("getBySkillId") 42 | public ResponseEntity getBySkillId(@RequestParam int id){ 43 | return ResponseEntity.ok(_jobAdvertisementRequireSkillService.getBySkillId(id)); 44 | } 45 | 46 | @GetMapping("getByJobAdvertisementsId") 47 | public ResponseEntity getByJobAdvertisementsId(@RequestParam int id){ 48 | return ResponseEntity.ok(_jobAdvertisementRequireSkillService.getByJobAdvertisementId(id)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobAdvertisementRequireSkillManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobAdvertisementRequireSkillService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobAdvertisementRequireSkillDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisementRequireSkill; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class JobAdvertisementRequireSkillManager implements IJobAdvertisementRequireSkillService { 17 | 18 | private IJobAdvertisementRequireSkillDao _jobAdvertisementRequireSkillDao; 19 | 20 | @Autowired 21 | public JobAdvertisementRequireSkillManager(IJobAdvertisementRequireSkillDao jobAdvertisementRequireSkillDao) { 22 | _jobAdvertisementRequireSkillDao = jobAdvertisementRequireSkillDao; 23 | } 24 | 25 | @Override 26 | public Result add(JobAdvertisementRequireSkill jobAdvertisementRequireSkill) { 27 | _jobAdvertisementRequireSkillDao.save(jobAdvertisementRequireSkill); 28 | return new SuccessResult(); 29 | } 30 | 31 | @Override 32 | public Result delete(JobAdvertisementRequireSkill jobAdvertisementRequireSkill) { 33 | _jobAdvertisementRequireSkillDao.delete(jobAdvertisementRequireSkill); 34 | return new SuccessResult(); 35 | } 36 | 37 | @Override 38 | public DataResult> getAll() { 39 | return new SuccessDataResult>(_jobAdvertisementRequireSkillDao.findAll()); 40 | } 41 | 42 | @Override 43 | public DataResult> getBySkillId(int id) { 44 | return new SuccessDataResult>(_jobAdvertisementRequireSkillDao.findBySkillId(id)); 45 | } 46 | 47 | @Override 48 | public DataResult> getByJobAdvertisementId(int id) { 49 | return new SuccessDataResult>(_jobAdvertisementRequireSkillDao.findByJobAdvertisementsId(id)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/LanguageManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerLanguageService; 4 | import kodlamaio.humanResourcesProject.business.abstracts.ILanguageService; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessDataResult; 8 | import kodlamaio.humanResourcesProject.core.utilities.results.SuccessResult; 9 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.ILanguageDao; 10 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerLanguage; 11 | import kodlamaio.humanResourcesProject.entities.concretes.Language; 12 | import kodlamaio.humanResourcesProject.entities.concretes.Skill; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.stereotype.Service; 15 | 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | @Service 20 | public class LanguageManager implements ILanguageService { 21 | 22 | private ILanguageDao _languageDao; 23 | private IJobSeekerLanguageService _jobSeekerLanguageService; 24 | 25 | @Autowired 26 | public LanguageManager(ILanguageDao languageDao, IJobSeekerLanguageService jobSeekerLanguageService) { 27 | _languageDao = languageDao; 28 | _jobSeekerLanguageService = jobSeekerLanguageService; 29 | } 30 | 31 | @Override 32 | public Result add(Language language) { 33 | _languageDao.save(language); 34 | return new SuccessResult(); 35 | } 36 | 37 | @Override 38 | public Result delete(Language language) { 39 | _languageDao.delete(language); 40 | return new SuccessResult(); 41 | } 42 | 43 | @Override 44 | public DataResult> getAll() { 45 | return new SuccessDataResult>(_languageDao.findAll()); 46 | } 47 | 48 | @Override 49 | public DataResult> getNoHaveLanguages(int userId) { 50 | List languages =_jobSeekerLanguageService.getByUserId(userId).getData(); 51 | List haveLanguages = new ArrayList<>();; 52 | for (JobSeekerLanguage language : languages){ 53 | haveLanguages.add(language.getLanguage()); 54 | } 55 | List noHaveLanguages = _languageDao.findAll(); 56 | noHaveLanguages.removeAll(haveLanguages); 57 | return new SuccessDataResult>(noHaveLanguages); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/EmployerController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IEmployerService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.ErrorDataResult; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 7 | import kodlamaio.humanResourcesProject.entities.concretes.Employer; 8 | import kodlamaio.humanResourcesProject.entities.concretes.User; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.http.HttpStatus; 11 | import org.springframework.http.ResponseEntity; 12 | import org.springframework.validation.FieldError; 13 | import org.springframework.web.bind.MethodArgumentNotValidException; 14 | import org.springframework.web.bind.annotation.*; 15 | 16 | import javax.validation.Valid; 17 | import java.util.HashMap; 18 | import java.util.List; 19 | import java.util.Map; 20 | 21 | @RestController 22 | @RequestMapping("/api/employer/") 23 | @CrossOrigin 24 | public class EmployerController { 25 | 26 | private IEmployerService _employerService; 27 | 28 | @Autowired 29 | public EmployerController(IEmployerService _employerService) { 30 | this._employerService = _employerService; 31 | } 32 | 33 | @GetMapping("getAll") 34 | public ResponseEntity getAll(){ 35 | return ResponseEntity.ok(_employerService.getAll()); 36 | } 37 | 38 | @PostMapping("add") 39 | public ResponseEntity add(@Valid @RequestBody Employer employer){ 40 | return ResponseEntity.ok(_employerService.add(employer)); 41 | } 42 | 43 | @ExceptionHandler(MethodArgumentNotValidException.class) 44 | @ResponseStatus(HttpStatus.BAD_REQUEST) 45 | public ErrorDataResult handleValidationException(MethodArgumentNotValidException exception){ 46 | Map validationErrors = new HashMap(); 47 | for(FieldError fieldError : exception.getBindingResult().getFieldErrors()){ 48 | validationErrors.put(fieldError.getField(),fieldError.getDefaultMessage()); 49 | } 50 | ErrorDataResult errors = new ErrorDataResult(validationErrors,"Validation errors"); 51 | return errors; 52 | } 53 | 54 | @PostMapping("update") 55 | public ResponseEntity update(@Valid @RequestBody Employer employer){ 56 | return ResponseEntity.ok(_employerService.update(employer)); 57 | } 58 | 59 | @DeleteMapping("delete") 60 | public ResponseEntity delete(@RequestBody Employer employer){ 61 | return ResponseEntity.ok(_employerService.delete(employer)); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/api/JobAdvertisementController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.api; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobAdvertisementService; 4 | import kodlamaio.humanResourcesProject.core.utilities.results.DataResult; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.Result; 6 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 7 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import javax.validation.Valid; 13 | import java.util.List; 14 | 15 | 16 | @RestController 17 | @RequestMapping("/api/jobAdvertisement/") 18 | @CrossOrigin 19 | public class JobAdvertisementController { 20 | private IJobAdvertisementService _jobAdvertisementService; 21 | 22 | @Autowired 23 | public JobAdvertisementController(IJobAdvertisementService jobAdvertisementService) { 24 | this._jobAdvertisementService = jobAdvertisementService; 25 | } 26 | 27 | @PostMapping("add") 28 | public ResponseEntity add(@Valid @RequestBody JobAdvertisement jobAdvertisement){ 29 | return ResponseEntity.ok(_jobAdvertisementService.add(jobAdvertisement)); 30 | } 31 | 32 | @DeleteMapping("delete") 33 | public ResponseEntity delete(@RequestBody JobAdvertisement jobAdvertisement){ 34 | return ResponseEntity.ok(_jobAdvertisementService.delete(jobAdvertisement)); 35 | } 36 | 37 | @GetMapping("getAll") 38 | public ResponseEntity getAll(){ 39 | return ResponseEntity.ok(_jobAdvertisementService.getAll()); 40 | } 41 | 42 | @GetMapping("getActiveAdvertisements") 43 | public ResponseEntity getActiveAdvertisements(){ 44 | return ResponseEntity.ok(_jobAdvertisementService.getActiveAdvertisements()); 45 | } 46 | 47 | @GetMapping("getActiveAdvertisementsByEmployer") 48 | public ResponseEntity getActiveAdvertisementsByEmployer(@RequestParam int employerId){ 49 | return ResponseEntity.ok(_jobAdvertisementService.getActiveAdvertisementsByEmployer(employerId)); 50 | } 51 | 52 | @PostMapping("advertisementActiveFalse") 53 | public ResponseEntity advertisementActiveFalse(@RequestParam int id){ 54 | return ResponseEntity.ok(_jobAdvertisementService.advertisementActiveFalse(id)); 55 | } 56 | 57 | @PostMapping("advertisementActiveTrue") 58 | public ResponseEntity advertisementActiveTrue(@RequestParam int id){ 59 | return ResponseEntity.ok(_jobAdvertisementService.advertisementActiveTrue(id)); 60 | } 61 | 62 | @GetMapping("getActiveAdvertisementsByDeadlineAsc") 63 | public ResponseEntity getActiveAdvertisementsByDeadlineAsc(){ 64 | return ResponseEntity.ok(_jobAdvertisementService.getActiveAdvertisementsByDeadlineAsc()); 65 | } 66 | 67 | @GetMapping("getActiveAdvertisementsByDeadlineDesc") 68 | public ResponseEntity getActiveAdvertisementsByDeadlineDesc(){ 69 | return ResponseEntity.ok(_jobAdvertisementService.getActiveAdvertisementsByDeadlineDesc()); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobPositionManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IJobPositionService; 4 | import kodlamaio.humanResourcesProject.business.abstracts.IJobSeekerPositionService; 5 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 6 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobPositionDao; 7 | import kodlamaio.humanResourcesProject.entities.concretes.JobPosition; 8 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeekerPosition; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | @Service 16 | public class JobPositionManager implements IJobPositionService { 17 | 18 | private IJobPositionDao _jobPositionDao; 19 | private IJobSeekerPositionService _jobSeekerPositionService; 20 | 21 | @Autowired 22 | public JobPositionManager(IJobPositionDao jobPositionDao, IJobSeekerPositionService jobSeekerPositionService) { 23 | super(); 24 | _jobPositionDao = jobPositionDao; 25 | _jobSeekerPositionService = jobSeekerPositionService; 26 | } 27 | 28 | @Override 29 | public Result add(JobPosition jobPosition) { 30 | 31 | List results = new ArrayList<>(); 32 | boolean isFail = false; 33 | 34 | results.add(checkJobPositionName(jobPosition)); 35 | 36 | for (var result : results){ 37 | if (!result.isSuccess()){ 38 | isFail = true; 39 | return result; 40 | } 41 | } 42 | 43 | if (!isFail){ 44 | _jobPositionDao.save(jobPosition); 45 | return new SuccessResult(); 46 | } 47 | else { 48 | return new ErrorResult(); 49 | } 50 | } 51 | 52 | @Override 53 | public DataResult> getAll() { 54 | return new SuccessDataResult>(_jobPositionDao.findAll(),"Positions listed"); 55 | } 56 | 57 | @Override 58 | public DataResult> getNoHavePositions(int userId) { 59 | List positions = _jobSeekerPositionService.getByUserId(userId).getData(); 60 | List havePositions = new ArrayList<>();; 61 | for (JobSeekerPosition position : positions){ 62 | havePositions.add(position.getJobPosition()); 63 | } 64 | List noHavePositions = _jobPositionDao.findAll(); 65 | noHavePositions.removeAll(havePositions); 66 | return new SuccessDataResult>(noHavePositions); 67 | } 68 | 69 | private Result checkJobPositionName(JobPosition jobPosition){ 70 | List jobPositions = _jobPositionDao.findByPositionName(jobPosition.getPositionName()); 71 | if (jobPositions.isEmpty()){ 72 | return new SuccessResult(); 73 | } 74 | return new ErrorResult("this position already exist"); 75 | } 76 | 77 | @Override 78 | public Result delete(JobPosition jobPosition){ 79 | _jobPositionDao.delete(jobPosition); 80 | return new SuccessResult(); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/EmployerManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IEmailValidationService; 4 | import kodlamaio.humanResourcesProject.business.abstracts.IEmployerService; 5 | import kodlamaio.humanResourcesProject.business.abstracts.IStaffValidationService; 6 | import kodlamaio.humanResourcesProject.business.abstracts.IUserService; 7 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 8 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IEmployerDao; 9 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 10 | import kodlamaio.humanResourcesProject.entities.concretes.Employer; 11 | import kodlamaio.humanResourcesProject.entities.concretes.StaffValidation; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | @Service 19 | public class EmployerManager implements IEmployerService { 20 | 21 | private IEmployerDao _employerDao; 22 | private IUserService _userService; 23 | private IStaffValidationService _staffValidationService; 24 | private IEmailValidationService _emailValidationService; 25 | 26 | @Autowired 27 | public EmployerManager(IEmployerDao employerDao, IUserService userService, IStaffValidationService staffValidationService, IEmailValidationService emailValidationService) { 28 | super(); 29 | _employerDao = employerDao; 30 | _userService = userService; 31 | _staffValidationService = staffValidationService; 32 | _emailValidationService = emailValidationService; 33 | } 34 | 35 | @Override 36 | public Result add(Employer employer) { 37 | 38 | List results = new ArrayList(); 39 | boolean isFail = false; 40 | 41 | Result nullControl = nullController(employer); 42 | Result emailControl = _userService.checkEmail(employer); 43 | Result employerEmailControl = checkEmployerEmail(employer); 44 | Result phoneNumberControl = checkPhoneNumber(employer); 45 | 46 | results.add(nullControl); 47 | results.add(emailControl); 48 | results.add(employerEmailControl); 49 | results.add(phoneNumberControl); 50 | 51 | for (var result : results){ 52 | if (!result.isSuccess()){ 53 | isFail = true; 54 | return result; 55 | } 56 | } 57 | 58 | if (! isFail){ 59 | _employerDao.save(employer); 60 | 61 | StaffValidation staffValidation = new StaffValidation(); 62 | staffValidation.setUserId(employer.getUserId()); 63 | staffValidation.setValid(false); 64 | _staffValidationService.add(staffValidation); 65 | 66 | EmailValidation emailValidation = new EmailValidation(); 67 | emailValidation.setUserId(employer.getUserId()); 68 | emailValidation.setValid(false); 69 | _emailValidationService.add(emailValidation); 70 | 71 | return new SuccessResult(); 72 | } 73 | else { 74 | return new ErrorResult(); 75 | } 76 | } 77 | 78 | @Override 79 | public Result update(Employer employer) { 80 | _employerDao.save(employer); 81 | return new SuccessResult(); 82 | } 83 | 84 | @Override 85 | public Result delete(Employer employer) { 86 | _employerDao.delete(employer); 87 | return new SuccessResult(); 88 | } 89 | 90 | @Override 91 | public DataResult> getAll() { 92 | return new SuccessDataResult>(_employerDao.findAll()); 93 | } 94 | 95 | 96 | private Result checkEmployerEmail(Employer employer) { 97 | String[] domain = employer.getEmail().split("@"); 98 | if (employer.getWebAddress().contains(domain[1])){ 99 | return new SuccessResult(); 100 | } 101 | return new ErrorResult("The e-mail address must be an extension of the web address."); 102 | } 103 | 104 | private Result checkPhoneNumber(Employer employer){ 105 | List employers = _employerDao.findByPhoneNumber(employer.getPhoneNumber()); 106 | if (employers.isEmpty()){ 107 | return new SuccessResult(); 108 | } 109 | return new ErrorResult("this phone number already exists in system"); 110 | } 111 | 112 | 113 | private Result nullController(Employer employer) { 114 | if ( 115 | employer.getCompanyName() == "" 116 | || employer.getWebAddress() == "" 117 | || employer.getPhoneNumber() == "" 118 | || employer.getEmail() == "" 119 | || employer.getPassword() == "" ) 120 | { 121 | return new ErrorResult("you must fill in the fields"); 122 | } 123 | return new SuccessResult(); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import java.net.*; 17 | import java.io.*; 18 | import java.nio.channels.*; 19 | import java.util.Properties; 20 | 21 | public class MavenWrapperDownloader { 22 | 23 | private static final String WRAPPER_VERSION = "0.5.6"; 24 | /** 25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 26 | */ 27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; 29 | 30 | /** 31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 32 | * use instead of the default one. 33 | */ 34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 35 | ".mvn/wrapper/maven-wrapper.properties"; 36 | 37 | /** 38 | * Path where the maven-wrapper.jar will be saved to. 39 | */ 40 | private static final String MAVEN_WRAPPER_JAR_PATH = 41 | ".mvn/wrapper/maven-wrapper.jar"; 42 | 43 | /** 44 | * Name of the property which should be used to override the default download url for the wrapper. 45 | */ 46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 47 | 48 | public static void main(String args[]) { 49 | System.out.println("- Downloader started"); 50 | File baseDirectory = new File(args[0]); 51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 52 | 53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 54 | // wrapperUrl parameter. 55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 56 | String url = DEFAULT_DOWNLOAD_URL; 57 | if(mavenWrapperPropertyFile.exists()) { 58 | FileInputStream mavenWrapperPropertyFileInputStream = null; 59 | try { 60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 61 | Properties mavenWrapperProperties = new Properties(); 62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 64 | } catch (IOException e) { 65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 66 | } finally { 67 | try { 68 | if(mavenWrapperPropertyFileInputStream != null) { 69 | mavenWrapperPropertyFileInputStream.close(); 70 | } 71 | } catch (IOException e) { 72 | // Ignore ... 73 | } 74 | } 75 | } 76 | System.out.println("- Downloading from: " + url); 77 | 78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 79 | if(!outputFile.getParentFile().exists()) { 80 | if(!outputFile.getParentFile().mkdirs()) { 81 | System.out.println( 82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 83 | } 84 | } 85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 86 | try { 87 | downloadFileFromURL(url, outputFile); 88 | System.out.println("Done"); 89 | System.exit(0); 90 | } catch (Throwable e) { 91 | System.out.println("- Error downloading"); 92 | e.printStackTrace(); 93 | System.exit(1); 94 | } 95 | } 96 | 97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 99 | String username = System.getenv("MVNW_USERNAME"); 100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 101 | Authenticator.setDefault(new Authenticator() { 102 | @Override 103 | protected PasswordAuthentication getPasswordAuthentication() { 104 | return new PasswordAuthentication(username, password); 105 | } 106 | }); 107 | } 108 | URL website = new URL(urlString); 109 | ReadableByteChannel rbc; 110 | rbc = Channels.newChannel(website.openStream()); 111 | FileOutputStream fos = new FileOutputStream(destination); 112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 113 | fos.close(); 114 | rbc.close(); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobAdvertisementManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | import kodlamaio.humanResourcesProject.business.abstracts.IEmailValidationService; 4 | import kodlamaio.humanResourcesProject.business.abstracts.IJobAdvertisementService; 5 | import kodlamaio.humanResourcesProject.business.abstracts.IStaffValidationService; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 7 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobAdvertisementDao; 8 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 9 | import kodlamaio.humanResourcesProject.entities.concretes.Employer; 10 | import kodlamaio.humanResourcesProject.entities.concretes.JobAdvertisement; 11 | import kodlamaio.humanResourcesProject.entities.concretes.StaffValidation; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | @Service 19 | public class JobAdvertisementManager implements IJobAdvertisementService { 20 | 21 | private IJobAdvertisementDao _jobAdvertisementDao; 22 | private IEmailValidationService _emailValidationService; 23 | private IStaffValidationService _staffValidationService; 24 | 25 | @Autowired 26 | public JobAdvertisementManager(IJobAdvertisementDao jobAdvertisementDao, IEmailValidationService emailValidationService, IStaffValidationService staffValidationService) { 27 | _jobAdvertisementDao = jobAdvertisementDao; 28 | _emailValidationService = emailValidationService; 29 | _staffValidationService = staffValidationService; 30 | } 31 | 32 | @Override 33 | public Result add(JobAdvertisement jobAdvertisement) { 34 | 35 | List results = new ArrayList<>(); 36 | boolean isFail = false; 37 | 38 | Result employerEmailControl = checkEmployerEmailValidation(jobAdvertisement.getEmployer()); 39 | Result employerStaffValidationControl = checkEmployerStaffValidation(jobAdvertisement.getEmployer()); 40 | 41 | results.add(employerEmailControl); 42 | results.add(employerStaffValidationControl); 43 | 44 | for (var result : results){ 45 | if(! result.isSuccess()){ 46 | isFail = true; 47 | return result; 48 | } 49 | } 50 | 51 | if (! isFail){ 52 | _jobAdvertisementDao.save(jobAdvertisement); 53 | return new SuccessResult(); 54 | } 55 | else { 56 | return new ErrorResult(); 57 | } 58 | 59 | } 60 | 61 | @Override 62 | public Result delete(JobAdvertisement jobAdvertisement) { 63 | _jobAdvertisementDao.delete(jobAdvertisement); 64 | return new SuccessResult(); 65 | } 66 | 67 | @Override 68 | public Result advertisementActiveFalse(int jobAdvertisementId) { 69 | JobAdvertisement jobAdvertisement = _jobAdvertisementDao.findById(jobAdvertisementId); 70 | jobAdvertisement.setActive(false); 71 | _jobAdvertisementDao.save(jobAdvertisement); 72 | return new SuccessResult(); 73 | } 74 | 75 | @Override 76 | public Result advertisementActiveTrue(int jobAdvertisementId) { 77 | JobAdvertisement jobAdvertisement = _jobAdvertisementDao.findById(jobAdvertisementId); 78 | jobAdvertisement.setActive(true); 79 | _jobAdvertisementDao.save(jobAdvertisement); 80 | return new SuccessResult(); 81 | } 82 | 83 | @Override 84 | public DataResult> getAll() { 85 | return new SuccessDataResult>(_jobAdvertisementDao.findAll()); 86 | } 87 | 88 | @Override 89 | public DataResult> getActiveAdvertisements() { 90 | return new SuccessDataResult>(_jobAdvertisementDao.findByIsActiveTrue()); 91 | } 92 | 93 | @Override 94 | public DataResult> getActiveAdvertisementsByEmployer(int employerId) { 95 | return new SuccessDataResult>(_jobAdvertisementDao.findByEmployer_UserIdAndIsActiveTrue(employerId)); 96 | } 97 | 98 | @Override 99 | public DataResult> getActiveAdvertisementsByDeadlineAsc() { 100 | return new SuccessDataResult>(_jobAdvertisementDao.findByIsActiveTrueOrderByApplicationDeadlineAsc()); 101 | } 102 | 103 | @Override 104 | public DataResult> getActiveAdvertisementsByDeadlineDesc() { 105 | return new SuccessDataResult>(_jobAdvertisementDao.findByIsActiveTrueOrderByApplicationDeadlineDesc()); 106 | } 107 | 108 | private Result checkEmployerEmailValidation(Employer employer){ 109 | EmailValidation emailValidation = _emailValidationService.getByUserId(employer.getUserId()).getData(); 110 | if(emailValidation.isValid()){ 111 | return new SuccessResult(); 112 | } 113 | return new ErrorResult("Email error"); 114 | } 115 | 116 | private Result checkEmployerStaffValidation(Employer employer){ 117 | StaffValidation staffValidation = _staffValidationService.getByUserId(employer.getUserId()).getData(); 118 | if (staffValidation.isValid()){ 119 | return new SuccessResult(); 120 | } 121 | return new ErrorResult("staff validation error"); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/Security/Mernis/KPSPublicLocator.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.Security.Mernis; 2 | 3 | public class KPSPublicLocator extends org.apache.axis.client.Service implements KPSPublic { 4 | 5 | public KPSPublicLocator() { 6 | } 7 | 8 | 9 | public KPSPublicLocator(org.apache.axis.EngineConfiguration config) { 10 | super(config); 11 | } 12 | 13 | public KPSPublicLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { 14 | super(wsdlLoc, sName); 15 | } 16 | 17 | // Use to get a proxy class for KPSPublicSoap 18 | private java.lang.String KPSPublicSoap_address = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 19 | 20 | public java.lang.String getKPSPublicSoapAddress() { 21 | return KPSPublicSoap_address; 22 | } 23 | 24 | // The WSDD service name defaults to the port name. 25 | private java.lang.String KPSPublicSoapWSDDServiceName = "KPSPublicSoap"; 26 | 27 | public java.lang.String getKPSPublicSoapWSDDServiceName() { 28 | return KPSPublicSoapWSDDServiceName; 29 | } 30 | 31 | public void setKPSPublicSoapWSDDServiceName(java.lang.String name) { 32 | KPSPublicSoapWSDDServiceName = name; 33 | } 34 | 35 | public KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException { 36 | java.net.URL endpoint; 37 | try { 38 | endpoint = new java.net.URL(KPSPublicSoap_address); 39 | } 40 | catch (java.net.MalformedURLException e) { 41 | throw new javax.xml.rpc.ServiceException(e); 42 | } 43 | return getKPSPublicSoap(endpoint); 44 | } 45 | 46 | public KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { 47 | try { 48 | KPSPublicSoapStub _stub = new KPSPublicSoapStub(portAddress, this); 49 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 50 | return _stub; 51 | } 52 | catch (org.apache.axis.AxisFault e) { 53 | return null; 54 | } 55 | } 56 | 57 | public void setKPSPublicSoapEndpointAddress(java.lang.String address) { 58 | KPSPublicSoap_address = address; 59 | } 60 | 61 | /** 62 | * For the given interface, get the stub implementation. 63 | * If this service has no port for the given interface, 64 | * then ServiceException is thrown. 65 | */ 66 | public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 67 | try { 68 | if (KPSPublicSoap.class.isAssignableFrom(serviceEndpointInterface)) { 69 | KPSPublicSoapStub _stub = new KPSPublicSoapStub(new java.net.URL(KPSPublicSoap_address), this); 70 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 71 | return _stub; 72 | } 73 | } 74 | catch (java.lang.Throwable t) { 75 | throw new javax.xml.rpc.ServiceException(t); 76 | } 77 | throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); 78 | } 79 | 80 | /** 81 | * For the given interface, get the stub implementation. 82 | * If this service has no port for the given interface, 83 | * then ServiceException is thrown. 84 | */ 85 | public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 86 | if (portName == null) { 87 | return getPort(serviceEndpointInterface); 88 | } 89 | java.lang.String inputPortName = portName.getLocalPart(); 90 | if ("KPSPublicSoap".equals(inputPortName)) { 91 | return getKPSPublicSoap(); 92 | } 93 | else { 94 | java.rmi.Remote _stub = getPort(serviceEndpointInterface); 95 | ((org.apache.axis.client.Stub) _stub).setPortName(portName); 96 | return _stub; 97 | } 98 | } 99 | 100 | public javax.xml.namespace.QName getServiceName() { 101 | return new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublic"); 102 | } 103 | 104 | private java.util.HashSet ports = null; 105 | 106 | public java.util.Iterator getPorts() { 107 | if (ports == null) { 108 | ports = new java.util.HashSet(); 109 | ports.add(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap")); 110 | } 111 | return ports.iterator(); 112 | } 113 | 114 | /** 115 | * Set the endpoint address for the specified port name. 116 | */ 117 | public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 118 | 119 | if ("KPSPublicSoap".equals(portName)) { 120 | setKPSPublicSoapEndpointAddress(address); 121 | } 122 | else 123 | { // Unknown Port Name 124 | throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); 125 | } 126 | } 127 | 128 | /** 129 | * Set the endpoint address for the specified port name. 130 | */ 131 | public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 132 | setEndpointAddress(portName.getLocalPart(), address); 133 | } 134 | 135 | } -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/core/Security/Mernis/KPSPublicSoapStub.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.core.Security.Mernis; 2 | 3 | public class KPSPublicSoapStub extends org.apache.axis.client.Stub implements KPSPublicSoap { 4 | private java.util.Vector cachedSerClasses = new java.util.Vector(); 5 | private java.util.Vector cachedSerQNames = new java.util.Vector(); 6 | private java.util.Vector cachedSerFactories = new java.util.Vector(); 7 | private java.util.Vector cachedDeserFactories = new java.util.Vector(); 8 | 9 | static org.apache.axis.description.OperationDesc [] _operations; 10 | 11 | static { 12 | _operations = new org.apache.axis.description.OperationDesc[1]; 13 | _initOperationDesc1(); 14 | } 15 | 16 | private static void _initOperationDesc1(){ 17 | org.apache.axis.description.OperationDesc oper; 18 | org.apache.axis.description.ParameterDesc param; 19 | oper = new org.apache.axis.description.OperationDesc(); 20 | oper.setName("TCKimlikNoDogrula"); 21 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNo"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false); 22 | oper.addParameter(param); 23 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Ad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false); 24 | param.setOmittable(true); 25 | oper.addParameter(param); 26 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Soyad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false); 27 | param.setOmittable(true); 28 | oper.addParameter(param); 29 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "DogumYili"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false); 30 | oper.addParameter(param); 31 | oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean")); 32 | oper.setReturnClass(boolean.class); 33 | oper.setReturnQName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrulaResult")); 34 | oper.setStyle(org.apache.axis.constants.Style.WRAPPED); 35 | oper.setUse(org.apache.axis.constants.Use.LITERAL); 36 | _operations[0] = oper; 37 | 38 | } 39 | 40 | public KPSPublicSoapStub() throws org.apache.axis.AxisFault { 41 | this(null); 42 | } 43 | 44 | public KPSPublicSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 45 | this(service); 46 | super.cachedEndpoint = endpointURL; 47 | } 48 | 49 | public KPSPublicSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 50 | if (service == null) { 51 | super.service = new org.apache.axis.client.Service(); 52 | } else { 53 | super.service = service; 54 | } 55 | ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); 56 | } 57 | 58 | protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 59 | try { 60 | org.apache.axis.client.Call _call = super._createCall(); 61 | if (super.maintainSessionSet) { 62 | _call.setMaintainSession(super.maintainSession); 63 | } 64 | if (super.cachedUsername != null) { 65 | _call.setUsername(super.cachedUsername); 66 | } 67 | if (super.cachedPassword != null) { 68 | _call.setPassword(super.cachedPassword); 69 | } 70 | if (super.cachedEndpoint != null) { 71 | _call.setTargetEndpointAddress(super.cachedEndpoint); 72 | } 73 | if (super.cachedTimeout != null) { 74 | _call.setTimeout(super.cachedTimeout); 75 | } 76 | if (super.cachedPortName != null) { 77 | _call.setPortName(super.cachedPortName); 78 | } 79 | java.util.Enumeration keys = super.cachedProperties.keys(); 80 | while (keys.hasMoreElements()) { 81 | java.lang.String key = (java.lang.String) keys.nextElement(); 82 | _call.setProperty(key, super.cachedProperties.get(key)); 83 | } 84 | return _call; 85 | } 86 | catch (java.lang.Throwable _t) { 87 | throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); 88 | } 89 | } 90 | 91 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException { 92 | if (super.cachedEndpoint == null) { 93 | throw new org.apache.axis.NoEndPointException(); 94 | } 95 | org.apache.axis.client.Call _call = createCall(); 96 | _call.setOperation(_operations[0]); 97 | _call.setUseSOAPAction(true); 98 | _call.setSOAPActionURI("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"); 99 | _call.setEncodingStyle(null); 100 | _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); 101 | _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); 102 | _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 103 | _call.setOperationName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula")); 104 | 105 | setRequestHeaders(_call); 106 | setAttachments(_call); 107 | try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(TCKimlikNo), ad, soyad, new java.lang.Integer(dogumYili)}); 108 | 109 | if (_resp instanceof java.rmi.RemoteException) { 110 | throw (java.rmi.RemoteException)_resp; 111 | } 112 | else { 113 | extractAttachments(_call); 114 | try { 115 | return ((java.lang.Boolean) _resp).booleanValue(); 116 | } catch (java.lang.Exception _exception) { 117 | return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue(); 118 | } 119 | } 120 | } catch (org.apache.axis.AxisFault axisFaultException) { 121 | throw axisFaultException; 122 | } 123 | } 124 | 125 | } -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.4.5 9 | 10 | 11 | kodlamaio 12 | humanResourcesProject 13 | 0.0.1-SNAPSHOT 14 | humanResourcesProject 15 | Demo project for Spring Boot 16 | 17 | 16 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.apache.axis 26 | axis 27 | 1.4 28 | 29 | 30 | com.cloudinary 31 | cloudinary-http44 32 | 1.29.0 33 | 34 | 35 | io.astefanutti.metrics.aspectj 36 | metrics-aspectj 37 | 1.2.0 38 | 39 | 40 | org.slf4j 41 | slf4j-api 42 | 43 | 44 | 45 | 46 | io.astefanutti.metrics.aspectj 47 | metrics-aspectj-deps 48 | 1.2.0 49 | 50 | 51 | org.modelmapper 52 | modelmapper 53 | 3.1.0 54 | 55 | org.springframework.boot spring-boot-starter-validation 56 | 57 | axis 58 | axis 59 | 1.4 60 | compile 61 | 62 | 63 | axis 64 | axis-wsdl4j 65 | 1.5.1 66 | compile 67 | 68 | 69 | javax.xml 70 | jaxrpc 71 | 1.1 72 | 73 | 74 | 75 | javax.validation 76 | validation-api 77 | 2.0.1.Final 78 | 79 | 80 | org.springframework.boot 81 | spring-boot-starter-web 82 | 83 | 84 | org.springframework.boot 85 | spring-boot-devtools 86 | runtime 87 | true 88 | 89 | 90 | org.postgresql 91 | postgresql 92 | runtime 93 | 94 | 95 | org.projectlombok 96 | lombok 97 | true 98 | 99 | 100 | org.springframework.boot 101 | spring-boot-starter-test 102 | test 103 | 104 | 105 | io.springfox 106 | springfox-swagger2 107 | 2.9.2 108 | 109 | 110 | io.springfox 111 | springfox-swagger-ui 112 | 2.9.2 113 | 114 | 115 | kodlamaio 116 | humanResourcesProject 117 | 0.0.1-SNAPSHOT 118 | 119 | 120 | commons-validator 121 | commons-validator 122 | 1.3.1 123 | 124 | 125 | io.swagger 126 | swagger-models 127 | 1.5.20 128 | 129 | 130 | io.swagger.core.v3 131 | swagger-models 132 | 2.1.2 133 | 134 | 135 | oro 136 | oro 137 | 2.0.8 138 | 139 | 140 | jakarta.xml.bind 141 | jakarta.xml.bind-api 142 | 2.3.3 143 | 144 | 145 | jakarta.xml.bind 146 | jakarta.xml.bind-api 147 | 2.3.3 148 | 149 | 150 | jakarta.xml.bind 151 | jakarta.xml.bind-api 152 | 2.3.3 153 | 154 | 155 | jakarta.xml.bind 156 | jakarta.xml.bind-api 157 | 2.3.3 158 | 159 | 160 | jakarta.xml.bind 161 | jakarta.xml.bind-api 162 | 2.3.3 163 | 164 | 165 | jakarta.xml.bind 166 | jakarta.xml.bind-api 167 | 2.3.3 168 | 169 | 170 | jakarta.xml.bind 171 | jakarta.xml.bind-api 172 | 2.3.3 173 | 174 | 175 | jakarta.persistence 176 | jakarta.persistence-api 177 | 2.2.3 178 | 179 | 180 | 181 | 182 | 183 | 184 | org.springframework.boot 185 | spring-boot-maven-plugin 186 | 187 | 188 | 189 | org.projectlombok 190 | lombok 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /src/main/java/kodlamaio/humanResourcesProject/business/concretes/JobSeekerManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.humanResourcesProject.business.concretes; 2 | 3 | 4 | import kodlamaio.humanResourcesProject.business.abstracts.*; 5 | import kodlamaio.humanResourcesProject.business.validations.mernis.IMernisCheckService; 6 | import kodlamaio.humanResourcesProject.core.utilities.results.*; 7 | import kodlamaio.humanResourcesProject.dataAccess.abstracts.IJobSeekerDao; 8 | import kodlamaio.humanResourcesProject.entities.concretes.EmailValidation; 9 | import kodlamaio.humanResourcesProject.entities.concretes.JobSeeker; 10 | import kodlamaio.humanResourcesProject.entities.concretes.Photo; 11 | import kodlamaio.humanResourcesProject.entities.dtos.CvDto; 12 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerCoverLetterDto; 13 | import kodlamaio.humanResourcesProject.entities.dtos.JobSeekerLinksDto; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Service; 16 | 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | @Service 21 | public class JobSeekerManager implements IJobSeekerService { 22 | 23 | private IJobSeekerDao _jobSeekerDao; 24 | private IUserService _userManager; 25 | private IMernisCheckService _mernisCheckService; 26 | private IEmailValidationService _emailValidationService; 27 | private IJobSeekerExperienceService _jobSeekerExperienceService; 28 | private IJobSeekerLanguageService _jobSeekerLanguageService; 29 | private IJobSeekerPositionService _jobSeekerPositionService; 30 | private IJobSeekerSchoolService _jobSeekerSchoolService; 31 | private IJobSeekerSkillService _jobSeekerSkillService; 32 | private IPhotoService _photoService; 33 | private IJobSeekerReferenceService _jobSeekerReferenceService; 34 | private IJobSeekerCertificateService _jobSeekerCertificateService; 35 | 36 | @Autowired 37 | public JobSeekerManager(IJobSeekerDao jobSeekerDao, IUserService userManager, IMernisCheckService mernisCheckService, IEmailValidationService emailValidationService, IJobSeekerExperienceService jobSeekerExperienceService, IJobSeekerLanguageService jobSeekerLanguageService, IJobSeekerPositionService jobSeekerPositionService, IJobSeekerSchoolService jobSeekerSchoolService, IJobSeekerSkillService jobSeekerSkillService, IPhotoService photoService, ICityService cityService, IJobSeekerReferenceService jobSeekerReferenceService, IJobSeekerCertificateService jobSeekerCertificateService) { 38 | super(); 39 | _jobSeekerDao = jobSeekerDao; 40 | _userManager = userManager; 41 | _mernisCheckService = mernisCheckService; 42 | _emailValidationService = emailValidationService; 43 | _jobSeekerExperienceService = jobSeekerExperienceService; 44 | _jobSeekerLanguageService = jobSeekerLanguageService; 45 | _jobSeekerPositionService = jobSeekerPositionService; 46 | _jobSeekerSchoolService = jobSeekerSchoolService; 47 | _jobSeekerSkillService = jobSeekerSkillService; 48 | _photoService = photoService; 49 | _jobSeekerReferenceService = jobSeekerReferenceService; 50 | _jobSeekerCertificateService = jobSeekerCertificateService; 51 | } 52 | 53 | @Override 54 | public Result add(JobSeeker jobSeeker) throws Exception{ 55 | 56 | List results = new ArrayList(); 57 | boolean isFail = false; 58 | 59 | results.add(nullController(jobSeeker)); 60 | results.add(checkNationalId(jobSeeker)); 61 | results.add(_userManager.checkEmail(jobSeeker)); 62 | results.add(_mernisCheckService.checkIfRealPerson(jobSeeker)); 63 | 64 | for (var result: results){ 65 | if (! result.isSuccess()) { 66 | isFail = true; 67 | return result; 68 | } 69 | } 70 | 71 | if (! isFail){ 72 | _jobSeekerDao.save(jobSeeker); 73 | 74 | EmailValidation emailValidation = new EmailValidation(); 75 | emailValidation.setUserId(jobSeeker.getUserId()); 76 | emailValidation.setValid(false); 77 | _emailValidationService.add(emailValidation); 78 | 79 | 80 | Photo photo = new Photo(); 81 | photo.setUserId(jobSeeker.getUserId()); 82 | photo.setPhotoUrl("https://res.cloudinary.com/dbzf16o0x/image/upload/v1657832793/Ec6ferCXYAA6XB__ednbzx.jpg"); 83 | _photoService.add(photo); 84 | 85 | return new SuccessResult(); 86 | } 87 | else { 88 | return new ErrorResult(); 89 | } 90 | 91 | } 92 | 93 | @Override 94 | public Result delete(JobSeeker jobSeeker) { 95 | _jobSeekerDao.delete(jobSeeker); 96 | return new SuccessResult(); 97 | } 98 | 99 | @Override 100 | public DataResult> getAll() { 101 | return new SuccessDataResult>(_jobSeekerDao.findAll()); 102 | } 103 | 104 | @Override 105 | public DataResult getCv(int userId) { 106 | CvDto cvDto = new CvDto(); 107 | JobSeeker jobSeeker = _jobSeekerDao.findById(userId); 108 | cvDto.setJobSeeker(jobSeeker); 109 | cvDto.setPhoto(_photoService.getByUserId(userId).getData()); 110 | cvDto.setJobSeekerCertificates(_jobSeekerCertificateService.getAllCertificatesByUserId(userId).getData()); 111 | cvDto.setJobSeekerReferences(_jobSeekerReferenceService.getAllReferencesByUserId(userId).getData()); 112 | cvDto.setJobSeekerExperiences(_jobSeekerExperienceService.getByUserIdOrderByStartDateDesc(userId).getData()); 113 | cvDto.setJobSeekerLanguages(_jobSeekerLanguageService.getByUserIdOrderByLevelDesc(userId).getData()); 114 | cvDto.setJobSeekerPositions(_jobSeekerPositionService.getByUserId(userId).getData()); 115 | cvDto.setJobSeekerSchools(_jobSeekerSchoolService.getByUserIdOrderByStartYearDesc(userId).getData()); 116 | cvDto.setJobSeekerSkills(_jobSeekerSkillService.getByUserId(userId).getData()); 117 | return new SuccessDataResult(cvDto); 118 | } 119 | 120 | @Override 121 | public Result updateLinks(JobSeekerLinksDto jobSeekerLinksDto) { 122 | JobSeeker jobSeeker = _jobSeekerDao.findById(jobSeekerLinksDto.getUserId()); 123 | jobSeeker.setGithubLink(jobSeekerLinksDto.getGithubLink()); 124 | jobSeeker.setLinkedinLink(jobSeekerLinksDto.getLinkedinLink()); 125 | jobSeeker.setInstagramLink(jobSeekerLinksDto.getInstagramLink()); 126 | jobSeeker.setTwitterLink(jobSeekerLinksDto.getTwitterLink()); 127 | _jobSeekerDao.save(jobSeeker); 128 | return new SuccessResult(); 129 | } 130 | 131 | 132 | @Override 133 | public Result updateCoverLetter(JobSeekerCoverLetterDto jobSeekerCoverLetterDto) { 134 | JobSeeker jobSeeker = _jobSeekerDao.findById(jobSeekerCoverLetterDto.getUserId()); 135 | jobSeeker.setCoverLetter(jobSeekerCoverLetterDto.getCoverLetter()); 136 | _jobSeekerDao.save(jobSeeker); 137 | return new SuccessResult(); 138 | } 139 | 140 | private Result checkNationalId(JobSeeker jobSeeker){ 141 | List jobSeekers = _jobSeekerDao.findByNationalId(jobSeeker.getNationalId()); 142 | if (jobSeekers.isEmpty()){ 143 | return new SuccessResult(); 144 | } 145 | return new ErrorResult("this user already exists in system"); 146 | } 147 | 148 | private Result nullController(JobSeeker jobSeeker) { 149 | if ( 150 | jobSeeker.getBirthYear() == "" 151 | || jobSeeker.getFirstName() == "" 152 | || jobSeeker.getLastName() == "" 153 | || jobSeeker.getNationalId() == "" 154 | || jobSeeker.getPassword() == "" 155 | || jobSeeker.getEmail() == "" ) 156 | { 157 | return new ErrorResult("you must fill in the fields"); 158 | } 159 | return new SuccessResult(); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | # Provide a "standardized" way to retrieve the CLI args that will 300 | # work with both Windows and non-Windows executions. 301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 302 | export MAVEN_CMD_LINE_ARGS 303 | 304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 305 | 306 | exec "$JAVACMD" \ 307 | $MAVEN_OPTS \ 308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 311 | --------------------------------------------------------------------------------