├── hrms.sql ├── .gitattributes ├── HRMS ├── hs_err_pid24108.log ├── hs_err_pid2860.log ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ ├── maven-wrapper.properties │ │ └── MavenWrapperDownloader.java ├── src │ ├── test │ │ └── java │ │ │ └── kodlamaio │ │ │ └── HRMS │ │ │ └── HrmsApplicationTests.java │ └── main │ │ ├── java │ │ └── kodlamaio │ │ │ └── HRMS │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ ├── UserDao.java │ │ │ │ ├── CityDao.java │ │ │ │ ├── EmployerDao.java │ │ │ │ ├── VerificationCodeDao.java │ │ │ │ ├── EmployeeDao.java │ │ │ │ ├── LanguageDao.java │ │ │ │ ├── JobTitleDao.java │ │ │ │ ├── ResumeLinkDao.java │ │ │ │ ├── ResumeSkillDao.java │ │ │ │ ├── ResumeLanguageDao.java │ │ │ │ ├── CandidateDao.java │ │ │ │ ├── ResumeDao.java │ │ │ │ ├── ResumeCoverLetterDao.java │ │ │ │ ├── ResumeJobExperienceDao.java │ │ │ │ ├── ResumeEducationDao.java │ │ │ │ └── JobPostingDao.java │ │ │ ├── core │ │ │ ├── utilities │ │ │ │ ├── results │ │ │ │ │ ├── ErrorResult.java │ │ │ │ │ ├── SuccessResult.java │ │ │ │ │ ├── ErrorDataResult.java │ │ │ │ │ ├── SuccesDataResult.java │ │ │ │ │ ├── Result.java │ │ │ │ │ └── DataResult.java │ │ │ │ └── adapters │ │ │ │ │ └── verification │ │ │ │ │ ├── mail │ │ │ │ │ ├── ValidationService.java │ │ │ │ │ └── MailValidationManager.java │ │ │ │ │ ├── image │ │ │ │ │ └── ImageService.java │ │ │ │ │ └── mernis │ │ │ │ │ ├── MernisCandidateCheckService.java │ │ │ │ │ └── MernisFakeServiceAdapters.java │ │ │ └── adapters │ │ │ │ └── CloudinaryServiceAdapter.java │ │ │ ├── business │ │ │ ├── abstracts │ │ │ │ ├── UserService.java │ │ │ │ ├── VerificationCodeService.java │ │ │ │ ├── EmployeeService.java │ │ │ │ ├── AuthService.java │ │ │ │ ├── EmployerService.java │ │ │ │ ├── CityService.java │ │ │ │ ├── JobPositionService.java │ │ │ │ ├── LanguageService.java │ │ │ │ ├── CandidateService.java │ │ │ │ ├── ResumeLinkService.java │ │ │ │ ├── ResumeSkillService.java │ │ │ │ ├── ResumeLanguageService.java │ │ │ │ ├── ResumeService.java │ │ │ │ ├── ResumeCoverLetterService.java │ │ │ │ ├── JobPostingService.java │ │ │ │ ├── ResumeEducationService.java │ │ │ │ └── ResumeJobExperienceService.java │ │ │ └── concretes │ │ │ │ ├── UserManager.java │ │ │ │ ├── VerificationCodeManager.java │ │ │ │ ├── EmployeeManager.java │ │ │ │ ├── JobPositionManager.java │ │ │ │ ├── CityManager.java │ │ │ │ ├── LanguageManager.java │ │ │ │ ├── ResumeSkillManager.java │ │ │ │ ├── ResumeLinkManager.java │ │ │ │ ├── ResumeCoverLetterManager.java │ │ │ │ ├── ResumeLanguageManager.java │ │ │ │ ├── AuthManager.java │ │ │ │ ├── ResumeEducationManager.java │ │ │ │ ├── ResumeJobExperienceManager.java │ │ │ │ ├── ResumeManager.java │ │ │ │ ├── JobPostingManager.java │ │ │ │ ├── EmployerManager.java │ │ │ │ └── CandidateManager.java │ │ │ ├── entities │ │ │ ├── dtos │ │ │ │ └── JobPostingListDto.java │ │ │ └── concretes │ │ │ │ ├── EmployerPhone.java │ │ │ │ ├── Employee.java │ │ │ │ ├── Candidate.java │ │ │ │ ├── City.java │ │ │ │ ├── Employer.java │ │ │ │ ├── ResumeSkill.java │ │ │ │ ├── User.java │ │ │ │ ├── VerificationCode.java │ │ │ │ ├── ResumeLink.java │ │ │ │ ├── Language.java │ │ │ │ ├── JobPosition.java │ │ │ │ ├── ResumeCoverLetter.java │ │ │ │ ├── ResumeLanguage.java │ │ │ │ ├── JobPosting.java │ │ │ │ ├── ResumeEducation.java │ │ │ │ ├── ResumeJobExperience.java │ │ │ │ └── Resume.java │ │ │ ├── configuration │ │ │ └── AppConfiguration.java │ │ │ ├── HrmsApplication.java │ │ │ └── api │ │ │ └── controllers │ │ │ ├── CandidateController.java │ │ │ ├── EmployeeController.java │ │ │ ├── EmployerController.java │ │ │ ├── JobTitlesController.java │ │ │ ├── CityController.java │ │ │ ├── AuthController.java │ │ │ ├── LanguageController.java │ │ │ ├── ResumeLinkController.java │ │ │ ├── ResumeSkillController.java │ │ │ ├── JobPostingController.java │ │ │ ├── ResumeLanguageController.java │ │ │ ├── ResumeController.java │ │ │ ├── ResumeCoverLetterController.java │ │ │ ├── ResumeEducationController.java │ │ │ └── ResumeJobExperienceController.java │ │ └── resources │ │ └── application.properties ├── .gitignore ├── pom.xml ├── mvnw.cmd └── mvnw ├── README.md └── HRMS.sql.txt /hrms.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nurcanaksu/HrmsProject/HEAD/hrms.sql -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /HRMS/hs_err_pid24108.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nurcanaksu/HrmsProject/HEAD/HRMS/hs_err_pid24108.log -------------------------------------------------------------------------------- /HRMS/hs_err_pid2860.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nurcanaksu/HrmsProject/HEAD/HRMS/hs_err_pid2860.log -------------------------------------------------------------------------------- /HRMS/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nurcanaksu/HrmsProject/HEAD/HRMS/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /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/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/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/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.results; 2 | 3 | public class ErrorResult extends Result{ 4 | 5 | public ErrorResult() { 6 | super(false); 7 | } 8 | 9 | public ErrorResult(String message) 10 | { 11 | super(false,message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/adapters/verification/mail/ValidationService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.adapters.verification.mail; 2 | 3 | public interface ValidationService { 4 | 5 | boolean sendVerificationCode(String emailAddress, String code); 6 | 7 | String codeGenerator(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /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 | 5 | public SuccessResult() { 6 | super(true); 7 | } 8 | 9 | public SuccessResult(String message) 10 | { 11 | super(true,message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/UserService.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.User; 7 | 8 | public interface UserService { 9 | 10 | DataResult> getAll(); 11 | } 12 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/CityDao.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.City; 8 | 9 | 10 | public interface CityDao extends JpaRepository{ 11 | 12 | City getById(int id); 13 | } 14 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/EmployerDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.HRMS.entities.concretes.Employer; 6 | 7 | public interface EmployerDao extends JpaRepository{ 8 | Employer findByEmail(String email); 9 | } 10 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/VerificationCodeDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.HRMS.entities.concretes.VerificationCode; 6 | 7 | public interface VerificationCodeDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/EmployeeDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import kodlamaio.HRMS.entities.concretes.Employee; 5 | 6 | public interface EmployeeDao extends JpaRepository { 7 | 8 | Employee findByEmail(String email); 9 | } 10 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/LanguageDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import kodlamaio.HRMS.entities.concretes.Language; 7 | 8 | public interface LanguageDao extends JpaRepository{ 9 | 10 | Language getById(int id); 11 | } 12 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/adapters/verification/image/ImageService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.adapters.verification.image; 2 | 3 | import org.springframework.web.multipart.MultipartFile; 4 | 5 | import kodlamaio.HRMS.core.utilities.results.DataResult; 6 | 7 | public interface ImageService { 8 | 9 | DataResult uploadPhoto(MultipartFile file); 10 | } 11 | -------------------------------------------------------------------------------- /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.JobPosition; 6 | 7 | public interface JobTitleDao extends JpaRepository { 8 | 9 | JobPosition findByTitleName(String titleName); 10 | } 11 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/VerificationCodeService.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.VerificationCode; 7 | 8 | public interface VerificationCodeService { 9 | 10 | DataResult> getAll(); 11 | } 12 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/adapters/verification/mernis/MernisCandidateCheckService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.adapters.verification.mernis; 2 | 3 | 4 | 5 | import java.time.LocalDate; 6 | 7 | 8 | public interface MernisCandidateCheckService { 9 | 10 | boolean CheckIfRealPerson(long nationalityId, String firstName, String lastName, LocalDate birthDate); 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /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=123 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | server.port=9090 -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/EmployeeService.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.Employee; 7 | 8 | public interface EmployeeService { 9 | 10 | DataResult> getAll(); 11 | 12 | DataResult getByEmail(String email); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeLinkDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import kodlamaio.HRMS.entities.concretes.ResumeLink; 8 | 9 | public interface ResumeLinkDao extends JpaRepository { 10 | 11 | List getAllByResume_Id(int resumeId); 12 | } -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeSkillDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import kodlamaio.HRMS.entities.concretes.ResumeSkill; 8 | 9 | public interface ResumeSkillDao extends JpaRepository { 10 | 11 | List getAllByResume_Id(int resumeId); 12 | } 13 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeLanguageDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import kodlamaio.HRMS.entities.concretes.ResumeLanguage; 7 | 8 | public interface ResumeLanguageDao extends JpaRepository{ 9 | 10 | List getAllByResume_Id(int resumeId); 11 | } 12 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/CandidateDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.HRMS.entities.concretes.Candidate; 6 | 7 | public interface CandidateDao extends JpaRepository { 8 | 9 | Candidate findByNationalityId(String nationalityId); 10 | 11 | Candidate findByEmail(String emailAddress); 12 | } 13 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | 8 | import kodlamaio.HRMS.entities.concretes.Resume; 9 | 10 | public interface ResumeDao extends JpaRepository { 11 | 12 | Optional> getByCandidate_id(int candidateId); 13 | } 14 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeCoverLetterDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import kodlamaio.HRMS.entities.concretes.ResumeCoverLetter; 8 | 9 | public interface ResumeCoverLetterDao extends JpaRepository { 10 | 11 | List getAllByResume_Id(int resumeId); 12 | } 13 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/AuthService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.abstracts; 2 | 3 | import kodlamaio.HRMS.core.utilities.results.Result; 4 | import kodlamaio.HRMS.entities.concretes.Candidate; 5 | import kodlamaio.HRMS.entities.concretes.Employer; 6 | 7 | public interface AuthService { 8 | 9 | Result registerForCandidate(Candidate candidate, String passwordRepeat); 10 | Result registerForEmployer(Employer employer, String passwordRepeat); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /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 | public interface EmployerService { 10 | 11 | 12 | DataResult> getAll(); 13 | 14 | DataResult getByEmail(String email); 15 | 16 | Result add(Employer employer);} 17 | -------------------------------------------------------------------------------- /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 | 5 | public ErrorDataResult(T data, String message) { 6 | super(data,false, message); 7 | } 8 | 9 | public ErrorDataResult(T data) { 10 | super(data,false); 11 | } 12 | 13 | public ErrorDataResult(String message) { 14 | super(null, false, message); 15 | } 16 | 17 | public ErrorDataResult() { 18 | super(null,false); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/results/SuccesDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.results; 2 | 3 | public class SuccesDataResult extends DataResult { 4 | 5 | public SuccesDataResult(T data, String message) { 6 | super(data,true, message); 7 | } 8 | 9 | public SuccesDataResult(T data) { 10 | super(data,true); 11 | } 12 | 13 | public SuccesDataResult(String message) { 14 | super(null, true, message); 15 | } 16 | 17 | public SuccesDataResult() { 18 | super(null,true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/adapters/verification/mernis/MernisFakeServiceAdapters.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.adapters.verification.mernis; 2 | 3 | 4 | 5 | import java.time.LocalDate; 6 | import org.springframework.stereotype.Service; 7 | 8 | @Service 9 | public class MernisFakeServiceAdapters implements MernisCandidateCheckService { 10 | 11 | @Override 12 | public boolean CheckIfRealPerson(long nationalityId, String firstName, String lastName, LocalDate birthDate) { 13 | 14 | return true; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /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/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.core.utilities.results.Result; 7 | import kodlamaio.HRMS.entities.concretes.City; 8 | 9 | public interface CityService { 10 | 11 | DataResult> getAll(); 12 | 13 | DataResult getById(int id); 14 | 15 | Result add(City city); 16 | 17 | Result update(City city); 18 | 19 | Result delete(City city); 20 | } 21 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/JobPositionService.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.core.utilities.results.Result; 8 | import kodlamaio.HRMS.entities.concretes.JobPosition; 9 | 10 | public interface JobPositionService { 11 | 12 | DataResult> getAll(); 13 | 14 | DataResult getByTitleName(String titleName); 15 | 16 | Result add(JobPosition jobPosition); 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.results; 2 | 3 | public class Result { // sonuc 4 | 5 | private boolean success; 6 | private String message; 7 | 8 | public Result(boolean success) { 9 | this.success = success; 10 | 11 | } 12 | 13 | public Result(boolean success, String message) { 14 | this(success); 15 | this.message = message; 16 | 17 | } 18 | 19 | public boolean isSucces() { 20 | return this.success; 21 | } 22 | 23 | public String getMessage() { 24 | return this.message; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /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.core.utilities.results.Result; 7 | import kodlamaio.HRMS.entities.concretes.Language; 8 | 9 | public interface LanguageService { 10 | 11 | DataResult> getAll(); 12 | 13 | DataResult getById(int id); 14 | 15 | Result add(Language language); 16 | 17 | Result update(Language language); 18 | 19 | Result delete(Language language); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /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 | 6 | private T data; 7 | 8 | public DataResult(T data, boolean success, String message) { 9 | super(success, message); 10 | this.data=data; 11 | // TODO Auto-generated constructor stub 12 | } 13 | 14 | public DataResult(T data, boolean success) { 15 | super(success); 16 | this.data=data; 17 | // TODO Auto-generated constructor stub 18 | } 19 | 20 | public T getData() 21 | { 22 | return this.data; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/dtos/JobPostingListDto.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 JobPostingListDto { //iş ilanı 13 | 14 | private int id; 15 | 16 | private String companyName; 17 | 18 | private String jobPositionName; 19 | 20 | private int openPositionsCount; 21 | 22 | private LocalDate createdDate; 23 | 24 | private LocalDate applicationDeadline; 25 | } 26 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/CandidateService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.abstracts; 2 | 3 | 4 | import java.util.List; 5 | 6 | 7 | import kodlamaio.HRMS.core.utilities.results.DataResult; 8 | import kodlamaio.HRMS.core.utilities.results.Result; 9 | import kodlamaio.HRMS.entities.concretes.Candidate; 10 | 11 | public interface CandidateService { 12 | 13 | DataResult> getAll(); 14 | 15 | Result add(Candidate candidate); 16 | 17 | DataResult getByNationalityId(String nationalityId); 18 | 19 | DataResult getByEmail(String emailAddress); 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeJobExperienceDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import kodlamaio.HRMS.entities.concretes.ResumeJobExperience; 8 | 9 | public interface ResumeJobExperienceDao extends JpaRepository { 10 | 11 | List getAllByResume_Id(int resumeId); 12 | 13 | List getAllByResume_IdOrderByFinishDate(int resumeId); 14 | 15 | List getAllByResume_IdOrderByFinishDateDesc(int resumeId); 16 | } 17 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/ResumeEducationDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import kodlamaio.HRMS.entities.concretes.ResumeEducation; 8 | 9 | public interface ResumeEducationDao extends JpaRepository { 10 | 11 | List getAllByResume_Id(int resumeId); // eğitim bilgileri 12 | 13 | List getAllByResume_IdOrderByGraduationDate(int resumeId); // mezuniyet tarihleri çoktan aza 14 | 15 | List getAllByResume_IdOrderByGraduationDateDesc(int resumeId); // tam tersi 16 | } 17 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeLinkService.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.ResumeLink; 8 | 9 | public interface ResumeLinkService { 10 | 11 | DataResult> getAll(); 12 | 13 | DataResult getById(int id); 14 | 15 | DataResult> getAllByResume_Id(int resumeId); 16 | 17 | Result add(ResumeLink resumeLink); 18 | 19 | Result update(ResumeLink resumeLink); 20 | 21 | Result delete(ResumeLink resumeLink); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeSkillService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.abstracts; 2 | 3 | import java.util.List; 4 | import kodlamaio.HRMS.core.utilities.results.DataResult; 5 | import kodlamaio.HRMS.core.utilities.results.Result; 6 | import kodlamaio.HRMS.entities.concretes.ResumeSkill; 7 | 8 | public interface ResumeSkillService { 9 | 10 | DataResult> getAll(); 11 | 12 | DataResult getById(int id); 13 | 14 | DataResult> getAllByResume_Id(int resumeId); 15 | 16 | Result add(ResumeSkill resumeSkill); 17 | 18 | Result update(ResumeSkill resumeSkill); 19 | 20 | Result delete(ResumeSkill resumeSkill); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeLanguageService.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.ResumeLanguage; 8 | 9 | public interface ResumeLanguageService { 10 | 11 | DataResult> getAll(); 12 | 13 | DataResult getById(int id); 14 | 15 | DataResult> getAllByResume_Id(int resumeId); 16 | 17 | Result add(ResumeLanguage resumeLanguage); 18 | 19 | Result update(ResumeLanguage resumeLanguage); 20 | 21 | Result delete(ResumeLanguage resumeLanguage); 22 | } 23 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/configuration/AppConfiguration.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.configuration; 2 | 3 | import org.modelmapper.ModelMapper; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | import com.cloudinary.Cloudinary; 8 | import com.cloudinary.utils.ObjectUtils; 9 | 10 | @Configuration 11 | public class AppConfiguration { 12 | 13 | @Bean 14 | public ModelMapper modelMapper() { 15 | 16 | return new ModelMapper(); 17 | } 18 | 19 | @Bean 20 | public Cloudinary cloudinary() { 21 | 22 | return new Cloudinary(ObjectUtils.asMap("cloud_name", "dz0r9aikp", "api_key", "466178369458849", "api_secret", 23 | "qGITpenniU252Kc4SgksfOEKHRs")); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import kodlamaio.HRMS.core.utilities.results.DataResult; 8 | import kodlamaio.HRMS.core.utilities.results.Result; 9 | import kodlamaio.HRMS.entities.concretes.Resume; 10 | 11 | public interface ResumeService { 12 | 13 | DataResult> getAll(); 14 | 15 | DataResult getById(int id); 16 | 17 | DataResult> getByCandidate_id(int candidateId); 18 | 19 | Result uploadPhoto(int candidateId, MultipartFile file); 20 | 21 | Result add(Resume resume); 22 | 23 | Result delete(Resume resume); 24 | 25 | Result update(Resume resume); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeCoverLetterService.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.ResumeCoverLetter; 8 | 9 | public interface ResumeCoverLetterService { 10 | 11 | DataResult> getAll(); 12 | 13 | DataResult getById(int id); 14 | 15 | DataResult> getAllByResume_Id(int resumeId); 16 | 17 | Result add(ResumeCoverLetter resumeCoverLetter); 18 | 19 | Result update(ResumeCoverLetter resumeCoverLetter); 20 | 21 | Result delete(ResumeCoverLetter resumeCoverLetter); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/EmployerPhone.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.entities.concretes; 2 | 3 | 4 | import javax.persistence.Column; 5 | 6 | import javax.persistence.Entity; 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="employer_phones") 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @EqualsAndHashCode(callSuper = false) 21 | public class EmployerPhone { 22 | 23 | @Id 24 | @Column(name="id") 25 | private int id; 26 | 27 | @Column(name="employer_id") 28 | private int employerId; 29 | 30 | @Column(name="phone_number") 31 | private String phoneNumber; 32 | } -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/Employee.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.PrimaryKeyJoinColumn; 6 | import javax.persistence.Table; 7 | 8 | import lombok.AllArgsConstructor; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.NoArgsConstructor; 12 | 13 | @Data 14 | @Entity 15 | @Table(name="employees") 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @EqualsAndHashCode(callSuper = false) 19 | @PrimaryKeyJoinColumn(name = "user_id", referencedColumnName = "id") 20 | public class Employee extends User { 21 | 22 | @Column(name="first_name") 23 | private String firstName; 24 | 25 | @Column(name="last_name") 26 | private String lastName; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /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 | import kodlamaio.HRMS.core.utilities.results.DataResult; 7 | import kodlamaio.HRMS.core.utilities.results.Result; 8 | import kodlamaio.HRMS.entities.concretes.JobPosting; 9 | 10 | public interface JobPostingService { 11 | 12 | public Result add(JobPosting jobPosting); 13 | 14 | public Result delete(JobPosting jobPosting); 15 | 16 | public Result update(JobPosting jobPosting); 17 | 18 | public DataResult> getAllActiveJobPosting(); 19 | 20 | public DataResult> getAllByCreationDateAsc(); 21 | 22 | public DataResult> getAllActiveJobPostingByCompanyName(String companyName); 23 | 24 | public Result closeJobPosting(int id); 25 | 26 | public Result openJobPosting(int id); 27 | 28 | } -------------------------------------------------------------------------------- /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/business/concretes/UserManager.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.UserService; 9 | import kodlamaio.HRMS.core.utilities.results.DataResult; 10 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 11 | import kodlamaio.HRMS.dataAccess.abstracts.UserDao; 12 | import kodlamaio.HRMS.entities.concretes.User; 13 | 14 | @Service 15 | public class UserManager implements UserService{ 16 | 17 | private UserDao userDao; 18 | 19 | @Autowired 20 | public UserManager(UserDao userDao) { 21 | super(); 22 | this.userDao =userDao; 23 | } 24 | 25 | @Override 26 | public DataResult> getAll() { 27 | return new SuccesDataResult>(this.userDao.findAll()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/dataAccess/abstracts/JobPostingDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import java.util.List; 7 | 8 | import kodlamaio.HRMS.entities.concretes.JobPosting; 9 | 10 | public interface JobPostingDao extends JpaRepository 11 | { 12 | 13 | @Query("From JobPosting where isActive = true") //aktif iş ilanlarını listeler 14 | List getAllActiveJobAdverts(); 15 | 16 | @Query("From JobPosting where isActive = true Order By createdDate") //tarihe göre listeler 17 | List getAllByCreationDateAsc(); 18 | 19 | 20 | @Query("From JobPosting where isActive = true and employer.companyName=:companyName") //şirket ismine göre listeler 21 | List getAllActiveJobPostingByEmployer_CompanyName(String companyName); 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeEducationService.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.core.utilities.results.Result; 8 | import kodlamaio.HRMS.entities.concretes.ResumeEducation; 9 | 10 | public interface ResumeEducationService{ 11 | 12 | DataResult> getAll(); 13 | 14 | DataResult getById(int id); 15 | 16 | DataResult> getAllByResume_Id(int resumeId); 17 | 18 | DataResult> getAllByResume_IdOrderByGraduationDate(int resumeId); // ASC 19 | 20 | DataResult> getAllByResume_IdOrderByGraduationDateDesc(int resumeId); 21 | 22 | Result add(ResumeEducation resumeEducation); 23 | 24 | Result update(ResumeEducation resumeEducation); 25 | 26 | Result delete(ResumeEducation resumeEducation); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/abstracts/ResumeJobExperienceService.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.ResumeJobExperience; 8 | 9 | public interface ResumeJobExperienceService { 10 | 11 | DataResult> getAll(); 12 | 13 | DataResult getById(int id); 14 | 15 | DataResult> getAllByResume_Id(int resumeId); 16 | 17 | DataResult> getAllByResume_IdOrderByFinishDate(int resumeId); 18 | 19 | DataResult> getAllByResume_IdOrderByFinishDateDesc(int resumeId); 20 | 21 | Result add(ResumeJobExperience resumeJobExperience); 22 | 23 | Result update(ResumeJobExperience resumeJobExperience); 24 | 25 | Result delete(ResumeJobExperience resumeJobExperience); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/Candidate.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.PrimaryKeyJoinColumn; 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="candidates") 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | @EqualsAndHashCode(callSuper = false) 21 | @PrimaryKeyJoinColumn(name="user_id",referencedColumnName = "id") 22 | public class Candidate extends User { 23 | 24 | @Column(name="first_name") 25 | private String firstName; 26 | 27 | @Column(name="last_name") 28 | private String lastName; 29 | 30 | @Column(name="nationality_id") 31 | private String nationalityId; 32 | 33 | @Column(name="birth_date") 34 | private LocalDate birthDate; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /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.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | import kodlamaio.HRMS.business.abstracts.CandidateService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.entities.concretes.Candidate; 12 | 13 | @RestController 14 | @RequestMapping("/api/candidates") 15 | public class CandidateController { 16 | 17 | private CandidateService candidateService; 18 | 19 | @Autowired 20 | public CandidateController(CandidateService candidateService) { 21 | super(); 22 | this.candidateService = candidateService; 23 | } 24 | 25 | @GetMapping("/getAll") 26 | public DataResult> getAll() { 27 | return this.candidateService.getAll(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/EmployeeController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import kodlamaio.HRMS.core.utilities.results.DataResult; 10 | import kodlamaio.HRMS.entities.concretes.Employee; 11 | import kodlamaio.HRMS.business.abstracts.EmployeeService; 12 | 13 | 14 | @RestController 15 | @RequestMapping("/api/employees") 16 | public class EmployeeController { 17 | 18 | private EmployeeService employeeService; 19 | 20 | @Autowired 21 | public EmployeeController(EmployeeService employeeService) { 22 | super(); 23 | this.employeeService = employeeService; 24 | } 25 | 26 | @GetMapping("/getall") 27 | public DataResult> getAll(){ 28 | return this.employeeService.getAll(); 29 | } 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/EmployerController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 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.EmployerService; 12 | import kodlamaio.HRMS.core.utilities.results.DataResult; 13 | import kodlamaio.HRMS.entities.concretes.Employer; 14 | 15 | @RestController 16 | @RequestMapping("/api/employers") 17 | public class EmployerController { 18 | 19 | private EmployerService employerService; 20 | 21 | @Autowired 22 | public EmployerController(EmployerService employerService) { 23 | super(); 24 | this.employerService = employerService; 25 | } 26 | 27 | 28 | @GetMapping("/getAll") 29 | public DataResult> getAll() 30 | { 31 | return this.employerService.getAll(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/City.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 | 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 | @Data 20 | @Entity 21 | @Table(name="cities") 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler", "jobPostings"}) 25 | public class City { 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | @Column(name="id") 29 | private int id; 30 | 31 | @Column(name="city_name") 32 | private String cityName; 33 | 34 | @OneToMany(mappedBy="city") 35 | private List jobPostings; 36 | } 37 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/utilities/adapters/verification/mail/MailValidationManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.utilities.adapters.verification.mail; 2 | 3 | import java.security.SecureRandom; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | @Service 8 | public class MailValidationManager implements ValidationService { 9 | 10 | @Override 11 | public boolean sendVerificationCode(String emailAddress, String code) { 12 | System.out.println(emailAddress + " mail adresine kod gönderildi. Doğrulama Kodu: " + code); 13 | return true; 14 | } 15 | 16 | @Override 17 | public String codeGenerator() { 18 | int length = 10; 19 | 20 | final String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 21 | 22 | SecureRandom random = new SecureRandom(); 23 | StringBuilder sb = new StringBuilder(); 24 | 25 | for (int i = 0; i < length; i++) 26 | { 27 | int randomIndex = random.nextInt(chars.length()); 28 | sb.append(chars.charAt(randomIndex)); 29 | } 30 | 31 | return sb.toString(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/JobTitlesController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 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 | import kodlamaio.HRMS.business.abstracts.JobPositionService; 11 | import kodlamaio.HRMS.core.utilities.results.DataResult; 12 | import kodlamaio.HRMS.entities.concretes.JobPosition; 13 | 14 | @RestController 15 | @RequestMapping("/api/jobTitles") 16 | public class JobTitlesController { 17 | 18 | private JobPositionService jobTitleService; 19 | 20 | @Autowired 21 | public JobTitlesController(JobPositionService jobTitleService) { 22 | super(); 23 | this.jobTitleService = jobTitleService; 24 | } 25 | 26 | @GetMapping("/getall") 27 | public DataResult> getAll() { 28 | return this.jobTitleService.getAll(); 29 | } 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/VerificationCodeManager.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.VerificationCodeService; 9 | import kodlamaio.HRMS.core.utilities.results.DataResult; 10 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 11 | import kodlamaio.HRMS.dataAccess.abstracts.VerificationCodeDao; 12 | import kodlamaio.HRMS.entities.concretes.VerificationCode; 13 | 14 | @Service 15 | public class VerificationCodeManager implements VerificationCodeService { 16 | 17 | private VerificationCodeDao verificationCodeDao; 18 | 19 | @Autowired 20 | public VerificationCodeManager(VerificationCodeDao verificationCodeDao) { 21 | super(); 22 | this.verificationCodeDao =verificationCodeDao; 23 | } 24 | 25 | @Override 26 | public DataResult> getAll() { 27 | return new SuccesDataResult>(this.verificationCodeDao.findAll()); 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/EmployeeManager.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.EmployeeService; 9 | import kodlamaio.HRMS.core.utilities.results.DataResult; 10 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 11 | import kodlamaio.HRMS.dataAccess.abstracts.EmployeeDao; 12 | import kodlamaio.HRMS.entities.concretes.Employee; 13 | 14 | @Service 15 | public class EmployeeManager implements EmployeeService { 16 | 17 | private EmployeeDao employeeDao; 18 | 19 | @Autowired 20 | public EmployeeManager(EmployeeDao employeeDao) { 21 | super(); 22 | this.employeeDao = employeeDao; 23 | } 24 | 25 | @Override 26 | public DataResult> getAll() { 27 | return new SuccesDataResult>(this.employeeDao.findAll()); 28 | } 29 | 30 | @Override 31 | public DataResult getByEmail(String email) { 32 | return new SuccesDataResult(this.employeeDao.findByEmail(email)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /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 | import javax.persistence.OneToMany; 8 | import javax.persistence.PrimaryKeyJoinColumn; 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 = false) 24 | @PrimaryKeyJoinColumn(name="user_id",referencedColumnName = "id") 25 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler", "jobPostings"}) 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_number") 35 | private String phoneNumber; 36 | 37 | @OneToMany(mappedBy="employer") 38 | private List jobPostings; 39 | } 40 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/ResumeSkill.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotNull; 14 | 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name="resume_skills") 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class ResumeSkill { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name="id") 30 | private int id; 31 | 32 | @JoinColumn(name = "resume_id") 33 | @ManyToOne 34 | private Resume resume; 35 | 36 | @NotNull 37 | @Column(name="name") 38 | private String name; 39 | 40 | @NotNull 41 | @Column(name="is_active") 42 | private boolean isActive; 43 | 44 | @NotNull 45 | @Column(name="created_date") 46 | private LocalDate createdDate = LocalDate.now(); 47 | } -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.*; 6 | 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.Id; 10 | import javax.persistence.Inheritance; 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="users") 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @Inheritance(strategy=InheritanceType.JOINED) // miras verdiği sınıfa ozelliklerini aktarır 25 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler", "products"}) 26 | public class User { 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name="id") 31 | private int id; 32 | 33 | @Column(name="email_address") 34 | private String email; 35 | 36 | @Column(name="password") 37 | private String password; 38 | 39 | @Column(name="is_active") 40 | private boolean isActive; 41 | 42 | @Column(name="created_date") 43 | private LocalDate createdDate; 44 | } -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/VerificationCode.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.Table; 11 | 12 | import lombok.AllArgsConstructor; 13 | import lombok.Data; 14 | import lombok.EqualsAndHashCode; 15 | import lombok.NoArgsConstructor; 16 | 17 | @Data 18 | @Entity 19 | @Table(name="verification_codes") 20 | @AllArgsConstructor 21 | @NoArgsConstructor 22 | @EqualsAndHashCode 23 | public class VerificationCode { 24 | 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | @Column(name="id") 28 | private int id; 29 | 30 | @Column(name="user_id") 31 | private int userId; 32 | 33 | @Column(name="verification_code") 34 | private String verificationCode; 35 | 36 | @Column(name="created_date") 37 | private LocalDate createdDate; 38 | 39 | @Column(name="expired_date") 40 | private LocalDate expiredDate; 41 | 42 | 43 | @Column(name="verification_date") 44 | private LocalDate verificationDate; 45 | 46 | @Column(name="is_verified") 47 | private boolean isVerified; 48 | } -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/CityController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import kodlamaio.HRMS.entities.concretes.City; 12 | import kodlamaio.HRMS.business.abstracts.CityService; 13 | import kodlamaio.HRMS.core.utilities.results.DataResult; 14 | import kodlamaio.HRMS.core.utilities.results.Result; 15 | 16 | @RestController 17 | @RequestMapping("/api/cities") 18 | public class CityController { 19 | 20 | private CityService cityService; 21 | 22 | @Autowired 23 | public CityController(CityService cityService) { 24 | super(); 25 | this.cityService = cityService; 26 | } 27 | 28 | @GetMapping("/getAll") 29 | public DataResult> getAll() { 30 | return this.cityService.getAll(); 31 | } 32 | 33 | @PostMapping("/add") 34 | public Result add(@RequestBody City city) { 35 | return this.cityService.add(city); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/ResumeLink.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotNull; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name="resume_links") 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | public class ResumeLink { 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | @Column(name="id") 28 | private int id; 29 | 30 | @NotNull 31 | @JoinColumn(name = "resume_id") 32 | @ManyToOne 33 | private Resume resume; 34 | 35 | @NotNull 36 | @Column(name="link_name") 37 | private String linkName; 38 | 39 | @NotNull 40 | @Column(name="link_url") 41 | private String linkUrl; 42 | 43 | @NotNull 44 | @Column(name="is_active") 45 | private boolean isActive; 46 | 47 | @NotNull 48 | @Column(name="created_date") 49 | private LocalDate createdDate = LocalDate.now(); 50 | } 51 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/core/adapters/CloudinaryServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.core.adapters; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 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.adapters.verification.image.ImageService; 13 | import kodlamaio.HRMS.core.utilities.results.DataResult; 14 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 15 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 16 | 17 | @Service 18 | public class CloudinaryServiceAdapter implements ImageService { 19 | 20 | private Cloudinary cloudinary; 21 | 22 | @Autowired 23 | public CloudinaryServiceAdapter(Cloudinary cloudinary) { 24 | this.cloudinary = cloudinary; 25 | } 26 | 27 | @Override 28 | public DataResult uploadPhoto(MultipartFile file) { 29 | try { 30 | Map uploadResult = cloudinary.uploader().upload(file.getBytes(), ObjectUtils.emptyMap()); 31 | return new SuccesDataResult(uploadResult); 32 | } 33 | catch (IOException e) { 34 | e.printStackTrace(); 35 | } 36 | return new ErrorDataResult("Cannot added!"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/Language.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.entities.concretes; 2 | import java.time.LocalDate; 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 | import javax.validation.constraints.NotNull; 13 | import javax.validation.constraints.Size; 14 | 15 | import com.fasterxml.jackson.annotation.JsonIgnore; 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 | public class Language { 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name="id") 30 | private int id; 31 | 32 | @NotNull 33 | @Size(max = 50) 34 | @Column(name="language_name") 35 | private String languageName; 36 | 37 | @NotNull 38 | @Column(name="is_active") 39 | private boolean isActive; 40 | 41 | @NotNull 42 | @Column(name="created_date") 43 | private LocalDate createdDate = LocalDate.now(); 44 | 45 | 46 | @JsonIgnore() 47 | @OneToMany(mappedBy = "language") 48 | private List resumeLanguage; 49 | } 50 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/JobPosition.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 | 8 | import javax.persistence.Entity; 9 | import javax.persistence.GeneratedValue; 10 | import javax.persistence.GenerationType; 11 | import javax.persistence.Id; 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.EqualsAndHashCode; 20 | import lombok.NoArgsConstructor; 21 | @Data 22 | @Entity 23 | @Table(name="job_positions") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @EqualsAndHashCode 27 | @JsonIgnoreProperties({"hibernateLazyInitializer", "handler", "jobPostings"}) 28 | public class JobPosition { 29 | 30 | @Id 31 | @GeneratedValue(strategy = GenerationType.IDENTITY) 32 | @Column(name="id") 33 | private int id; 34 | 35 | @Column(name="name") 36 | private String titleName; 37 | 38 | @Column(name="description") 39 | private String description; 40 | 41 | @Column(name="created_date") 42 | private LocalDate createdDate; 43 | 44 | @Column(name="is_active") 45 | private Boolean isActive; 46 | 47 | @OneToMany(mappedBy="jobPosition") 48 | private List jobPostings; 49 | 50 | } 51 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/AuthController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RequestBody; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import kodlamaio.HRMS.business.abstracts.AuthService; 10 | import kodlamaio.HRMS.core.utilities.results.Result; 11 | import kodlamaio.HRMS.entities.concretes.Candidate; 12 | import kodlamaio.HRMS.entities.concretes.Employer; 13 | 14 | @RestController 15 | @RequestMapping("/api/addedoperations") 16 | public class AuthController { 17 | 18 | private AuthService authService; 19 | 20 | @Autowired 21 | public AuthController(AuthService authService) { 22 | super(); 23 | this.authService = authService; 24 | } 25 | 26 | @PostMapping("/registerforemployer") 27 | public Result registerForEmployer(@RequestBody Employer employer, String passwordRepeat) { 28 | return authService.registerForEmployer(employer, passwordRepeat); 29 | } 30 | 31 | @PostMapping("/registerforcandidate") 32 | public Result registerForCandidate(@RequestBody Candidate candidate, String passwordRepeat) { 33 | return authService.registerForCandidate(candidate, passwordRepeat); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/ResumeCoverLetter.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotNull; 14 | import javax.validation.constraints.Size; 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name="resume_cover_letters") 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | public class ResumeCoverLetter { 25 | @Id 26 | @GeneratedValue(strategy = GenerationType.IDENTITY) 27 | @Column(name="id") 28 | private int id; 29 | 30 | @NotNull 31 | @JoinColumn(name = "resume_id") 32 | @ManyToOne 33 | private Resume resume; 34 | 35 | @NotNull 36 | @Size(max = 50) 37 | @Column(name="title") 38 | private String title; 39 | 40 | @NotNull 41 | @Size(max = 250) 42 | @Column(name="cover_letter") 43 | private String coverLetter; 44 | 45 | @NotNull 46 | @Column(name="is_active") 47 | private boolean isActive; 48 | 49 | @NotNull 50 | @Column(name="created_date") 51 | private LocalDate createdDate = LocalDate.now(); 52 | } 53 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/ResumeLanguage.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotNull; 14 | 15 | import org.hibernate.validator.constraints.Range; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name="resume_languages") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class ResumeLanguage { 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name="id") 30 | private int id; 31 | 32 | @NotNull 33 | @JoinColumn(name = "resume_id") 34 | @ManyToOne 35 | private Resume resume; 36 | 37 | @NotNull 38 | @JoinColumn(name = "language_id") 39 | @ManyToOne 40 | private Language language; 41 | 42 | @NotNull 43 | @Range(min = 1, max = 6) 44 | @Column(name="level") 45 | private int level; 46 | 47 | @NotNull 48 | @Column(name="is_active") 49 | private boolean isActive; 50 | 51 | @NotNull 52 | @Column(name="created_date") 53 | private LocalDate createdDate = LocalDate.now(); 54 | } 55 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/JobPositionManager.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.JobPositionService; 9 | import kodlamaio.HRMS.core.utilities.results.DataResult; 10 | import kodlamaio.HRMS.core.utilities.results.Result; 11 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 13 | import kodlamaio.HRMS.dataAccess.abstracts.JobTitleDao; 14 | import kodlamaio.HRMS.entities.concretes.JobPosition; 15 | 16 | @Service 17 | public class JobPositionManager implements JobPositionService { 18 | 19 | private JobTitleDao jobTitleDao; 20 | 21 | @Autowired 22 | public JobPositionManager(JobTitleDao jobTitleDao) { 23 | super(); 24 | this.jobTitleDao = jobTitleDao; 25 | } 26 | 27 | @Override 28 | public DataResult> getAll() { 29 | return new SuccesDataResult>(this.jobTitleDao.findAll()); 30 | } 31 | 32 | @Override 33 | public DataResult getByTitleName(String titleName) { 34 | 35 | return new SuccesDataResult(this.jobTitleDao.findByTitleName(titleName)); 36 | } 37 | 38 | @Override 39 | public Result add(JobPosition jobPosition) { 40 | this.jobTitleDao.save(jobPosition); 41 | return new SuccessResult("İşçi pozisyonu başarıyla eklendi"); 42 | } 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/JobPosting.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | 14 | import lombok.AllArgsConstructor; 15 | import lombok.Data; 16 | import lombok.NoArgsConstructor; 17 | 18 | @Data 19 | @Entity 20 | @Table(name="job_postings") 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | public class JobPosting { 24 | @Id 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) 26 | @Column(name="id") 27 | private int id; 28 | 29 | @Column(name="description") 30 | private String description; 31 | 32 | @Column(name = "min_salary") 33 | private int minSalary; 34 | 35 | @Column(name = "max_salary") 36 | private int maxSalary; 37 | 38 | @Column(name = "open_positions_count") 39 | private int openPositionsCount; 40 | 41 | @Column(name = "application_deadline") 42 | private LocalDate applicationDeadline; 43 | 44 | @Column(name = "created_date") 45 | private LocalDate createdDate; 46 | 47 | @Column(name = "is_active") 48 | private boolean isActive; 49 | 50 | 51 | @ManyToOne 52 | @JoinColumn(name="employer_id") 53 | private Employer employer; 54 | 55 | @ManyToOne 56 | @JoinColumn(name="job_position_id") 57 | private JobPosition jobPosition; 58 | 59 | @ManyToOne 60 | @JoinColumn(name="city_id") 61 | private City city; 62 | 63 | } 64 | -------------------------------------------------------------------------------- /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.Result; 11 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 13 | import kodlamaio.HRMS.dataAccess.abstracts.CityDao; 14 | import kodlamaio.HRMS.entities.concretes.City; 15 | 16 | @Service 17 | public class CityManager implements CityService { 18 | 19 | private CityDao cityDao; 20 | 21 | @Autowired 22 | public CityManager(CityDao cityDao) { 23 | super(); 24 | this.cityDao = cityDao; 25 | } 26 | 27 | @Override 28 | public DataResult> getAll() { 29 | return new SuccesDataResult>(this.cityDao.findAll(), "Şehirler listelendi"); 30 | } 31 | 32 | @Override 33 | public DataResult getById(int id) { 34 | return new SuccesDataResult(this.cityDao.getById(id)); 35 | } 36 | 37 | @Override 38 | public Result add(City city) { 39 | this.cityDao.save(city); 40 | return new SuccessResult("Şehir başarıyla eklendi"); 41 | } 42 | 43 | @Override 44 | public Result update(City city) { 45 | this.cityDao.save(city); 46 | return new SuccessResult("Şehir başarıyla güncellendi"); 47 | } 48 | 49 | @Override 50 | public Result delete(City city) { 51 | this.cityDao.delete(city); 52 | return new SuccessResult("Şehir başarıyla silindi"); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /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.Result; 11 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 13 | import kodlamaio.HRMS.dataAccess.abstracts.LanguageDao; 14 | import kodlamaio.HRMS.entities.concretes.Language; 15 | 16 | @Service 17 | public class LanguageManager implements LanguageService{ 18 | 19 | 20 | private LanguageDao languageDao; 21 | 22 | 23 | @Autowired 24 | public LanguageManager(LanguageDao languageDao) { 25 | super(); 26 | this.languageDao = languageDao; 27 | } 28 | 29 | @Override 30 | public DataResult> getAll() { 31 | 32 | return new SuccesDataResult>(this.languageDao.findAll(), "Diller listelendi"); 33 | } 34 | 35 | @Override 36 | public DataResult getById(int id) { 37 | return new SuccesDataResult(this.languageDao.getById(id),"Id sine sahip dil getirildi"); 38 | } 39 | 40 | @Override 41 | public Result add(Language language) { 42 | language.setActive(true); 43 | this.languageDao.save(language); 44 | return new SuccessResult("Dil başarıyla eklendi"); 45 | } 46 | 47 | @Override 48 | public Result update(Language language) { 49 | this.languageDao.save(language); 50 | return new SuccessResult("Dil başarıyla güncellendi"); 51 | } 52 | 53 | @Override 54 | public Result delete(Language language) { 55 | this.languageDao.delete(language); 56 | return new SuccessResult("Dil başarıyla silindi"); 57 | } 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/ResumeEducation.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotNull; 14 | import javax.validation.constraints.PastOrPresent; 15 | import javax.validation.constraints.Size; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name="resume_educations") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class ResumeEducation { 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name="id") 30 | private int id; 31 | 32 | @JoinColumn(name = "resume_id") 33 | @ManyToOne 34 | private Resume resume; 35 | 36 | @NotNull 37 | @Size(max = 150) 38 | @Column(name="school_name") 39 | private String schoolName; 40 | 41 | @NotNull 42 | @Size(max = 150) 43 | @Column(name="department_name") 44 | private String departmentName; 45 | 46 | @NotNull 47 | @PastOrPresent 48 | @Column(name="start_date") 49 | private LocalDate startDate; 50 | 51 | @PastOrPresent 52 | @Column(name="graduation_date") 53 | private LocalDate graduationDate; 54 | 55 | @NotNull 56 | @Column(name="is_active") 57 | private boolean isActive; 58 | 59 | @NotNull 60 | @Column(name="created_date") 61 | private LocalDate createdDate = LocalDate.now(); 62 | 63 | public String getGraduationDate() { 64 | if (this.graduationDate == null) { 65 | return "Devam ediyor"; 66 | } 67 | return this.graduationDate.toString(); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/LanguageController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | import java.util.List; 3 | 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestParam; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import kodlamaio.HRMS.business.abstracts.LanguageService; 13 | import kodlamaio.HRMS.core.utilities.results.DataResult; 14 | import kodlamaio.HRMS.core.utilities.results.Result; 15 | import kodlamaio.HRMS.entities.concretes.Language; 16 | 17 | @RestController 18 | @RequestMapping("/api/languages") 19 | public class LanguageController { 20 | 21 | private LanguageService languageService; 22 | 23 | @Autowired 24 | public LanguageController(LanguageService languageService) { 25 | super(); 26 | this.languageService = languageService; 27 | } 28 | 29 | @GetMapping("/getAll") 30 | public DataResult> getAll() 31 | { 32 | return this.languageService.getAll(); 33 | } 34 | 35 | @GetMapping("/getById") 36 | public DataResult getById(@RequestParam int id) 37 | { 38 | return this.languageService.getById(id); 39 | } 40 | 41 | @PostMapping("/add") 42 | public Result add(@RequestBody Language language){ 43 | return this.languageService.add(language); 44 | } 45 | 46 | @PostMapping("/update") 47 | public Result update(@RequestBody Language language){ 48 | return this.languageService.update(language); 49 | } 50 | 51 | @PostMapping("/delete") 52 | public Result delete(@RequestBody Language language){ 53 | return this.languageService.delete(language); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/ResumeJobExperience.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.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | import javax.validation.constraints.NotNull; 14 | import javax.validation.constraints.PastOrPresent; 15 | import javax.validation.constraints.Size; 16 | 17 | import lombok.AllArgsConstructor; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @Entity 23 | @Table(name="resume_job_experiences") 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class ResumeJobExperience { //deneyim 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name="id") 31 | private int id; 32 | 33 | @NotNull 34 | @JoinColumn(name = "resume_id") 35 | @ManyToOne 36 | private Resume resume; 37 | 38 | @NotNull 39 | @JoinColumn(name = "job_positions_id") 40 | @ManyToOne 41 | private JobPosition jobPosition; 42 | 43 | @NotNull 44 | @Size(max = 150) 45 | @Column(name="company_name") 46 | private String companyName; 47 | 48 | @NotNull 49 | @PastOrPresent 50 | @Column(name="start_date") 51 | private LocalDate startDate; 52 | 53 | @PastOrPresent 54 | @Column(name="finish_date") 55 | private LocalDate finishDate; 56 | 57 | @NotNull 58 | @Column(name="is_active") 59 | private boolean isActive; 60 | 61 | @NotNull 62 | @Column(name="created_date") 63 | private LocalDate createdDate = LocalDate.now(); 64 | 65 | public String getFinishDate() { 66 | if (this.finishDate == null) { 67 | return "Devam ediyor"; 68 | } 69 | return this.finishDate.toString(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/entities/concretes/Resume.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 | import javax.validation.constraints.NotNull; 16 | 17 | import com.fasterxml.jackson.annotation.JsonIgnore; 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | 20 | import lombok.AllArgsConstructor; 21 | import lombok.Data; 22 | import lombok.NoArgsConstructor; 23 | 24 | @Data 25 | @Entity 26 | @Table(name="resumes") 27 | @AllArgsConstructor 28 | @NoArgsConstructor 29 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","resumeEducations","resumeJobExperiences", "resumeLanguages","resumeCoverLetters","resumeLinks","resumeSkills"}) 30 | public class Resume { 31 | @Id 32 | @GeneratedValue(strategy = GenerationType.IDENTITY) 33 | @Column(name="id") 34 | private int id; 35 | 36 | 37 | @ManyToOne 38 | @JoinColumn(name = "candidate_id") 39 | private Candidate candidate; 40 | 41 | @Column(name="image") 42 | private String image; 43 | 44 | @NotNull 45 | @Column(name="is_active") 46 | private boolean isActive; 47 | 48 | @NotNull 49 | @Column(name="created_date") 50 | private LocalDate createdDate = LocalDate.now(); 51 | 52 | @JsonIgnore 53 | @OneToMany(mappedBy = "resume") 54 | private List resumeEducations; 55 | 56 | @JsonIgnore 57 | @OneToMany(mappedBy = "resume") 58 | private List resumeJobExperiences; 59 | 60 | @JsonIgnore 61 | @OneToMany(mappedBy = "resume") 62 | private List resumeLanguages; 63 | 64 | @JsonIgnore 65 | @OneToMany(mappedBy = "resume") 66 | private List resumeCoverLetters; 67 | 68 | @JsonIgnore 69 | @OneToMany(mappedBy = "resume") 70 | private List resumeLinks; 71 | 72 | @JsonIgnore 73 | @OneToMany(mappedBy = "resume") 74 | private List resumeSkills; 75 | } 76 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeSkillManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.HRMS.business.abstracts.ResumeSkillService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.Result; 13 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 14 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 15 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeSkillDao; 16 | import kodlamaio.HRMS.entities.concretes.ResumeSkill; 17 | 18 | @Service 19 | public class ResumeSkillManager implements ResumeSkillService { 20 | 21 | private ResumeSkillDao resumeSkillDao; 22 | 23 | @Autowired 24 | public ResumeSkillManager(ResumeSkillDao resumeSkillDao) { 25 | super(); 26 | this.resumeSkillDao = resumeSkillDao; 27 | } 28 | 29 | @Override 30 | public DataResult> getAll() { 31 | return new SuccesDataResult>(this.resumeSkillDao.findAll()); 32 | } 33 | 34 | @Override 35 | public DataResult getById(int id) { 36 | Optional resumeSkill = this.resumeSkillDao.findById(id); 37 | 38 | if (Optional.empty() != null) { 39 | return new ErrorDataResult("CV Beceri bulunamadı"); 40 | } 41 | return new SuccesDataResult(resumeSkill.get()); 42 | } 43 | 44 | @Override 45 | public DataResult> getAllByResume_Id(int resumeId) { 46 | return new SuccesDataResult>(this.resumeSkillDao.getAllByResume_Id(resumeId)); 47 | } 48 | 49 | @Override 50 | public Result add(ResumeSkill resumeSkill) { 51 | this.resumeSkillDao.save(resumeSkill); 52 | return new SuccessResult("CV Beceri Eklendi."); 53 | } 54 | 55 | @Override 56 | public Result update(ResumeSkill resumeSkill) { 57 | this.resumeSkillDao.save(resumeSkill); 58 | return new SuccessResult("CV Beceri Güncellendi."); 59 | } 60 | 61 | @Override 62 | public Result delete(ResumeSkill resumeSkill) { 63 | this.resumeSkillDao.delete(resumeSkill); 64 | return new SuccessResult("CV Beceri Silindi."); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeLinkController.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.http.ResponseEntity; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import kodlamaio.HRMS.business.abstracts.ResumeLinkService; 15 | import kodlamaio.HRMS.core.utilities.results.DataResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.entities.concretes.ResumeLink; 18 | 19 | @RestController 20 | @RequestMapping("/api/resumeLinks") 21 | public class ResumeLinkController { 22 | private ResumeLinkService resumeLinkService; 23 | 24 | @Autowired 25 | public ResumeLinkController(ResumeLinkService resumeLinkService) { 26 | super(); 27 | this.resumeLinkService = resumeLinkService; 28 | } 29 | 30 | @GetMapping("/getall") 31 | public ResponseEntity>> getAll() { 32 | return ResponseEntity.ok(this.resumeLinkService.getAll()); 33 | } 34 | 35 | @GetMapping("/getById") 36 | public ResponseEntity> getById(@RequestParam int id) { 37 | return ResponseEntity.ok(this.resumeLinkService.getById(id)); 38 | } 39 | 40 | @GetMapping("/getAllByResume_Id") 41 | public ResponseEntity>> getAllByResume_Id(@RequestParam int resumeId) { 42 | return ResponseEntity.ok(this.resumeLinkService.getAllByResume_Id(resumeId)); 43 | } 44 | 45 | @PostMapping("/add") 46 | public ResponseEntity add(@RequestBody ResumeLink resumeLink) { 47 | return ResponseEntity.ok(this.resumeLinkService.add(resumeLink)); 48 | } 49 | 50 | @PostMapping("/update") 51 | public ResponseEntity update(@RequestBody ResumeLink resumeLink) { 52 | return ResponseEntity.ok(this.resumeLinkService.update(resumeLink)); 53 | } 54 | 55 | @PostMapping("/delete") 56 | public ResponseEntity delete(@RequestBody ResumeLink resumeLink) { 57 | return ResponseEntity.ok(this.resumeLinkService.delete(resumeLink)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeLinkManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.HRMS.business.abstracts.ResumeLinkService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.Result; 13 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 14 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 15 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeLinkDao; 16 | import kodlamaio.HRMS.entities.concretes.ResumeLink; 17 | 18 | @Service 19 | public class ResumeLinkManager implements ResumeLinkService { 20 | private ResumeLinkDao resumeLinkDao; 21 | 22 | @Autowired 23 | public ResumeLinkManager(ResumeLinkDao resumeLinkDao) { 24 | super(); 25 | this.resumeLinkDao = resumeLinkDao; 26 | } 27 | 28 | @Override 29 | public DataResult> getAll() { 30 | return new SuccesDataResult>(this.resumeLinkDao.findAll()); 31 | } 32 | 33 | @Override 34 | public DataResult getById(int id) { 35 | Optional resumeLink = this.resumeLinkDao.findById(id); 36 | 37 | if (Optional.empty() != null) { 38 | return new ErrorDataResult("CV Link bulunamadı"); 39 | } 40 | return new SuccesDataResult(resumeLink.get()); 41 | } 42 | 43 | @Override 44 | public DataResult> getAllByResume_Id(int resumeId) { 45 | return new SuccesDataResult>(this.resumeLinkDao.getAllByResume_Id(resumeId)); 46 | } 47 | 48 | @Override 49 | public Result add(ResumeLink resumeLink) { 50 | this.resumeLinkDao.save(resumeLink); 51 | System.out.println("resumeLink add ->" + resumeLink); 52 | return new SuccessResult("CV Link Eklendi."); 53 | } 54 | 55 | @Override 56 | public Result update(ResumeLink resumeLink) { 57 | this.resumeLinkDao.save(resumeLink); 58 | System.out.println("resumeLink update ->" + resumeLink); 59 | return new SuccessResult("CV Link Güncellendi."); 60 | } 61 | 62 | @Override 63 | public Result delete(ResumeLink resumeLink) { 64 | this.resumeLinkDao.delete(resumeLink); 65 | return new SuccessResult("CV Link Silindi."); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeSkillController.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.http.ResponseEntity; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import kodlamaio.HRMS.business.abstracts.ResumeSkillService; 15 | import kodlamaio.HRMS.core.utilities.results.DataResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.entities.concretes.ResumeSkill; 18 | 19 | @RestController 20 | @RequestMapping("/api/resumeSkills") 21 | public class ResumeSkillController { 22 | 23 | private ResumeSkillService resumeSkillService; 24 | 25 | @Autowired 26 | public ResumeSkillController(ResumeSkillService resumeSkillService) { 27 | super(); 28 | this.resumeSkillService = resumeSkillService; 29 | } 30 | 31 | @GetMapping("/getall") 32 | public ResponseEntity>> getAll() { 33 | return ResponseEntity.ok(this.resumeSkillService.getAll()); 34 | } 35 | 36 | @GetMapping("/getById") 37 | public ResponseEntity> getById(@RequestParam int id) { 38 | return ResponseEntity.ok(this.resumeSkillService.getById(id)); 39 | } 40 | 41 | @GetMapping("/getAllByResume_Id") 42 | public ResponseEntity>> getAllByResume_Id(@RequestParam int resumeId) { 43 | return ResponseEntity.ok(this.resumeSkillService.getAllByResume_Id(resumeId)); 44 | } 45 | 46 | @PostMapping("/add") 47 | public ResponseEntity add(@RequestBody ResumeSkill resumeSkill) { 48 | return ResponseEntity.ok(this.resumeSkillService.add(resumeSkill)); 49 | } 50 | 51 | @PostMapping("/update") 52 | public ResponseEntity update(@RequestBody ResumeSkill resumeSkill) { 53 | return ResponseEntity.ok(this.resumeSkillService.update(resumeSkill)); 54 | } 55 | 56 | @PostMapping("/delete") 57 | public ResponseEntity delete(@RequestBody ResumeSkill resumeSkill) { 58 | return ResponseEntity.ok(this.resumeSkillService.delete(resumeSkill)); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/JobPostingController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | import kodlamaio.HRMS.business.abstracts.JobPostingService; 14 | import kodlamaio.HRMS.core.utilities.results.DataResult; 15 | import kodlamaio.HRMS.core.utilities.results.Result; 16 | import kodlamaio.HRMS.entities.concretes.JobPosting; 17 | 18 | @RestController 19 | @RequestMapping("/api/jobpostings") 20 | public class JobPostingController { 21 | 22 | private JobPostingService jobPostingService; 23 | 24 | @Autowired 25 | public JobPostingController(JobPostingService jobPostingService) { 26 | super(); 27 | this.jobPostingService = jobPostingService; 28 | } 29 | 30 | @PostMapping("/add") 31 | public Result add(@RequestBody JobPosting jobPosting) { 32 | return jobPostingService.add(jobPosting); 33 | } 34 | 35 | @PostMapping("/update") 36 | public Result update(@RequestBody JobPosting jobPosting) { 37 | return jobPostingService.update(jobPosting); 38 | } 39 | 40 | @GetMapping("/getAllActiveJobPosting") 41 | public DataResult> getAllActiveJobAdvert(){ 42 | return jobPostingService.getAllActiveJobPosting(); 43 | } 44 | 45 | @GetMapping("/getAllByCreationDateAsc") 46 | public DataResult> getAllByCreationDateAsc(){ 47 | return jobPostingService.getAllByCreationDateAsc(); 48 | } 49 | 50 | @GetMapping("/getByIsActiveTrueAndEmployer_CompanyName") 51 | public DataResult> getByIsActiveTrueAndEmployer_CompanyName( String companyName){ 52 | return this.jobPostingService.getAllActiveJobPostingByCompanyName(companyName); 53 | } 54 | 55 | @PostMapping("/closeJobPosting") 56 | public Result closeJobAdvert(@RequestParam("id") int id) { 57 | return jobPostingService.closeJobPosting(id); 58 | } 59 | 60 | @PostMapping("/openJobPosting") 61 | public Result openJobAdvert(@RequestParam("id") int id) { 62 | return jobPostingService.openJobPosting(id); 63 | } 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeLanguageController.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.http.ResponseEntity; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import kodlamaio.HRMS.business.abstracts.ResumeLanguageService; 15 | import kodlamaio.HRMS.core.utilities.results.DataResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.entities.concretes.ResumeLanguage; 18 | 19 | @RestController 20 | @RequestMapping("/api/resumeLanguages") 21 | public class ResumeLanguageController { 22 | private ResumeLanguageService resumeLanguageService; 23 | 24 | @Autowired 25 | public ResumeLanguageController(ResumeLanguageService resumeLanguageService) { 26 | super(); 27 | this.resumeLanguageService = resumeLanguageService; 28 | } 29 | 30 | @GetMapping("/getall") 31 | public ResponseEntity>> getAll() { 32 | return ResponseEntity.ok(this.resumeLanguageService.getAll()); 33 | } 34 | 35 | @GetMapping("/getById") 36 | public ResponseEntity> getById(@RequestParam int id) { 37 | return ResponseEntity.ok(this.resumeLanguageService.getById(id)); 38 | } 39 | 40 | @GetMapping("/getAllByResume_Id") 41 | public ResponseEntity>> getAllByResume_Id(@RequestParam int resumeId) { 42 | return ResponseEntity.ok(this.resumeLanguageService.getAllByResume_Id(resumeId)); 43 | } 44 | 45 | @PostMapping("/add") 46 | public ResponseEntity add(@RequestBody ResumeLanguage resumeLanguage) { 47 | return ResponseEntity.ok(this.resumeLanguageService.add(resumeLanguage)); 48 | } 49 | 50 | @PostMapping("/update") 51 | public ResponseEntity update(@RequestBody ResumeLanguage resumeLanguage) { 52 | return ResponseEntity.ok(this.resumeLanguageService.update(resumeLanguage)); 53 | } 54 | 55 | @PostMapping("/delete") 56 | public ResponseEntity delete(@RequestBody ResumeLanguage resumeLanguage) { 57 | return ResponseEntity.ok(this.resumeLanguageService.delete(resumeLanguage)); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeController.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.http.ResponseEntity; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | import org.springframework.web.multipart.MultipartFile; 14 | 15 | import kodlamaio.HRMS.business.abstracts.ResumeService; 16 | import kodlamaio.HRMS.core.utilities.results.DataResult; 17 | import kodlamaio.HRMS.core.utilities.results.Result; 18 | import kodlamaio.HRMS.entities.concretes.Resume; 19 | 20 | @RestController 21 | @RequestMapping("/api/resumes") 22 | public class ResumeController { 23 | 24 | private ResumeService resumeService; 25 | 26 | @Autowired 27 | public ResumeController(ResumeService resumeService) { 28 | super(); 29 | this.resumeService = resumeService; 30 | } 31 | 32 | @GetMapping("/getall") 33 | public ResponseEntity>> getAll() { 34 | return ResponseEntity.ok(this.resumeService.getAll()); 35 | } 36 | 37 | @GetMapping("/getById") 38 | public ResponseEntity> getById(@RequestParam int id) { 39 | return ResponseEntity.ok(this.resumeService.getById(id)); 40 | } 41 | 42 | @GetMapping("/getByCandidate_id") 43 | public ResponseEntity>> getByCandidate_id(@RequestParam int candidateId) { 44 | return ResponseEntity.ok(this.resumeService.getByCandidate_id(candidateId)); 45 | } 46 | 47 | @PostMapping("/uploadPhoto") 48 | public Result uploadImage(@RequestParam int candidateId, @RequestBody MultipartFile file) { 49 | return this.resumeService.uploadPhoto(candidateId, file); 50 | } 51 | 52 | @PostMapping("/add") 53 | public ResponseEntity add(@RequestBody Resume resume) { 54 | return ResponseEntity.ok(this.resumeService.add(resume)); 55 | } 56 | 57 | @PostMapping("/update") 58 | public ResponseEntity update(@RequestBody Resume resume) { 59 | return ResponseEntity.ok(this.resumeService.update(resume)); 60 | } 61 | 62 | @PostMapping("/delete") 63 | public ResponseEntity delete(@RequestBody Resume resume) { 64 | return ResponseEntity.ok(this.resumeService.delete(resume)); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeCoverLetterManager.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 | import java.util.Optional; 8 | import kodlamaio.HRMS.business.abstracts.ResumeCoverLetterService; 9 | import kodlamaio.HRMS.core.utilities.results.DataResult; 10 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 11 | import kodlamaio.HRMS.core.utilities.results.Result; 12 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 13 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 14 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeCoverLetterDao; 15 | import kodlamaio.HRMS.entities.concretes.ResumeCoverLetter; 16 | 17 | @Service 18 | public class ResumeCoverLetterManager implements ResumeCoverLetterService { 19 | 20 | private ResumeCoverLetterDao resumeCoverLetterDao; 21 | 22 | @Autowired 23 | public ResumeCoverLetterManager(ResumeCoverLetterDao resumeCoverLetterDao) { 24 | super(); 25 | this.resumeCoverLetterDao = resumeCoverLetterDao; 26 | } 27 | 28 | @Override 29 | public DataResult> getAll() { 30 | return new SuccesDataResult>(this.resumeCoverLetterDao.findAll()); 31 | } 32 | 33 | @Override 34 | public DataResult getById(int id) { 35 | Optional resumeCoverLetter = this.resumeCoverLetterDao.findById(id); 36 | 37 | if (Optional.empty() != null) { 38 | return new SuccesDataResult(resumeCoverLetter.get()); 39 | 40 | } 41 | return new ErrorDataResult("CV Ön Yazı bulunamadı"); 42 | } 43 | 44 | @Override 45 | public DataResult> getAllByResume_Id(int resumeId) { 46 | return new SuccesDataResult>(this.resumeCoverLetterDao.getAllByResume_Id(resumeId)); 47 | } 48 | 49 | @Override 50 | public Result add(ResumeCoverLetter resumeCoverLetter) { 51 | this.resumeCoverLetterDao.save(resumeCoverLetter); 52 | return new SuccessResult("CV Ön Yazı Eklendi."); 53 | } 54 | 55 | @Override 56 | public Result update(ResumeCoverLetter resumeCoverLetter) { 57 | this.resumeCoverLetterDao.save(resumeCoverLetter); 58 | return new SuccessResult("CV Ön Yazı Güncellendi."); 59 | } 60 | 61 | @Override 62 | public Result delete(ResumeCoverLetter resumeCoverLetter) { 63 | this.resumeCoverLetterDao.delete(resumeCoverLetter); 64 | return new SuccessResult("CV Ön Yazı Silindi."); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeCoverLetterController.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.http.ResponseEntity; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import kodlamaio.HRMS.business.abstracts.ResumeCoverLetterService; 15 | import kodlamaio.HRMS.core.utilities.results.DataResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.entities.concretes.ResumeCoverLetter; 18 | 19 | @RestController 20 | @RequestMapping("/api/resumeCoverLetters") 21 | public class ResumeCoverLetterController { 22 | private ResumeCoverLetterService resumeCoverLetterService; 23 | 24 | @Autowired 25 | public ResumeCoverLetterController(ResumeCoverLetterService resumeCoverLetterService) { 26 | super(); 27 | this.resumeCoverLetterService = resumeCoverLetterService; 28 | } 29 | 30 | @GetMapping("/getall") 31 | public ResponseEntity>> getAll() { 32 | return ResponseEntity.ok(this.resumeCoverLetterService.getAll()); 33 | } 34 | 35 | @GetMapping("/getById") 36 | public ResponseEntity> getById(@RequestParam int id) { 37 | return ResponseEntity.ok(this.resumeCoverLetterService.getById(id)); 38 | } 39 | 40 | @GetMapping("/getAllByResume_Id") 41 | public ResponseEntity>> getAllByResume_Id(@RequestParam int resumeId) { 42 | return ResponseEntity.ok(this.resumeCoverLetterService.getAllByResume_Id(resumeId)); 43 | } 44 | 45 | @PostMapping("/add") 46 | public ResponseEntity add(@RequestBody ResumeCoverLetter resumeCoverLetter) { 47 | return ResponseEntity.ok(this.resumeCoverLetterService.add(resumeCoverLetter)); 48 | } 49 | 50 | @PostMapping("/update") 51 | public ResponseEntity update(@RequestBody ResumeCoverLetter resumeCoverLetter) { 52 | return ResponseEntity.ok(this.resumeCoverLetterService.update(resumeCoverLetter)); 53 | } 54 | 55 | @PostMapping("/delete") 56 | public ResponseEntity delete(@RequestBody ResumeCoverLetter resumeCoverLetter) { 57 | return ResponseEntity.ok(this.resumeCoverLetterService.delete(resumeCoverLetter)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeLanguageManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.HRMS.business.abstracts.ResumeLanguageService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.Result; 13 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 14 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 15 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeLanguageDao; 16 | import kodlamaio.HRMS.entities.concretes.ResumeLanguage; 17 | 18 | @Service 19 | public class ResumeLanguageManager implements ResumeLanguageService { 20 | 21 | private ResumeLanguageDao resumeLanguageDao; 22 | 23 | @Autowired 24 | public ResumeLanguageManager(ResumeLanguageDao resumeLanguageDao) { 25 | super(); 26 | this.resumeLanguageDao = resumeLanguageDao; 27 | } 28 | 29 | @Override 30 | public DataResult> getAll() { 31 | return new SuccesDataResult>(this.resumeLanguageDao.findAll()); 32 | } 33 | 34 | @Override 35 | public DataResult getById(int id) { 36 | Optional resumeLanguage = this.resumeLanguageDao.findById(id); 37 | 38 | if (Optional.empty() != null) { 39 | 40 | return new ErrorDataResult("CV Dil Bilgisi bulunamadı"); 41 | 42 | } 43 | return new SuccesDataResult(resumeLanguage.get()); 44 | 45 | } 46 | 47 | @Override 48 | public DataResult> getAllByResume_Id(int resumeId) { 49 | return new SuccesDataResult>(this.resumeLanguageDao.getAllByResume_Id(resumeId)); 50 | } 51 | 52 | @Override 53 | public Result add(ResumeLanguage resumeLanguage) { 54 | this.resumeLanguageDao.save(resumeLanguage); 55 | System.out.println("resumeLanguage add ->" + resumeLanguage); 56 | return new SuccessResult("CV Dil Bilgisi Eklendi."); 57 | } 58 | 59 | @Override 60 | public Result update(ResumeLanguage resumeLanguage) { 61 | this.resumeLanguageDao.save(resumeLanguage); 62 | System.out.println("resumeLanguage update ->" + resumeLanguage); 63 | return new SuccessResult("CV Dil Bilgisi Güncellendi."); 64 | } 65 | 66 | @Override 67 | public Result delete(ResumeLanguage resumeLanguage) { 68 | this.resumeLanguageDao.delete(resumeLanguage); 69 | return new SuccessResult("CV Dil Bilgisi Silindi."); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/AuthManager.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.AuthService; 7 | import kodlamaio.HRMS.business.abstracts.CandidateService; 8 | import kodlamaio.HRMS.business.abstracts.EmployerService; 9 | import kodlamaio.HRMS.core.utilities.adapters.verification.mail.ValidationService; 10 | import kodlamaio.HRMS.core.utilities.results.ErrorResult; 11 | import kodlamaio.HRMS.core.utilities.results.Result; 12 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 13 | import kodlamaio.HRMS.entities.concretes.Candidate; 14 | import kodlamaio.HRMS.entities.concretes.Employer; 15 | import lombok.var; 16 | 17 | @Service("AuthManager") 18 | public class AuthManager implements AuthService { 19 | 20 | private CandidateService candidateService; 21 | private EmployerService employerService; 22 | private ValidationService validationService; 23 | 24 | @Autowired 25 | public AuthManager(CandidateService candidateService, EmployerService employerService, 26 | ValidationService validationService) { 27 | super(); 28 | this.candidateService = candidateService; 29 | this.employerService = employerService; 30 | this.validationService = validationService; 31 | } 32 | 33 | @Override 34 | public Result registerForCandidate(Candidate candidate, String passwordRepeat) { 35 | if (!checkPasswordRepeat(candidate.getPassword(), passwordRepeat)) { 36 | return new ErrorResult("Şifreler eşleşmiyor"); 37 | } 38 | 39 | var result = this.candidateService.add(candidate); 40 | 41 | if (result.isSucces()) { 42 | if (validationService(candidate.getEmail())) { 43 | return new SuccessResult("Aday kaydoldu"); 44 | } 45 | } 46 | 47 | return new ErrorResult(result.getMessage()); 48 | } 49 | 50 | @Override 51 | public Result registerForEmployer(Employer employer, String passwordRepeat) { 52 | if (!checkPasswordRepeat(employer.getPassword(), passwordRepeat)) { 53 | return new ErrorResult("Şifreler Eşleşmiyor"); 54 | } 55 | 56 | var result = this.employerService.add(employer); 57 | 58 | if (result.isSucces()) { 59 | if (validationService(employer.getEmail())) { 60 | return new SuccessResult("İşçi kayıt başarılı"); 61 | } 62 | } 63 | 64 | return new ErrorResult(result.getMessage()); 65 | } 66 | 67 | private boolean checkPasswordRepeat(String password, String passwordRepeat) { 68 | if (!password.equals(passwordRepeat)) { 69 | return false; 70 | } 71 | return true; 72 | } 73 | 74 | private boolean validationService(String email) { 75 | String code = this.validationService.codeGenerator(); 76 | if (!this.validationService.sendVerificationCode(email, code)) { 77 | return false; 78 | } 79 | return true; 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HrmsProject 2 | Human Resources Management System 3 | 4 | 5 | “HRMS” stands for Human Resources Management System. 6 | 7 | -- 8 | 9 | 1.AŞAMA 10 | Spring Boot ile hrms isimli proje oluşturuldu, 11 | Katmanları yazıldı, 12 | Sistemde bulunan genel iş pozisyonlarını listeleyecek api yazıldı. 13 | 14 | 2.AŞAMA 15 | 16 | Req 1 : İş Arayanlar sisteme kayıt olabilmelidir. 17 | 18 | Kabul Kriterleri: 19 | 20 | Kayıt sırasında kullanıcıdan ad, soyad, tcno, doğum yılı, e-Posta, şifre, şifre tekrarı bilgileri istenir. 21 | Tüm alanlar zorunludur. Kullanıcı bilgilendirilir. 22 | Mernis doğrulaması yapılarak sisteme kayıt gerçekleştirilir. 23 | Doğrulama geçerli değilse kullanıcı bilgilendirilir. 24 | Daha önce kayıtlı bir e-posta veya tcno var ise kayıt gerçekleşmez. Kullanıcı bilgilendirilir. 25 | Kayıdın gerçekleşmesi için e-posta doğrulaması gerekir. 26 | 27 | Req 2 : İş verenler sisteme kayıt olabilmelidir. 28 | 29 | Kabul Kriterleri: 30 | 31 | Kayıt sırasında kullanıcıdan şirket adı, web sitesi, web sitesi ile aynı domaine sahip e-posta, telefon, şifre, şifre tekrarı bilgileri istenir. Burada amaç sisteme şirket olmayanların katılmasını engellemektir. 32 | Tüm alanlar zorunludur. Kullanıcı bilgilendirilir. 33 | Şirket kayıtları iki şekilde doğrulanır. Kayıdın gerçekleşmesi için e-posta doğrulaması gerekir. HRMS personelinin onayı gerekmektedir. 34 | Daha önce kayıtlı bir e-posta var ise kayıt gerçekleşmez. Kullanıcı bilgilendirilir. 35 | 36 | Req 3 : Sisteme genel iş pozisyonu isimleri eklenebilir. Örneğin Software Developer, Software Architect. 37 | 38 | Kabul Kriterleri: 39 | 40 | Bu pozisyonlar tekrar edemez. Kullanıcı uyarılır. 41 | Req 4 : İş verenler listelendi. (Sadece tüm liste) 42 | 43 | Req 5 : İş arayanlar listelendi. (Sadece tüm liste) 44 | 45 | Req 6 : İş pozisyonları listelendi. (Sadece tüm liste) 46 | 47 | 48 | Req 7 : İş verenler sisteme iş ilanı ekleyebilir. 49 | 50 | İş ilanı formunda; 51 | İş tanımı girişi yapılabiliyor. (Örneğin; firmamız için JAVA, C# vb. dillere hakim....) 52 | Maaş skalası için min-max girişi yapılabiliyor. (Opsiyonel) 53 | Açık pozisyon adedi girişi yapılabiliyor. (Zorunlu) 54 | Son başvuru tarihi girişi yapılabiliyorr. 55 | Req 8 : Sistemdeki tüm aktif iş ilanları listelenebiliyor. 56 | 57 | Liste, tablo formunda geliyor. 58 | Listede firmadı, genel iş pozisyonu adı, açık pozisyon adedi, yayın tarihi, son başvuru tarihi bilgileri bulunuyor. 59 | Req 9 : Sistemdeki tüm aktif iş ilanları tarihe göre listelenebiliyor. 60 | 61 | Liste, tablo formunda . 62 | Listede firmadı, genel iş pozisyonu adı, açık pozisyon adedi, yayın tarihi, son başvuru tarihi bilgileri yer alıyor. 63 | Req 10 : Sistemde bir firmaya ait tüm aktif iş ilanları listelenebiliyor. 64 | 65 | Liste, tablo formunda . 66 | Listede firmadı, genel iş pozisyonu adı, açık pozisyon adedi, yayın tarihi, son başvuru tarihi bilgileri yer alıyor. 67 | Req 11 : İş verenler sistemdeki bir ilanı kapatabiliyor. (Pasif ilan) 68 | -------------------------------------------------------------------------------- /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 | org.springframework.boot 63 | spring-boot-starter-validation 64 | 65 | 66 | com.cloudinary 67 | cloudinary-http44 68 | 1.29.0 69 | 70 | 71 | org.modelmapper 72 | modelmapper 73 | 2.3.5 74 | 75 | 76 | 77 | 78 | 79 | 80 | org.springframework.boot 81 | spring-boot-maven-plugin 82 | 83 | 84 | 85 | org.projectlombok 86 | lombok 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeEducationManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import java.util.Optional; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.HRMS.business.abstracts.ResumeEducationService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.Result; 13 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 14 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 15 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeEducationDao; 16 | import kodlamaio.HRMS.entities.concretes.ResumeEducation; 17 | 18 | @Service 19 | public class ResumeEducationManager implements ResumeEducationService { 20 | 21 | private ResumeEducationDao resumeEducationDao; 22 | 23 | @Autowired 24 | public ResumeEducationManager(ResumeEducationDao resumeEducationDao) { 25 | super(); 26 | this.resumeEducationDao = resumeEducationDao; 27 | } 28 | 29 | @Override 30 | public DataResult> getAll() { 31 | return new SuccesDataResult>(this.resumeEducationDao.findAll()); 32 | } 33 | 34 | @Override 35 | public DataResult getById(int id) { 36 | Optional resumeEducation = this.resumeEducationDao.findById(id); 37 | 38 | if (Optional.empty() != null){ 39 | 40 | return new SuccesDataResult(resumeEducation.get()); 41 | } 42 | return new ErrorDataResult("CV'de Eğitim bulunamadı"); 43 | } 44 | 45 | @Override 46 | public DataResult> getAllByResume_Id(int resumeId) { 47 | return new SuccesDataResult>(this.resumeEducationDao.getAllByResume_Id(resumeId)); 48 | } 49 | @Override 50 | public DataResult> getAllByResume_IdOrderByGraduationDate(int resumeId) { 51 | return new SuccesDataResult>(this.resumeEducationDao.getAllByResume_IdOrderByGraduationDate(resumeId)); 52 | } 53 | 54 | @Override 55 | public DataResult> getAllByResume_IdOrderByGraduationDateDesc(int resumeId) { 56 | return new SuccesDataResult>(this.resumeEducationDao.getAllByResume_IdOrderByGraduationDateDesc(resumeId)); 57 | } 58 | 59 | @Override 60 | public Result add(ResumeEducation resumeEducation) { 61 | this.resumeEducationDao.save(resumeEducation); 62 | return new SuccessResult("Cv'ye eğitim başarıyla eklendi"); 63 | } 64 | 65 | @Override 66 | public Result update(ResumeEducation resumeEducation) { 67 | this.resumeEducationDao.save(resumeEducation); 68 | return new SuccessResult("CV'de eğitim alanı başarıyla güncellendi"); 69 | } 70 | 71 | @Override 72 | public Result delete(ResumeEducation resumeEducation) { 73 | this.resumeEducationDao.delete(resumeEducation); 74 | return new SuccessResult("CV'de eğitim alanı başarıyla silindi"); 75 | } 76 | 77 | 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeJobExperienceManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.HRMS.business.abstracts.ResumeJobExperienceService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 12 | import kodlamaio.HRMS.core.utilities.results.Result; 13 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 14 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 15 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeJobExperienceDao; 16 | import kodlamaio.HRMS.entities.concretes.ResumeJobExperience; 17 | 18 | @Service 19 | public class ResumeJobExperienceManager implements ResumeJobExperienceService { 20 | 21 | private ResumeJobExperienceDao resumeJobExperienceDao; 22 | 23 | @Autowired 24 | public ResumeJobExperienceManager(ResumeJobExperienceDao resumeJobExperienceDao) { 25 | super(); 26 | this.resumeJobExperienceDao = resumeJobExperienceDao; 27 | } 28 | 29 | @Override 30 | public DataResult> getAll() { 31 | return new SuccesDataResult>(this.resumeJobExperienceDao.findAll()); 32 | } 33 | 34 | @Override 35 | public DataResult getById(int id) { 36 | Optional resumeJobExperience = this.resumeJobExperienceDao.findById(id); 37 | 38 | if (Optional.empty() != null) { 39 | return new ErrorDataResult("CV İş Deneyimi bulunamadı"); 40 | } 41 | 42 | return new SuccesDataResult(resumeJobExperience.get()); 43 | 44 | } 45 | 46 | @Override 47 | public DataResult> getAllByResume_Id(int resumeId) { 48 | return new SuccesDataResult>(this.resumeJobExperienceDao.getAllByResume_Id(resumeId)); 49 | } 50 | 51 | @Override 52 | public DataResult> getAllByResume_IdOrderByFinishDate(int resumeId) { 53 | return new SuccesDataResult>( 54 | this.resumeJobExperienceDao.getAllByResume_IdOrderByFinishDate(resumeId)); 55 | } 56 | 57 | @Override 58 | public DataResult> getAllByResume_IdOrderByFinishDateDesc(int resumeId) { 59 | return new SuccesDataResult>( 60 | this.resumeJobExperienceDao.getAllByResume_IdOrderByFinishDateDesc(resumeId)); 61 | } 62 | 63 | @Override 64 | public Result add(ResumeJobExperience resumeJobExperience) { 65 | this.resumeJobExperienceDao.save(resumeJobExperience); 66 | return new SuccessResult("Cv ye deneyimi eklendi"); 67 | } 68 | 69 | @Override 70 | public Result update(ResumeJobExperience resumeJobExperience) { 71 | this.resumeJobExperienceDao.save(resumeJobExperience); 72 | return new SuccessResult("Cv ye deneyimi güncellendi"); 73 | 74 | } 75 | 76 | @Override 77 | public Result delete(ResumeJobExperience resumeJobExperience) { 78 | this.resumeJobExperienceDao.delete(resumeJobExperience); 79 | return new SuccessResult("Cv den deneyim silindi"); 80 | 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/ResumeManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | import java.util.Optional; 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.ResumeService; 12 | import kodlamaio.HRMS.core.utilities.adapters.verification.image.ImageService; 13 | import kodlamaio.HRMS.core.utilities.results.DataResult; 14 | import kodlamaio.HRMS.core.utilities.results.ErrorDataResult; 15 | import kodlamaio.HRMS.core.utilities.results.Result; 16 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 17 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 18 | import kodlamaio.HRMS.dataAccess.abstracts.ResumeDao; 19 | import kodlamaio.HRMS.entities.concretes.Resume; 20 | 21 | @Service 22 | public class ResumeManager implements ResumeService { 23 | 24 | private ResumeDao resumeDao; 25 | 26 | private ImageService imageService; 27 | 28 | @Autowired 29 | public ResumeManager(ResumeDao resumeDao, ImageService imageService) { 30 | super(); 31 | this.resumeDao = resumeDao; 32 | 33 | this.imageService = imageService; 34 | } 35 | 36 | @Override 37 | public DataResult> getAll() { 38 | return new SuccesDataResult>(this.resumeDao.findAll()); 39 | } 40 | 41 | @Override 42 | public DataResult getById(int id) { 43 | Optional resume = this.resumeDao.findById(id); 44 | 45 | if (Optional.empty() != null){ 46 | return new SuccesDataResult(resume.get()); 47 | } 48 | return new ErrorDataResult("CV bulunamadı"); 49 | 50 | } 51 | 52 | @Override 53 | public DataResult> getByCandidate_id(int candidateId) { 54 | Optional> candidateResult = this.resumeDao.getByCandidate_id(candidateId); 55 | 56 | if (Optional.empty() != null) { 57 | 58 | return new SuccesDataResult>(candidateResult.get(), "İş Arayanın Cv Listelendi"); 59 | } 60 | return new ErrorDataResult>("İş Arayanın Cv Bulunamadı"); 61 | } 62 | 63 | @Override 64 | public Result uploadPhoto(int candidateId, MultipartFile file) { 65 | Map result = (Map) this.imageService.uploadPhoto(file).getData(); 66 | String url = result.get("url"); 67 | List resumesAddPhoto = this.getByCandidate_id(candidateId).getData(); 68 | for (Resume resume : resumesAddPhoto) { 69 | resume.setImage(url); 70 | this.resumeDao.save(resume); 71 | } 72 | 73 | return new SuccessResult(); 74 | } 75 | 76 | @Override 77 | public Result add(Resume resume) { 78 | //this.resumeDao.save(resume); 79 | System.out.println(resume); 80 | System.out.println(resume.getResumeEducations()); 81 | return new SuccessResult("CV Eklendi."); 82 | } 83 | 84 | @Override 85 | public Result update(Resume resume) { 86 | this.resumeDao.save(resume); 87 | return new SuccessResult("CV Güncellendi."); 88 | } 89 | 90 | @Override 91 | public Result delete(Resume resume) { 92 | this.resumeDao.delete(resume); 93 | return new SuccessResult("CV Silindi."); 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeEducationController.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.GetMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestParam; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import kodlamaio.HRMS.business.abstracts.ResumeEducationService; 13 | 14 | import java.util.List; 15 | import kodlamaio.HRMS.core.utilities.results.DataResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.entities.concretes.ResumeEducation; 18 | 19 | @RestController 20 | @RequestMapping("/api/resumeEducations") 21 | public class ResumeEducationController { 22 | private ResumeEducationService resumeEducationService; 23 | 24 | @Autowired 25 | public ResumeEducationController(ResumeEducationService resumeEducationService) { 26 | super(); 27 | this.resumeEducationService = resumeEducationService; 28 | } 29 | 30 | @GetMapping("/getall") 31 | public ResponseEntity>> getAll() { 32 | return ResponseEntity.ok(this.resumeEducationService.getAll()); 33 | 34 | } 35 | 36 | @GetMapping("/getById") 37 | public ResponseEntity> getById(@RequestParam int id) { 38 | return ResponseEntity.ok(this.resumeEducationService.getById(id)); 39 | } 40 | 41 | @GetMapping("/getAllByResume_Id") 42 | public ResponseEntity>> getAllByResume_Id(@RequestParam int resumeId) 43 | { 44 | return ResponseEntity.ok(this.resumeEducationService.getAllByResume_Id(resumeId)); 45 | } 46 | 47 | @GetMapping("/getAllByResume_IdOrderByGraduationDate") 48 | public ResponseEntity>> getAllByResume_IdOrderByGraduationDate(@RequestParam int resumeId) 49 | { 50 | return ResponseEntity.ok(this.resumeEducationService.getAllByResume_IdOrderByGraduationDate(resumeId)); 51 | } 52 | 53 | @GetMapping("/getAllByResume_IdOrderByGraduationDateDesc") 54 | public ResponseEntity>> getAllByResume_IdOrderByGraduationDateDesc(@RequestParam int resumeId) 55 | { 56 | return ResponseEntity.ok(this.resumeEducationService.getAllByResume_IdOrderByGraduationDate(resumeId)); 57 | } 58 | 59 | @PostMapping("/add") 60 | public ResponseEntity add(@RequestBody ResumeEducation resumeEducation) 61 | { 62 | return ResponseEntity.ok(this.resumeEducationService.add(resumeEducation)); 63 | } 64 | 65 | @PostMapping("/update") 66 | public ResponseEntity update(@RequestBody ResumeEducation resumeEducation) 67 | { 68 | return ResponseEntity.ok(this.resumeEducationService.update(resumeEducation)); 69 | } 70 | 71 | @PostMapping("/delete") 72 | public ResponseEntity delete(@RequestBody ResumeEducation resumeEducation) 73 | { 74 | return ResponseEntity.ok(this.resumeEducationService.delete(resumeEducation)); 75 | } 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | } 84 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/api/controllers/ResumeJobExperienceController.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.http.ResponseEntity; 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.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import kodlamaio.HRMS.business.abstracts.ResumeJobExperienceService; 15 | import kodlamaio.HRMS.core.utilities.results.DataResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.entities.concretes.ResumeJobExperience; 18 | 19 | @RestController 20 | @RequestMapping("/api/resumeJobExperiences") 21 | public class ResumeJobExperienceController { 22 | 23 | private ResumeJobExperienceService resumeJobExperienceService; 24 | 25 | @Autowired 26 | public ResumeJobExperienceController(ResumeJobExperienceService resumeJobExperienceService) { 27 | super(); 28 | this.resumeJobExperienceService = resumeJobExperienceService; 29 | } 30 | 31 | @GetMapping("/getall") 32 | public ResponseEntity>> getAll() { 33 | return ResponseEntity.ok(this.resumeJobExperienceService.getAll()); 34 | } 35 | 36 | @GetMapping("/getById") 37 | public ResponseEntity> getById(@RequestParam int id) { 38 | return ResponseEntity.ok(this.resumeJobExperienceService.getById(id)); 39 | } 40 | 41 | 42 | 43 | @GetMapping("/getAllByResume_Id") 44 | public ResponseEntity>> getAllByResume_Id(@RequestParam int resumeId) { 45 | return ResponseEntity.ok(this.resumeJobExperienceService.getAllByResume_Id(resumeId)); 46 | } 47 | 48 | @GetMapping("/getAllByResume_IdOrderByFinishDate") 49 | public ResponseEntity>> getAllByResume_IdOrderByFinishDate( 50 | @RequestParam int resumeId) { 51 | return ResponseEntity.ok(this.resumeJobExperienceService.getAllByResume_IdOrderByFinishDate(resumeId)); 52 | } 53 | 54 | @GetMapping("/getAllByResume_IdOrderByFinishDateDesc") 55 | public ResponseEntity>> getAllByResume_IdOrderByFinishDateDesc( 56 | @RequestParam int resumeId) { 57 | return ResponseEntity.ok(this.resumeJobExperienceService.getAllByResume_IdOrderByFinishDateDesc(resumeId)); 58 | } 59 | 60 | @PostMapping("/add") 61 | public ResponseEntity add(@RequestBody ResumeJobExperience resumeJobExperience) { 62 | return ResponseEntity.ok(this.resumeJobExperienceService.add(resumeJobExperience)); 63 | } 64 | 65 | @PostMapping("/update") 66 | public ResponseEntity update(@RequestBody ResumeJobExperience resumeJobExperience) { 67 | return ResponseEntity.ok(this.resumeJobExperienceService.update(resumeJobExperience)); 68 | } 69 | 70 | @PostMapping("/delete") 71 | public ResponseEntity delete(@RequestBody ResumeJobExperience resumeJobExperience) { 72 | return ResponseEntity.ok(this.resumeJobExperienceService.delete(resumeJobExperience)); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/JobPostingManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import kodlamaio.HRMS.business.abstracts.JobPostingService; 10 | import kodlamaio.HRMS.core.utilities.results.DataResult; 11 | import kodlamaio.HRMS.core.utilities.results.ErrorResult; 12 | import kodlamaio.HRMS.core.utilities.results.Result; 13 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 14 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 15 | import kodlamaio.HRMS.dataAccess.abstracts.JobPostingDao; 16 | import kodlamaio.HRMS.entities.concretes.JobPosting; 17 | 18 | @Service 19 | public class JobPostingManager implements JobPostingService { 20 | 21 | private JobPostingDao jobPostingDao; 22 | 23 | @Autowired 24 | public JobPostingManager(JobPostingDao jobPostingDao) { 25 | super(); 26 | this.jobPostingDao = jobPostingDao; 27 | } 28 | 29 | @Override 30 | public Result add(JobPosting jobPosting) { 31 | this.jobPostingDao.save(jobPosting); 32 | return new SuccessResult("iş ilanı eklendi"); 33 | } 34 | 35 | @Override 36 | public Result delete(JobPosting jobPosting) { 37 | this.jobPostingDao.delete(jobPosting); 38 | return new SuccessResult("iş ilanı başarıyla silindi"); 39 | 40 | } 41 | 42 | @Override 43 | public Result update(JobPosting jobPosting) { 44 | this.jobPostingDao.save(jobPosting); 45 | return new SuccessResult("iş ilani başarıyla güncellendi!"); 46 | } 47 | 48 | @Override 49 | public DataResult> getAllActiveJobPosting() { 50 | return new SuccesDataResult>(this.jobPostingDao.getAllActiveJobAdverts()); 51 | } 52 | 53 | @Override 54 | public DataResult> getAllByCreationDateAsc() { 55 | return new SuccesDataResult>(this.jobPostingDao.getAllByCreationDateAsc()); 56 | } 57 | 58 | 59 | @Override 60 | public Result closeJobPosting(int id) { 61 | JobPosting jobPosting = jobPostingDao.getOne(id); 62 | 63 | if (jobPosting == null) { 64 | return new ErrorResult("böyle bir iş ilanı yok"); 65 | } 66 | 67 | if (jobPosting.isActive() == false) { 68 | return new ErrorResult("bu iş ilanı zaten pasif"); 69 | } 70 | 71 | jobPosting.setActive(false); 72 | update(jobPosting); 73 | return new SuccessResult("is ilani pasif duruma cekildi"); 74 | } 75 | 76 | @Override 77 | public Result openJobPosting(int id) { 78 | JobPosting jobPosting = jobPostingDao.getOne(id); 79 | 80 | if (jobPosting == null) { 81 | return new ErrorResult("boyle bir is ilani yok"); 82 | } 83 | 84 | if (jobPosting.isActive() == true) { 85 | return new ErrorResult("bu is ilani zaten aktif"); 86 | } 87 | 88 | jobPosting.setActive(true); 89 | update(jobPosting); 90 | return new SuccessResult("is ilani aktif duruma cekildi"); 91 | } 92 | 93 | @Override 94 | public DataResult> getAllActiveJobPostingByCompanyName(String companyName) { 95 | return new SuccesDataResult>( 96 | this.jobPostingDao.getAllActiveJobPostingByEmployer_CompanyName(companyName)); 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /HRMS/src/main/java/kodlamaio/HRMS/business/concretes/EmployerManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.HRMS.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import java.util.Arrays; 6 | import java.util.List; 7 | import java.util.regex.Matcher; 8 | import java.util.regex.Pattern; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import kodlamaio.HRMS.business.abstracts.EmployerService; 14 | import kodlamaio.HRMS.core.utilities.results.DataResult; 15 | import kodlamaio.HRMS.core.utilities.results.ErrorResult; 16 | import kodlamaio.HRMS.core.utilities.results.Result; 17 | import kodlamaio.HRMS.core.utilities.results.SuccesDataResult; 18 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 19 | import kodlamaio.HRMS.dataAccess.abstracts.EmployerDao; 20 | import kodlamaio.HRMS.entities.concretes.Employer; 21 | 22 | @Service 23 | public class EmployerManager implements EmployerService { 24 | 25 | private EmployerDao employerDao; 26 | 27 | @Autowired 28 | public EmployerManager(EmployerDao employerDao) { 29 | super(); 30 | this.employerDao = employerDao; 31 | } 32 | 33 | @Override 34 | public Result add(Employer employer) { 35 | 36 | if (!validationEmployer(employer)) { 37 | return new ErrorResult("Eksik veri girişi."); 38 | } 39 | 40 | if (!checkIfEmailExists(employer.getEmail())) { 41 | return new ErrorResult("Email e sahip kullanıcı zaten var"); 42 | } 43 | 44 | if (!checkEmailFormat(employer.getEmail())) { 45 | return new ErrorResult("E-mail formatında olmasına dikkat edip tekrar deneyiniz."); 46 | } 47 | 48 | if (!checkIfEqualEmailAndDomain(employer.getEmail(), employer.getWebAddress())) { 49 | return new ErrorResult("web sitesi ile aynı domaine sahip e-posta olduğundan emin olunuz"); 50 | } 51 | 52 | employer.setCreatedDate(LocalDate.now()); 53 | employer.setActive(true); 54 | 55 | this.employerDao.save(employer); 56 | return new SuccessResult("İşçi başarıyla eklendi"); 57 | } 58 | 59 | @Override 60 | public DataResult> getAll() { 61 | 62 | return new SuccesDataResult>(this.employerDao.findAll()); 63 | } 64 | 65 | @Override 66 | public DataResult getByEmail(String email) { 67 | 68 | return new SuccesDataResult(this.employerDao.findByEmail(email)); 69 | } 70 | 71 | private boolean validationEmployer(Employer employer) { 72 | if (employer.getEmail() == null && employer.getPassword() == null && employer.getCompanyName() == null 73 | && employer.getWebAddress() == null) { 74 | return false; 75 | } 76 | return true; 77 | } 78 | 79 | private boolean checkIfEmailExists(String email) { 80 | if (this.employerDao.findByEmail(email) != null) { 81 | return false; 82 | } 83 | return true; 84 | } 85 | 86 | public boolean checkEmailFormat(String message) { 87 | String regex = "^(.+)@(.+)$"; 88 | Pattern pattern = Pattern.compile(regex); 89 | Matcher matcher = pattern.matcher(message); 90 | return matcher.matches(); 91 | } 92 | 93 | private boolean checkIfEqualEmailAndDomain(String email, String website) { 94 | 95 | String[] webAdressKeywords = { "www", "http://www", "https://www" }; 96 | 97 | String[] emailDomain = email.split("@", 2); 98 | 99 | String domain = ""; 100 | String[] websiteDomain = website.split("\\.", 2); 101 | if (Arrays.asList(webAdressKeywords).contains(websiteDomain[0])) { 102 | domain = websiteDomain[1]; 103 | } else { 104 | domain = website; 105 | } 106 | 107 | if (!emailDomain[1].equals(domain)) { 108 | System.out.println("Domain hatası"); 109 | return false; 110 | } 111 | return true; 112 | } 113 | 114 | } -------------------------------------------------------------------------------- /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 | import java.util.regex.Matcher; 6 | import java.util.regex.Pattern; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import kodlamaio.HRMS.business.abstracts.CandidateService; 12 | import kodlamaio.HRMS.core.utilities.adapters.verification.mernis.MernisCandidateCheckService; 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.SuccesDataResult; 17 | import kodlamaio.HRMS.core.utilities.results.SuccessResult; 18 | import kodlamaio.HRMS.dataAccess.abstracts.CandidateDao; 19 | import kodlamaio.HRMS.entities.concretes.Candidate; 20 | 21 | @Service 22 | public class CandidateManager implements CandidateService { 23 | 24 | private CandidateDao candidateDao; 25 | private MernisCandidateCheckService candidateCheckService; 26 | 27 | @Autowired 28 | public CandidateManager(CandidateDao candidateDao, 29 | MernisCandidateCheckService candidateCheckService 30 | ) { 31 | super(); 32 | this.candidateDao = candidateDao; 33 | this.candidateCheckService = candidateCheckService; 34 | } 35 | 36 | @Override 37 | public DataResult> getAll() { 38 | 39 | return new SuccesDataResult>(this.candidateDao.findAll()); 40 | } 41 | 42 | @Override 43 | public DataResult getByNationalityId(String nationalityId) { 44 | return new SuccesDataResult(this.candidateDao.findByNationalityId(nationalityId)); 45 | } 46 | 47 | @Override 48 | public DataResult getByEmail(String emailAddress) { 49 | return new SuccesDataResult(this.candidateDao.findByEmail(emailAddress)); 50 | } 51 | 52 | @Override 53 | public Result add(Candidate candidate) { 54 | 55 | if (!validationCondidate(candidate)) { 56 | return new ErrorResult("Eksik veri girişi."); 57 | } 58 | 59 | if (!checkIfNationalityId(candidate.getNationalityId())) { 60 | return new ErrorResult("Bu kimlik numarasına kayıtlı kullanıcı zaten var"); 61 | } 62 | 63 | if (!checkIfRealPerson(candidate)) { 64 | return new ErrorResult("Kullanıcı doğrulanamadı"); 65 | } 66 | 67 | if (!checkIfEmailExists(candidate.getEmail())) { 68 | return new ErrorResult("Email e sahip kullanıcı zaten var"); 69 | } 70 | 71 | if (!checkEmailFormat(candidate.getEmail())) { 72 | return new ErrorResult("E-posta formatında olmasına dikkat edip tekrar deneyiniz."); 73 | } 74 | 75 | candidate.setCreatedDate(LocalDate.now()); 76 | candidate.setActive(true); 77 | 78 | this.candidateDao.save(candidate); 79 | return new SuccessResult("Aday başarıyla eklendi"); 80 | 81 | } 82 | 83 | private boolean checkIfNationalityId(String nationalityId) { 84 | if (this.candidateDao.findByNationalityId(nationalityId) != null) { 85 | return false; 86 | } 87 | return true; 88 | } 89 | 90 | private boolean checkIfRealPerson(Candidate candidate) { 91 | if (!this.candidateCheckService.CheckIfRealPerson(Long.parseLong(candidate.getNationalityId()), 92 | candidate.getFirstName().toUpperCase(), candidate.getLastName().toUpperCase(), 93 | candidate.getBirthDate())) { 94 | return false; 95 | } 96 | return true; 97 | } 98 | 99 | private boolean validationCondidate(Candidate candidate) { 100 | if (candidate.getEmail() == null && candidate.getPassword() == null && candidate.getFirstName() == null 101 | && candidate.getLastName() == null && candidate.getNationalityId() == null 102 | && candidate.getBirthDate() == null) { 103 | return false; 104 | } 105 | return true; 106 | } 107 | 108 | private boolean checkIfEmailExists(String emailAddress) { 109 | if (this.candidateDao.findByEmail(emailAddress) != null) { 110 | return false; 111 | } 112 | return true; 113 | } 114 | 115 | public boolean checkEmailFormat(String message) { 116 | String regex = "^(.+)@(.+)$"; 117 | Pattern pattern = Pattern.compile(regex); 118 | Matcher matcher = pattern.matcher(message); 119 | return matcher.matches(); 120 | } 121 | 122 | 123 | } 124 | -------------------------------------------------------------------------------- /HRMS.sql.txt: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | 4 | CREATE TABLE public.users 5 | ( 6 | id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), 7 | email_address character varying(320) NOT NULL, 8 | password character varying(25) NOT NULL, 9 | is_active boolean NOT NULL, 10 | created_date date NOT NULL, 11 | CONSTRAINT pk_users PRIMARY KEY (id) 12 | ); 13 | 14 | CREATE TABLE public.candidates 15 | ( 16 | user_id integer NOT NULL, 17 | first_name character varying(50) NOT NULL, 18 | last_name character varying(50) NOT NULL, 19 | nationality_id character(11) NOT NULL, 20 | birth_date date NOT NULL, 21 | CONSTRAINT pk_candidates PRIMARY KEY (user_id), 22 | CONSTRAINT fk_candidates_users FOREIGN KEY (user_id) REFERENCES public.users (id) ON DELETE CASCADE, 23 | CONSTRAINT uc_candidates_nationality_id UNIQUE (nationality_id) 24 | ); 25 | 26 | CREATE TABLE public.employers 27 | ( 28 | user_id integer NOT NULL, 29 | company_name character varying(150) NOT NULL, 30 | web_address character varying(75) NOT NULL, 31 | CONSTRAINT pk_employers PRIMARY KEY (user_id), 32 | CONSTRAINT fk_employers_users FOREIGN KEY (user_id) REFERENCES public.users (id) ON DELETE CASCADE 33 | ); 34 | 35 | CREATE TABLE public.employer_phones( 36 | id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), 37 | employer_id integer NOT NULL, 38 | phone_number character varying(12) NOT NULL, 39 | CONSTRAINT pk_employer_phones PRIMARY KEY (id), 40 | CONSTRAINT fk_employer_phones_employer_id FOREIGN KEY (employer_id) REFERENCES public.employers (user_id) ON DELETE CASCADE 41 | ); 42 | 43 | CREATE TABLE public.employees 44 | ( 45 | user_id integer NOT NULL, 46 | first_name character varying(50) NOT NULL, 47 | last_name character varying(50) NOT NULL, 48 | CONSTRAINT pk_employees PRIMARY KEY (user_id), 49 | CONSTRAINT fk_employees_users FOREIGN KEY (user_id) REFERENCES public.users (id) ON DELETE CASCADE 50 | ); 51 | 52 | CREATE TABLE public.verification_codes 53 | ( 54 | id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), 55 | code character varying(50) NOT NULL, 56 | is_verified boolean DEFAULT false NOT NULL, 57 | verified_date date NOT NULL, 58 | CONSTRAINT pk_verification_codes PRIMARY KEY (id), 59 | CONSTRAINT uc_verification_codes_code UNIQUE (code) 60 | ); 61 | 62 | CREATE TABLE public.verification_codes_candidates( 63 | id integer NOT NULL, 64 | candidate_id integer NOT NULL, 65 | CONSTRAINT pk_verification_codes_candidates PRIMARY KEY (id), 66 | CONSTRAINT fk_verification_codes_candidates_verification_codes FOREIGN KEY (id) REFERENCES public.verification_codes (id) ON DELETE CASCADE, 67 | CONSTRAINT fk_verification_codes_candidates_candidates FOREIGN KEY (candidate_id) REFERENCES public.candidates (user_id) ON DELETE CASCADE 68 | ); 69 | 70 | CREATE TABLE public.verification_codes_employers( 71 | id integer NOT NULL, 72 | employer_id integer NOT NULL, 73 | CONSTRAINT pk_verification_codes_employers PRIMARY KEY (id), 74 | CONSTRAINT fk_verification_codes_employers_verification_codes FOREIGN KEY (id) REFERENCES public.verification_codes (id) ON DELETE CASCADE, 75 | CONSTRAINT fk_verification_codes_employers_employers FOREIGN KEY (employer_id) REFERENCES public.employers (user_id) ON DELETE CASCADE 76 | ); 77 | 78 | CREATE TABLE public.employee_confirms( 79 | id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), 80 | employee_id integer NOT NULL, 81 | is_confirmed boolean DEFAULT false NOT NULL, 82 | confirm_date date NOT NULL, 83 | CONSTRAINT pk_employee_confirms PRIMARY KEY (id), 84 | CONSTRAINT fk_employee_confirms_employees FOREIGN KEY (employee_id) REFERENCES public.employees (user_id) ON DELETE CASCADE 85 | ); 86 | 87 | CREATE TABLE public.employee_confirms_employers( 88 | id integer NOT NULL, 89 | employer_id integer NOT NULL, 90 | CONSTRAINT pk_employee_confirms_employers PRIMARY KEY (id), 91 | CONSTRAINT fk_employee_confirms_employers_employee_confirms FOREIGN KEY (id) REFERENCES public.employee_confirms (id) ON DELETE CASCADE, 92 | CONSTRAINT fk_employee_confirms_employers_employers FOREIGN KEY (employer_id) REFERENCES public.employers (user_id) ON DELETE CASCADE 93 | ); 94 | 95 | CREATE TABLE public.job_positions( 96 | id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), 97 | name character varying(255) NOT NULL, 98 | CONSTRAINT pk_job_titles PRIMARY KEY (id), 99 | CONSTRAINT uc_job_titles_title UNIQUE (name) 100 | ); 101 | 102 | 103 | END; -------------------------------------------------------------------------------- /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/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 | --------------------------------------------------------------------------------