└── hrms ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ ├── maven-wrapper.properties │ └── MavenWrapperDownloader.java ├── src ├── main │ ├── java │ │ ├── kodlamaio │ │ │ └── hrms │ │ │ │ ├── core │ │ │ │ ├── abstracts │ │ │ │ │ └── VerificationEmailService.java │ │ │ │ ├── verificationEmails │ │ │ │ │ └── VerificationEmailManager.java │ │ │ │ ├── utilities │ │ │ │ │ └── results │ │ │ │ │ │ ├── ErrorResult.java │ │ │ │ │ │ ├── SuccessResult.java │ │ │ │ │ │ ├── Result.java │ │ │ │ │ │ ├── DataResult.java │ │ │ │ │ │ ├── ErrorDataResult.java │ │ │ │ │ │ └── SuccessDataResult.java │ │ │ │ ├── imageuploads │ │ │ │ │ ├── ImageUploadService.java │ │ │ │ │ └── ImageUploadManager.java │ │ │ │ ├── adapters │ │ │ │ │ ├── VerificationEmailManagerAdapter.java │ │ │ │ │ └── MerniseServiceAdapter.java │ │ │ │ ├── configs │ │ │ │ │ └── AppConfig.java │ │ │ │ └── cloudinaryServices │ │ │ │ │ └── CloudinaryService.java │ │ │ │ ├── business │ │ │ │ ├── abstracts │ │ │ │ │ ├── UserService.java │ │ │ │ │ ├── CandidateCheckService.java │ │ │ │ │ ├── CityService.java │ │ │ │ │ ├── LevelService.java │ │ │ │ │ ├── SchoolService.java │ │ │ │ │ ├── SkillService.java │ │ │ │ │ ├── LanguageService.java │ │ │ │ │ ├── SectionService.java │ │ │ │ │ ├── TypeOfWorkService.java │ │ │ │ │ ├── WorkingTimeService.java │ │ │ │ │ ├── EmployeService.java │ │ │ │ │ ├── MyFavouriteService.java │ │ │ │ │ ├── JobTitleService.java │ │ │ │ │ ├── CandidateService.java │ │ │ │ │ ├── CvSkillService.java │ │ │ │ │ ├── LanguageLevelService.java │ │ │ │ │ ├── SchoolSectionService.java │ │ │ │ │ ├── ImageService.java │ │ │ │ │ ├── EmployerService.java │ │ │ │ │ ├── CvService.java │ │ │ │ │ └── JobPostingService.java │ │ │ │ └── concretes │ │ │ │ │ ├── SkillManager.java │ │ │ │ │ ├── CityManager.java │ │ │ │ │ ├── LevelManager.java │ │ │ │ │ ├── SchoolManager.java │ │ │ │ │ ├── SectionManager.java │ │ │ │ │ ├── LanguageManager.java │ │ │ │ │ ├── WorkingTimeManager.java │ │ │ │ │ ├── TypeOfWorkManager.java │ │ │ │ │ ├── UserManager.java │ │ │ │ │ ├── EmployeManager.java │ │ │ │ │ ├── MyFavouriteManager.java │ │ │ │ │ ├── CvSkillManager.java │ │ │ │ │ ├── JobTitleManager.java │ │ │ │ │ ├── LanguageLevelManager.java │ │ │ │ │ ├── SchoolSectionManager.java │ │ │ │ │ ├── CvManager.java │ │ │ │ │ ├── ImageManager.java │ │ │ │ │ ├── EmployerManager.java │ │ │ │ │ ├── CandidateManager.java │ │ │ │ │ └── JobPostingManager.java │ │ │ │ ├── dataAccess │ │ │ │ └── abstracts │ │ │ │ │ ├── UserDao.java │ │ │ │ │ ├── CityDao.java │ │ │ │ │ ├── LevelDao.java │ │ │ │ │ ├── SkillDao.java │ │ │ │ │ ├── JobTitleDao.java │ │ │ │ │ ├── LanguageDao.java │ │ │ │ │ ├── SchoolDao.java │ │ │ │ │ ├── SectionDao.java │ │ │ │ │ ├── EmployeDao.java │ │ │ │ │ ├── TypeOfWorkDao.java │ │ │ │ │ ├── WorkingTimeDao.java │ │ │ │ │ ├── CandidateDao.java │ │ │ │ │ ├── MyFavouriteDao.java │ │ │ │ │ ├── ImageDao.java │ │ │ │ │ ├── CvSkillDao.java │ │ │ │ │ ├── LanguageLevelDao.java │ │ │ │ │ ├── SchoolSectionDao.java │ │ │ │ │ ├── EmployerDao.java │ │ │ │ │ ├── CvDao.java │ │ │ │ │ └── JobPostingDao.java │ │ │ │ ├── entities │ │ │ │ ├── dtos │ │ │ │ │ ├── CvSkillDto.java │ │ │ │ │ ├── LanguageLevelDto.java │ │ │ │ │ ├── SchoolSectionDto.java │ │ │ │ │ ├── PageableDto.java │ │ │ │ │ ├── EmployerForRegisterDto.java │ │ │ │ │ ├── CandidateForRegisterDto.java │ │ │ │ │ └── CandidateWithCvDto.java │ │ │ │ └── concretes │ │ │ │ │ ├── EmployeConfirmEmployer.java │ │ │ │ │ ├── User.java │ │ │ │ │ ├── Employe.java │ │ │ │ │ ├── EmployeConfirm.java │ │ │ │ │ ├── CvSkill.java │ │ │ │ │ ├── MyFavourite.java │ │ │ │ │ ├── LanguageLevel.java │ │ │ │ │ ├── Skill.java │ │ │ │ │ ├── Level.java │ │ │ │ │ ├── City.java │ │ │ │ │ ├── School.java │ │ │ │ │ ├── Section.java │ │ │ │ │ ├── WorkingTime.java │ │ │ │ │ ├── Language.java │ │ │ │ │ ├── JobTitle.java │ │ │ │ │ ├── TypeOfWork.java │ │ │ │ │ ├── Image.java │ │ │ │ │ ├── SchoolSection.java │ │ │ │ │ ├── Employer.java │ │ │ │ │ ├── Candidate.java │ │ │ │ │ ├── JobPosting.java │ │ │ │ │ └── Cv.java │ │ │ │ ├── HrmsApplication.java │ │ │ │ └── api │ │ │ │ └── controllers │ │ │ │ ├── LevelController.java │ │ │ │ ├── CityController.java │ │ │ │ ├── SkillController.java │ │ │ │ ├── EmployeController.java │ │ │ │ ├── SchoolController.java │ │ │ │ ├── LanguageController.java │ │ │ │ ├── SectionController.java │ │ │ │ ├── TypeOfWorkController.java │ │ │ │ ├── WorkingTimeController.java │ │ │ │ ├── MyFavouriteController.java │ │ │ │ ├── CandidateController.java │ │ │ │ ├── JobTitlesController.java │ │ │ │ ├── CvSkillController.java │ │ │ │ ├── LanguageLevelController.java │ │ │ │ ├── SchoolSectionController.java │ │ │ │ ├── ImageController.java │ │ │ │ ├── CvController.java │ │ │ │ ├── EmployerController.java │ │ │ │ └── JobPostingController.java │ │ └── tr │ │ │ └── gov │ │ │ └── nvi │ │ │ └── tckimlik │ │ │ └── WS │ │ │ ├── KPSPublicSoap.java │ │ │ ├── KPSPublic.java │ │ │ ├── KPSPublicSoapProxy.java │ │ │ ├── KPSPublicLocator.java │ │ │ └── KPSPublicSoapStub.java │ └── resources │ │ └── application.properties └── test │ └── java │ └── kodlamaio │ └── hrms │ └── HrmsApplicationTests.java ├── .gitignore ├── pom.xml ├── mvnw.cmd └── mvnw /hrms/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kadirdemirel/hrms/HEAD/hrms/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/abstracts/VerificationEmailService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.abstracts; 2 | 3 | public interface VerificationEmailService { 4 | Boolean verificationEmail(String message); 5 | } 6 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import kodlamaio.hrms.core.utilities.results.Result; 4 | 5 | public interface UserService { 6 | Result GetByMail(String email); 7 | } 8 | -------------------------------------------------------------------------------- /hrms/.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 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/CandidateCheckService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | 4 | import kodlamaio.hrms.entities.concretes.Candidate; 5 | 6 | public interface CandidateCheckService { 7 | boolean CheckIfRealPerson(Candidate candidate); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/verificationEmails/VerificationEmailManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.verificationEmails; 2 | 3 | public class VerificationEmailManager { 4 | public void verificationEmail(String message) { 5 | System.out.println("Doğrulama e-postası gönderildi."); 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class ErrorResult extends Result { 4 | public ErrorResult() { 5 | super(false); 6 | } 7 | 8 | public ErrorResult(String message) { 9 | super(false, message); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/test/java/kodlamaio/hrms/HrmsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HrmsApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class SuccessResult extends Result { 4 | public SuccessResult() { 5 | super(true); 6 | } 7 | 8 | public SuccessResult(String message) { 9 | super(true, message); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.User; 6 | 7 | public interface UserDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/CityDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | 6 | import kodlamaio.hrms.entities.concretes.City; 7 | 8 | public interface CityDao extends JpaRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/LevelDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.Level; 6 | 7 | public interface LevelDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/SkillDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.Skill; 6 | 7 | public interface SkillDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/JobTitleDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.JobTitle; 6 | 7 | public interface JobTitleDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/LanguageDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.Language; 6 | 7 | public interface LanguageDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/SchoolDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | 6 | import kodlamaio.hrms.entities.concretes.School; 7 | 8 | public interface SchoolDao extends JpaRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/SectionDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.Section; 6 | 7 | public interface SectionDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/CityService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.entities.concretes.City; 7 | 8 | 9 | public interface CityService { 10 | DataResult> getAll(); 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/LevelService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.entities.concretes.Level; 7 | 8 | public interface LevelService { 9 | DataResult> getAll(); 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/SchoolService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.entities.concretes.School; 7 | 8 | public interface SchoolService { 9 | DataResult> getAll(); 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/SkillService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.entities.concretes.Skill; 7 | 8 | public interface SkillService { 9 | DataResult> getAll(); 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/EmployeDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | 8 | import kodlamaio.hrms.entities.concretes.Employe; 9 | 10 | public interface EmployeDao extends JpaRepository { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/TypeOfWorkDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entities.concretes.TypeOfWork; 6 | 7 | 8 | public interface TypeOfWorkDao extends JpaRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/imageuploads/ImageUploadService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.imageuploads; 2 | 3 | 4 | 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import kodlamaio.hrms.core.utilities.results.DataResult; 8 | 9 | public interface ImageUploadService { 10 | DataResult save(MultipartFile file); 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/WorkingTimeDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | 6 | import kodlamaio.hrms.entities.concretes.WorkingTime; 7 | 8 | public interface WorkingTimeDao extends JpaRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/LanguageService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.entities.concretes.Language; 7 | 8 | public interface LanguageService { 9 | DataResult> getAll(); 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/SectionService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | 6 | import kodlamaio.hrms.core.utilities.results.DataResult; 7 | import kodlamaio.hrms.entities.concretes.Section; 8 | 9 | public interface SectionService { 10 | DataResult> getAll(); 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/CandidateDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import kodlamaio.hrms.entities.concretes.Candidate; 8 | 9 | 10 | public interface CandidateDao extends JpaRepository { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/CvSkillDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class CvSkillDto { 11 | private int id; 12 | private String skillName; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/TypeOfWorkService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | 7 | import kodlamaio.hrms.entities.concretes.TypeOfWork; 8 | 9 | public interface TypeOfWorkService { 10 | DataResult> getAll(); 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/WorkingTimeService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | 7 | import kodlamaio.hrms.entities.concretes.WorkingTime; 8 | 9 | public interface WorkingTimeService { 10 | DataResult> getAll(); 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/LanguageLevelDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class LanguageLevelDto { 11 | private int id; 12 | private String languageName; 13 | private String levelName; 14 | } 15 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/SchoolSectionDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class SchoolSectionDto { 11 | private int id; 12 | private String schoolName; 13 | private String sectionName; 14 | } 15 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/PageableDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | 4 | 5 | 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | 10 | import lombok.NoArgsConstructor; 11 | 12 | @Data 13 | 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class PageableDto { 17 | 18 | 19 | private int cityId; 20 | private int typeOfWorkId; 21 | } 22 | -------------------------------------------------------------------------------- /hrms/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/hrms 5 | spring.datasource.username=postgres 6 | spring.datasource.password=12345 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | 9 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/EmployeService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import kodlamaio.hrms.core.utilities.results.Result; 4 | import kodlamaio.hrms.entities.concretes.Employe; 5 | import kodlamaio.hrms.entities.concretes.Employer; 6 | 7 | public interface EmployeService { 8 | Result confirm(Employer employer); 9 | 10 | Result add(Employe employe); 11 | } 12 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/MyFavouriteService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import kodlamaio.hrms.core.utilities.results.Result; 4 | 5 | import kodlamaio.hrms.entities.concretes.MyFavourite; 6 | 7 | public interface MyFavouriteService { 8 | Result add(MyFavourite myFavourite); 9 | Result insertCandidateAndJobPosting(int candidateId, int jobPostingId); 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/JobTitleService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.core.utilities.results.Result; 7 | import kodlamaio.hrms.entities.concretes.JobTitle; 8 | 9 | public interface JobTitleService { 10 | 11 | DataResult> getAll(); 12 | 13 | Result add(JobTitle jobTitle); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /hrms/src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoap.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public interface KPSPublicSoap extends java.rmi.Remote { 11 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException; 12 | } 13 | -------------------------------------------------------------------------------- /hrms/.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 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.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(boolean success, String message) { 12 | this(success); 13 | this.message = message; 14 | } 15 | 16 | public boolean isSuccess() { 17 | return this.success; 18 | } 19 | 20 | public String getMessage() { 21 | return this.message; 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/CandidateService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.core.utilities.results.Result; 7 | import kodlamaio.hrms.entities.concretes.Candidate; 8 | import kodlamaio.hrms.entities.dtos.CandidateForRegisterDto; 9 | 10 | public interface CandidateService { 11 | 12 | Result add(CandidateForRegisterDto candidateForRegisterDto); 13 | 14 | DataResult> getAll(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class DataResult extends Result { 4 | 5 | private T data; 6 | 7 | public DataResult(T data, boolean success, String message) { 8 | super(success, message); 9 | this.data = data; 10 | // TODO Auto-generated constructor stub 11 | } 12 | 13 | public DataResult(T data, boolean success) { 14 | super(success); 15 | this.data = data; 16 | // TODO Auto-generated constructor stub 17 | } 18 | 19 | public T getData() { 20 | return this.data; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/CvSkillService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | 6 | 7 | import kodlamaio.hrms.core.utilities.results.DataResult; 8 | import kodlamaio.hrms.core.utilities.results.Result; 9 | import kodlamaio.hrms.entities.concretes.CvSkill; 10 | import kodlamaio.hrms.entities.dtos.CvSkillDto; 11 | 12 | public interface CvSkillService { 13 | DataResult> getAll(); 14 | 15 | Result add(CvSkill cvSkill); 16 | 17 | DataResult> getCvSkillDetails(int cvId); 18 | 19 | Result updateCvSkill(int sckillId, int id); 20 | } 21 | -------------------------------------------------------------------------------- /hrms/src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublic.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublic.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public interface KPSPublic extends javax.xml.rpc.Service { 11 | public java.lang.String getKPSPublicSoapAddress(); 12 | 13 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException; 14 | 15 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; 16 | } 17 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/adapters/VerificationEmailManagerAdapter.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.adapters; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import kodlamaio.hrms.core.abstracts.VerificationEmailService; 6 | import kodlamaio.hrms.core.verificationEmails.VerificationEmailManager; 7 | @Service 8 | public class VerificationEmailManagerAdapter implements VerificationEmailService { 9 | 10 | VerificationEmailManager email = new VerificationEmailManager(); 11 | 12 | @Override 13 | public Boolean verificationEmail(String message) { 14 | email.verificationEmail(message); 15 | return true; 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/EmployerForRegisterDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | 4 | 5 | 6 | import kodlamaio.hrms.entities.concretes.User; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.NoArgsConstructor; 11 | 12 | @Data 13 | @EqualsAndHashCode(callSuper = true) 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class EmployerForRegisterDto extends User { 17 | 18 | private String repeatPassword; 19 | 20 | //@Column(name = "company_name") 21 | private String companyName; 22 | 23 | // @Column(name = "web_address") 24 | private String webAddress; 25 | } 26 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/LanguageLevelService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.core.utilities.results.Result; 7 | import kodlamaio.hrms.entities.concretes.LanguageLevel; 8 | import kodlamaio.hrms.entities.dtos.LanguageLevelDto; 9 | 10 | public interface LanguageLevelService { 11 | DataResult> getAll(); 12 | 13 | Result add(LanguageLevel languageLevel); 14 | 15 | DataResult> getLanguageLevelDetails(int cvId); 16 | 17 | Result languageLevel(int languageId, int levelId, int id); 18 | } 19 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/SchoolSectionService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.core.utilities.results.Result; 7 | 8 | import kodlamaio.hrms.entities.concretes.SchoolSection; 9 | 10 | import kodlamaio.hrms.entities.dtos.SchoolSectionDto; 11 | 12 | public interface SchoolSectionService { 13 | DataResult> getAll(); 14 | 15 | Result add(SchoolSection scholSection); 16 | 17 | DataResult> getSchoolSectionDetails(int cvId); 18 | 19 | Result updateSchoolSection(int schoolId,int sectionId,int id); 20 | } 21 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class ErrorDataResult extends DataResult { 4 | public ErrorDataResult(T data, String message) { 5 | super(data, false, message); 6 | // TODO Auto-generated constructor stub 7 | } 8 | 9 | public ErrorDataResult(T data) { 10 | super(data, false); 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public ErrorDataResult(String message) { 15 | super(null, false, message); 16 | // TODO Auto-generated constructor stub 17 | } 18 | 19 | public ErrorDataResult() { 20 | super(null, false); 21 | // TODO Auto-generated constructor stub 22 | } 23 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/ImageService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | 6 | import org.springframework.web.multipart.MultipartFile; 7 | 8 | import kodlamaio.hrms.core.utilities.results.DataResult; 9 | import kodlamaio.hrms.core.utilities.results.Result; 10 | import kodlamaio.hrms.entities.concretes.Image; 11 | 12 | public interface ImageService { 13 | 14 | Result add(Image image); 15 | 16 | DataResult> getAllByCvId(int imageId); 17 | 18 | Result addAll(List image); 19 | 20 | DataResult> getAll(); 21 | 22 | Result add(Image image, MultipartFile file); 23 | 24 | // Result imageUpdate(String url, int id); 25 | } 26 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class SuccessDataResult extends DataResult { 4 | 5 | public SuccessDataResult(T data, String message) { 6 | super(data, true, message); 7 | // TODO Auto-generated constructor stub 8 | } 9 | 10 | public SuccessDataResult(T data) { 11 | super(data, true); 12 | // TODO Auto-generated constructor stub 13 | } 14 | 15 | public SuccessDataResult(String message) { 16 | super(null, true, message); 17 | // TODO Auto-generated constructor stub 18 | } 19 | 20 | public SuccessDataResult() { 21 | super(null, true); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/EmployerService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.core.utilities.results.Result; 7 | import kodlamaio.hrms.entities.concretes.Employer; 8 | 9 | import kodlamaio.hrms.entities.dtos.EmployerForRegisterDto; 10 | 11 | public interface EmployerService { 12 | Result add(EmployerForRegisterDto employerForRegisterDto); 13 | 14 | DataResult> getAll(); 15 | 16 | DataResult getById(int id); 17 | 18 | Result updateEmployer(String companyName, String phone,boolean status ,int id); 19 | 20 | Result updateEmployerClone(String companyNameClone, String phoneClone,boolean status, int id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/CvService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import kodlamaio.hrms.core.utilities.results.DataResult; 7 | import kodlamaio.hrms.core.utilities.results.Result; 8 | 9 | import kodlamaio.hrms.entities.concretes.Cv; 10 | 11 | public interface CvService { 12 | DataResult> getByYearOfGraduation(Cv cv); 13 | 14 | DataResult> getByYearOff(Cv cv); 15 | 16 | Result add(Cv cv); 17 | 18 | DataResult> getAll(); 19 | 20 | DataResult getById(int id); 21 | 22 | Result updateCv(String gitHubAddress, String linkedlnAddress, String coverLetter, LocalDate yearOfEntry, 23 | LocalDate yearOfGraduation, LocalDate yearOfEmployment, LocalDate yearOff, int id); 24 | } 25 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/SkillManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.SkillService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.SkillDao; 12 | import kodlamaio.hrms.entities.concretes.Skill; 13 | 14 | @Service 15 | public class SkillManager implements SkillService { 16 | @Autowired 17 | SkillDao skillDao; 18 | 19 | @Override 20 | public DataResult> getAll() { 21 | return new SuccessDataResult>(this.skillDao.findAll()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/CityManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.CityService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.CityDao; 12 | import kodlamaio.hrms.entities.concretes.City; 13 | 14 | @Service 15 | public class CityManager implements CityService{ 16 | 17 | @Autowired 18 | private CityDao cityDao; 19 | 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | return new SuccessDataResult>(this.cityDao.findAll()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/LevelManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.LevelService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.LevelDao; 12 | import kodlamaio.hrms.entities.concretes.Level; 13 | 14 | @Service 15 | public class LevelManager implements LevelService { 16 | @Autowired 17 | LevelDao levelDao; 18 | 19 | @Override 20 | public DataResult> getAll() { 21 | return new SuccessDataResult>(this.levelDao.findAll()); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/SchoolManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.SchoolService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.SchoolDao; 12 | import kodlamaio.hrms.entities.concretes.School; 13 | 14 | @Service 15 | public class SchoolManager implements SchoolService { 16 | @Autowired 17 | SchoolDao schoolDao; 18 | 19 | @Override 20 | public DataResult> getAll() { 21 | return new SuccessDataResult>(this.schoolDao.findAll()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/CandidateForRegisterDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | 4 | 5 | 6 | 7 | 8 | import kodlamaio.hrms.entities.concretes.User; 9 | import lombok.AllArgsConstructor; 10 | import lombok.Data; 11 | import lombok.EqualsAndHashCode; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | @EqualsAndHashCode(callSuper=true) 18 | public class CandidateForRegisterDto extends User { 19 | 20 | private String repeatPassword; 21 | 22 | // @Column(name = "first_name") 23 | private String firstName; 24 | 25 | //@Column(name = "last_name") 26 | private String lastName; 27 | 28 | // @Column(name = "identification_number") 29 | private String identificationNumber; 30 | 31 | // @Column(name = "birth_date") 32 | private String birthDate; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/SectionManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.SectionService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.SectionDao; 12 | import kodlamaio.hrms.entities.concretes.Section; 13 | 14 | @Service 15 | public class SectionManager implements SectionService { 16 | @Autowired 17 | SectionDao sectionDao; 18 | 19 | @Override 20 | public DataResult> getAll() { 21 | return new SuccessDataResult>(this.sectionDao.findAll()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/LanguageManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.LanguageService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.LanguageDao; 12 | import kodlamaio.hrms.entities.concretes.Language; 13 | 14 | @Service 15 | public class LanguageManager implements LanguageService { 16 | @Autowired 17 | LanguageDao languageDao; 18 | 19 | @Override 20 | public DataResult> getAll() { 21 | return new SuccessDataResult>(this.languageDao.findAll()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/MyFavouriteDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import javax.transaction.Transactional; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Modifying; 7 | import org.springframework.data.jpa.repository.Query; 8 | import org.springframework.data.repository.query.Param; 9 | 10 | import kodlamaio.hrms.entities.concretes.MyFavourite; 11 | 12 | public interface MyFavouriteDao extends JpaRepository { 13 | @Modifying 14 | @Transactional 15 | @Query(value = "insert into my_favorites (candidate_id,job_posting_id) values (:candidate_id,:job_posting_id)", nativeQuery = true) 16 | void insertCandidateAndJobPosting(@Param("candidate_id") int candidate_id, 17 | @Param("job_posting_id") int job_posting_id); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/configs/AppConfig.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.configs; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | import com.cloudinary.Cloudinary; 7 | import com.cloudinary.utils.ObjectUtils; 8 | 9 | 10 | import kodlamaio.hrms.core.imageuploads.ImageUploadManager; 11 | import kodlamaio.hrms.core.imageuploads.ImageUploadService; 12 | 13 | @Configuration 14 | public class AppConfig { 15 | private Cloudinary cloudinaryService() { 16 | return new Cloudinary(ObjectUtils.asMap("cloud_name", "dihpo3hxj", "api_key", "872549268788792", "api_secret", 17 | "hmIkqn0NjuaECtrjWfv3ZecD-IY" 18 | 19 | 20 | )); 21 | 22 | } 23 | 24 | @Bean 25 | public ImageUploadService imageUploadService() { 26 | return new ImageUploadManager(cloudinaryService()); 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/dtos/CandidateWithCvDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.dtos; 2 | 3 | import java.time.LocalDate; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class CandidateWithCvDto { 13 | 14 | private int id; 15 | private String gitHubAddress; 16 | private String linkedlnAddress; 17 | private String coverLetter; 18 | private LocalDate yearOfEntry; 19 | private LocalDate yearOfGraduation; 20 | private LocalDate yearOfEmployment; 21 | private LocalDate yearOff; 22 | private String languageName; 23 | private String levelName; 24 | private String schoolName; 25 | private String sectionName; 26 | private String skillName; 27 | private String firstName; 28 | private String lastName; 29 | private String url; 30 | } 31 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/WorkingTimeManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.WorkingTimeService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.WorkingTimeDao; 12 | import kodlamaio.hrms.entities.concretes.WorkingTime; 13 | 14 | @Service 15 | public class WorkingTimeManager implements WorkingTimeService { 16 | @Autowired 17 | private WorkingTimeDao workingTimeDao; 18 | 19 | @Override 20 | public DataResult> getAll() { 21 | return new SuccessDataResult>(this.workingTimeDao.findAll()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/ImageDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import javax.transaction.Transactional; 6 | 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 11 | import org.springframework.data.repository.query.Param; 12 | 13 | import kodlamaio.hrms.entities.concretes.Image; 14 | 15 | @EnableJpaRepositories 16 | public interface ImageDao extends JpaRepository { 17 | List getAllByCvId(int cvId); 18 | 19 | // @Modifying 20 | // @Transactional 21 | // @Query("update Image set url=:url where id=:id") 22 | // 23 | // int imageUpdate(@Param("url") String url, @Param("id") int id); 24 | } 25 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/TypeOfWorkManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.TypeOfWorkService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.hrms.dataAccess.abstracts.TypeOfWorkDao; 12 | import kodlamaio.hrms.entities.concretes.TypeOfWork; 13 | 14 | 15 | @Service 16 | public class TypeOfWorkManager implements TypeOfWorkService { 17 | 18 | @Autowired 19 | private TypeOfWorkDao typeOfWorkDao; 20 | 21 | @Override 22 | public DataResult> getAll() { 23 | return new SuccessDataResult>(this.typeOfWorkDao.findAll()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/EmployeConfirmEmployer.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.EqualsAndHashCode; 13 | import lombok.NoArgsConstructor; 14 | 15 | @Data 16 | @Entity 17 | @Table(name = "employee_confirms_employers") 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @EqualsAndHashCode(callSuper = true) 21 | 22 | public class EmployeConfirmEmployer extends Employer { 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name = "id") 26 | private int id; 27 | 28 | @Column(name = "employer_id") 29 | private int employerId; 30 | } 31 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/HrmsApplication.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | @SpringBootApplication 13 | @EnableSwagger2 14 | public class HrmsApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(HrmsApplication.class, args); 18 | } 19 | 20 | @Bean 21 | public Docket api() { 22 | return new Docket(DocumentationType.SWAGGER_2).select() 23 | .apis(RequestHandlerSelectors.basePackage("kodlamaio.hrms")).build(); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/LevelController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.LevelService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | import kodlamaio.hrms.entities.concretes.Level; 14 | 15 | @RestController 16 | @RequestMapping("/api/levels") 17 | @CrossOrigin 18 | public class LevelController { 19 | @Autowired 20 | LevelService levelService; 21 | 22 | @GetMapping("/getall") 23 | public DataResult> getAll() { 24 | return this.levelService.getAll(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | import javax.persistence.*; 15 | 16 | @Entity 17 | @Data 18 | @Table(name = "users") 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | @Inheritance(strategy = InheritanceType.JOINED) 22 | 23 | public class User { 24 | 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | @Column(name = "id") 28 | private int id; 29 | @Column(name = "email_address") 30 | private String emailAddress; 31 | @Column(name = "password") 32 | private String password; 33 | 34 | 35 | 36 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/CityController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.CityService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | 14 | import kodlamaio.hrms.entities.concretes.City; 15 | 16 | @RestController 17 | @RequestMapping("/api/cities") 18 | @CrossOrigin 19 | public class CityController { 20 | @Autowired 21 | private CityService cityService; 22 | 23 | @GetMapping("/getall") 24 | public DataResult> getAll() { 25 | return this.cityService.getAll(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/SkillController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.SkillService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | import kodlamaio.hrms.entities.concretes.Skill; 14 | 15 | @RestController 16 | @RequestMapping("/api/skills") 17 | @CrossOrigin 18 | public class SkillController { 19 | @Autowired 20 | SkillService skillService; 21 | 22 | @GetMapping("/getall") 23 | public DataResult> getAll() { 24 | return this.skillService.getAll(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Employe.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.EqualsAndHashCode; 13 | import lombok.NoArgsConstructor; 14 | 15 | @Data 16 | @Entity 17 | @Table(name = "employees") 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @EqualsAndHashCode(callSuper = true) 21 | public class Employe extends User { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name = "id") 26 | private int id; 27 | 28 | @Column(name = "first_name") 29 | private String firstName; 30 | 31 | @Column(name = "last_name") 32 | private String lastName; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/EmployeController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import kodlamaio.hrms.business.abstracts.EmployeService; 13 | import kodlamaio.hrms.entities.concretes.Employe; 14 | 15 | @RestController 16 | @RequestMapping("/api/employees") 17 | @CrossOrigin 18 | public class EmployeController { 19 | 20 | @Autowired 21 | EmployeService employeService; 22 | 23 | @PostMapping("/add") 24 | public void add(@RequestBody Employe employe) { 25 | this.employeService.add(employe); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/SchoolController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.SchoolService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | 14 | import kodlamaio.hrms.entities.concretes.School; 15 | 16 | @RestController 17 | @RequestMapping("/api/schools") 18 | @CrossOrigin 19 | public class SchoolController { 20 | @Autowired 21 | SchoolService schoolService; 22 | 23 | @GetMapping("/getall") 24 | public DataResult> getAll() { 25 | return this.schoolService.getAll(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/LanguageController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.LanguageService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | import kodlamaio.hrms.entities.concretes.Language; 14 | 15 | @RestController 16 | @RequestMapping("/api/languages") 17 | @CrossOrigin 18 | public class LanguageController { 19 | @Autowired 20 | LanguageService languageService; 21 | 22 | @GetMapping("getall") 23 | public DataResult> getAll() { 24 | return this.languageService.getAll(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/SectionController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.SectionService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | 14 | import kodlamaio.hrms.entities.concretes.Section; 15 | 16 | @RestController 17 | @RequestMapping("/api/sections") 18 | @CrossOrigin 19 | public class SectionController { 20 | @Autowired 21 | SectionService sectionService; 22 | 23 | @GetMapping("/getall") 24 | public DataResult> getAll() { 25 | return this.sectionService.getAll(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/EmployeConfirm.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.EqualsAndHashCode; 13 | import lombok.NoArgsConstructor; 14 | 15 | @Data 16 | @Entity 17 | @Table(name = "employee_confirms") 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @EqualsAndHashCode(callSuper = true) 21 | public class EmployeConfirm extends Employe { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name = "id") 26 | private int id; 27 | 28 | @Column(name = "employee_id") 29 | private int employeId; 30 | 31 | @Column(name = "is_confirmed") 32 | private boolean isConfirmed; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/CvSkill.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | 13 | import javax.persistence.Table; 14 | 15 | 16 | 17 | import lombok.NoArgsConstructor; 18 | 19 | import lombok.AllArgsConstructor; 20 | import lombok.Data; 21 | 22 | @Data 23 | @Entity 24 | @Table(name = "cv_skills") 25 | @AllArgsConstructor 26 | @NoArgsConstructor 27 | 28 | public class CvSkill { 29 | @Id 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | @Column(name = "id") 32 | private int id; 33 | 34 | @ManyToOne() 35 | @JoinColumn(name = "skill_id") 36 | private Skill skill; 37 | 38 | @ManyToOne() 39 | @JoinColumn(name = "cv_id") 40 | private Cv cv; 41 | } 42 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/TypeOfWorkController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.TypeOfWorkService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | 14 | import kodlamaio.hrms.entities.concretes.TypeOfWork; 15 | 16 | @RestController 17 | @RequestMapping("/api/typeOfWorks") 18 | @CrossOrigin 19 | public class TypeOfWorkController { 20 | @Autowired 21 | private TypeOfWorkService typeOfWorkService; 22 | 23 | @GetMapping("/getall") 24 | public DataResult> getAll() { 25 | return this.typeOfWorkService.getAll(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/WorkingTimeController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.WorkingTimeService; 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | 14 | import kodlamaio.hrms.entities.concretes.WorkingTime; 15 | 16 | @RestController 17 | @RequestMapping("/api/workingTimes") 18 | @CrossOrigin 19 | public class WorkingTimeController { 20 | @Autowired 21 | private WorkingTimeService workingTimeService; 22 | 23 | @GetMapping("/getall") 24 | public DataResult> getAll() { 25 | return this.workingTimeService.getAll(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/MyFavourite.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | 13 | import javax.persistence.Table; 14 | 15 | 16 | 17 | 18 | import lombok.AllArgsConstructor; 19 | import lombok.Data; 20 | import lombok.NoArgsConstructor; 21 | 22 | @Data 23 | @Entity 24 | @Table(name = "my_favorites") 25 | @AllArgsConstructor 26 | @NoArgsConstructor 27 | 28 | public class MyFavourite { 29 | @Id 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | @Column(name = "id") 32 | private int id; 33 | 34 | @ManyToOne() 35 | @JoinColumn(name = "candidate_id") 36 | private Candidate candidate; 37 | 38 | @ManyToOne() 39 | @JoinColumn(name = "job_posting_id") 40 | private JobPosting jobPosting; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/CvSkillDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import javax.transaction.Transactional; 6 | 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | import org.springframework.data.repository.query.Param; 11 | 12 | import kodlamaio.hrms.entities.concretes.CvSkill; 13 | import kodlamaio.hrms.entities.dtos.CvSkillDto; 14 | 15 | public interface CvSkillDao extends JpaRepository { 16 | 17 | @Query("Select new kodlamaio.hrms.entities.dtos.CvSkillDto(c.id, " + " s.skillName) " 18 | + "From CvSkill c INNER JOIN c.skill s " + " where c.cv.id = ?1") 19 | List getCvSkillDto(int cvId); 20 | 21 | @Modifying 22 | @Transactional 23 | @Query("update CvSkill set skill.id=:sckillId where id=:id") 24 | 25 | int updateCvSkill(@Param("sckillId") int sckillId, @Param("id") int id); 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import kodlamaio.hrms.business.abstracts.UserService; 7 | import kodlamaio.hrms.core.utilities.results.ErrorResult; 8 | import kodlamaio.hrms.core.utilities.results.Result; 9 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 10 | import kodlamaio.hrms.dataAccess.abstracts.UserDao; 11 | import kodlamaio.hrms.entities.concretes.User; 12 | import lombok.var; 13 | 14 | @Service 15 | public class UserManager implements UserService { 16 | @Autowired 17 | private UserDao userDao; 18 | 19 | @Override 20 | public Result GetByMail(String email) { 21 | var resultVar = this.userDao.findAll(); 22 | for (User users : resultVar) { 23 | if (users.getEmailAddress() == email) { 24 | return new ErrorResult("Bu email kullanılıyor"); 25 | } else { 26 | return new SuccessResult(); 27 | } 28 | 29 | } 30 | return null; 31 | } 32 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/LanguageLevel.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.ManyToOne; 10 | 11 | import javax.persistence.Table; 12 | 13 | import lombok.AllArgsConstructor; 14 | import lombok.Data; 15 | import lombok.NoArgsConstructor; 16 | 17 | @Data 18 | @Entity 19 | @Table(name = "language_levels") 20 | @AllArgsConstructor 21 | @NoArgsConstructor 22 | 23 | public class LanguageLevel { 24 | @Id 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) 26 | @Column(name = "id") 27 | private int id; 28 | 29 | @ManyToOne() 30 | @JoinColumn(name = "language_id") 31 | private Language language; 32 | 33 | @ManyToOne() 34 | @JoinColumn(name = "level_id") 35 | private Level level; 36 | 37 | @ManyToOne() 38 | @JoinColumn(name = "cv_id") 39 | private Cv cv; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Skill.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.NoArgsConstructor; 17 | 18 | import lombok.AllArgsConstructor; 19 | import lombok.Data; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "skills") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "cvSkills" }) 27 | public class Skill { 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private int id; 32 | 33 | @Column(name = "skill_name") 34 | private String skillName; 35 | 36 | @OneToMany(mappedBy = "skill") 37 | private List cvSkills; 38 | } 39 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Level.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "levels") 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "languageLevels" }) 26 | public class Level { 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "level_name") 33 | private String levelName; 34 | 35 | @OneToMany(mappedBy = "level") 36 | private List languageLevels; 37 | } 38 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/City.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "city") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 27 | public class City { 28 | 29 | @Id 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | @Column(name = "id") 32 | private int id; 33 | 34 | @Column(name = "city_name") 35 | private String cityName; 36 | 37 | 38 | @OneToMany(mappedBy = "city") 39 | private List jobPostings; 40 | } 41 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/School.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "schools") 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "schoolSections" }) 26 | public class School { 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "school_name") 33 | private String schoolName; 34 | 35 | @OneToMany(mappedBy = "school") 36 | private List schoolSections; 37 | } 38 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/EmployeManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import kodlamaio.hrms.business.abstracts.EmployeService; 7 | import kodlamaio.hrms.core.utilities.results.Result; 8 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 9 | import kodlamaio.hrms.dataAccess.abstracts.EmployeDao; 10 | import kodlamaio.hrms.entities.concretes.Employe; 11 | import kodlamaio.hrms.entities.concretes.Employer; 12 | 13 | @Service 14 | public class EmployeManager implements EmployeService { 15 | 16 | @Autowired 17 | EmployeDao employeDao; 18 | 19 | @Override 20 | public Result confirm(Employer employer) { 21 | 22 | return new SuccessResult("Sistem çalışanı tarafından" + employer.getCompanyName() + " adlı firma doğrulandı."); 23 | } 24 | 25 | @Override 26 | public Result add(Employe employe) { 27 | this.employeDao.save(employe); 28 | return new SuccessResult("Kullanıcı başarıyla eklendi"); 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/adapters/MerniseServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.adapters; 2 | 3 | import java.util.Locale; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | import kodlamaio.hrms.business.abstracts.CandidateCheckService; 8 | import kodlamaio.hrms.entities.concretes.Candidate; 9 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoap; 10 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 11 | 12 | @Service 13 | public class MerniseServiceAdapter implements CandidateCheckService { 14 | 15 | public boolean CheckIfRealPerson(Candidate candidate) { 16 | try { 17 | KPSPublicSoap client = new KPSPublicSoapProxy(); 18 | 19 | boolean isValid = client.TCKimlikNoDogrula(Long.valueOf(candidate.getIdentificationNumber()), 20 | candidate.getFirstName().toUpperCase(new Locale("tr")), 21 | candidate.getLastName().toUpperCase(new Locale("tr")), candidate.getBirthDate().getYear()); 22 | 23 | return isValid; 24 | 25 | } catch (Exception e) { 26 | 27 | System.out.println("Giriş bilgileri doğru değil"); 28 | } 29 | 30 | return false; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Section.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "sections") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "schoolSections" }) 27 | public class Section { 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private int id; 32 | @Column(name = "section_name") 33 | private String sectionName; 34 | 35 | @OneToMany(mappedBy = "section") 36 | private List schoolSections; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/WorkingTime.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name = "working_times") 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 25 | public class WorkingTime { 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | @Column(name = "id") 29 | private int id; 30 | 31 | @Column(name ="workingTimeName") 32 | private String workingTimeName; 33 | 34 | @OneToMany(mappedBy = "workingTime") 35 | private List jobPostings; 36 | } 37 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/MyFavouriteManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import kodlamaio.hrms.business.abstracts.MyFavouriteService; 7 | import kodlamaio.hrms.core.utilities.results.Result; 8 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 9 | import kodlamaio.hrms.dataAccess.abstracts.MyFavouriteDao; 10 | import kodlamaio.hrms.entities.concretes.MyFavourite; 11 | 12 | @Service 13 | public class MyFavouriteManager implements MyFavouriteService { 14 | @Autowired 15 | private MyFavouriteDao myFavouriteDao; 16 | 17 | @Override 18 | public Result add(MyFavourite myFavourite) { 19 | this.myFavouriteDao.save(myFavourite); 20 | return new SuccessResult("Favorilerime Eklendi."); 21 | } 22 | 23 | @Override 24 | public Result insertCandidateAndJobPosting(int candidateId, int jobPostingId) { 25 | this.myFavouriteDao.insertCandidateAndJobPosting(candidateId, jobPostingId); 26 | return new SuccessResult("başarılı"); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Language.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | 12 | import javax.persistence.OneToMany; 13 | import javax.persistence.Table; 14 | 15 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "languages") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "languageLevels" }) 27 | public class Language { 28 | 29 | @Id 30 | @GeneratedValue(strategy = GenerationType.IDENTITY) 31 | @Column(name = "id") 32 | private int id; 33 | 34 | @Column(name = "language_name") 35 | private String languageName; 36 | 37 | @OneToMany(mappedBy = "language") 38 | private List languageLevels; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/JobTitle.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "job_titles") 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings", "employerJobTitles" }) 26 | public class JobTitle { 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private int id; 32 | 33 | @Column(name = "title") 34 | private String title; 35 | 36 | 37 | @OneToMany(mappedBy = "jobTitle") 38 | private List jobPostings; 39 | 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/TypeOfWork.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | 4 | import java.util.List; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.OneToMany; 12 | import javax.persistence.Table; 13 | 14 | 15 | 16 | 17 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 18 | 19 | import lombok.AllArgsConstructor; 20 | import lombok.Data; 21 | 22 | import lombok.NoArgsConstructor; 23 | 24 | @Data 25 | @Entity 26 | @Table(name = "type_of_works") 27 | @AllArgsConstructor 28 | @NoArgsConstructor 29 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 30 | public class TypeOfWork { 31 | @Id 32 | @GeneratedValue(strategy = GenerationType.IDENTITY) 33 | @Column(name = "id") 34 | private int id; 35 | 36 | @Column(name ="typeOfWorkName") 37 | private String typeOfWorkName; 38 | 39 | @OneToMany(mappedBy = "typeOfWork") 40 | private List jobPostings; 41 | } 42 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/LanguageLevelDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import javax.transaction.Transactional; 6 | 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | import org.springframework.data.repository.query.Param; 11 | 12 | import kodlamaio.hrms.entities.concretes.LanguageLevel; 13 | import kodlamaio.hrms.entities.dtos.LanguageLevelDto; 14 | 15 | public interface LanguageLevelDao extends JpaRepository { 16 | 17 | @Query("Select new kodlamaio.hrms.entities.dtos.LanguageLevelDto(l.id,la.languageName, le.levelName) " 18 | + "From LanguageLevel l INNER JOIN l.language la INNER JOIN l.level le " + " where l.cv.id = ?1") 19 | List getLanguageLevelDto(int cvId); 20 | 21 | @Modifying 22 | @Transactional 23 | @Query("update LanguageLevel set language.id=:languageId, level.id=:levelId where id=:id") 24 | 25 | int languageLevel(@Param("languageId") int languageId, @Param("levelId") int levelId, @Param("id") int id); 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/SchoolSectionDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import javax.transaction.Transactional; 6 | 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | import org.springframework.data.repository.query.Param; 11 | 12 | import kodlamaio.hrms.entities.concretes.SchoolSection; 13 | 14 | import kodlamaio.hrms.entities.dtos.SchoolSectionDto; 15 | 16 | public interface SchoolSectionDao extends JpaRepository { 17 | @Query("Select new kodlamaio.hrms.entities.dtos.SchoolSectionDto(ss.id,sc.schoolName, se.sectionName) " 18 | + "From SchoolSection ss INNER JOIN ss.school sc INNER JOIN ss.section se " + " where ss.cv.id = ?1") 19 | List getSchoolSectionDto(int cvId); 20 | 21 | @Modifying 22 | @Transactional 23 | @Query("update SchoolSection set school.id=:schoolId, section.id=:sectionId where id=:id") 24 | 25 | int updateSchoolSection(@Param("schoolId") int schoolId, @Param("sectionId") int sectionId, @Param("id") int id); 26 | } 27 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/imageuploads/ImageUploadManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.imageuploads; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.multipart.MultipartFile; 8 | 9 | import com.cloudinary.Cloudinary; 10 | import com.cloudinary.utils.ObjectUtils; 11 | 12 | import kodlamaio.hrms.core.utilities.results.DataResult; 13 | import kodlamaio.hrms.core.utilities.results.ErrorDataResult; 14 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 15 | 16 | public class ImageUploadManager implements ImageUploadService { 17 | 18 | private final Cloudinary cloudinary; 19 | 20 | @Autowired 21 | public ImageUploadManager(Cloudinary cloudinary) { 22 | this.cloudinary = cloudinary; 23 | } 24 | 25 | @Override 26 | public DataResult save(MultipartFile file) { 27 | try { 28 | Map uploadResult = cloudinary.uploader().upload(file.getBytes(), ObjectUtils.emptyMap()); 29 | return new SuccessDataResult(uploadResult); 30 | 31 | } catch (IOException e) { 32 | e.printStackTrace(); 33 | 34 | } 35 | return new ErrorDataResult(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Image.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.FetchType; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.OneToOne; 13 | import javax.persistence.Table; 14 | 15 | 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "images") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class Image { 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "url") 33 | private String url; 34 | 35 | @Column(name = "uploaded_date") 36 | private LocalDate uploadedDate; 37 | // private LocalDateTime uploadedDate=LocalDateTime.now(); //"2 Ekim 2007, 38 | // 13:45.30.123456789" 39 | 40 | @OneToOne(optional = false, fetch = FetchType.LAZY) 41 | @JoinColumn(name = "cv_id") 42 | private Cv cv; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/SchoolSection.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | 13 | import javax.persistence.Table; 14 | 15 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name = "school_sections") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "sections", "schools" }) 27 | public class SchoolSection { 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private int id; 32 | 33 | @ManyToOne() 34 | @JoinColumn(name = "school_id") 35 | private School school; 36 | 37 | @ManyToOne() 38 | @JoinColumn(name = "section_id") 39 | private Section section; 40 | 41 | @ManyToOne() 42 | @JoinColumn(name = "cv_id") 43 | private Cv cv; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/EmployerDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | 4 | 5 | import javax.transaction.Transactional; 6 | 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | import org.springframework.data.repository.query.Param; 11 | 12 | import kodlamaio.hrms.entities.concretes.Cv; 13 | import kodlamaio.hrms.entities.concretes.Employer; 14 | 15 | public interface EmployerDao extends JpaRepository { 16 | 17 | Employer getById(int id); 18 | 19 | 20 | @Modifying 21 | @Transactional 22 | @Query("update Employer set companyName=:companyName,phone=:phone,status=:status where id=:id") 23 | 24 | int updateEmployer(@Param("companyName") String companyName,@Param("phone") String phone,@Param("status") boolean status, @Param("id") int id); 25 | 26 | @Modifying 27 | @Transactional 28 | @Query("update Employer set companyNameClone=:companyNameClone, phoneClone=:phoneClone,status=:status where id=:id") 29 | 30 | int updateEmployerClone(@Param("companyNameClone") String companyNameClone, @Param("phoneClone") String phoneClone,@Param("status") boolean status, @Param("id") int id); 31 | } 32 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/JobPostingService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | 6 | 7 | import kodlamaio.hrms.core.utilities.results.DataResult; 8 | import kodlamaio.hrms.core.utilities.results.Result; 9 | 10 | import kodlamaio.hrms.entities.concretes.JobPosting; 11 | import kodlamaio.hrms.entities.dtos.PageableDto; 12 | 13 | public interface JobPostingService { 14 | Result add(JobPosting jobPosting); 15 | 16 | DataResult> getAll(); 17 | 18 | DataResult> getByStatus(int status); 19 | 20 | DataResult> getAllStatusAndDate(int status); 21 | 22 | DataResult> getByStatusAndEmployerId(int status, int employerId); 23 | 24 | Result Update(JobPosting jobPosting); 25 | 26 | Result updateStatus(int status, int id); 27 | 28 | 29 | DataResult getById(int id); 30 | 31 | DataResult> getByFilter(int pageNo, int pageSize, PageableDto pageableDto); 32 | // DataResult>> getAll(int pageNo, int pageSize); 33 | // DataResult>> getByCityIdAndTypeOfWorkId(int cityId,int typeOfWorkId,int pageNo,int pageSize); 34 | 35 | // DataResult> getByCityIdAndTypeOfWorkId(int cityId, int typeOfWorkId); 36 | } 37 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Employer.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | 8 | import javax.persistence.OneToMany; 9 | import javax.persistence.Table; 10 | 11 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 12 | 13 | import lombok.AllArgsConstructor; 14 | import lombok.Data; 15 | import lombok.EqualsAndHashCode; 16 | import lombok.NoArgsConstructor; 17 | 18 | @Data 19 | @Entity 20 | @Table(name = "employers") 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | @EqualsAndHashCode(callSuper = true) 24 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings", "employerJobTitles" }) 25 | 26 | public class Employer extends User { 27 | 28 | @Column(name = "company_name") 29 | private String companyName; 30 | 31 | @Column(name = "web_address") 32 | private String webAddress; 33 | 34 | @Column(name = "phone") 35 | private String phone; 36 | 37 | @Column(name = "clone_company_name") 38 | private String companyNameClone; 39 | 40 | 41 | @Column(name = "clone_phone") 42 | private String phoneClone; 43 | 44 | 45 | @Column(name = "status") 46 | private boolean status; 47 | 48 | @OneToMany(mappedBy = "employer") 49 | private List jobPostings; 50 | 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/CvDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import javax.transaction.Transactional; 7 | 8 | import org.springframework.data.domain.Sort; 9 | import org.springframework.data.jpa.repository.JpaRepository; 10 | import org.springframework.data.jpa.repository.Modifying; 11 | import org.springframework.data.jpa.repository.Query; 12 | import org.springframework.data.repository.query.Param; 13 | 14 | import kodlamaio.hrms.entities.concretes.Cv; 15 | 16 | public interface CvDao extends JpaRepository { 17 | List getByYearOfGraduation(LocalDate yearOfGraduation, Sort sort); 18 | 19 | List getByYearOff(LocalDate yearOff, Sort sort); 20 | 21 | Cv getById(int id); 22 | 23 | @Modifying 24 | @Transactional 25 | @Query("update Cv set gitHubAddress=:gitHubAddress,linkedlnAddress=:linkedlnAddress,coverLetter=:coverLetter,yearOfEntry=:yearOfEntry,yearOfGraduation=:yearOfGraduation,yearOfEmployment=:yearOfEmployment,yearOff=:yearOff where id=:id") 26 | 27 | int updateCv(@Param("gitHubAddress") String gitHubAddress, @Param("linkedlnAddress") String linkedlnAddress, 28 | @Param("coverLetter") String coverLetter, LocalDate yearOfEntry, LocalDate yearOfGraduation, 29 | LocalDate yearOfEmployment, LocalDate yearOff, @Param("id") int id); 30 | } 31 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/MyFavouriteController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.CrossOrigin; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.hrms.business.abstracts.MyFavouriteService; 12 | import kodlamaio.hrms.core.utilities.results.Result; 13 | import kodlamaio.hrms.entities.concretes.MyFavourite; 14 | 15 | @RestController 16 | @RequestMapping("/api/myFavorites") 17 | @CrossOrigin 18 | public class MyFavouriteController { 19 | @Autowired 20 | private MyFavouriteService myFavouriteService; 21 | 22 | @PostMapping("/add") 23 | public Result add(@RequestBody MyFavourite myFavourite) { 24 | return this.myFavouriteService.add(myFavourite); 25 | } 26 | @PostMapping("/insertCandidateAndJobPosting") 27 | 28 | public Result insertCandidateAndJobPosting(@RequestParam("candidateId") int candidateId, @RequestParam("jobPostingId") int jobPostingId) { 29 | 30 | return this.myFavouriteService.insertCandidateAndJobPosting(candidateId, jobPostingId); 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/CandidateController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import kodlamaio.hrms.business.abstracts.CandidateService; 14 | import kodlamaio.hrms.core.utilities.results.DataResult; 15 | import kodlamaio.hrms.core.utilities.results.Result; 16 | import kodlamaio.hrms.entities.concretes.Candidate; 17 | import kodlamaio.hrms.entities.dtos.CandidateForRegisterDto; 18 | 19 | @RestController 20 | @RequestMapping("/api/candidates") 21 | @CrossOrigin 22 | public class CandidateController { 23 | @Autowired 24 | private CandidateService candidateService; 25 | 26 | @PostMapping("/add") 27 | public Result add(@RequestBody CandidateForRegisterDto candidateForRegisterDto) { 28 | return this.candidateService.add(candidateForRegisterDto); 29 | } 30 | 31 | @GetMapping("/getall") 32 | public DataResult> getAll() { 33 | return this.candidateService.getAll(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/JobTitlesController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import kodlamaio.hrms.business.abstracts.JobTitleService; 14 | import kodlamaio.hrms.core.utilities.results.DataResult; 15 | import kodlamaio.hrms.core.utilities.results.Result; 16 | import kodlamaio.hrms.entities.concretes.JobTitle; 17 | 18 | @RestController 19 | @RequestMapping("/api/jobtitles") 20 | @CrossOrigin 21 | public class JobTitlesController { 22 | private JobTitleService jobTitleService; 23 | 24 | @Autowired 25 | public JobTitlesController(JobTitleService jobTitleService) { 26 | this.jobTitleService = jobTitleService; 27 | } 28 | 29 | @GetMapping("/getall") 30 | public DataResult> getAll() { 31 | return this.jobTitleService.getAll(); 32 | } 33 | 34 | @PostMapping("/add") 35 | public Result add(@RequestBody JobTitle jobTitle) { 36 | return this.jobTitleService.add(jobTitle); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Candidate.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.OneToMany; 10 | import javax.persistence.OneToOne; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnore; 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.EqualsAndHashCode; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @EqualsAndHashCode(callSuper = true) 23 | @Entity 24 | @Table(name = "candidates") 25 | @AllArgsConstructor 26 | @NoArgsConstructor 27 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "myFavourites" }) 28 | public class Candidate extends User { 29 | 30 | @Column(name = "first_name") 31 | private String firstName; 32 | 33 | @Column(name = "last_name") 34 | private String lastName; 35 | 36 | @Column(name = "identification_number") 37 | private String identificationNumber; 38 | 39 | @Column(name = "birth_date") 40 | private LocalDate birthDate; 41 | 42 | @JsonIgnore 43 | @OneToOne(mappedBy = "candidate", optional = true, fetch = FetchType.LAZY) 44 | private Cv cv; 45 | 46 | @OneToMany(mappedBy = "candidate") 47 | private List myFavourites; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/CvSkillController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import kodlamaio.hrms.business.abstracts.CvSkillService; 14 | import kodlamaio.hrms.core.utilities.results.DataResult; 15 | import kodlamaio.hrms.core.utilities.results.Result; 16 | import kodlamaio.hrms.entities.concretes.CvSkill; 17 | import kodlamaio.hrms.entities.dtos.CvSkillDto; 18 | 19 | @RestController 20 | @RequestMapping("/api/cvsSkill") 21 | @CrossOrigin 22 | public class CvSkillController { 23 | @Autowired 24 | private CvSkillService cvSkillService; 25 | 26 | @GetMapping("/getAll") 27 | public DataResult> getAll() { 28 | return this.cvSkillService.getAll(); 29 | } 30 | 31 | @GetMapping("/getCvSkillDetails") 32 | public DataResult> getCvSkillDetails(@RequestParam int cvId) { 33 | return this.cvSkillService.getCvSkillDetails(cvId); 34 | } 35 | 36 | @PostMapping("/updateCvSkill") 37 | public Result updateCvSkill(int skillId, int id) { 38 | return this.cvSkillService.updateCvSkill(skillId, id); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/CvSkillManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.CvSkillService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.Result; 11 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 12 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 13 | import kodlamaio.hrms.dataAccess.abstracts.CvSkillDao; 14 | import kodlamaio.hrms.entities.concretes.CvSkill; 15 | import kodlamaio.hrms.entities.dtos.CvSkillDto; 16 | 17 | @Service 18 | public class CvSkillManager implements CvSkillService { 19 | 20 | @Autowired 21 | private CvSkillDao cvSkillDao; 22 | 23 | @Override 24 | public DataResult> getAll() { 25 | return new SuccessDataResult>(this.cvSkillDao.findAll()); 26 | } 27 | 28 | @Override 29 | public Result add(CvSkill cvSkill) { 30 | this.cvSkillDao.save(cvSkill); 31 | return new SuccessResult("Beceri bilgisi eklendi."); 32 | } 33 | 34 | @Override 35 | public DataResult> getCvSkillDetails(int cvId) { 36 | return new SuccessDataResult>(this.cvSkillDao.getCvSkillDto(cvId)); 37 | } 38 | 39 | @Override 40 | public Result updateCvSkill(int sckillId, int id) { 41 | this.cvSkillDao.updateCvSkill(sckillId, id); 42 | return new SuccessResult("Beceri bilgileri güncellendi."); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/cloudinaryServices/CloudinaryService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.cloudinaryServices; 2 | 3 | import java.io.File; 4 | import java.io.FileOutputStream; 5 | import java.io.IOException; 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | import com.cloudinary.Cloudinary; 9 | import com.cloudinary.utils.ObjectUtils; 10 | 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.web.multipart.MultipartFile; 13 | 14 | @Service 15 | public class CloudinaryService { 16 | 17 | Cloudinary cloudinary; 18 | private Map valuesMap = new HashMap<>(); 19 | 20 | public CloudinaryService() { 21 | valuesMap.put("cloud_name", "dihpo3hxj"); 22 | valuesMap.put("api_key", "872549268788792"); 23 | valuesMap.put("api_secret", "hmIkqn0NjuaECtrjWfv3ZecD-IY"); 24 | cloudinary = new Cloudinary(valuesMap); 25 | } 26 | 27 | public Map upload(MultipartFile multipartFile) throws IOException { 28 | File file = convert(multipartFile); 29 | Map result = cloudinary.uploader().upload(file, ObjectUtils.emptyMap()); 30 | file.delete(); 31 | return result; 32 | } 33 | 34 | public Map delete(String id) throws IOException { 35 | Map result = cloudinary.uploader().destroy(id, ObjectUtils.emptyMap()); 36 | return result; 37 | } 38 | 39 | private File convert(MultipartFile multipartFile) throws IOException { 40 | File file = new File(multipartFile.getOriginalFilename()); 41 | FileOutputStream stream = new FileOutputStream(file); 42 | stream.write(multipartFile.getBytes()); 43 | stream.close(); 44 | 45 | return file; 46 | } 47 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/JobTitleManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | 4 | 5 | import java.util.List; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import kodlamaio.hrms.business.abstracts.JobTitleService; 11 | import kodlamaio.hrms.core.utilities.results.DataResult; 12 | import kodlamaio.hrms.core.utilities.results.ErrorResult; 13 | import kodlamaio.hrms.core.utilities.results.Result; 14 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 15 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 16 | import kodlamaio.hrms.dataAccess.abstracts.JobTitleDao; 17 | 18 | import kodlamaio.hrms.entities.concretes.JobTitle; 19 | 20 | @Service 21 | public class JobTitleManager implements JobTitleService { 22 | 23 | JobTitleDao jobTitleDao; 24 | 25 | @Autowired 26 | public JobTitleManager(JobTitleDao jobTitleDao) { 27 | this.jobTitleDao = jobTitleDao; 28 | } 29 | 30 | @Override 31 | public DataResult> getAll() { 32 | 33 | return new SuccessDataResult>(this.jobTitleDao.findAll()); 34 | } 35 | 36 | @Override 37 | public Result add(JobTitle jobTitle) { 38 | for (JobTitle jobTitleCheck : this.jobTitleDao.findAll()) { 39 | if (!jobTitleCheck.getTitle().equals(jobTitle.getTitle())) { 40 | this.jobTitleDao.save(jobTitle); 41 | return new SuccessResult("Genel iş pozisyonu başarıyla eklendi."); 42 | } else { 43 | return new ErrorResult("Böyle bir genel iş pozisyonu bulunmaktadır."); 44 | } 45 | } 46 | return null; 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/LanguageLevelManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.LanguageLevelService; 9 | import kodlamaio.hrms.core.utilities.results.DataResult; 10 | import kodlamaio.hrms.core.utilities.results.Result; 11 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 12 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 13 | import kodlamaio.hrms.dataAccess.abstracts.LanguageLevelDao; 14 | import kodlamaio.hrms.entities.concretes.LanguageLevel; 15 | import kodlamaio.hrms.entities.dtos.LanguageLevelDto; 16 | 17 | @Service 18 | public class LanguageLevelManager implements LanguageLevelService { 19 | @Autowired 20 | private LanguageLevelDao languageLevelDao; 21 | 22 | @Override 23 | public DataResult> getAll() { 24 | return new SuccessDataResult>(this.languageLevelDao.findAll()); 25 | } 26 | 27 | @Override 28 | public Result add(LanguageLevel languageLevel) { 29 | this.languageLevelDao.save(languageLevel); 30 | return new SuccessResult("Yabancı Dil bilgisi eklendi."); 31 | } 32 | 33 | @Override 34 | public DataResult> getLanguageLevelDetails(int cvId) { 35 | return new SuccessDataResult>(this.languageLevelDao.getLanguageLevelDto(cvId)); 36 | } 37 | 38 | @Override 39 | public Result languageLevel(int languageId, int levelId, int id) { 40 | this.languageLevelDao.languageLevel(languageId, levelId, id); 41 | return new SuccessResult("Yabancı dil bilgisi güncellendi"); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/LanguageLevelController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import kodlamaio.hrms.business.abstracts.LanguageLevelService; 14 | import kodlamaio.hrms.core.utilities.results.DataResult; 15 | import kodlamaio.hrms.core.utilities.results.Result; 16 | import kodlamaio.hrms.entities.concretes.LanguageLevel; 17 | 18 | import kodlamaio.hrms.entities.dtos.LanguageLevelDto; 19 | 20 | @RestController 21 | @RequestMapping("/api/languageLevels") 22 | @CrossOrigin 23 | public class LanguageLevelController { 24 | @Autowired 25 | private LanguageLevelService languageLevelService; 26 | 27 | @GetMapping("/getAll") 28 | public DataResult> getAll() { 29 | return this.languageLevelService.getAll(); 30 | } 31 | 32 | @GetMapping("/getLanguageLevelDetails") 33 | public DataResult> getLanguageLevelDetails(@RequestParam int cvId) { 34 | return this.languageLevelService.getLanguageLevelDetails(cvId); 35 | } 36 | 37 | @PostMapping("/updateLanguageLevel") 38 | public Result updateLanguageLevel(@RequestParam("languageId") int languageId,@RequestParam("levelId") int levelId,@RequestParam("id") int id) 39 | { 40 | return this.languageLevelService.languageLevel(languageId, levelId, id); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/SchoolSectionManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.hrms.business.abstracts.SchoolSectionService; 10 | 11 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 12 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 13 | import kodlamaio.hrms.core.utilities.results.DataResult; 14 | import kodlamaio.hrms.core.utilities.results.Result; 15 | import kodlamaio.hrms.dataAccess.abstracts.SchoolSectionDao; 16 | import kodlamaio.hrms.entities.concretes.SchoolSection; 17 | import kodlamaio.hrms.entities.dtos.SchoolSectionDto; 18 | 19 | 20 | @Service 21 | public class SchoolSectionManager implements SchoolSectionService { 22 | @Autowired 23 | private SchoolSectionDao schoolSectionDao; 24 | 25 | @Override 26 | public DataResult> getAll() { 27 | return new SuccessDataResult>(this.schoolSectionDao.findAll()); 28 | } 29 | 30 | @Override 31 | public Result add(SchoolSection scholSection) { 32 | this.schoolSectionDao.save(scholSection); 33 | return new SuccessResult("Okul bilgisi eklendi."); 34 | } 35 | 36 | @Override 37 | public DataResult> getSchoolSectionDetails(int cvId) { 38 | return new SuccessDataResult>(this.schoolSectionDao.getSchoolSectionDto(cvId)); 39 | } 40 | 41 | @Override 42 | public Result updateSchoolSection(int schoolId, int sectionId, int id) { 43 | this.schoolSectionDao.updateSchoolSection(schoolId, sectionId, id); 44 | return new SuccessResult("Okul ve bölüm bilgisi güncellendi"); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/JobPostingDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import javax.transaction.Transactional; 6 | 7 | import org.springframework.data.domain.Sort; 8 | import org.springframework.data.jpa.repository.JpaRepository; 9 | import org.springframework.data.jpa.repository.Modifying; 10 | import org.springframework.data.jpa.repository.Query; 11 | import org.springframework.data.repository.query.Param; 12 | import org.springframework.data.domain.Page; 13 | import org.springframework.data.domain.Pageable; 14 | 15 | import kodlamaio.hrms.entities.concretes.JobPosting; 16 | import kodlamaio.hrms.entities.dtos.PageableDto; 17 | 18 | public interface JobPostingDao extends JpaRepository { 19 | List getByStatus(int status); 20 | 21 | List getByStatus(int status, Sort sort); 22 | 23 | List getByStatusAndEmployerId(int status, int id); 24 | 25 | // List getByCityIdAndTypeOfWorkId(int cityId, int typeOfWorkId); 26 | // List>> getByCityIdAndTypeOfWorkId(int cityId,int typeOfWorkId); 27 | 28 | JobPosting getById(int id); 29 | 30 | @Modifying 31 | @Transactional 32 | @Query("update JobPosting set status=:status where id=:id ") 33 | 34 | int updateStatus(@Param("status") int status, @Param("id") int id); 35 | 36 | @Query("Select j from kodlamaio.hrms.entities.concretes.JobPosting j where" 37 | + " ((:#{#filter.cityId}) IS 0 OR j.city.id IN (:#{#filter.cityId}))" 38 | + " and ((:#{#filter.typeOfWorkId}) IS 0 OR j.typeOfWork.id IN (:#{#filter.typeOfWorkId}))" 39 | + " and j.status=1") 40 | public Page getByFilter(@Param("filter") PageableDto pageableDto, Pageable pageable); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/SchoolSectionController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import kodlamaio.hrms.business.abstracts.SchoolSectionService; 14 | import kodlamaio.hrms.core.utilities.results.DataResult; 15 | import kodlamaio.hrms.core.utilities.results.Result; 16 | import kodlamaio.hrms.entities.concretes.SchoolSection; 17 | 18 | import kodlamaio.hrms.entities.dtos.SchoolSectionDto; 19 | 20 | @RestController 21 | @RequestMapping("/api/schoolSections") 22 | @CrossOrigin 23 | public class SchoolSectionController { 24 | @Autowired 25 | private SchoolSectionService schoolSectionService; 26 | 27 | @GetMapping("/getAll") 28 | public DataResult> getAll() { 29 | return this.schoolSectionService.getAll(); 30 | } 31 | 32 | @GetMapping("/getSchoolSectionDetails") 33 | public DataResult> getSchoolSectionDetails(@RequestParam int cvId) { 34 | return this.schoolSectionService.getSchoolSectionDetails(cvId); 35 | } 36 | 37 | @PostMapping("/updateSchoolSection") 38 | public Result updateSchoolSection(@RequestParam("schoolId") int schoolId, @RequestParam("sectionId") int sectionId, 39 | @RequestParam("id") int id) { 40 | 41 | return this.schoolSectionService.updateSchoolSection(schoolId, sectionId, id); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/ImageController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.CrossOrigin; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | import org.springframework.web.multipart.MultipartFile; 13 | 14 | import kodlamaio.hrms.business.abstracts.ImageService; 15 | 16 | import kodlamaio.hrms.entities.concretes.Cv; 17 | import kodlamaio.hrms.entities.concretes.Image; 18 | 19 | @RestController 20 | @RequestMapping("/api/images") 21 | @CrossOrigin 22 | public class ImageController { 23 | private ImageService imageService; 24 | 25 | @Autowired 26 | public ImageController(ImageService imageService) { 27 | this.imageService = imageService; 28 | } 29 | 30 | @PostMapping(value = "/add") 31 | public ResponseEntity add(@RequestBody MultipartFile file, @RequestParam int cvId) { 32 | Image image = new Image(); 33 | Cv cv = new Cv(); 34 | cv.setId(cvId); 35 | image.setCv(cv); 36 | return ResponseEntity.ok(this.imageService.add(image, file)); 37 | } 38 | 39 | @GetMapping("/getall") 40 | public ResponseEntity getAll() { 41 | return ResponseEntity.ok(this.imageService.getAll()); 42 | } 43 | 44 | @GetMapping("/getAllByCvId") 45 | public ResponseEntity getAllByCvId(int cvId) { 46 | return ResponseEntity.ok(this.imageService.getAllByCvId(cvId)); 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /hrms/src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.java: -------------------------------------------------------------------------------- 1 | package tr.gov.nvi.tckimlik.WS; 2 | 3 | public class KPSPublicSoapProxy implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 4 | private String _endpoint = null; 5 | private tr.gov.nvi.tckimlik.WS.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 tr.gov.nvi.tckimlik.WS.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 tr.gov.nvi.tckimlik.WS.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 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/JobPosting.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.OneToMany; 14 | import javax.persistence.Table; 15 | 16 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 17 | 18 | import lombok.AllArgsConstructor; 19 | import lombok.Data; 20 | 21 | import lombok.NoArgsConstructor; 22 | 23 | @Data 24 | @Entity 25 | @Table(name = "job_postings") 26 | @AllArgsConstructor 27 | @NoArgsConstructor 28 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings", "myFavourites" }) 29 | public class JobPosting { 30 | 31 | @Id 32 | @GeneratedValue(strategy = GenerationType.IDENTITY) 33 | @Column(name = "id") 34 | private int id; 35 | 36 | @Column(name = "job_description") 37 | private String jobDescription; 38 | 39 | @Column(name = "min_salary") 40 | private int minSalary; 41 | 42 | @Column(name = "max_salary") 43 | private int maxSalary; 44 | 45 | @Column(name = "open_position") 46 | private String openPosition; 47 | 48 | @Column(name = "last_date") 49 | private LocalDate lastDate; 50 | 51 | @Column(name = "status") 52 | private int status; 53 | 54 | 55 | @ManyToOne() 56 | @JoinColumn(name = "jobtitle_id") 57 | private JobTitle jobTitle; 58 | 59 | @ManyToOne() 60 | @JoinColumn(name = "city_id") 61 | private City city; 62 | 63 | @ManyToOne() 64 | @JoinColumn(name = "employer_id") 65 | private Employer employer; 66 | 67 | @ManyToOne() 68 | @JoinColumn(name = "typeOfWork_id") 69 | private TypeOfWork typeOfWork; 70 | 71 | @ManyToOne() 72 | @JoinColumn(name = "workingTime_id") 73 | private WorkingTime workingTime; 74 | 75 | @OneToMany(mappedBy = "jobPosting") 76 | private List myFavourites; 77 | 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entities/concretes/Cv.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.GeneratedValue; 10 | import javax.persistence.GenerationType; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | 14 | import javax.persistence.OneToMany; 15 | import javax.persistence.OneToOne; 16 | import javax.persistence.Table; 17 | 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.sun.istack.Nullable; 21 | 22 | import lombok.AllArgsConstructor; 23 | import lombok.Data; 24 | import lombok.NoArgsConstructor; 25 | 26 | @Data 27 | @Entity 28 | @Table(name = "cvs") 29 | @AllArgsConstructor 30 | @NoArgsConstructor 31 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "schoolSections", "languageLevels", "cvSkills", 32 | "image" }) 33 | public class Cv { 34 | @Id 35 | @GeneratedValue(strategy = GenerationType.IDENTITY) 36 | @Column(name = "id") 37 | private int id; 38 | 39 | @Column(name = "github_address") 40 | private String gitHubAddress; 41 | 42 | @Column(name = "linkedln_address") 43 | private String linkedlnAddress; 44 | 45 | @Column(name = "cover_letter") 46 | private String coverLetter; 47 | 48 | @Column(name = "year_of_entry") 49 | private LocalDate yearOfEntry; 50 | @Column(name = "year_of_graduation") 51 | private LocalDate yearOfGraduation; 52 | 53 | @Column(name = "year_of_employment") 54 | private LocalDate yearOfEmployment; 55 | 56 | @Column(name = "year_off") 57 | private LocalDate yearOff; 58 | 59 | @OneToMany(mappedBy = "cv") 60 | private List languageLevels; 61 | 62 | @OneToMany(mappedBy = "cv") 63 | private List schoolSections; 64 | 65 | @OneToMany(mappedBy = "cv") 66 | private List cvSkills; 67 | 68 | @OneToOne(optional = false, fetch = FetchType.LAZY) 69 | @JoinColumn(name = "candidate_id") 70 | private Candidate candidate; 71 | 72 | @Nullable 73 | @OneToOne(mappedBy = "cv", optional = true, fetch = FetchType.LAZY) 74 | private Image image; 75 | 76 | } 77 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/CvController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.time.LocalDate; 4 | import java.time.format.DateTimeFormatter; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.CrossOrigin; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | 12 | import org.springframework.web.bind.annotation.RequestBody; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestParam; 15 | import org.springframework.web.bind.annotation.RestController; 16 | 17 | import kodlamaio.hrms.business.abstracts.CvService; 18 | import kodlamaio.hrms.core.utilities.results.DataResult; 19 | import kodlamaio.hrms.core.utilities.results.Result; 20 | 21 | import kodlamaio.hrms.entities.concretes.Cv; 22 | 23 | @RestController 24 | @RequestMapping("/api/cvs") 25 | @CrossOrigin 26 | public class CvController { 27 | @Autowired 28 | CvService cvService; 29 | 30 | @PostMapping("/add") 31 | public Result add(@RequestBody Cv cv) { 32 | return this.cvService.add(cv); 33 | } 34 | 35 | @GetMapping("/getall") 36 | public DataResult> getAll() { 37 | return this.cvService.getAll(); 38 | } 39 | 40 | @GetMapping("/getById") 41 | public DataResult getById(int id) { 42 | return this.cvService.getById(id); 43 | } 44 | 45 | @PostMapping("/updateCv") 46 | public Result updateCv(@RequestParam("gitHubAddress") String gitHubAddress, 47 | @RequestParam("linkedlnAddress") String linkedlnAddress, @RequestParam("coverLetter") String coverLetter, 48 | String yearOfEntry, String yearOfGraduation, String yearOfEmployment, String yearOff, int id) { 49 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/d"); 50 | 51 | // convert String to LocalDate 52 | // LocalDate localDate = LocalDate.parse(date, formatter); 53 | return this.cvService.updateCv(gitHubAddress, linkedlnAddress, coverLetter, LocalDate.parse(yearOfEntry), 54 | LocalDate.parse(yearOfGraduation), LocalDate.parse(yearOfEmployment), LocalDate.parse(yearOff), id); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/CvManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.Sort; 8 | import org.springframework.stereotype.Service; 9 | 10 | import kodlamaio.hrms.business.abstracts.CvService; 11 | import kodlamaio.hrms.core.utilities.results.DataResult; 12 | import kodlamaio.hrms.core.utilities.results.Result; 13 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 14 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 15 | import kodlamaio.hrms.dataAccess.abstracts.CvDao; 16 | import kodlamaio.hrms.entities.concretes.Cv; 17 | 18 | 19 | @Service 20 | public class CvManager implements CvService { 21 | @Autowired 22 | CvDao cvDao; 23 | 24 | @Override 25 | public DataResult> getByYearOfGraduation(Cv cv) { 26 | Sort sort = Sort.by(Sort.Direction.DESC, "yearOfGraduation"); 27 | 28 | return new SuccessDataResult>(this.cvDao.getByYearOfGraduation(cv.getYearOfGraduation(), sort)); 29 | 30 | } 31 | 32 | @Override 33 | public DataResult> getByYearOff(Cv cv) { 34 | Sort sort = Sort.by(Sort.Direction.DESC, "yearOff"); 35 | return new SuccessDataResult>(this.cvDao.getByYearOff(cv.getYearOff(), sort)); 36 | } 37 | 38 | @Override 39 | public Result add(Cv cv) { 40 | this.cvDao.save(cv); 41 | return new SuccessResult("Cv ekleme başarılı"); 42 | } 43 | 44 | @Override 45 | public DataResult> getAll() { 46 | return new SuccessDataResult>(this.cvDao.findAll()); 47 | } 48 | 49 | @Override 50 | public DataResult getById(int id) { 51 | return new SuccessDataResult(this.cvDao.getById(id)); 52 | } 53 | 54 | @Override 55 | public Result updateCv(String gitHubAddress, String linkedlnAddress, String coverLetter, LocalDate yearOfEntry, 56 | LocalDate yearOfGraduation, LocalDate yearOfEmployment, LocalDate yearOff, int id) { 57 | 58 | this.cvDao.updateCv(gitHubAddress, linkedlnAddress, coverLetter, yearOfEntry, yearOfGraduation, 59 | yearOfEmployment, yearOff, id); 60 | return new SuccessResult("Cv bilgisi başarıyla güncellendi"); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/ImageManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.web.multipart.MultipartFile; 10 | 11 | import kodlamaio.hrms.business.abstracts.ImageService; 12 | import kodlamaio.hrms.core.imageuploads.ImageUploadService; 13 | import kodlamaio.hrms.core.utilities.results.DataResult; 14 | import kodlamaio.hrms.core.utilities.results.Result; 15 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 16 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 17 | import kodlamaio.hrms.dataAccess.abstracts.ImageDao; 18 | import kodlamaio.hrms.entities.concretes.Image; 19 | 20 | @Service 21 | public class ImageManager implements ImageService { 22 | 23 | private ImageDao imageDao; 24 | private ImageUploadService imageUploadService; 25 | 26 | @Autowired 27 | public ImageManager(ImageDao imageDao, ImageUploadService imageUploadService) { 28 | super(); 29 | this.imageDao = imageDao; 30 | this.imageUploadService = imageUploadService; 31 | } 32 | 33 | @Override 34 | public Result add(Image image) { 35 | this.imageDao.save(image); 36 | return new SuccessResult(); 37 | } 38 | 39 | @Override 40 | public DataResult> getAllByCvId(int imageId) { 41 | return new SuccessDataResult>(this.imageDao.getAllByCvId(imageId)); 42 | } 43 | 44 | @Override 45 | public Result addAll(List image) { 46 | imageDao.saveAll(image); 47 | return new SuccessResult(); 48 | 49 | } 50 | 51 | @Override 52 | public DataResult> getAll() { 53 | return new SuccessDataResult>(this.imageDao.findAll()); 54 | } 55 | 56 | @Override 57 | public Result add(Image image, MultipartFile file) { 58 | Map result = (Map) imageUploadService.save(file).getData(); 59 | String url = result.get("url"); 60 | image.setUrl(url); 61 | image.setUploadedDate(LocalDate.now()); 62 | 63 | return add(image); 64 | 65 | } 66 | 67 | // @Override 68 | // public Result imageUpdate(String url, int id) { 69 | // this.imageDao.imageUpdate(url, id); 70 | // return new SuccessResult("Fotoğraf güncellendi"); 71 | // } 72 | 73 | } -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/EmployerController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.PutMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import kodlamaio.hrms.business.abstracts.EmployerService; 16 | import kodlamaio.hrms.core.utilities.results.DataResult; 17 | import kodlamaio.hrms.core.utilities.results.Result; 18 | import kodlamaio.hrms.entities.concretes.Employer; 19 | 20 | import kodlamaio.hrms.entities.dtos.EmployerForRegisterDto; 21 | 22 | @RestController 23 | @RequestMapping("/api/employers") 24 | @CrossOrigin 25 | public class EmployerController { 26 | @Autowired 27 | EmployerService employerService; 28 | 29 | @PostMapping("/add") 30 | public Result add(@RequestBody EmployerForRegisterDto employerForRegisterDto) { 31 | return this.employerService.add(employerForRegisterDto); 32 | } 33 | 34 | @GetMapping("/getall") 35 | public DataResult> getAll() { 36 | return this.employerService.getAll(); 37 | } 38 | 39 | @PutMapping("/updateEmployer") 40 | public Result updateEmployer(@RequestParam("companyName") String companyName, @RequestParam("phone") String phone, @RequestParam("status") boolean status, 41 | @RequestParam("id") int id) { 42 | return this.employerService.updateEmployer(companyName, phone, status,id); 43 | } 44 | 45 | @PutMapping("/updateEmployerClone") 46 | public Result updateEmployerClone(@RequestParam("companyNameClone") String companyNameClone, 47 | @RequestParam("phoneClone") String phoneClone,@RequestParam("status") boolean status, @RequestParam("id") int id) { 48 | return this.employerService.updateEmployerClone(companyNameClone, phoneClone,status, id); 49 | } 50 | 51 | @GetMapping("/getById") 52 | public DataResult getById(@RequestParam("Id") int id) { 53 | return this.employerService.getById(id); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /hrms/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.4.5 10 | 11 | 12 | kodlamaio 13 | hrms 14 | 0.0.1-SNAPSHOT 15 | hrms 16 | Demo project for Spring Boot 17 | 18 | 11 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-web 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-devtools 33 | runtime 34 | true 35 | 36 | 37 | org.postgresql 38 | postgresql 39 | runtime 40 | 41 | 42 | org.projectlombok 43 | lombok 44 | true 45 | 46 | 47 | org.springframework.boot 48 | spring-boot-starter-test 49 | test 50 | 51 | 52 | io.springfox 53 | springfox-swagger2 54 | 2.9.2 55 | 56 | 57 | io.springfox 58 | springfox-swagger-ui 59 | 2.9.2 60 | 61 | 62 | com.cloudinary 63 | cloudinary-http44 64 | 1.17.0 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | org.springframework.boot 73 | spring-boot-maven-plugin 74 | 75 | 76 | 77 | org.projectlombok 78 | lombok 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/JobPostingController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | 7 | import org.springframework.web.bind.annotation.CrossOrigin; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import kodlamaio.hrms.business.abstracts.JobPostingService; 17 | import kodlamaio.hrms.core.utilities.results.DataResult; 18 | import kodlamaio.hrms.core.utilities.results.Result; 19 | 20 | import kodlamaio.hrms.entities.concretes.JobPosting; 21 | import kodlamaio.hrms.entities.dtos.PageableDto; 22 | 23 | @RestController 24 | @RequestMapping("/api/jobpostings") 25 | @CrossOrigin 26 | public class JobPostingController { 27 | @Autowired 28 | JobPostingService jobPostingService; 29 | 30 | @PostMapping("/add") 31 | public Result add(@RequestBody JobPosting jobPosting) { 32 | 33 | return this.jobPostingService.add(jobPosting); 34 | } 35 | 36 | @GetMapping("/getall") 37 | public DataResult> getAll() { 38 | return this.jobPostingService.getAll(); 39 | } 40 | 41 | @GetMapping("/getalltrue") 42 | public DataResult> getByStatus(int status) { 43 | return this.jobPostingService.getByStatus(status); 44 | } 45 | 46 | @GetMapping("/getallstatusanddate") 47 | public DataResult> getByStatus2(int status) { 48 | return this.jobPostingService.getAllStatusAndDate(status); 49 | } 50 | 51 | @GetMapping("/getbystatusandemployer") 52 | public DataResult> getByStatusAndEmployerId(int status, int employerId) { 53 | return this.jobPostingService.getByStatusAndEmployerId(status, employerId); 54 | } 55 | 56 | @PostMapping("/update") 57 | public Result updateStatus(@RequestBody JobPosting jobPosting) { 58 | return this.jobPostingService.Update(jobPosting); 59 | 60 | } 61 | 62 | @PostMapping("/statusUpdate") 63 | public Result updateStatus(@RequestParam("status") int status, @RequestParam("id") int id) { 64 | return this.jobPostingService.updateStatus(status, id); 65 | 66 | } 67 | 68 | @GetMapping("/getById") 69 | public DataResult getById(int id) { 70 | return this.jobPostingService.getById(id); 71 | } 72 | 73 | // @GetMapping("/getAllByPage") 74 | // DataResult>> getAll(int pageNo, int pageSize) { 75 | // 76 | // return this.jobPostingService.getAll(pageNo, pageSize); 77 | // } 78 | 79 | // @GetMapping("/getByCityIdAndTypeOfWorkId") 80 | // DataResult> getByCityIdAndTypeOfWorkId(int cityId, int 81 | // typeOfWorkId) { 82 | // return this.jobPostingService.getByCityIdAndTypeOfWorkId(cityId, 83 | // typeOfWorkId); 84 | // } 85 | 86 | @PostMapping("/getByFilter") 87 | public Result getByFilter(@RequestParam int pageNo, @RequestParam int pageSize, 88 | @RequestBody PageableDto pageableDto) { 89 | System.out.println(pageNo); 90 | System.out.println(pageSize); 91 | System.out.println(pageableDto); 92 | return jobPostingService.getByFilter(pageNo, pageSize, pageableDto); 93 | 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/EmployerManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.EmployeService; 9 | import kodlamaio.hrms.business.abstracts.EmployerService; 10 | import kodlamaio.hrms.core.abstracts.VerificationEmailService; 11 | import kodlamaio.hrms.core.utilities.results.DataResult; 12 | import kodlamaio.hrms.core.utilities.results.ErrorResult; 13 | import kodlamaio.hrms.core.utilities.results.Result; 14 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 15 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 16 | import kodlamaio.hrms.dataAccess.abstracts.EmployerDao; 17 | 18 | import kodlamaio.hrms.entities.concretes.Employer; 19 | 20 | import kodlamaio.hrms.entities.dtos.EmployerForRegisterDto; 21 | import lombok.var; 22 | 23 | @Service 24 | public class EmployerManager implements EmployerService { 25 | 26 | @Autowired 27 | EmployerDao employerDao; 28 | @Autowired 29 | VerificationEmailService verificationEmailService; 30 | @Autowired 31 | EmployeService employeService; 32 | 33 | @Override 34 | public Result add(EmployerForRegisterDto employerForRegisterDto) { 35 | var employer = new Employer(); 36 | employer.setId(employerForRegisterDto.getId()); 37 | employer.setCompanyName(employerForRegisterDto.getCompanyName()); 38 | employer.setWebAddress(employerForRegisterDto.getWebAddress()); 39 | employer.setEmailAddress(employerForRegisterDto.getEmailAddress()); 40 | employer.setPassword(employerForRegisterDto.getPassword()); 41 | 42 | if (employer.getPassword().equals(employerForRegisterDto.getRepeatPassword())) { 43 | if (employer.getCompanyName() != null && employer.getEmailAddress() != null 44 | && employer.getPassword() != null && employer.getWebAddress() != null) { 45 | this.employerDao.save(employer); 46 | if (verificationLink()) { 47 | this.employerDao.save(employer); 48 | return new SuccessResult("Kullanıcı başarıyla eklendi"); 49 | } 50 | 51 | else if (this.employeService.confirm(employer) != null) { 52 | 53 | this.employerDao.save(employer); 54 | return new SuccessResult("Kullanıcı başarıyla eklendi"); 55 | 56 | } else { 57 | return new ErrorResult("Kullanıcı doğrulama linkine tıklamadığı için kaydı geçersiz sayıldı."); 58 | } 59 | 60 | } else { 61 | 62 | return new ErrorResult("Bütün alanların doldurulması zorunludur !"); 63 | } 64 | } else { 65 | return new ErrorResult("Yazdığınız şifreler birbiriyle uyuşmuyor lütfen kontrol ediniz."); 66 | } 67 | 68 | } 69 | 70 | @Override 71 | public Result updateEmployer(String companyName, String phone,boolean status, int id) { 72 | this.employerDao.updateEmployer(companyName, phone,status, id); 73 | return new SuccessResult("Güncelleme başarılı"); 74 | } 75 | 76 | @Override 77 | public Result updateEmployerClone(String companyNameClone, String phoneClone,boolean status, int id) { 78 | this.employerDao.updateEmployerClone(companyNameClone, phoneClone,status, id); 79 | return new SuccessResult("Güncelleme başarılı"); 80 | } 81 | 82 | @Override 83 | public DataResult> getAll() { 84 | return new SuccessDataResult>(this.employerDao.findAll()); 85 | } 86 | 87 | private boolean verificationLink() { 88 | Boolean aBoolean = this.verificationEmailService.verificationEmail("Link kullanıcıya ulaştı."); 89 | if (!aBoolean) { 90 | System.out.println("Kullanıcı doğrulama linkine tıkladı."); 91 | return true; 92 | } else { 93 | 94 | return false; 95 | } 96 | } 97 | 98 | @Override 99 | public DataResult getById(int id) { 100 | return new SuccessDataResult(this.employerDao.getById(id)); 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/CandidateManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.hrms.business.abstracts.CandidateCheckService; 10 | import kodlamaio.hrms.business.abstracts.CandidateService; 11 | 12 | import kodlamaio.hrms.core.abstracts.VerificationEmailService; 13 | import kodlamaio.hrms.core.utilities.results.DataResult; 14 | import kodlamaio.hrms.core.utilities.results.ErrorResult; 15 | import kodlamaio.hrms.core.utilities.results.Result; 16 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 17 | 18 | import kodlamaio.hrms.dataAccess.abstracts.CandidateDao; 19 | 20 | import kodlamaio.hrms.entities.concretes.Candidate; 21 | import kodlamaio.hrms.entities.dtos.CandidateForRegisterDto; 22 | import lombok.var; 23 | 24 | @Service 25 | public class CandidateManager implements CandidateService { 26 | @Autowired 27 | CandidateDao candidateDao; 28 | @Autowired 29 | CandidateCheckService candidateCheckService; 30 | @Autowired 31 | VerificationEmailService verificationEmailService; 32 | 33 | @Override 34 | public Result add(CandidateForRegisterDto candidateForRegisterDto) { 35 | var candidate = new Candidate(); 36 | candidate.setId(candidateForRegisterDto.getId()); 37 | candidate.setFirstName(candidateForRegisterDto.getFirstName()); 38 | candidate.setLastName(candidateForRegisterDto.getLastName()); 39 | candidate.setBirthDate(LocalDate.parse(candidateForRegisterDto.getBirthDate())); 40 | candidate.setIdentificationNumber(candidateForRegisterDto.getIdentificationNumber()); 41 | candidate.setEmailAddress(candidateForRegisterDto.getEmailAddress()); 42 | candidate.setPassword(candidateForRegisterDto.getPassword()); 43 | if (mandatoryField(candidate)) { 44 | if (identificationNumberAndEmail(candidate)) { 45 | if (candidate.getPassword() == candidateForRegisterDto.getRepeatPassword()) { 46 | if (this.candidateCheckService.CheckIfRealPerson(candidate)) { 47 | 48 | if (verificationLink()) { 49 | this.candidateDao.save(candidate); 50 | 51 | } else { 52 | return new ErrorResult("Kullanıcı doğrulama linkine tıklamadığı için kayıt başarısız !"); 53 | } 54 | 55 | } 56 | } else { 57 | 58 | return new ErrorResult("Yazdığınız şifreler birbiriyle uyuşmuyor lütfen kontrol ediniz."); 59 | } 60 | 61 | } else { 62 | return new ErrorResult("Email veya TC Kimlik numaranız sistemde zaten kayıtlı !"); 63 | } 64 | } else { 65 | return new ErrorResult("Hiç bir alan boş geçilemez !"); 66 | } 67 | return null; 68 | 69 | } 70 | 71 | @Override 72 | public DataResult> getAll() { 73 | return new SuccessDataResult>(this.candidateDao.findAll()); 74 | } 75 | 76 | private boolean verificationLink() { 77 | Boolean aBoolean = this.verificationEmailService.verificationEmail("Link kullanıcıya ulaştı."); 78 | if (aBoolean) { 79 | System.out.println("Kullanıcı doğrulama linkine tıkladı."); 80 | return true; 81 | } else { 82 | 83 | return false; 84 | } 85 | } 86 | 87 | private boolean mandatoryField(Candidate candidate) { 88 | if (candidate.getBirthDate() != null && candidate.getEmailAddress() != "" && candidate.getFirstName() != "" 89 | && candidate.getLastName() != "" && candidate.getPassword() != "") { 90 | return true; 91 | } else { 92 | 93 | return false; 94 | } 95 | } 96 | 97 | private boolean identificationNumberAndEmail(Candidate candidate) { 98 | for (Candidate emailcheck : this.candidateDao.findAll()) { 99 | if (emailcheck.getIdentificationNumber().equals(candidate.getIdentificationNumber()) 100 | || emailcheck.getEmailAddress().equals(candidate.getEmailAddress())) { 101 | 102 | return false; 103 | 104 | } else { 105 | return true; 106 | } 107 | 108 | } 109 | return false; 110 | } 111 | 112 | } 113 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/JobPostingManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.PageRequest; 7 | import org.springframework.data.domain.Pageable; 8 | import org.springframework.data.domain.Sort; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | 12 | import kodlamaio.hrms.business.abstracts.JobPostingService; 13 | import kodlamaio.hrms.core.utilities.results.DataResult; 14 | import kodlamaio.hrms.core.utilities.results.Result; 15 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 16 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 17 | import kodlamaio.hrms.dataAccess.abstracts.JobPostingDao; 18 | import kodlamaio.hrms.entities.concretes.JobPosting; 19 | import kodlamaio.hrms.entities.dtos.PageableDto; 20 | 21 | @Service 22 | public class JobPostingManager implements JobPostingService { 23 | 24 | @Autowired 25 | JobPostingDao jobPostingDao; 26 | 27 | @Override 28 | public Result add(JobPosting jobPosting) { 29 | this.jobPostingDao.save(jobPosting); 30 | return new SuccessResult("Başarılı"); 31 | } 32 | 33 | @Override 34 | public DataResult> getAll() { 35 | 36 | return new SuccessDataResult>(this.jobPostingDao.findAll()); 37 | } 38 | 39 | @Override 40 | public DataResult> getAllStatusAndDate(int status) { 41 | Sort sort = Sort.by(Sort.Direction.DESC, "lastDate"); 42 | return new SuccessDataResult>(this.jobPostingDao.getByStatus(status, sort)); 43 | } 44 | 45 | @Override 46 | public DataResult> getByStatusAndEmployerId(int status, int employerId) { 47 | return new SuccessDataResult>(this.jobPostingDao.getByStatusAndEmployerId(status, employerId)); 48 | } 49 | 50 | @Override 51 | public Result Update(JobPosting jobPosting) { 52 | this.jobPostingDao.save(jobPosting); 53 | return new SuccessResult(); 54 | } 55 | 56 | @Override 57 | public DataResult> getByStatus(@RequestParam("status") int status) { 58 | return new SuccessDataResult>(this.jobPostingDao.getByStatus(status)); 59 | } 60 | 61 | @Override 62 | public Result updateStatus(int status, int id) { 63 | this.jobPostingDao.updateStatus(status, id); 64 | return new SuccessResult(); 65 | } 66 | 67 | @Override 68 | public DataResult getById(int id) { 69 | return new SuccessDataResult(this.jobPostingDao.getById(id)); 70 | } 71 | 72 | @Override 73 | public DataResult> getByFilter(int pageNo, int pageSize, PageableDto pageableDto) { 74 | Pageable pageable = PageRequest.of(pageNo - 1, pageSize); 75 | return new SuccessDataResult>( 76 | this.jobPostingDao.getByFilter(pageableDto, pageable).getContent(), 77 | this.jobPostingDao.getByFilter(pageableDto, pageable).getTotalElements() + ""); 78 | } 79 | 80 | // @Override 81 | // public DataResult>> getAll(int pageNo, int pageSize) { 82 | // 83 | // int a = this.jobPostingDao.findAll().toArray().length; 84 | // int z=a; 85 | // 86 | // if (a % pageSize == 0) { 87 | // a = a / pageSize; 88 | // } else { 89 | // a = a / pageSize + 1; 90 | // } 91 | // 92 | // Pageable pageable = PageRequest.of(pageNo - 1, pageSize); 93 | // 94 | // PageableDto> b = new PageableDto>(); 95 | // b.setListData(this.jobPostingDao.findAll(pageable).getContent()); 96 | // b.setPageNo(pageNo); 97 | // b.setPageSize(pageSize); 98 | // b.setSection(a); 99 | // b.setTotalData(z); 100 | // 101 | // SuccessDataResult>> c = new SuccessDataResult>>(b); 102 | // 103 | // return c; 104 | // 105 | // } 106 | 107 | // @Override 108 | // public DataResult>> getByCityIdAndTypeOfWorkId(int cityId, int typeOfWorkId, 109 | // int pageNo, int pageSize) { 110 | // int a = this.jobPostingDao.findAll().toArray().length; 111 | // int z = a; 112 | // 113 | // if (a % pageSize == 0) { 114 | // a = a / pageSize; 115 | // } else { 116 | // a = a / pageSize + 1; 117 | // } 118 | // 119 | // Pageable pageable = PageRequest.of(pageNo - 1, pageSize); 120 | // 121 | // PageableDto> b = new PageableDto>(); 122 | // b.setListData(this.jobPostingDao.findAll(pageable).getContent()); 123 | // b.setPageNo(pageNo); 124 | // b.setPageSize(pageSize); 125 | // b.setSection(a); 126 | // b.setTotalData(z); 127 | // 128 | // SuccessDataResult>> c = new SuccessDataResult>>(b); 129 | // 130 | // return c; 131 | // } 132 | 133 | // @Override 134 | // public DataResult> getByCityIdAndTypeOfWorkId(int cityId, int typeOfWorkId) { 135 | // return new SuccessDataResult>( 136 | // this.jobPostingDao.getByCityIdAndTypeOfWorkId(cityId, typeOfWorkId)); 137 | // } 138 | 139 | } 140 | -------------------------------------------------------------------------------- /hrms/.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 | -------------------------------------------------------------------------------- /hrms/src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicLocator.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public class KPSPublicLocator extends org.apache.axis.client.Service implements tr.gov.nvi.tckimlik.WS.KPSPublic { 11 | 12 | public KPSPublicLocator() { 13 | } 14 | 15 | 16 | public KPSPublicLocator(org.apache.axis.EngineConfiguration config) { 17 | super(config); 18 | } 19 | 20 | public KPSPublicLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { 21 | super(wsdlLoc, sName); 22 | } 23 | 24 | // Use to get a proxy class for KPSPublicSoap 25 | private java.lang.String KPSPublicSoap_address = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 26 | 27 | public java.lang.String getKPSPublicSoapAddress() { 28 | return KPSPublicSoap_address; 29 | } 30 | 31 | // The WSDD service name defaults to the port name. 32 | private java.lang.String KPSPublicSoapWSDDServiceName = "KPSPublicSoap"; 33 | 34 | public java.lang.String getKPSPublicSoapWSDDServiceName() { 35 | return KPSPublicSoapWSDDServiceName; 36 | } 37 | 38 | public void setKPSPublicSoapWSDDServiceName(java.lang.String name) { 39 | KPSPublicSoapWSDDServiceName = name; 40 | } 41 | 42 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException { 43 | java.net.URL endpoint; 44 | try { 45 | endpoint = new java.net.URL(KPSPublicSoap_address); 46 | } 47 | catch (java.net.MalformedURLException e) { 48 | throw new javax.xml.rpc.ServiceException(e); 49 | } 50 | return getKPSPublicSoap(endpoint); 51 | } 52 | 53 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { 54 | try { 55 | tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub _stub = new tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub(portAddress, this); 56 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 57 | return _stub; 58 | } 59 | catch (org.apache.axis.AxisFault e) { 60 | return null; 61 | } 62 | } 63 | 64 | public void setKPSPublicSoapEndpointAddress(java.lang.String address) { 65 | KPSPublicSoap_address = address; 66 | } 67 | 68 | /** 69 | * For the given interface, get the stub implementation. 70 | * If this service has no port for the given interface, 71 | * then ServiceException is thrown. 72 | */ 73 | public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 74 | try { 75 | if (tr.gov.nvi.tckimlik.WS.KPSPublicSoap.class.isAssignableFrom(serviceEndpointInterface)) { 76 | tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub _stub = new tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub(new java.net.URL(KPSPublicSoap_address), this); 77 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 78 | return _stub; 79 | } 80 | } 81 | catch (java.lang.Throwable t) { 82 | throw new javax.xml.rpc.ServiceException(t); 83 | } 84 | throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); 85 | } 86 | 87 | /** 88 | * For the given interface, get the stub implementation. 89 | * If this service has no port for the given interface, 90 | * then ServiceException is thrown. 91 | */ 92 | public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 93 | if (portName == null) { 94 | return getPort(serviceEndpointInterface); 95 | } 96 | java.lang.String inputPortName = portName.getLocalPart(); 97 | if ("KPSPublicSoap".equals(inputPortName)) { 98 | return getKPSPublicSoap(); 99 | } 100 | else { 101 | java.rmi.Remote _stub = getPort(serviceEndpointInterface); 102 | ((org.apache.axis.client.Stub) _stub).setPortName(portName); 103 | return _stub; 104 | } 105 | } 106 | 107 | public javax.xml.namespace.QName getServiceName() { 108 | return new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublic"); 109 | } 110 | 111 | private java.util.HashSet ports = null; 112 | 113 | public java.util.Iterator getPorts() { 114 | if (ports == null) { 115 | ports = new java.util.HashSet(); 116 | ports.add(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap")); 117 | } 118 | return ports.iterator(); 119 | } 120 | 121 | /** 122 | * Set the endpoint address for the specified port name. 123 | */ 124 | public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 125 | 126 | if ("KPSPublicSoap".equals(portName)) { 127 | setKPSPublicSoapEndpointAddress(address); 128 | } 129 | else 130 | { // Unknown Port Name 131 | throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); 132 | } 133 | } 134 | 135 | /** 136 | * Set the endpoint address for the specified port name. 137 | */ 138 | public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 139 | setEndpointAddress(portName.getLocalPart(), address); 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /hrms/src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoapStub.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public class KPSPublicSoapStub extends org.apache.axis.client.Stub implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 11 | private java.util.Vector cachedSerClasses = new java.util.Vector(); 12 | private java.util.Vector cachedSerQNames = new java.util.Vector(); 13 | private java.util.Vector cachedSerFactories = new java.util.Vector(); 14 | private java.util.Vector cachedDeserFactories = new java.util.Vector(); 15 | 16 | static org.apache.axis.description.OperationDesc [] _operations; 17 | 18 | static { 19 | _operations = new org.apache.axis.description.OperationDesc[1]; 20 | _initOperationDesc1(); 21 | } 22 | 23 | private static void _initOperationDesc1(){ 24 | org.apache.axis.description.OperationDesc oper; 25 | org.apache.axis.description.ParameterDesc param; 26 | oper = new org.apache.axis.description.OperationDesc(); 27 | oper.setName("TCKimlikNoDogrula"); 28 | 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); 29 | oper.addParameter(param); 30 | 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); 31 | param.setOmittable(true); 32 | oper.addParameter(param); 33 | 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); 34 | param.setOmittable(true); 35 | oper.addParameter(param); 36 | 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); 37 | oper.addParameter(param); 38 | oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean")); 39 | oper.setReturnClass(boolean.class); 40 | oper.setReturnQName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrulaResult")); 41 | oper.setStyle(org.apache.axis.constants.Style.WRAPPED); 42 | oper.setUse(org.apache.axis.constants.Use.LITERAL); 43 | _operations[0] = oper; 44 | 45 | } 46 | 47 | public KPSPublicSoapStub() throws org.apache.axis.AxisFault { 48 | this(null); 49 | } 50 | 51 | public KPSPublicSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 52 | this(service); 53 | super.cachedEndpoint = endpointURL; 54 | } 55 | 56 | public KPSPublicSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 57 | if (service == null) { 58 | super.service = new org.apache.axis.client.Service(); 59 | } else { 60 | super.service = service; 61 | } 62 | ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); 63 | } 64 | 65 | protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 66 | try { 67 | org.apache.axis.client.Call _call = super._createCall(); 68 | if (super.maintainSessionSet) { 69 | _call.setMaintainSession(super.maintainSession); 70 | } 71 | if (super.cachedUsername != null) { 72 | _call.setUsername(super.cachedUsername); 73 | } 74 | if (super.cachedPassword != null) { 75 | _call.setPassword(super.cachedPassword); 76 | } 77 | if (super.cachedEndpoint != null) { 78 | _call.setTargetEndpointAddress(super.cachedEndpoint); 79 | } 80 | if (super.cachedTimeout != null) { 81 | _call.setTimeout(super.cachedTimeout); 82 | } 83 | if (super.cachedPortName != null) { 84 | _call.setPortName(super.cachedPortName); 85 | } 86 | java.util.Enumeration keys = super.cachedProperties.keys(); 87 | while (keys.hasMoreElements()) { 88 | java.lang.String key = (java.lang.String) keys.nextElement(); 89 | _call.setProperty(key, super.cachedProperties.get(key)); 90 | } 91 | return _call; 92 | } 93 | catch (java.lang.Throwable _t) { 94 | throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); 95 | } 96 | } 97 | 98 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException { 99 | if (super.cachedEndpoint == null) { 100 | throw new org.apache.axis.NoEndPointException(); 101 | } 102 | org.apache.axis.client.Call _call = createCall(); 103 | _call.setOperation(_operations[0]); 104 | _call.setUseSOAPAction(true); 105 | _call.setSOAPActionURI("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"); 106 | _call.setEncodingStyle(null); 107 | _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); 108 | _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); 109 | _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 110 | _call.setOperationName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula")); 111 | 112 | setRequestHeaders(_call); 113 | setAttachments(_call); 114 | try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(TCKimlikNo), ad, soyad, new java.lang.Integer(dogumYili)}); 115 | 116 | if (_resp instanceof java.rmi.RemoteException) { 117 | throw (java.rmi.RemoteException)_resp; 118 | } 119 | else { 120 | extractAttachments(_call); 121 | try { 122 | return ((java.lang.Boolean) _resp).booleanValue(); 123 | } catch (java.lang.Exception _exception) { 124 | return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue(); 125 | } 126 | } 127 | } catch (org.apache.axis.AxisFault axisFaultException) { 128 | throw axisFaultException; 129 | } 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /hrms/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 | -------------------------------------------------------------------------------- /hrms/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 | --------------------------------------------------------------------------------