├── .mvn └── wrapper │ ├── maven-wrapper.jar │ ├── maven-wrapper.properties │ └── MavenWrapperDownloader.java ├── src ├── main │ ├── java │ │ ├── mernis │ │ │ ├── KPSPublic.class │ │ │ ├── KPSPublicSoap.class │ │ │ ├── ObjectFactory.class │ │ │ ├── package-info.class │ │ │ ├── TCKimlikNoDogrula.class │ │ │ ├── TCKimlikNoDogrulaResponse.class │ │ │ ├── package-info.java │ │ │ ├── TPADateTimeConverter.java │ │ │ ├── TPAMarshalGuid.java │ │ │ ├── ObjectFactory.java │ │ │ ├── TCKimlikNoDogrulaResponse.java │ │ │ ├── KPSPublicSoap.java │ │ │ ├── Metadata.info │ │ │ ├── TPAStandardDateTimeConverter.java │ │ │ ├── KPSPublic.asmx │ │ │ ├── TCKimlikNoDogrula.java │ │ │ ├── KPSPublic.java │ │ │ ├── TPAHelper.java │ │ │ ├── KPSPublicSoapStub.java │ │ │ ├── TPAKPSPublicSoap.java │ │ │ ├── TPAKPSPublicSoap12.java │ │ │ └── TPAExtendedSoapSerializationEnvelope.java │ │ └── com │ │ │ └── icanerdogan │ │ │ └── HRMS │ │ │ ├── adapters │ │ │ ├── abstracts │ │ │ │ ├── EmployeeConfirmationService.java │ │ │ │ ├── MernisService.java │ │ │ │ └── EmailService.java │ │ │ └── concretes │ │ │ │ ├── EmployeeConfirmationAdapter.java │ │ │ │ ├── EmailServiceAdapter.java │ │ │ │ └── MernisServiceAdapter.java │ │ │ ├── business │ │ │ ├── abstracts │ │ │ │ ├── UserService.java │ │ │ │ ├── EmployerPhoneService.java │ │ │ │ ├── PositionService.java │ │ │ │ ├── EmployerService.java │ │ │ │ ├── CV │ │ │ │ │ ├── CVLinkService.java │ │ │ │ │ ├── CVAbilityService.java │ │ │ │ │ ├── CVLanguageService.java │ │ │ │ │ ├── CVCoverLetterService.java │ │ │ │ │ ├── CVEducationService.java │ │ │ │ │ ├── CVExperienceService.java │ │ │ │ │ └── CVPhotographService.java │ │ │ │ ├── CandidateService.java │ │ │ │ └── JobAdvertService.java │ │ │ └── concretes │ │ │ │ ├── EmployerPhoneManager.java │ │ │ │ ├── PositionManager.java │ │ │ │ ├── EmployerManager.java │ │ │ │ ├── CV │ │ │ │ ├── CVLinkManager.java │ │ │ │ ├── CVAbilityManager.java │ │ │ │ ├── CVLanguageManager.java │ │ │ │ ├── CVCoverLetterManager.java │ │ │ │ ├── CVEducationManager.java │ │ │ │ ├── CVExperienceManager.java │ │ │ │ └── CVPhotographManager.java │ │ │ │ ├── UserManager.java │ │ │ │ ├── CandidateManager.java │ │ │ │ └── JobAdvertManager.java │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ ├── PositionDao.java │ │ │ │ ├── EmployerDao.java │ │ │ │ ├── UserDao.java │ │ │ │ ├── CV │ │ │ │ ├── CVCoverLetterDao.java │ │ │ │ ├── CVLinkDao.java │ │ │ │ ├── CVAbilityDao.java │ │ │ │ ├── CVLanguageDao.java │ │ │ │ ├── CVPhotographDao.java │ │ │ │ ├── CVEducationDao.java │ │ │ │ └── CVExperienceDao.java │ │ │ │ ├── UserVerificationDao.java │ │ │ │ ├── CandidateDao.java │ │ │ │ └── JobAdvertDao.java │ │ │ ├── core │ │ │ └── utilities │ │ │ │ ├── results │ │ │ │ ├── ErrorResult.java │ │ │ │ ├── SuccessResult.java │ │ │ │ ├── DataResult.java │ │ │ │ ├── Result.java │ │ │ │ ├── ErrorDataResult.java │ │ │ │ └── SuccessDataResult.java │ │ │ │ ├── upload │ │ │ │ ├── CVImageUploadService.java │ │ │ │ └── CVImageUploadManager.java │ │ │ │ └── regex │ │ │ │ ├── RegexEmail.java │ │ │ │ └── RegexPassword.java │ │ │ ├── entities │ │ │ ├── concretes │ │ │ │ ├── Position.java │ │ │ │ ├── City.java │ │ │ │ ├── Employer.java │ │ │ │ ├── EmployerPhone.java │ │ │ │ ├── User.java │ │ │ │ ├── UserVerification.java │ │ │ │ ├── Candidate.java │ │ │ │ ├── CV │ │ │ │ │ ├── CVAbility.java │ │ │ │ │ ├── CVCoverLetter.java │ │ │ │ │ ├── CVPhotograph.java │ │ │ │ │ ├── CVLink.java │ │ │ │ │ ├── CVLanguage.java │ │ │ │ │ ├── CVExperience.java │ │ │ │ │ └── CVEducation.java │ │ │ │ └── JobAdvert.java │ │ │ └── dtos │ │ │ │ └── CVDto.java │ │ │ ├── api │ │ │ ├── UsersController.java │ │ │ ├── PositionsController.java │ │ │ ├── CandidatesController.java │ │ │ ├── CV │ │ │ │ ├── CVLinksController.java │ │ │ │ ├── CVAbilitiesController.java │ │ │ │ ├── CVLanguagesController.java │ │ │ │ ├── CVCoverLettersController.java │ │ │ │ ├── CVEducationsController.java │ │ │ │ ├── CVExperiencesController.java │ │ │ │ └── CVPhotographsController.java │ │ │ ├── EmployerController.java │ │ │ ├── EmployersController.java │ │ │ └── JobAdvertController.java │ │ │ └── HrmsApplication.java │ └── resources │ │ └── application.properties └── test │ └── java │ └── com │ └── icanerdogan │ └── HRMS │ └── HrmsApplicationTests.java ├── .gitignore ├── README.md ├── pom.xml ├── mvnw.cmd └── mvnw /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /src/main/java/mernis/KPSPublic.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/src/main/java/mernis/KPSPublic.class -------------------------------------------------------------------------------- /src/main/java/mernis/KPSPublicSoap.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/src/main/java/mernis/KPSPublicSoap.class -------------------------------------------------------------------------------- /src/main/java/mernis/ObjectFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/src/main/java/mernis/ObjectFactory.class -------------------------------------------------------------------------------- /src/main/java/mernis/package-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/src/main/java/mernis/package-info.class -------------------------------------------------------------------------------- /src/main/java/mernis/TCKimlikNoDogrula.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/src/main/java/mernis/TCKimlikNoDogrula.class -------------------------------------------------------------------------------- /src/main/java/mernis/TCKimlikNoDogrulaResponse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimcanerdogan/HRMS/HEAD/src/main/java/mernis/TCKimlikNoDogrulaResponse.class -------------------------------------------------------------------------------- /src/main/java/mernis/package-info.java: -------------------------------------------------------------------------------- 1 | @javax.xml.bind.annotation.XmlSchema(namespace = "http://tckimlik.nvi.gov.tr/WS", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) 2 | package mernis; 3 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/adapters/abstracts/EmployeeConfirmationService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.adapters.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.Employer; 4 | 5 | public interface EmployeeConfirmationService { 6 | boolean employeeCheck(Employer employer); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.Result; 4 | import com.icanerdogan.HRMS.entities.concretes.User; 5 | 6 | public interface UserService { 7 | Result addUser(User user); 8 | } 9 | -------------------------------------------------------------------------------- /src/test/java/com/icanerdogan/HRMS/HrmsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.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 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/PositionDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.Position; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface PositionDao extends JpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/EmployerDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.Employer; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface EmployerDao extends JpaRepository { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/adapters/abstracts/MernisService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.adapters.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.Result; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | 6 | public interface MernisService { 7 | boolean checkIfRealPerson(Candidate candidate); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/EmployerPhoneService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.Result; 4 | import com.icanerdogan.HRMS.entities.concretes.EmployerPhone; 5 | 6 | public interface EmployerPhoneService { 7 | Result addPhone(EmployerPhone employerPhone); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface UserDao extends JpaRepository { 7 | User findByEmailAdress(String email); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/adapters/abstracts/EmailService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.adapters.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.Result; 4 | import com.icanerdogan.HRMS.entities.concretes.User; 5 | 6 | public interface EmailService { 7 | Result sendEmail(String email); 8 | 9 | boolean isEmailUsed(User user); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.results; 2 | 3 | public class ErrorResult extends Result { 4 | 5 | // İşlem Sonucu Başarısız! 6 | public ErrorResult(){ 7 | super(false); 8 | } 9 | public ErrorResult(String message) { 10 | super(false, message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/PositionService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.Result; 4 | import com.icanerdogan.HRMS.entities.concretes.Position; 5 | 6 | import java.util.List; 7 | 8 | public interface PositionService { 9 | List getAll(); 10 | Result addPosition(Position position); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVCoverLetterDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVCoverLetter; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface CVCoverLetterDao extends JpaRepository { 7 | CVCoverLetter getCVCoverLetterByCandidate_Id(int id); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/upload/CVImageUploadService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.upload; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import org.springframework.web.multipart.MultipartFile; 5 | 6 | import java.util.Map; 7 | 8 | public interface CVImageUploadService { 9 | 10 | DataResult uploadImageFile(MultipartFile imageFile); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVLinkDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLink; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface CVLinkDao extends JpaRepository { 9 | List getAllByCandidate_Id(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/UserVerificationDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.User; 4 | import com.icanerdogan.HRMS.entities.concretes.UserVerification; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | public interface UserVerificationDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect 2 | spring.jpa.hibernate.ddl-auto=update 3 | spring.jpa.hibernate.show-sql=true 4 | spring.datasource.url=jdbc:postgresql://localhost:5432/hrms 5 | spring.datasource.username=postgres 6 | spring.datasource.password=12345 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | 9 | server.port=8082 10 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVAbilityDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVAbility; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface CVAbilityDao extends JpaRepository { 9 | List getAllByCandidate_Id(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVLanguageDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLanguage; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface CVLanguageDao extends JpaRepository { 9 | List getAllByCandidate_Id(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVPhotographDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVPhotograph; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface CVPhotographDao extends JpaRepository { 7 | CVPhotograph getById(int id); 8 | 9 | CVPhotograph getByCandidate_Id(int id); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.results; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.Result; 4 | 5 | public class SuccessResult extends Result { 6 | 7 | // İşlem Sonnucu Başarılı 8 | public SuccessResult(){ 9 | super(true); 10 | } 11 | public SuccessResult(String message) { 12 | super(true, message); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CandidateDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 4 | import com.icanerdogan.HRMS.entities.concretes.User; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | public interface CandidateDao extends JpaRepository { 8 | Candidate findByIdentificationnumber(String identificationNumber); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/EmployerService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.Employer; 6 | 7 | import java.util.List; 8 | 9 | public interface EmployerService { 10 | DataResult> getAll(); 11 | Result add(Employer employer); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVEducationDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVEducation; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface CVEducationDao extends JpaRepository { 9 | List getAllByCandidate_Id(int id); 10 | List getAllByCandidate_IdOrderByGraduationYearDesc(int id); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/CV/CVExperienceDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.CV.CVExperience; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface CVExperienceDao extends JpaRepository { 9 | List getAllByCandidate_Id(int id); 10 | List getAllByCandidate_IdOrderByLeaveDateDesc(int id); 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/adapters/concretes/EmployeeConfirmationAdapter.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.adapters.concretes; 2 | 3 | import com.icanerdogan.HRMS.adapters.abstracts.EmployeeConfirmationService; 4 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 5 | import com.icanerdogan.HRMS.entities.concretes.Employer; 6 | 7 | public class EmployeeConfirmationAdapter implements EmployeeConfirmationService { 8 | @Override 9 | public boolean employeeCheck(Employer employer) { 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/regex/RegexEmail.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.regex; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | public class RegexEmail { 7 | public static final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); 8 | 9 | public static boolean validate(String emailStr) { 10 | Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(emailStr); 11 | return matcher.find(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/Position.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "job_titles") 11 | 12 | @Data 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | public class Position { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.IDENTITY) 18 | 19 | @Column(name = "id") 20 | private int id; 21 | @Column(name = "title") 22 | private String positionName; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/City.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "cities") 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | 16 | public class City { 17 | @Id 18 | @GeneratedValue(strategy = GenerationType.IDENTITY) 19 | 20 | @Column(name = "id") 21 | private int id; 22 | 23 | @Column(name = "city_name") 24 | private String city_name; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVLinkService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLink; 6 | 7 | import java.util.List; 8 | 9 | public interface CVLinkService { 10 | Result add(CVLink cvLink); 11 | Result update(CVLink cvLink); 12 | Result delete(int id); 13 | 14 | DataResult> getAll(); 15 | DataResult> getAllByCandidateId(int id); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CandidateService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 6 | import com.icanerdogan.HRMS.entities.concretes.User; 7 | 8 | import java.util.List; 9 | 10 | public interface CandidateService { 11 | DataResult> getAll(); 12 | DataResult checkAllIdentificationNumber(String email); 13 | Result add(Candidate candidate); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/regex/RegexPassword.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.regex; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | public class RegexPassword { 7 | private static final String PASSWORD_PATTERN = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#&()–[{}]:;',?/*~$^+=<>]).{8,20}$"; 8 | 9 | private static final Pattern pattern = Pattern.compile(PASSWORD_PATTERN); 10 | 11 | public static boolean validate(final String password) { 12 | Matcher matcher = pattern.matcher(password); 13 | return matcher.matches(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVAbilityService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVAbility; 6 | 7 | import java.util.List; 8 | 9 | public interface CVAbilityService { 10 | Result add(CVAbility cvAbility); 11 | Result delete(int id); 12 | Result update(CVAbility cvAbility); 13 | 14 | DataResult> getAll(); 15 | 16 | DataResult> getAllByCandidateId(int id); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.results; 2 | 3 | // Birden fazla vertipiyle çalışmak için bu gibi Generic sınıflarla çalışıyoruz! 4 | public class DataResult extends Result { 5 | 6 | private T data; 7 | public DataResult(T data, boolean success, String message) { 8 | super(success, message); 9 | this.data = data; 10 | } 11 | 12 | public DataResult(T data, boolean success) { 13 | super(success); 14 | this.data = data; 15 | } 16 | 17 | public T getData(){ 18 | return this.data; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVLanguageService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLanguage; 6 | 7 | import java.util.List; 8 | 9 | public interface CVLanguageService { 10 | Result add(CVLanguage cvLanguage); 11 | Result update(CVLanguage cvLanguage); 12 | Result delete(int id); 13 | 14 | DataResult> getAll(); 15 | DataResult> getAllByCandidateId(int id); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/Employer.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "employers") 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | public class Employer { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.IDENTITY) 18 | @Column(name = "id") 19 | private int id; 20 | @Column(name = "company_name") 21 | private String companyName; 22 | @Column(name = "web_address") 23 | private String webAddress; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.results; 2 | 3 | public class Result { 4 | private boolean success; 5 | private String message; 6 | 7 | public Result(boolean success){ 8 | this.success = success; 9 | } 10 | 11 | public Result(boolean success, String message){ 12 | this(success); // Yukarıdaki tek parametreli constructoru çağırmış oluyor! 13 | this.message = message; 14 | } 15 | 16 | public boolean isSuccess(){ 17 | return this.success; 18 | } 19 | 20 | public String getMessage(){ 21 | return this.message; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVCoverLetterService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVCoverLetter; 6 | 7 | import java.util.List; 8 | 9 | public interface CVCoverLetterService { 10 | Result add(CVCoverLetter cvCoverLetter); 11 | Result update(CVCoverLetter cvCoverLetter); 12 | Result delete(int id); 13 | 14 | DataResult> getAll(); 15 | 16 | DataResult> getAllByCandidateId(int id); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/EmployerPhone.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "employer_phones") 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | public class EmployerPhone { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.IDENTITY) 18 | @Column(name = "id") 19 | private int id; 20 | @Column(name = "employer_id") 21 | private int employerId; 22 | @Column(name = "phone_number") 23 | private String phoneNumber; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "users") 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | public class User { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.IDENTITY) 18 | @Column(name = "id") 19 | private int id; 20 | @Column(name = "email_address") 21 | private String emailAdress; 22 | @Column(name = "password") 23 | private String password; 24 | 25 | private String rPassword; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/UserVerification.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "verification_codes") 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | 16 | public class UserVerification { 17 | 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | @Column(name = "id") 21 | private int id; 22 | @Column(name = "code") 23 | private String code; 24 | @Column(name = "is_verified") 25 | private Boolean is_verified; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVEducationService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVEducation; 6 | 7 | import java.util.List; 8 | 9 | public interface CVEducationService { 10 | Result add(CVEducation cvEducation); 11 | Result update(CVEducation cvEducation); 12 | Result delete(int id); 13 | 14 | DataResult> getAll(); 15 | 16 | DataResult> getAllByCandidateId(int id); 17 | 18 | DataResult> getAllByCandidateIdOrderByGraduationYearDesc(int id); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVExperienceService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVExperience; 6 | 7 | import java.util.List; 8 | 9 | public interface CVExperienceService { 10 | Result add(CVExperience cvExperience); 11 | Result update(CVExperience cvExperience); 12 | Result delete(int id); 13 | 14 | DataResult> getAll(); 15 | 16 | DataResult> getAllByCandidateId(int id); 17 | 18 | DataResult> getAllByCandidateIdOrderByLeaveDateDesc(int id); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/EmployerPhoneManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.EmployerPhoneService; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 6 | import com.icanerdogan.HRMS.entities.concretes.EmployerPhone; 7 | 8 | import org.springframework.stereotype.Service; 9 | 10 | @Service 11 | public class EmployerPhoneManager implements EmployerPhoneService { 12 | 13 | // BU fonksion employers ile id bağlantısı kurulacak! 14 | @Override 15 | public Result addPhone(EmployerPhone employerPhone) { 16 | return new SuccessResult("Şirket Telefon NUmarası Eklendi!"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/CV/CVPhotographService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts.CV; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.CV.CVPhotograph; 6 | import org.springframework.web.multipart.MultipartFile; 7 | 8 | import java.util.List; 9 | 10 | public interface CVPhotographService { 11 | 12 | Result add(CVPhotograph cvPhotograph, MultipartFile multipartFile); 13 | Result delete(CVPhotograph cvPhotograph); 14 | 15 | DataResult> getAll(); 16 | DataResult> getById(int id); 17 | DataResult> getAllByCandidateId(int id); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPADateTimeConverter.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 5.11.5.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | import java.util.Date; 13 | 14 | 15 | public interface TPADateTimeConverter 16 | { 17 | java.util.Date convertDateTime(String strDate); 18 | java.util.Date convertTime(String strDate); 19 | java.util.Date convertDate(String strDate); 20 | String convertDuration(String value); 21 | String getStringFromDateTime(Date value); 22 | String getStringFromDate(Date value); 23 | String getStringFromTime(Date value); 24 | String getStringFromDuration(String value); 25 | } -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/Candidate.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | @Entity 10 | @Table(name = "candidates") 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | public class Candidate { 16 | @Id 17 | @GeneratedValue(strategy = GenerationType.IDENTITY) 18 | 19 | @Column(name = "id") 20 | private int id; 21 | @Column(name = "first_name") 22 | private String firstname; 23 | @Column(name = "last_name") 24 | private String lastname; 25 | @Column(name = "identification_number") 26 | private String identificationnumber; 27 | @Column(name = "birth_date") 28 | private String birthdate; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/abstracts/JobAdvertService.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.abstracts; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.JobAdvert; 6 | 7 | import java.util.List; 8 | 9 | public interface JobAdvertService { 10 | Result addAdvertisement(JobAdvert jobAdvert); 11 | 12 | DataResult> getAll(); 13 | 14 | DataResult> findByAllActive(); 15 | 16 | DataResult> findByActiveStatusAndCreationDateASC(); 17 | 18 | DataResult> findByActiveStatusAndCreationDateDESC(); 19 | 20 | DataResult> findByActiveStatusAndEmployer(int employer_id); 21 | 22 | Result updateActiveStatus(boolean active_status, int id); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVAbility.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "cv_abilities") 17 | 18 | public class CVAbility { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | private int id; 22 | 23 | @ManyToOne 24 | @JoinColumn(name = "candidate_id") 25 | @NotNull 26 | @JsonIgnore 27 | private Candidate candidate; 28 | 29 | @Column(name = "technology_name") 30 | private String technologyName; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/dtos/CVDto.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.dtos; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.CV.*; 5 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import java.util.List; 11 | 12 | @Data 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | public class CVDto { 16 | 17 | @JsonIgnore 18 | public Candidate candidate; 19 | 20 | private List cvEducations; 21 | private List cvExperiences; 22 | private List cvLanguages; 23 | private List cvPhotographs; 24 | private List cvLinks; 25 | private List cvAbilities; 26 | private List cvCoverLetters; 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.results; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | 5 | public class ErrorDataResult extends DataResult { 6 | 7 | // Sonuç başarısız olduğundan dolayı super içine direk false veriyoruz! 8 | public ErrorDataResult(T data, String message) { 9 | super(data, false, message); 10 | } 11 | 12 | // Sadece data ve succes bilgisini false olarak döndüren fonksiyon 13 | public ErrorDataResult(T data) { 14 | super(data, false); 15 | } 16 | 17 | // Sadece mesaj döndürdüğümüz! 18 | public ErrorDataResult(String message) { 19 | super(null, false, message); 20 | } 21 | 22 | // Herhangi bir data veya mesaj olmayınca sadece false döndüren fonksiyon! 23 | public ErrorDataResult() { 24 | super(null, false); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVCoverLetter.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "cv_coverletter") 17 | 18 | public class CVCoverLetter { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | private int id; 22 | 23 | @ManyToOne 24 | @JoinColumn(name = "candidate_id") 25 | @NotNull 26 | @JsonIgnore 27 | private Candidate candidate; 28 | 29 | @Column(name = "cover_letter") 30 | @Lob // Uzun metinler için 31 | private String coverLetter; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.results; 2 | 3 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 4 | 5 | public class SuccessDataResult extends DataResult { 6 | 7 | // Sonuç başarılı olduğundan dolayı super içine direk true veriyoruz! 8 | public SuccessDataResult(T data, String message) { 9 | super(data, true, message); 10 | } 11 | 12 | // Sadece data ve succes bilgisini true olarak döndüren fonksiyon 13 | public SuccessDataResult(T data) { 14 | super(data, true); 15 | } 16 | 17 | // Sadece mesaj döndürdüğümüz! 18 | public SuccessDataResult(String message) { 19 | super(null, true, message); 20 | } 21 | 22 | // Herhangi bir data veya mesaj olmayınca sadece true döndüren fonksiyon! 23 | public SuccessDataResult() { 24 | super(null, true); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVPhotograph.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "cv_images") 17 | public class CVPhotograph { 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | @Column(name = "id") 22 | private int id; 23 | 24 | @ManyToOne 25 | @JoinColumn(name = "candidate_id") 26 | @NotNull 27 | @JsonIgnore 28 | private Candidate candidate; 29 | 30 | @Column(name = "photo") 31 | @NotNull 32 | private String photoLink; 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVLink.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "cv_links") 17 | 18 | public class CVLink { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | private int id; 23 | 24 | @ManyToOne 25 | @JoinColumn(name = "candidate_id") 26 | @NotNull 27 | @JsonIgnore 28 | private Candidate candidate; 29 | 30 | @Column(name = "github") 31 | private String githubAddress; 32 | 33 | @Column(name = "linkedin") 34 | private String linkedinAddress; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVLanguage.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | 12 | @Data 13 | @Entity 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "cv_languages") 17 | 18 | public class CVLanguage { 19 | 20 | @Id 21 | @GeneratedValue(strategy = GenerationType.IDENTITY) 22 | private int id; 23 | 24 | @ManyToOne 25 | @JoinColumn(name = "candidate_id") 26 | @NotNull 27 | @JsonIgnore 28 | private Candidate candidate; 29 | 30 | @Column(name = "language") 31 | private String language; 32 | 33 | @Column(name = "language_level") 34 | private int languageLevel; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/UsersController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.UserService; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.User; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | @RestController 13 | @RequestMapping("api/users") 14 | public class UsersController { 15 | private UserService userService; 16 | 17 | @Autowired 18 | public UsersController(UserService userService) { 19 | this.userService = userService; 20 | } 21 | 22 | @PostMapping("/add") 23 | public Result add(@RequestBody User user){ 24 | return userService.addUser(user); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/HrmsApplication.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.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.PathSelectors; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.spi.DocumentationType; 10 | import springfox.documentation.spring.web.plugins.Docket; 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 | 13 | @SpringBootApplication() 14 | @EnableSwagger2 15 | public class HrmsApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(HrmsApplication.class, args); 19 | } 20 | @Bean 21 | public Docket api() { 22 | return new Docket(DocumentationType.SWAGGER_2) 23 | .select() 24 | .apis(RequestHandlerSelectors.basePackage("com.icanerdogan.HRMS")) 25 | .paths(PathSelectors.any()) 26 | .build(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/PositionsController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.PositionService; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.entities.concretes.Position; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import java.util.List; 10 | 11 | @RestController 12 | @RequestMapping("/api/positions") //Kullanıcın pozisyonları görmesi için gitmesi gereken sekme 13 | public class PositionsController { 14 | private PositionService positionService; 15 | 16 | @Autowired 17 | public PositionsController(PositionService positionService) { 18 | this.positionService = positionService; 19 | } 20 | 21 | @GetMapping("/allpositions") 22 | public List getAll() 23 | { 24 | return this.positionService.getAll(); 25 | } 26 | 27 | @PostMapping("/add") 28 | public Result add(@RequestBody Position position){ 29 | return positionService.addPosition(position); 30 | } 31 | } -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CandidatesController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CandidateService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("api/candidates") 14 | public class CandidatesController { 15 | private CandidateService candidateService; 16 | 17 | @Autowired 18 | public CandidatesController(CandidateService candidateService) { 19 | this.candidateService = candidateService; 20 | } 21 | 22 | @GetMapping("/getall") 23 | public DataResult> getAll(){ 24 | return this.candidateService.getAll(); 25 | } 26 | 27 | @PostMapping("/add") 28 | public Result add(@RequestBody Candidate candidate){ 29 | return candidateService.add(candidate); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/adapters/concretes/EmailServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.adapters.concretes; 2 | 3 | import com.icanerdogan.HRMS.adapters.abstracts.EmailService; 4 | import com.icanerdogan.HRMS.core.utilities.results.Result; 5 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 6 | import com.icanerdogan.HRMS.dataAccess.abstracts.UserDao; 7 | import com.icanerdogan.HRMS.entities.concretes.User; 8 | import org.springframework.stereotype.Service; 9 | 10 | @Service 11 | public class EmailServiceAdapter implements EmailService { 12 | private UserDao userDao; 13 | 14 | public EmailServiceAdapter(UserDao userDao) { 15 | this.userDao = userDao; 16 | } 17 | 18 | @Override 19 | public Result sendEmail(String email) { 20 | return new SuccessResult("Kayıt Maili Gönderildi!"); 21 | } 22 | 23 | @Override 24 | public boolean isEmailUsed(User user) { 25 | for (User u : this.userDao.findAll()){ 26 | if (u.getEmailAdress().equals(user.getEmailAdress())){ 27 | return false; 28 | } 29 | } 30 | return true; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPAMarshalGuid.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 5.11.5.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | 13 | import org.ksoap2.serialization.Marshal; 14 | import org.ksoap2.serialization.PropertyInfo; 15 | import org.ksoap2.serialization.SoapSerializationEnvelope; 16 | import org.xmlpull.v1.XmlPullParser; 17 | import org.xmlpull.v1.XmlPullParserException; 18 | import org.xmlpull.v1.XmlSerializer; 19 | 20 | import java.io.IOException; 21 | import java.util.UUID; 22 | 23 | 24 | public class TPAMarshalGuid implements Marshal 25 | { 26 | public java.lang.Object readInstance(XmlPullParser parser, java.lang.String namespace, java.lang.String name,PropertyInfo expected) throws IOException, XmlPullParserException 27 | { 28 | return UUID.fromString(parser.nextText()); 29 | } 30 | 31 | public void register(SoapSerializationEnvelope cm) 32 | { 33 | cm.addMapping(cm.xsd, "guid", UUID.class, this); 34 | } 35 | 36 | public void writeInstance(XmlSerializer writer, java.lang.Object obj) throws IOException 37 | { 38 | writer.text(obj.toString()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVExperience.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | import java.time.LocalDate; 12 | 13 | @Data 14 | @Entity 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Table(name = "cv_experiencesc") 18 | 19 | public class CVExperience { 20 | 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | private int id; 24 | 25 | @ManyToOne 26 | @JoinColumn(name = "candidate_id") 27 | @NotNull 28 | @JsonIgnore 29 | private Candidate candidate; 30 | 31 | @Column(name = "company_name") 32 | @NotNull 33 | private String companyName; 34 | 35 | @Column(name = "position") 36 | @NotNull 37 | private String position; 38 | 39 | @Column(name = "start_date") 40 | @NotNull 41 | private LocalDate startDate; 42 | 43 | @Column(name = "leave_date") 44 | private LocalDate leaveDate; 45 | 46 | @Column(name = "reason_leaving") 47 | private String reasonLeaving; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/dataAccess/abstracts/JobAdvertDao.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.dataAccess.abstracts; 2 | 3 | import com.icanerdogan.HRMS.entities.concretes.JobAdvert; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.Modifying; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import javax.transaction.Transactional; 9 | import java.util.List; 10 | 11 | public interface JobAdvertDao extends JpaRepository { 12 | 13 | 14 | //boolean findAllById(int id); 15 | 16 | @Query("From JobAdvert j where j.active_status=:true") 17 | List findByAllActive(); 18 | 19 | @Query("From JobAdvert j where j.active_status=:true order by j.creation_date ASC") 20 | List findByActiveStatusAndCreationDateASC(); 21 | 22 | @Query("From JobAdvert j where j.active_status=:true order by j.creation_date DESC") 23 | List findByActiveStatusAndCreationDateDESC(); 24 | 25 | @Query("From JobAdvert j where j.active_status=:true and j.employer.id=:employer_id") 26 | List findByActiveStatusAndEmployer(int employer_id); 27 | 28 | @Transactional 29 | @Modifying 30 | @Query("update JobAdvert j set j.active_status=:active where j.id=:id") 31 | void updateActiveStatus(boolean active_status, int id); 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/adapters/concretes/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.adapters.concretes; 2 | 3 | 4 | import com.icanerdogan.HRMS.adapters.abstracts.MernisService; 5 | import com.icanerdogan.HRMS.core.utilities.results.ErrorResult; 6 | import com.icanerdogan.HRMS.core.utilities.results.Result; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 9 | import mernis.TPAKPSPublicSoap; 10 | import org.springframework.stereotype.Component; 11 | 12 | import java.util.Locale; 13 | 14 | @Component 15 | public class MernisServiceAdapter implements MernisService { 16 | 17 | 18 | @Override 19 | public boolean checkIfRealPerson(Candidate candidate) { 20 | String dogum = candidate.getBirthdate(); 21 | String[] dates = dogum.split("."); 22 | int year = Integer.parseInt(dates[0]); 23 | 24 | boolean result = true; 25 | 26 | TPAKPSPublicSoap tpakpsPublicSoap = new TPAKPSPublicSoap(); 27 | 28 | try { 29 | result = tpakpsPublicSoap.TCKimlikNoDogrula( 30 | Long.parseLong(candidate.getIdentificationnumber()), 31 | candidate.getFirstname().toUpperCase(), 32 | candidate.getLastname().toUpperCase(), 33 | year 34 | ); 35 | } catch (Exception e) { 36 | e.printStackTrace(); 37 | } 38 | 39 | if(result) { 40 | return true; 41 | }else { 42 | return false; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/CV/CVEducation.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes.CV; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 5 | import com.sun.istack.NotNull; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Data; 8 | import lombok.NoArgsConstructor; 9 | 10 | import javax.persistence.*; 11 | import java.time.LocalDate; 12 | 13 | @Data 14 | @Entity 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Table(name = "cv_educations") 18 | public class CVEducation { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | @Column(name = "id") 22 | private int id; 23 | 24 | @ManyToOne 25 | @JoinColumn(name = "candidate_id") 26 | @NotNull 27 | @JsonIgnore 28 | private Candidate candidate; 29 | 30 | @Column(name = "school_name") 31 | @NotNull 32 | private String schoolName; 33 | 34 | @Column(name = "department_name") 35 | @NotNull 36 | private String departmentName; 37 | 38 | @Column(name = "graduation_year") 39 | @NotNull 40 | private String graduationYear; 41 | 42 | @Column(name = "start_year") 43 | @NotNull 44 | private String startYear; 45 | 46 | @Column(name = "starting_date") 47 | @NotNull 48 | private LocalDate startingDate; 49 | 50 | @Column(name = "ending_date") 51 | private LocalDate endingDate; 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/mernis/ObjectFactory.java: -------------------------------------------------------------------------------- 1 | 2 | package mernis; 3 | 4 | import javax.xml.bind.annotation.XmlRegistry; 5 | 6 | 7 | /** 8 | * This object contains factory methods for each 9 | * Java content interface and Java element interface 10 | * generated in the mernis package. 11 | *

An ObjectFactory allows you to programatically 12 | * construct new instances of the Java representation 13 | * for XML content. The Java representation of XML 14 | * content can consist of schema derived interfaces 15 | * and classes representing the binding of schema 16 | * type definitions, element declarations and model 17 | * groups. Factory methods for each of these are 18 | * provided in this class. 19 | * 20 | */ 21 | @XmlRegistry 22 | public class ObjectFactory { 23 | 24 | 25 | /** 26 | * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: mernis 27 | * 28 | */ 29 | public ObjectFactory() { 30 | } 31 | 32 | /** 33 | * Create an instance of {@link TCKimlikNoDogrula } 34 | * 35 | */ 36 | public TCKimlikNoDogrula createTCKimlikNoDogrula() { 37 | return new TCKimlikNoDogrula(); 38 | } 39 | 40 | /** 41 | * Create an instance of {@link TCKimlikNoDogrulaResponse } 42 | * 43 | */ 44 | public TCKimlikNoDogrulaResponse createTCKimlikNoDogrulaResponse() { 45 | return new TCKimlikNoDogrulaResponse(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/core/utilities/upload/CVImageUploadManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.core.utilities.upload; 2 | 3 | import com.cloudinary.Cloudinary; 4 | import com.cloudinary.utils.ObjectUtils; 5 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 6 | import com.icanerdogan.HRMS.core.utilities.results.ErrorDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.web.multipart.MultipartFile; 10 | 11 | import java.io.IOException; 12 | import java.util.Map; 13 | 14 | @Service 15 | public class CVImageUploadManager implements CVImageUploadService{ 16 | private Cloudinary cloudinary; 17 | 18 | public CVImageUploadManager() { 19 | 20 | this.cloudinary = new Cloudinary(ObjectUtils.asMap( 21 | "cloud_name", "dtimgzm07", 22 | "api_key", "861955374865133", 23 | "api_secret", "Hc30YO7WY3edIQz8iVOA700emSU")); 24 | } 25 | 26 | @Override 27 | public DataResult uploadImageFile(MultipartFile imageFile) { 28 | try { 29 | @SuppressWarnings("unchecked") 30 | Map resultMap =(Map) cloudinary.uploader().upload(imageFile.getBytes(), ObjectUtils.emptyMap()); 31 | return new SuccessDataResult(resultMap); 32 | } catch (IOException e) { 33 | e.printStackTrace(); 34 | 35 | } 36 | return new ErrorDataResult(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/entities/concretes/JobAdvert.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.entities.concretes; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | import java.time.LocalDate; 9 | import java.time.LocalDateTime; 10 | 11 | @Entity 12 | @Table(name = "job_advertisements") 13 | 14 | @Data 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class JobAdvert { 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | 21 | @Column(name = "id") 22 | private int id; 23 | 24 | // İş Veren 25 | @ManyToOne 26 | @JoinColumn(name = "employer_id") 27 | private Employer employer; 28 | 29 | @ManyToOne 30 | @JoinColumn(name = "city_id") 31 | private City city; 32 | 33 | @ManyToOne 34 | @JoinColumn(name = "position_id") 35 | private Position position; 36 | 37 | 38 | @Column(name = "job_description") 39 | private String job_description; 40 | 41 | @Column(name = "min_salary") 42 | private String min_salary; 43 | 44 | @Column(name = "max_salary") 45 | private String max_salary; 46 | 47 | @Column(name = "number_of_positions") 48 | private String number_of_positions; 49 | 50 | @Column(name = "creation_date") 51 | private LocalDateTime creation_date = LocalDateTime.now(); 52 | 53 | @Column(name = "application_deadline") 54 | private LocalDate application_deadline; 55 | 56 | @Column(name = "active") 57 | private boolean active_status; 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/PositionManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.PositionService; 4 | import com.icanerdogan.HRMS.core.utilities.results.ErrorResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 7 | import com.icanerdogan.HRMS.dataAccess.abstracts.PositionDao; 8 | import com.icanerdogan.HRMS.entities.concretes.Position; 9 | import com.icanerdogan.HRMS.entities.concretes.User; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class PositionManager implements PositionService { 17 | private PositionDao positionDao; 18 | 19 | @Autowired 20 | public PositionManager(PositionDao positionDao) { 21 | this.positionDao = positionDao; 22 | } 23 | 24 | @Override 25 | public List getAll() { 26 | return this.positionDao.findAll(); 27 | } 28 | 29 | @Override 30 | public Result addPosition(Position position) { 31 | for (Position p : this.positionDao.findAll()){ 32 | if (p.getPositionName().equals(position.getPositionName())){ 33 | return new ErrorResult("Bu Pozisyon Zaten Mevcut! Başka bir pozisyon Eklemeyi Deneyin!"); 34 | } 35 | } 36 | return new SuccessResult("Pozisyon Başarıyla Eklendi: "+position.getPositionName()); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVLinksController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | 4 | import com.icanerdogan.HRMS.business.abstracts.CV.CVLinkService; 5 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 6 | import com.icanerdogan.HRMS.core.utilities.results.Result; 7 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLink; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import java.util.List; 12 | 13 | @RestController 14 | @RequestMapping("api/links") 15 | public class CVLinksController { 16 | private CVLinkService cvLinkService; 17 | 18 | @Autowired 19 | public CVLinksController(CVLinkService cvLinkService) { 20 | this.cvLinkService = cvLinkService; 21 | } 22 | 23 | @PostMapping("/add") 24 | public Result add(@RequestBody CVLink cvLink){ 25 | return this.cvLinkService.add(cvLink); 26 | } 27 | 28 | @PostMapping("/update") 29 | public Result update(@RequestBody CVLink cvLink){ 30 | return this.cvLinkService.update(cvLink); 31 | } 32 | 33 | @PostMapping("/delete") 34 | public Result delete(@RequestParam("id") int id){ 35 | return this.cvLinkService.delete(id); 36 | } 37 | 38 | 39 | @GetMapping("/getAll") 40 | public DataResult> getAll(){ 41 | return this.cvLinkService.getAll(); 42 | } 43 | 44 | @GetMapping("/getAllByCandidateId") 45 | public DataResult> getAllByCandidateId(@RequestParam int id){ 46 | return this.cvLinkService.getAllByCandidateId(id); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVAbilitiesController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVAbilityService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.CV.CVAbility; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("api/abilities") 14 | public class CVAbilitiesController { 15 | private CVAbilityService cvAbilityService; 16 | 17 | @Autowired 18 | public CVAbilitiesController(CVAbilityService cvAbilityService) { 19 | this.cvAbilityService = cvAbilityService; 20 | } 21 | 22 | @PostMapping("/add") 23 | public Result add(@RequestBody CVAbility cvAbility){ 24 | return this.cvAbilityService.add(cvAbility); 25 | } 26 | 27 | @PostMapping("/update") 28 | public Result update(@RequestBody CVAbility cvAbility){ 29 | return this.cvAbilityService.update(cvAbility); 30 | } 31 | 32 | @PostMapping("/delete") 33 | public Result delete(@RequestParam("id") int id){ 34 | return this.cvAbilityService.delete(id); 35 | } 36 | 37 | @GetMapping("/getAll") 38 | public DataResult> getAll(){ 39 | return this.cvAbilityService.getAll(); 40 | } 41 | 42 | @GetMapping("/getAllByCandidateId") 43 | public DataResult> getAllByJobseekerId(@RequestParam int id){ 44 | return this.cvAbilityService.getAllByCandidateId(id); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/EmployerController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.EmployerPhoneService; 4 | import com.icanerdogan.HRMS.business.abstracts.EmployerService; 5 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 6 | import com.icanerdogan.HRMS.core.utilities.results.Result; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 9 | import com.icanerdogan.HRMS.entities.concretes.Employer; 10 | import com.icanerdogan.HRMS.entities.concretes.EmployerPhone; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/api/employers") 18 | public class EmployerController { 19 | private EmployerService employerService; 20 | private EmployerPhoneService employerPhoneService; 21 | 22 | @Autowired 23 | public EmployerController(EmployerService employerService, EmployerPhoneService employerPhoneService) { 24 | this.employerService = employerService; 25 | this.employerPhoneService = employerPhoneService; 26 | } 27 | 28 | @GetMapping("/allemployers") 29 | public DataResult> getAll(){ 30 | return this.employerService.getAll(); 31 | } 32 | @PostMapping("/add") 33 | public Result add(@RequestBody Employer employer, @RequestBody EmployerPhone employerPhone) { 34 | this.employerPhoneService.addPhone(employerPhone); 35 | this.employerService.add(employer); 36 | 37 | return new SuccessResult("Employer Eklendi!"); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/EmployersController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.EmployerPhoneService; 4 | import com.icanerdogan.HRMS.business.abstracts.EmployerService; 5 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 6 | import com.icanerdogan.HRMS.core.utilities.results.Result; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 9 | import com.icanerdogan.HRMS.entities.concretes.Employer; 10 | import com.icanerdogan.HRMS.entities.concretes.EmployerPhone; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/api/employers") 18 | public class EmployersController { 19 | private EmployerService employerService; 20 | private EmployerPhoneService employerPhoneService; 21 | 22 | @Autowired 23 | public EmployersController(EmployerService employerService, EmployerPhoneService employerPhoneService) { 24 | this.employerService = employerService; 25 | this.employerPhoneService = employerPhoneService; 26 | } 27 | 28 | @GetMapping("/allemployers") 29 | public DataResult> getAll(){ 30 | return this.employerService.getAll(); 31 | } 32 | @PostMapping("/add") 33 | public Result add(@RequestBody Employer employer, @RequestBody EmployerPhone employerPhone) { 34 | this.employerPhoneService.addPhone(employerPhone); 35 | this.employerService.add(employer); 36 | 37 | return new SuccessResult("Employer Eklendi!"); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/EmployerManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes; 2 | 3 | import com.icanerdogan.HRMS.adapters.abstracts.EmailService; 4 | import com.icanerdogan.HRMS.adapters.concretes.EmployeeConfirmationAdapter; 5 | import com.icanerdogan.HRMS.business.abstracts.EmployerService; 6 | import com.icanerdogan.HRMS.core.utilities.results.*; 7 | import com.icanerdogan.HRMS.dataAccess.abstracts.EmployerDao; 8 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 9 | import com.icanerdogan.HRMS.entities.concretes.Employer; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class EmployerManager implements EmployerService { 17 | 18 | private EmployerDao employerDao; 19 | private EmailService emailService; 20 | private EmployeeConfirmationAdapter employeeConfirmationAdapter; 21 | 22 | 23 | @Autowired 24 | public EmployerManager(EmployerDao employerDao, EmailService emailService) { 25 | this.employerDao = employerDao; 26 | this.emailService = emailService; 27 | } 28 | 29 | @Override 30 | public DataResult> getAll() { 31 | return new SuccessDataResult>(this.employerDao.findAll(), "Tüm İş Verenler Listelendi!"); 32 | } 33 | 34 | @Override 35 | public Result add(Employer employer) { 36 | if (employeeConfirmationAdapter.employeeCheck(employer)){ 37 | return new SuccessResult("İş Veren Başarıyla Eklendi! Yönetici Tarafından Onaylandı!"); 38 | } 39 | return new ErrorResult("İş Veren Onaylanmadı!"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVLanguagesController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVLanguageService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLanguage; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("api/languages") 14 | public class CVLanguagesController { 15 | private CVLanguageService cvLanguageService; 16 | 17 | @Autowired 18 | public CVLanguagesController(CVLanguageService cvLanguageService) { 19 | this.cvLanguageService = cvLanguageService; 20 | } 21 | 22 | @PostMapping("/add") 23 | public Result add(@RequestBody CVLanguage cvLanguage) { 24 | return this.cvLanguageService.add(cvLanguage); 25 | } 26 | 27 | @PostMapping("/update") 28 | public Result update(@RequestBody CVLanguage cvLanguage) { 29 | return this.cvLanguageService.update(cvLanguage); 30 | } 31 | 32 | @PostMapping("/delete") 33 | public Result delete(@RequestParam("id") int id) { 34 | return this.cvLanguageService.delete(id); 35 | } 36 | 37 | @GetMapping("/getAll") 38 | public DataResult> getAll() { 39 | return this.cvLanguageService.getAll(); 40 | } 41 | 42 | @GetMapping("/getAllByJobSeekerId") 43 | public DataResult> getAllByCandidateId(@RequestParam int id) { 44 | return this.cvLanguageService.getAllByCandidateId(id); 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/mernis/TCKimlikNoDogrulaResponse.java: -------------------------------------------------------------------------------- 1 | 2 | package mernis; 3 | 4 | import javax.xml.bind.annotation.XmlAccessType; 5 | import javax.xml.bind.annotation.XmlAccessorType; 6 | import javax.xml.bind.annotation.XmlElement; 7 | import javax.xml.bind.annotation.XmlRootElement; 8 | import javax.xml.bind.annotation.XmlType; 9 | 10 | 11 | /** 12 | *

Java class for anonymous complex type. 13 | * 14 | *

The following schema fragment specifies the expected content contained within this class. 15 | * 16 | *

17 |  * <complexType>
18 |  *   <complexContent>
19 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
20 |  *       <sequence>
21 |  *         <element name="TCKimlikNoDogrulaResult" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
22 |  *       </sequence>
23 |  *     </restriction>
24 |  *   </complexContent>
25 |  * </complexType>
26 |  * 
27 | * 28 | * 29 | */ 30 | @XmlAccessorType(XmlAccessType.FIELD) 31 | @XmlType(name = "", propOrder = { 32 | "tcKimlikNoDogrulaResult" 33 | }) 34 | @XmlRootElement(name = "TCKimlikNoDogrulaResponse") 35 | public class TCKimlikNoDogrulaResponse { 36 | 37 | @XmlElement(name = "TCKimlikNoDogrulaResult") 38 | protected boolean tcKimlikNoDogrulaResult; 39 | 40 | /** 41 | * Gets the value of the tcKimlikNoDogrulaResult property. 42 | * 43 | */ 44 | public boolean isTCKimlikNoDogrulaResult() { 45 | return tcKimlikNoDogrulaResult; 46 | } 47 | 48 | /** 49 | * Sets the value of the tcKimlikNoDogrulaResult property. 50 | * 51 | */ 52 | public void setTCKimlikNoDogrulaResult(boolean value) { 53 | this.tcKimlikNoDogrulaResult = value; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVCoverLettersController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVCoverLetterService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.CV.CVCoverLetter; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("api/coverletters") 14 | public class CVCoverLettersController { 15 | private CVCoverLetterService cvCoverLetterService; 16 | 17 | @Autowired 18 | public CVCoverLettersController(CVCoverLetterService cvCoverLetterService) { 19 | this.cvCoverLetterService = cvCoverLetterService; 20 | } 21 | 22 | @PostMapping("/add") 23 | public Result add(@RequestBody CVCoverLetter cvCoverLetter) { 24 | return this.cvCoverLetterService.add(cvCoverLetter); 25 | } 26 | 27 | @PostMapping("/update") 28 | public Result update(@RequestBody CVCoverLetter cvCoverLetter) { 29 | return this.cvCoverLetterService.update(cvCoverLetter) ; 30 | 31 | } 32 | @PostMapping("/delete") 33 | public Result delete(@RequestParam("id") int id) { 34 | return this.cvCoverLetterService.delete(id); 35 | 36 | } 37 | 38 | @GetMapping("/getAll") 39 | public DataResult> getAll(){ 40 | return this.cvCoverLetterService.getAll(); 41 | } 42 | 43 | @GetMapping("/getAllByCandidateId") 44 | public DataResult> getAllByCandidateId(@RequestParam int id){ 45 | return this.cvCoverLetterService.getAllByCandidateId(id); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/mernis/KPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | 2 | package mernis; 3 | 4 | import javax.jws.WebMethod; 5 | import javax.jws.WebParam; 6 | import javax.jws.WebResult; 7 | import javax.jws.WebService; 8 | import javax.xml.bind.annotation.XmlSeeAlso; 9 | import javax.xml.ws.RequestWrapper; 10 | import javax.xml.ws.ResponseWrapper; 11 | 12 | 13 | /** 14 | * This class was generated by the JAX-WS RI. 15 | * JAX-WS RI 2.2.9-b130926.1035 16 | * Generated source version: 2.2 17 | * 18 | */ 19 | @WebService(name = "KPSPublicSoap", targetNamespace = "http://tckimlik.nvi.gov.tr/WS") 20 | @XmlSeeAlso({ 21 | ObjectFactory.class 22 | }) 23 | public interface KPSPublicSoap { 24 | 25 | 26 | /** 27 | * 28 | * @param dogumYili 29 | * @param ad 30 | * @param tcKimlikNo 31 | * @param soyad 32 | * @return 33 | * returns boolean 34 | */ 35 | @WebMethod(operationName = "TCKimlikNoDogrula", action = "http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula") 36 | @WebResult(name = "TCKimlikNoDogrulaResult", targetNamespace = "http://tckimlik.nvi.gov.tr/WS") 37 | @RequestWrapper(localName = "TCKimlikNoDogrula", targetNamespace = "http://tckimlik.nvi.gov.tr/WS", className = "mernis.TCKimlikNoDogrula") 38 | @ResponseWrapper(localName = "TCKimlikNoDogrulaResponse", targetNamespace = "http://tckimlik.nvi.gov.tr/WS", className = "mernis.TCKimlikNoDogrulaResponse") 39 | public boolean tcKimlikNoDogrula( 40 | @WebParam(name = "TCKimlikNo", targetNamespace = "http://tckimlik.nvi.gov.tr/WS") 41 | long tcKimlikNo, 42 | @WebParam(name = "Ad", targetNamespace = "http://tckimlik.nvi.gov.tr/WS") 43 | String ad, 44 | @WebParam(name = "Soyad", targetNamespace = "http://tckimlik.nvi.gov.tr/WS") 45 | String soyad, 46 | @WebParam(name = "DogumYili", targetNamespace = "http://tckimlik.nvi.gov.tr/WS") 47 | int dogumYili); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVLinkManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVLinkService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVLinkDao; 9 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLink; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class CVLinkManager implements CVLinkService { 17 | 18 | private CVLinkDao cvLinkDao; 19 | 20 | @Autowired 21 | public CVLinkManager(CVLinkDao cvLinkDao) { 22 | this.cvLinkDao = cvLinkDao; 23 | } 24 | 25 | @Override 26 | public Result add(CVLink cvLink) { 27 | this.cvLinkDao.save(cvLink); 28 | return new SuccessResult("Link Başarıyla Eklendi!"); 29 | } 30 | 31 | @Override 32 | public Result update(CVLink cvLink) { 33 | this.cvLinkDao.save(cvLink); 34 | return new SuccessResult("Link Başarıyla Güncellendi!"); 35 | } 36 | 37 | @Override 38 | public Result delete(int id) { 39 | this.cvLinkDao.deleteById(id); 40 | return new SuccessResult("Link Başarıyla Silindi!"); 41 | } 42 | 43 | @Override 44 | public DataResult> getAll() { 45 | return new SuccessDataResult>(this.cvLinkDao.findAll()); 46 | } 47 | 48 | @Override 49 | public DataResult> getAllByCandidateId(int id) { 50 | return new SuccessDataResult>(this.cvLinkDao.getAllByCandidate_Id(id)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/mernis/Metadata.info: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5.11.5.0 5 | Basic 6 | easywsdl 7 | TPAKPSPublicSoap 8 | 9 | 10 | https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL 11 | 12 | mernis 13 | false 14 | true 15 | false 16 | true 17 | false 18 | false 19 | false 20 | false 21 | Default 22 | 23 | false 24 | false 25 | Java 26 | None 27 | true 28 | false 29 | false 30 | 31 | 32 | Metadata.info 33 | TPADateTimeConverter.java 34 | TPAExtendedSoapSerializationEnvelope.java 35 | TPAHelper.java 36 | TPAKPSPublicSoap.java 37 | TPAKPSPublicSoap12.java 38 | TPAMarshalGuid.java 39 | TPAStandardDateTimeConverter.java 40 | 41 | 42 | ExKsoap2-1.0.3.1.jar 43 | ksoap2-android-assembly-3.6.4-jar-with-dependencies.jar 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVAbilityManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVAbilityService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVAbilityDao; 9 | import com.icanerdogan.HRMS.entities.concretes.CV.CVAbility; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | @Service 15 | public class CVAbilityManager implements CVAbilityService { 16 | private CVAbilityDao cvAbilityDao; 17 | 18 | @Autowired 19 | public CVAbilityManager(CVAbilityDao cvAbilityDao) { 20 | this.cvAbilityDao = cvAbilityDao; 21 | } 22 | 23 | 24 | @Override 25 | public Result add(CVAbility cvAbility) { 26 | this.cvAbilityDao.save(cvAbility); 27 | return new SuccessResult("Yeni Yetenek Eklendi!"); 28 | } 29 | 30 | @Override 31 | public Result delete(int id) { 32 | this.cvAbilityDao.deleteById(id); 33 | return new SuccessResult("Yetenek Silindi!"); 34 | } 35 | 36 | @Override 37 | public Result update(CVAbility cvAbility) { 38 | this.cvAbilityDao.save(cvAbility); 39 | return new SuccessResult("Yetenek Güncellendi!"); 40 | } 41 | 42 | @Override 43 | public DataResult> getAll() { 44 | return new SuccessDataResult>(this.cvAbilityDao.findAll()); 45 | } 46 | 47 | @Override 48 | public DataResult> getAllByCandidateId(int id) { 49 | return new SuccessDataResult>(this.cvAbilityDao.getAllByCandidate_Id(id)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVLanguageManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVLanguageService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVLanguageDao; 9 | import com.icanerdogan.HRMS.entities.concretes.CV.CVLanguage; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class CVLanguageManager implements CVLanguageService { 17 | private CVLanguageDao cvLanguageDao; 18 | 19 | @Autowired 20 | public CVLanguageManager(CVLanguageDao cvLanguageDao) { 21 | this.cvLanguageDao = cvLanguageDao; 22 | } 23 | 24 | @Override 25 | public Result add(CVLanguage cvLanguage) { 26 | this.cvLanguageDao.save(cvLanguage); 27 | return new SuccessResult("Dil Başarıyla Eklendi!"); 28 | } 29 | 30 | @Override 31 | public Result update(CVLanguage cvLanguage) { 32 | this.cvLanguageDao.save(cvLanguage); 33 | return new SuccessResult("Dil Başarıyla Güncellendi!"); 34 | } 35 | 36 | @Override 37 | public Result delete(int id) { 38 | this.cvLanguageDao.deleteById(id); 39 | return new SuccessResult("Dil Başarıyla Silindi!"); 40 | } 41 | 42 | @Override 43 | public DataResult> getAll() { 44 | return new SuccessDataResult>(this.cvLanguageDao.findAll()); 45 | } 46 | 47 | @Override 48 | public DataResult> getAllByCandidateId(int id) { 49 | return new SuccessDataResult>(this.cvLanguageDao.getAllByCandidate_Id(id)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVEducationsController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVEducationService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.CV.CVEducation; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("api/educations") 14 | public class CVEducationsController { 15 | private CVEducationService cvEducationService; 16 | 17 | @Autowired 18 | public CVEducationsController(CVEducationService cvEducationService) { 19 | this.cvEducationService = cvEducationService; 20 | } 21 | 22 | @PostMapping("/add") 23 | public Result add(@RequestBody CVEducation cvEducation) { 24 | return this.cvEducationService.add(cvEducation); 25 | } 26 | 27 | @PostMapping("/update") 28 | public Result update(@RequestBody CVEducation cvEducation) { 29 | return this.cvEducationService.update(cvEducation); 30 | } 31 | 32 | @PostMapping("/delete") 33 | public Result delete(@RequestParam("id") int id) { 34 | return this.cvEducationService.delete(id); 35 | } 36 | 37 | @GetMapping("/getAll") 38 | public DataResult> getAll() { 39 | return this.cvEducationService.getAll(); 40 | } 41 | 42 | @GetMapping("/getAllByCandidateIdOrderByGraduationYearDesc") 43 | public DataResult> getAllByCandidateIdOrderByGraduationYearDesc (@RequestParam int id){ 44 | return this.cvEducationService.getAllByCandidateIdOrderByGraduationYearDesc(id); 45 | } 46 | @GetMapping("/getAllByCandidateId") 47 | public DataResult> getAllByCandidateId(@RequestParam int id){ 48 | return this.cvEducationService.getAllByCandidateId(id); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVExperiencesController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVExperienceService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.CV.CVExperience; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("api/experiences") 14 | public class CVExperiencesController { 15 | private CVExperienceService cvExperienceService; 16 | 17 | @Autowired 18 | public CVExperiencesController(CVExperienceService cvExperienceService) { 19 | this.cvExperienceService = cvExperienceService; 20 | } 21 | @PostMapping("/add") 22 | public Result add(@RequestBody CVExperience cvExperience) { 23 | return this.cvExperienceService.add(cvExperience); 24 | } 25 | 26 | @PostMapping("/update") 27 | public Result update(@RequestBody CVExperience cvExperience) { 28 | return this.cvExperienceService.update(cvExperience); 29 | } 30 | 31 | @PostMapping("/delete") 32 | public Result delete(@RequestParam("id") int id) { 33 | return this.cvExperienceService.delete(id); 34 | } 35 | 36 | @GetMapping("/getAll") 37 | public DataResult> getAll() { 38 | return this.cvExperienceService.getAll(); 39 | } 40 | 41 | @GetMapping("/getAllByCandidateIdOrderByLeaveDateDesc") 42 | public DataResult> getAllByCandidateIdOrderByLeaveDateDesc(@RequestParam("id") int id){ 43 | return this.cvExperienceService.getAllByCandidateIdOrderByLeaveDateDesc(id); 44 | } 45 | 46 | @GetMapping("/getAllByCandidateId") 47 | public DataResult> getAllByCandidateId(@RequestParam int id){ 48 | return this.cvExperienceService.getAllByCandidateId(id); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes; 2 | 3 | import com.icanerdogan.HRMS.adapters.abstracts.EmailService; 4 | import com.icanerdogan.HRMS.adapters.concretes.EmailServiceAdapter; 5 | import com.icanerdogan.HRMS.adapters.concretes.MernisServiceAdapter; 6 | import com.icanerdogan.HRMS.business.abstracts.UserService; 7 | import com.icanerdogan.HRMS.core.utilities.regex.RegexEmail; 8 | import com.icanerdogan.HRMS.core.utilities.regex.RegexPassword; 9 | import com.icanerdogan.HRMS.core.utilities.results.*; 10 | import com.icanerdogan.HRMS.dataAccess.abstracts.UserDao; 11 | import com.icanerdogan.HRMS.entities.concretes.User; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | @Service 16 | public class UserManager implements UserService { 17 | private UserDao userDao; 18 | private RegexEmail regexEmail; 19 | private RegexPassword regexPassword; 20 | private EmailServiceAdapter emailServiceAdapter; 21 | 22 | @Autowired 23 | public UserManager(UserDao userDao) { 24 | super(); 25 | this.userDao = userDao; 26 | } 27 | 28 | @Override 29 | public Result addUser(User user) { 30 | //this.userDao.save(user); 31 | String userMail = user.getEmailAdress(); 32 | String userPassword = user.getPassword(); 33 | String rUserPassword = user.getRPassword(); 34 | 35 | if (regexEmail.validate(userMail) && !regexPassword.validate(userPassword)) { 36 | if (userPassword.equals(rUserPassword)) { 37 | return new SuccessResult("Kullanıcı Eklendi!"); 38 | } 39 | } 40 | 41 | if (!emailServiceAdapter.isEmailUsed(user)){ 42 | return new SuccessResult("Kullanılmayan, Geçerli Bir E-Posta Girdiniz! Kayıt Başarılı!"); 43 | } 44 | 45 | emailServiceAdapter.sendEmail(userMail); 46 | 47 | return new ErrorResult("Kullanıcı Ekleme İşlemi Başarısız!"); 48 | 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVCoverLetterManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVCoverLetterService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVCoverLetterDao; 9 | import com.icanerdogan.HRMS.entities.concretes.CV.CVCoverLetter; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | @Service 15 | public class CVCoverLetterManager implements CVCoverLetterService { 16 | private CVCoverLetterDao cvCoverLetterDao; 17 | 18 | @Autowired 19 | public CVCoverLetterManager(CVCoverLetterDao cvCoverLetterDao) { 20 | this.cvCoverLetterDao = cvCoverLetterDao; 21 | } 22 | 23 | @Override 24 | public Result add(CVCoverLetter cvCoverLetter) { 25 | this.cvCoverLetterDao.save(cvCoverLetter); 26 | return new SuccessResult("Ön Yazı Başarıyla Eklendi!"); 27 | } 28 | 29 | @Override 30 | public Result update(CVCoverLetter cvCoverLetter) { 31 | this.cvCoverLetterDao.save(cvCoverLetter); 32 | return new SuccessResult("Ön Yazı Başarıyla Güncellendi!"); 33 | } 34 | 35 | @Override 36 | public Result delete(int id) { 37 | this.cvCoverLetterDao.deleteById(id); 38 | return new SuccessResult("Ön Yazı Başarıyla Silindi!"); 39 | } 40 | 41 | @Override 42 | public DataResult> getAll() { 43 | return new SuccessDataResult>(this.cvCoverLetterDao.findAll()); 44 | } 45 | 46 | @Override 47 | public DataResult> getAllByCandidateId(int id) { 48 | return new SuccessDataResult(this.cvCoverLetterDao.getCVCoverLetterByCandidate_Id(id)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/CV/CVPhotographsController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVPhotographService; 4 | import com.icanerdogan.HRMS.business.abstracts.CandidateService; 5 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 6 | import com.icanerdogan.HRMS.core.utilities.results.Result; 7 | import com.icanerdogan.HRMS.entities.concretes.CV.CVPhotograph; 8 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.*; 11 | import org.springframework.web.multipart.MultipartFile; 12 | 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping("api/photographs") 17 | public class CVPhotographsController { 18 | 19 | private CVPhotographService cvPhotographService; 20 | 21 | @Autowired 22 | public CVPhotographsController(CVPhotographService cvPhotographService) { 23 | this.cvPhotographService = cvPhotographService; 24 | } 25 | 26 | @PostMapping(value = "/add") 27 | public Result add(@RequestBody MultipartFile file, @RequestParam("id") int id) { 28 | CVPhotograph cvPhotograph = new CVPhotograph(); 29 | Candidate candidate = new Candidate(); 30 | candidate.setId(id); 31 | cvPhotograph.setCandidate(candidate); 32 | return this.cvPhotographService.add(cvPhotograph, file); 33 | } 34 | 35 | 36 | @DeleteMapping("/delete") 37 | public Result delete(@RequestBody CVPhotograph cvPhotograph) { 38 | return this.cvPhotographService.delete(cvPhotograph); 39 | } 40 | 41 | @GetMapping("/getAll") 42 | public DataResult> getAll() { 43 | return this.cvPhotographService.getAll(); 44 | } 45 | 46 | @GetMapping("/getById") 47 | public DataResult> getById(@RequestParam("id") int id) { 48 | return this.cvPhotographService.getById(id); 49 | } 50 | 51 | @GetMapping("/getAllByCandidateId") 52 | public DataResult> getAllByCandidateId(@RequestParam("candidate_id") int id) { 53 | return this.cvPhotographService.getAllByCandidateId(id); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVEducationManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVEducationService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVEducationDao; 9 | import com.icanerdogan.HRMS.entities.concretes.CV.CVEducation; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class CVEducationManager implements CVEducationService { 17 | private CVEducationDao cvEducationDao; 18 | 19 | @Autowired 20 | public CVEducationManager(CVEducationDao cvEducationDao) { 21 | this.cvEducationDao = cvEducationDao; 22 | } 23 | 24 | @Override 25 | public Result add(CVEducation cvEducation) { 26 | this.cvEducationDao.save(cvEducation); 27 | return new SuccessResult("Okul Başarıyla Eklendi!"); 28 | } 29 | 30 | @Override 31 | public Result update(CVEducation cvEducation) { 32 | this.cvEducationDao.save(cvEducation); 33 | return new SuccessResult("Okul Başarıyla Güncellendi!"); 34 | } 35 | 36 | @Override 37 | public Result delete(int id) { 38 | this.cvEducationDao.deleteById(id); 39 | return new SuccessResult("Okul Başarıyla Silindi!"); 40 | } 41 | 42 | @Override 43 | public DataResult> getAll() { 44 | return new SuccessDataResult>(this.cvEducationDao.findAll()); 45 | } 46 | 47 | @Override 48 | public DataResult> getAllByCandidateId(int id) { 49 | return new SuccessDataResult>(this.cvEducationDao.getAllByCandidate_Id(id)); 50 | } 51 | 52 | @Override 53 | public DataResult> getAllByCandidateIdOrderByGraduationYearDesc(int id) { 54 | return new SuccessDataResult>(this.cvEducationDao.getAllByCandidate_IdOrderByGraduationYearDesc(id)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CandidateManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes; 2 | 3 | import com.icanerdogan.HRMS.adapters.concretes.MernisServiceAdapter; 4 | import com.icanerdogan.HRMS.business.abstracts.CandidateService; 5 | import com.icanerdogan.HRMS.core.utilities.results.*; 6 | import com.icanerdogan.HRMS.dataAccess.abstracts.CandidateDao; 7 | import com.icanerdogan.HRMS.entities.concretes.Candidate; 8 | import com.icanerdogan.HRMS.entities.concretes.User; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | public class CandidateManager implements CandidateService { 16 | CandidateDao candidateDao; 17 | MernisServiceAdapter mernisServiceAdapter; 18 | 19 | @Autowired 20 | public CandidateManager(CandidateDao candidateDao) { 21 | this.candidateDao = candidateDao; 22 | } 23 | 24 | @Override 25 | public DataResult> getAll() { 26 | return new SuccessDataResult> 27 | (this.candidateDao.findAll(), "Tüm Adaylar Listelendi!"); 28 | } 29 | 30 | //Tüm Candidates içinden kontrol TC Kimlik numaraası kontrolü 31 | @Override 32 | public DataResult checkAllIdentificationNumber(String identificationNumber) { 33 | return new ErrorDataResult(candidateDao.findByIdentificationnumber(identificationNumber)); 34 | } 35 | 36 | @Override 37 | public Result add(Candidate candidate) { 38 | //this.candidateDao.save(candidate); 39 | String firstName = candidate.getFirstname(); 40 | String lastName = candidate.getLastname(); 41 | String identificationnumber = candidate.getIdentificationnumber(); 42 | String birthdate = candidate.getBirthdate(); 43 | 44 | if (firstName == null || lastName== null || 45 | identificationnumber == null || birthdate == null){ 46 | return new ErrorResult("Boş Alan Bırakılmaz!"); 47 | } 48 | 49 | if(!mernisServiceAdapter.checkIfRealPerson(candidate)){ 50 | return new ErrorResult("Kimlik Doğrulama İşlemi Başarısız!"); 51 | } 52 | 53 | return new SuccessResult("Kayıt İşlemi Başarılı!"); 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVExperienceManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVExperienceService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVExperienceDao; 9 | import com.icanerdogan.HRMS.entities.concretes.CV.CVExperience; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | 15 | @Service 16 | public class CVExperienceManager implements CVExperienceService { 17 | private CVExperienceDao cvExperienceDao; 18 | 19 | @Autowired 20 | public CVExperienceManager(CVExperienceDao cvExperienceDao) { 21 | this.cvExperienceDao = cvExperienceDao; 22 | } 23 | 24 | @Override 25 | public Result add(CVExperience cvExperience) { 26 | this.cvExperienceDao.save(cvExperience); 27 | return new SuccessResult("Tecrübe Başarıyla Eklendi!"); 28 | } 29 | 30 | @Override 31 | public Result update(CVExperience cvExperience) { 32 | this.cvExperienceDao.save(cvExperience); 33 | return new SuccessResult("Tecrübe Başarıyla Güncellendi!"); 34 | } 35 | 36 | @Override 37 | public Result delete(int id) { 38 | this.cvExperienceDao.deleteById(id); 39 | return new SuccessResult("Tecrübe Başarıyla Silindi!"); 40 | } 41 | 42 | @Override 43 | public DataResult> getAll() { 44 | return new SuccessDataResult>(this.cvExperienceDao.findAll()); 45 | } 46 | 47 | @Override 48 | public DataResult> getAllByCandidateId(int id) { 49 | return new SuccessDataResult>(this.cvExperienceDao.getAllByCandidate_Id(id)); 50 | 51 | } 52 | 53 | @Override 54 | public DataResult> getAllByCandidateIdOrderByLeaveDateDesc(int id) { 55 | return new SuccessDataResult>(this.cvExperienceDao.getAllByCandidate_IdOrderByLeaveDateDesc(id)); 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/api/JobAdvertController.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.api; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.JobAdvertService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.entities.concretes.JobAdvert; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.*; 9 | 10 | import java.util.List; 11 | 12 | @RestController 13 | @RequestMapping("/api/advertisements") 14 | public class JobAdvertController { 15 | 16 | private JobAdvertService jobAdvertService; 17 | 18 | @Autowired 19 | public JobAdvertController(JobAdvertService jobAdvertService) { 20 | this.jobAdvertService = jobAdvertService; 21 | } 22 | 23 | @GetMapping("/getAll") 24 | public DataResult> getAll(){ 25 | return this.jobAdvertService.getAll(); 26 | } 27 | 28 | @PostMapping("/addAdvertisement") 29 | public Result addAdvertisement(@RequestBody JobAdvert jobAdvert){ 30 | return this.jobAdvertService.addAdvertisement(jobAdvert); 31 | } 32 | 33 | @GetMapping("/findByAllActive") 34 | public DataResult> findByAllActive(){ 35 | return this.jobAdvertService.findByAllActive(); 36 | } 37 | 38 | @GetMapping("/findByActiveStatusAndCreationDateASC") 39 | public DataResult> findByActiveStatusAndCreationDateASC(){ 40 | return this.jobAdvertService.findByActiveStatusAndCreationDateASC(); 41 | } 42 | 43 | @GetMapping("/findByActiveStatusAndCreationDateDESC") 44 | public DataResult> findByActiveStatusAndCreationDateDESC(){ 45 | return this.jobAdvertService.findByActiveStatusAndCreationDateDESC(); 46 | } 47 | 48 | @PostMapping("/findByActiveStatusAndEmployer") 49 | public DataResult> findByActiveStatusAndEmployer(@RequestParam(value = "employer_id") int employer_id){ 50 | return this.jobAdvertService.findByActiveStatusAndEmployer(employer_id); 51 | } 52 | 53 | @PutMapping("/updateActiveStatus") 54 | public Result updateActiveStatus(@RequestParam(value = "active") boolean active_status, @RequestParam(value = "id") int id){ 55 | return this.jobAdvertService.updateActiveStatus(active_status,id); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/CV/CVPhotographManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes.CV; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.CV.CVPhotographService; 4 | import com.icanerdogan.HRMS.core.utilities.results.DataResult; 5 | import com.icanerdogan.HRMS.core.utilities.results.Result; 6 | import com.icanerdogan.HRMS.core.utilities.results.SuccessDataResult; 7 | import com.icanerdogan.HRMS.core.utilities.results.SuccessResult; 8 | import com.icanerdogan.HRMS.core.utilities.upload.CVImageUploadService; 9 | import com.icanerdogan.HRMS.dataAccess.abstracts.CV.CVPhotographDao; 10 | import com.icanerdogan.HRMS.entities.concretes.CV.CVPhotograph; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Service; 13 | import org.springframework.web.multipart.MultipartFile; 14 | 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | @Service 19 | public class CVPhotographManager implements CVPhotographService { 20 | private CVPhotographDao cvPhotographDao; 21 | private CVImageUploadService cvImageUploadService; 22 | 23 | @Autowired 24 | public CVPhotographManager(CVPhotographDao cvPhotographDao, CVImageUploadService cvImageUploadService) { 25 | this.cvPhotographDao = cvPhotographDao; 26 | this.cvImageUploadService = cvImageUploadService; 27 | } 28 | 29 | @Override 30 | public Result add(CVPhotograph cvPhotograph, MultipartFile multipartFile) { 31 | Map result = this.cvImageUploadService.uploadImageFile(multipartFile).getData(); 32 | String url = result.get("url"); 33 | cvPhotograph.setPhotoLink(url); 34 | return new SuccessResult("Fotoğraf Başarıyla Eklendi!"); 35 | } 36 | 37 | @Override 38 | public Result delete(CVPhotograph cvPhotograph) { 39 | this.cvPhotographDao.delete(cvPhotograph); 40 | return new SuccessResult("Fotoğraf Başarıyla Silindi!"); 41 | } 42 | 43 | @Override 44 | public DataResult> getAll() { 45 | return new SuccessDataResult<>(this.cvPhotographDao.findAll()); 46 | } 47 | 48 | @Override 49 | public DataResult> getById(int id) { 50 | return new SuccessDataResult<>(this.cvPhotographDao.getById(id)); 51 | } 52 | 53 | @Override 54 | public DataResult> getAllByCandidateId(int id) { 55 | return new SuccessDataResult<>(this.cvPhotographDao.getByCandidate_Id(id)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |

File Directory

4 |
    5 |
  • Main
  • 6 |
  • Adapters
  • 7 | 11 |
  • Business
  • 12 | 16 |
  • Core / Utilities
  • 17 | 22 |
  • Data Access
  • 23 | 26 |
  • Entities
  • 27 | 31 |
  • API / Controllers
  • 32 |
      33 | -------------------------------------------------------------------------------- /src/main/java/com/icanerdogan/HRMS/business/concretes/JobAdvertManager.java: -------------------------------------------------------------------------------- 1 | package com.icanerdogan.HRMS.business.concretes; 2 | 3 | import com.icanerdogan.HRMS.business.abstracts.JobAdvertService; 4 | import com.icanerdogan.HRMS.core.utilities.results.*; 5 | import com.icanerdogan.HRMS.dataAccess.abstracts.JobAdvertDao; 6 | import com.icanerdogan.HRMS.entities.concretes.JobAdvert; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | 13 | @Service 14 | public class JobAdvertManager implements JobAdvertService { 15 | private JobAdvertDao jobAdvertDao; 16 | 17 | @Autowired 18 | public JobAdvertManager(JobAdvertDao jobAdvertDao) { 19 | this.jobAdvertDao = jobAdvertDao; 20 | } 21 | 22 | @Override 23 | public Result addAdvertisement(JobAdvert jobAdvert) { 24 | this.jobAdvertDao.save(jobAdvert); 25 | return new SuccessResult("İş İlanı Başarıyla Eklendi!"); 26 | } 27 | 28 | @Override 29 | public DataResult> getAll() { 30 | return new SuccessDataResult> 31 | (this.jobAdvertDao.findAll(), "Tüm İş İlanları Listelendi!"); 32 | } 33 | 34 | @Override 35 | public DataResult> findByAllActive() { 36 | return new SuccessDataResult> 37 | (this.jobAdvertDao.findByAllActive(), "Aktif İş İlanları Listelendi!"); 38 | } 39 | 40 | @Override 41 | public DataResult> findByActiveStatusAndCreationDateASC() { 42 | return new SuccessDataResult> 43 | (this.jobAdvertDao.findByActiveStatusAndCreationDateASC(),"İş İlanları Yeniden Eskiye Doğru Sıralandı!"); 44 | } 45 | 46 | @Override 47 | public DataResult> findByActiveStatusAndCreationDateDESC() { 48 | return new SuccessDataResult> 49 | (this.jobAdvertDao.findByActiveStatusAndCreationDateDESC(), "İş İlanları Eskiden Yeniye Doğru Sıralandı!"); 50 | } 51 | 52 | @Override 53 | public DataResult> findByActiveStatusAndEmployer(int employer_id) { 54 | return new SuccessDataResult> 55 | (this.jobAdvertDao.findByActiveStatusAndEmployer(employer_id), "Tüm Aktif İş İlanlarınız Listelendi!"); 56 | } 57 | 58 | @Override 59 | public Result updateActiveStatus(boolean active_status, int id) { 60 | /*if (!jobAdvertDao.findAllById(id)){ 61 | 62 | */ 63 | this.jobAdvertDao.updateActiveStatus(active_status, id); 64 | return new SuccessResult(id + " Numaralı İlanının Aktiflik Durumu GÜncellendi!"); 65 | /*} 66 | return new ErrorResult(id + " ID Numaralı İlan Bulunamadı!"); 67 | 68 | */ 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPAStandardDateTimeConverter.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 5.11.5.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | import java.text.SimpleDateFormat; 13 | import java.util.Date; 14 | import java.util.Locale; 15 | 16 | 17 | 18 | public class TPAStandardDateTimeConverter implements TPADateTimeConverter 19 | { 20 | public java.util.TimeZone TimeZone=java.util.TimeZone.getTimeZone("UTC"); 21 | 22 | @Override 23 | public Date convertDateTime(String strDate) 24 | { 25 | java.lang.String[] formats = new java.lang.String[] { 26 | "yyyy-MM-dd'T'HH:mm:ss.SSS", 27 | "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", 28 | "yyyy-MM-dd'T'HH:mm:ssZ", 29 | "yyyy-MM-dd'T'HH:mm:ss", 30 | "yyyy-MM-dd'T'HH:mm", 31 | "yyyy-MM-dd" 32 | }; 33 | return parse(strDate,formats); 34 | } 35 | 36 | private Date parse(String strDate,java.lang.String[] formats){ 37 | if(strDate==null) 38 | { 39 | return null; 40 | } 41 | for (java.lang.String frm : formats) 42 | { 43 | try 44 | { 45 | SimpleDateFormat format = new SimpleDateFormat(frm, Locale.US); 46 | format.setTimeZone(java.util.TimeZone.getTimeZone("UTC")); 47 | return format.parse(strDate); 48 | } 49 | catch (java.lang.Exception ex) 50 | { 51 | } 52 | } 53 | return null; 54 | } 55 | 56 | @Override 57 | public Date convertTime(String strDate) 58 | { 59 | java.lang.String[] formats = new java.lang.String[] { 60 | "HH:mm:ss.SSS", 61 | "HH:mm:ss", 62 | "HH:mm" 63 | }; 64 | return parse(strDate,formats); 65 | } 66 | 67 | @Override 68 | public Date convertDate(String strDate) 69 | { 70 | return convertDateTime(strDate); 71 | } 72 | 73 | @Override 74 | public String convertDuration(String value) { 75 | return value; 76 | } 77 | 78 | @Override 79 | public String getStringFromDateTime(Date value) 80 | { 81 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); 82 | format.setTimeZone(TimeZone); 83 | return format.format(value); 84 | } 85 | 86 | @Override 87 | public String getStringFromDate(Date value) 88 | { 89 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd", Locale.US); 90 | format.setTimeZone(TimeZone); 91 | return format.format(value); 92 | } 93 | 94 | @Override 95 | public String getStringFromTime(Date value) 96 | { 97 | SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss", Locale.US); 98 | format.setTimeZone(TimeZone); 99 | return format.format(value); 100 | } 101 | 102 | @Override 103 | public String getStringFromDuration(String value) 104 | { 105 | return value; 106 | } 107 | } 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/main/java/mernis/KPSPublic.asmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/java/mernis/TCKimlikNoDogrula.java: -------------------------------------------------------------------------------- 1 | 2 | package mernis; 3 | 4 | import javax.xml.bind.annotation.XmlAccessType; 5 | import javax.xml.bind.annotation.XmlAccessorType; 6 | import javax.xml.bind.annotation.XmlElement; 7 | import javax.xml.bind.annotation.XmlRootElement; 8 | import javax.xml.bind.annotation.XmlType; 9 | 10 | 11 | /** 12 | *

      Java class for anonymous complex type. 13 | * 14 | *

      The following schema fragment specifies the expected content contained within this class. 15 | * 16 | *

       17 |  * <complexType>
       18 |  *   <complexContent>
       19 |  *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       20 |  *       <sequence>
       21 |  *         <element name="TCKimlikNo" type="{http://www.w3.org/2001/XMLSchema}long"/>
       22 |  *         <element name="Ad" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
       23 |  *         <element name="Soyad" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
       24 |  *         <element name="DogumYili" type="{http://www.w3.org/2001/XMLSchema}int"/>
       25 |  *       </sequence>
       26 |  *     </restriction>
       27 |  *   </complexContent>
       28 |  * </complexType>
       29 |  * 
      30 | * 31 | * 32 | */ 33 | @XmlAccessorType(XmlAccessType.FIELD) 34 | @XmlType(name = "", propOrder = { 35 | "tcKimlikNo", 36 | "ad", 37 | "soyad", 38 | "dogumYili" 39 | }) 40 | @XmlRootElement(name = "TCKimlikNoDogrula") 41 | public class TCKimlikNoDogrula { 42 | 43 | @XmlElement(name = "TCKimlikNo") 44 | protected long tcKimlikNo; 45 | @XmlElement(name = "Ad") 46 | protected String ad; 47 | @XmlElement(name = "Soyad") 48 | protected String soyad; 49 | @XmlElement(name = "DogumYili") 50 | protected int dogumYili; 51 | 52 | /** 53 | * Gets the value of the tcKimlikNo property. 54 | * 55 | */ 56 | public long getTCKimlikNo() { 57 | return tcKimlikNo; 58 | } 59 | 60 | /** 61 | * Sets the value of the tcKimlikNo property. 62 | * 63 | */ 64 | public void setTCKimlikNo(long value) { 65 | this.tcKimlikNo = value; 66 | } 67 | 68 | /** 69 | * Gets the value of the ad property. 70 | * 71 | * @return 72 | * possible object is 73 | * {@link String } 74 | * 75 | */ 76 | public String getAd() { 77 | return ad; 78 | } 79 | 80 | /** 81 | * Sets the value of the ad property. 82 | * 83 | * @param value 84 | * allowed object is 85 | * {@link String } 86 | * 87 | */ 88 | public void setAd(String value) { 89 | this.ad = value; 90 | } 91 | 92 | /** 93 | * Gets the value of the soyad property. 94 | * 95 | * @return 96 | * possible object is 97 | * {@link String } 98 | * 99 | */ 100 | public String getSoyad() { 101 | return soyad; 102 | } 103 | 104 | /** 105 | * Sets the value of the soyad property. 106 | * 107 | * @param value 108 | * allowed object is 109 | * {@link String } 110 | * 111 | */ 112 | public void setSoyad(String value) { 113 | this.soyad = value; 114 | } 115 | 116 | /** 117 | * Gets the value of the dogumYili property. 118 | * 119 | */ 120 | public int getDogumYili() { 121 | return dogumYili; 122 | } 123 | 124 | /** 125 | * Sets the value of the dogumYili property. 126 | * 127 | */ 128 | public void setDogumYili(int value) { 129 | this.dogumYili = value; 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.5.0 9 | 10 | 11 | com.icanerdogan 12 | HRMS 13 | 0.0.1-SNAPSHOT 14 | HRMS 15 | Demo project for Spring Boot 16 | 17 | 11 18 | 1.8 19 | 1.8 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-data-jpa 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-web 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 | 53 | 54 | 55 | io.springfox 56 | springfox-swagger2 57 | 2.9.2 58 | 59 | 60 | 61 | io.springfox 62 | springfox-swagger-ui 63 | 2.9.2 64 | 65 | 66 | 67 | org.apache.maven.plugins 68 | maven-compiler-plugin 69 | 3.8.1 70 | 71 | 72 | 73 | 74 | org.apache.axis 75 | axis 76 | 1.4 77 | 78 | 79 | 80 | 81 | com.cloudinary 82 | cloudinary-core 83 | 1.29.0 84 | compile 85 | 86 | 87 | org.apache.commons 88 | commons-lang3 89 | 3.1 90 | compile 91 | 92 | 93 | org.apache.httpcomponents 94 | httpclient 95 | 4.4 96 | compile 97 | 98 | 99 | org.apache.httpcomponents 100 | httpmime 101 | 4.4 102 | compile 103 | 104 | 105 | 106 | 107 | 108 | 109 | org.springframework.boot 110 | spring-boot-maven-plugin 111 | 112 | 113 | 114 | org.projectlombok 115 | lombok 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /src/main/java/mernis/KPSPublic.java: -------------------------------------------------------------------------------- 1 | 2 | package mernis; 3 | 4 | import java.net.MalformedURLException; 5 | import java.net.URL; 6 | import javax.xml.namespace.QName; 7 | import javax.xml.ws.Service; 8 | import javax.xml.ws.WebEndpoint; 9 | import javax.xml.ws.WebServiceClient; 10 | import javax.xml.ws.WebServiceException; 11 | import javax.xml.ws.WebServiceFeature; 12 | 13 | 14 | /** 15 | * This class was generated by the JAX-WS RI. 16 | * JAX-WS RI 2.2.9-b130926.1035 17 | * Generated source version: 2.2 18 | * 19 | */ 20 | @WebServiceClient(name = "KPSPublic", targetNamespace = "http://tckimlik.nvi.gov.tr/WS", wsdlLocation = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL") 21 | public class KPSPublic 22 | extends Service 23 | { 24 | 25 | private final static URL KPSPUBLIC_WSDL_LOCATION; 26 | private final static WebServiceException KPSPUBLIC_EXCEPTION; 27 | private final static QName KPSPUBLIC_QNAME = new QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublic"); 28 | 29 | static { 30 | URL url = null; 31 | WebServiceException e = null; 32 | try { 33 | url = new URL("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL"); 34 | } catch (MalformedURLException ex) { 35 | e = new WebServiceException(ex); 36 | } 37 | KPSPUBLIC_WSDL_LOCATION = url; 38 | KPSPUBLIC_EXCEPTION = e; 39 | } 40 | 41 | public KPSPublic() { 42 | super(__getWsdlLocation(), KPSPUBLIC_QNAME); 43 | } 44 | 45 | public KPSPublic(WebServiceFeature... features) { 46 | super(__getWsdlLocation(), KPSPUBLIC_QNAME, features); 47 | } 48 | 49 | public KPSPublic(URL wsdlLocation) { 50 | super(wsdlLocation, KPSPUBLIC_QNAME); 51 | } 52 | 53 | public KPSPublic(URL wsdlLocation, WebServiceFeature... features) { 54 | super(wsdlLocation, KPSPUBLIC_QNAME, features); 55 | } 56 | 57 | public KPSPublic(URL wsdlLocation, QName serviceName) { 58 | super(wsdlLocation, serviceName); 59 | } 60 | 61 | public KPSPublic(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { 62 | super(wsdlLocation, serviceName, features); 63 | } 64 | 65 | /** 66 | * 67 | * @return 68 | * returns KPSPublicSoap 69 | */ 70 | @WebEndpoint(name = "KPSPublicSoap") 71 | public KPSPublicSoap getKPSPublicSoap() { 72 | return super.getPort(new QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap"), KPSPublicSoap.class); 73 | } 74 | 75 | /** 76 | * 77 | * @param features 78 | * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. 79 | * @return 80 | * returns KPSPublicSoap 81 | */ 82 | @WebEndpoint(name = "KPSPublicSoap") 83 | public KPSPublicSoap getKPSPublicSoap(WebServiceFeature... features) { 84 | return super.getPort(new QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap"), KPSPublicSoap.class, features); 85 | } 86 | 87 | /** 88 | * 89 | * @return 90 | * returns KPSPublicSoap 91 | */ 92 | @WebEndpoint(name = "KPSPublicSoap12") 93 | public KPSPublicSoap getKPSPublicSoap12() { 94 | return super.getPort(new QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap12"), KPSPublicSoap.class); 95 | } 96 | 97 | /** 98 | * 99 | * @param features 100 | * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the features parameter will have their default values. 101 | * @return 102 | * returns KPSPublicSoap 103 | */ 104 | @WebEndpoint(name = "KPSPublicSoap12") 105 | public KPSPublicSoap getKPSPublicSoap12(WebServiceFeature... features) { 106 | return super.getPort(new QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap12"), KPSPublicSoap.class, features); 107 | } 108 | 109 | private static URL __getWsdlLocation() { 110 | if (KPSPUBLIC_EXCEPTION!= null) { 111 | throw KPSPUBLIC_EXCEPTION; 112 | } 113 | return KPSPUBLIC_WSDL_LOCATION; 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import java.net.*; 17 | import java.io.*; 18 | import java.nio.channels.*; 19 | import java.util.Properties; 20 | 21 | public class MavenWrapperDownloader { 22 | 23 | private static final String WRAPPER_VERSION = "0.5.6"; 24 | /** 25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 26 | */ 27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; 29 | 30 | /** 31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 32 | * use instead of the default one. 33 | */ 34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 35 | ".mvn/wrapper/maven-wrapper.properties"; 36 | 37 | /** 38 | * Path where the maven-wrapper.jar will be saved to. 39 | */ 40 | private static final String MAVEN_WRAPPER_JAR_PATH = 41 | ".mvn/wrapper/maven-wrapper.jar"; 42 | 43 | /** 44 | * Name of the property which should be used to override the default download url for the wrapper. 45 | */ 46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 47 | 48 | public static void main(String args[]) { 49 | System.out.println("- Downloader started"); 50 | File baseDirectory = new File(args[0]); 51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 52 | 53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 54 | // wrapperUrl parameter. 55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 56 | String url = DEFAULT_DOWNLOAD_URL; 57 | if(mavenWrapperPropertyFile.exists()) { 58 | FileInputStream mavenWrapperPropertyFileInputStream = null; 59 | try { 60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 61 | Properties mavenWrapperProperties = new Properties(); 62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 64 | } catch (IOException e) { 65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 66 | } finally { 67 | try { 68 | if(mavenWrapperPropertyFileInputStream != null) { 69 | mavenWrapperPropertyFileInputStream.close(); 70 | } 71 | } catch (IOException e) { 72 | // Ignore ... 73 | } 74 | } 75 | } 76 | System.out.println("- Downloading from: " + url); 77 | 78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 79 | if(!outputFile.getParentFile().exists()) { 80 | if(!outputFile.getParentFile().mkdirs()) { 81 | System.out.println( 82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 83 | } 84 | } 85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 86 | try { 87 | downloadFileFromURL(url, outputFile); 88 | System.out.println("Done"); 89 | System.exit(0); 90 | } catch (Throwable e) { 91 | System.out.println("- Error downloading"); 92 | e.printStackTrace(); 93 | System.exit(1); 94 | } 95 | } 96 | 97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 99 | String username = System.getenv("MVNW_USERNAME"); 100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 101 | Authenticator.setDefault(new Authenticator() { 102 | @Override 103 | protected PasswordAuthentication getPasswordAuthentication() { 104 | return new PasswordAuthentication(username, password); 105 | } 106 | }); 107 | } 108 | URL website = new URL(urlString); 109 | ReadableByteChannel rbc; 110 | rbc = Channels.newChannel(website.openStream()); 111 | FileOutputStream fos = new FileOutputStream(destination); 112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 113 | fos.close(); 114 | rbc.close(); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPAHelper.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 5.11.5.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | import java.util.*; 13 | import org.ksoap2.serialization.*; 14 | import org.kxml2.kdom.Element; 15 | import org.kxml2.kdom.Node; 16 | 17 | 18 | public class TPAHelper 19 | { 20 | public static < T, E> T getKeyByValue(java.util.Map< T, E> map, E value) { 21 | for (java.util.Map.Entry< T, E> entry : map.entrySet()) { 22 | if (value.equals(entry.getValue())) { 23 | return entry.getKey(); 24 | } 25 | } 26 | return null; 27 | } 28 | 29 | public static java.lang.Object getAttribute(AttributeContainer obj,java.lang.String name,java.lang.String namespace) 30 | { 31 | for (int i=0;i < obj.getAttributeCount();i++){ 32 | AttributeInfo info = new AttributeInfo(); 33 | obj.getAttributeInfo(i,info); 34 | if(info.name.equals(name) && info.namespace.equals(namespace)) 35 | { 36 | return info.getValue(); 37 | } 38 | } 39 | return null; 40 | } 41 | 42 | 43 | public static Element convertToHeader(java.lang.Object obj,java.lang.String namespace,java.lang.String name) 44 | { 45 | org.kxml2.kdom.Element parentElement = new org.kxml2.kdom.Element().createElement(namespace,name); 46 | if(obj==null) 47 | { 48 | return parentElement; 49 | } 50 | if(obj instanceof KvmSerializable) 51 | { 52 | KvmSerializable soapObject =(KvmSerializable)obj; 53 | for(int i = 0;i < soapObject.getPropertyCount();i++){ 54 | PropertyInfo info = new PropertyInfo(); 55 | soapObject.getPropertyInfo(i,new Hashtable(),info); 56 | java.lang.Object value=soapObject.getProperty(i); 57 | if(value!=null && value!=SoapPrimitive.NullSkip && value!=SoapPrimitive.NullNilElement) 58 | { 59 | info.setValue(value); 60 | Element el1= convertToHeader( info.getValue(),info.getNamespace(),info.getName()); 61 | parentElement.addChild(Node.ELEMENT, el1); 62 | } 63 | } 64 | } 65 | else if(obj!=null && obj!=SoapPrimitive.NullSkip && obj!=SoapPrimitive.NullNilElement) 66 | { 67 | java.lang.String value=obj.toString(); 68 | if (obj instanceof java.util.Date) 69 | { 70 | java.util.Date date = (java.util.Date) obj; 71 | value = TPAExtendedSoapSerializationEnvelope.getDateTimeConverter().getStringFromDateTime(date); 72 | } 73 | parentElement.addChild(org.kxml2.kdom.Node.TEXT,value); 74 | } 75 | if(obj instanceof AttributeContainer) 76 | { 77 | AttributeContainer attrContainer= (AttributeContainer)obj; 78 | for(int i=0;i < attrContainer.getAttributeCount();i++) 79 | { 80 | AttributeInfo info=new AttributeInfo(); 81 | attrContainer.getAttributeInfo(i,info); 82 | Object value=info.getValue(); 83 | parentElement.setAttribute(info.namespace,info.name,value!=null?value.toString():"" ); 84 | } 85 | } 86 | return parentElement; 87 | } 88 | 89 | public static Element findOutHeader(java.lang.String name,SoapSerializationEnvelope envelope) 90 | { 91 | if(envelope.headerIn==null) 92 | { 93 | return null; 94 | } 95 | for(int i=0;i < envelope.headerIn.length;i++) { 96 | Element elem=envelope.headerIn[i]; 97 | if(elem.getName().equals(name) && (elem.getChildCount()>0||elem.getAttributeCount()>0)) 98 | return elem; 99 | } 100 | return null; 101 | } 102 | 103 | public static java.lang.Object convertToSoapObject(Element element) 104 | { 105 | if(element.getChildCount()==0 || (element.getChildCount()==1 && !(element.getChild(0) instanceof Element))) 106 | { 107 | SoapPrimitive primitive = new SoapPrimitive(element.getNamespace(),element.getName(),element.getChildCount()==1? element.getText(0):null); 108 | return primitive; 109 | } 110 | else 111 | { 112 | SoapObject obj = new SoapObject(element.getNamespace(),element.getName()); 113 | for (int i=0;i < element.getChildCount();i++) 114 | { 115 | Element childElement=element.getElement(i); 116 | java.lang.Object childObject=convertToSoapObject(childElement); 117 | if(childObject instanceof SoapObject) 118 | { 119 | SoapObject soapObj= (SoapObject) childObject; 120 | obj.addProperty(soapObj.getName(),childObject); 121 | } 122 | else 123 | { 124 | SoapPrimitive primitive= (SoapPrimitive) childObject; 125 | obj.addProperty(primitive.getName(),primitive); 126 | } 127 | } 128 | return obj; 129 | } 130 | } 131 | public static boolean isEmpty(CharSequence str) { 132 | return str == null || str.length() == 0; 133 | } 134 | 135 | public static ArrayList< PropertyInfo> getProperties(SoapObject soapObject,String name) 136 | { 137 | ArrayList< PropertyInfo> list = new ArrayList< PropertyInfo>(); 138 | int size = soapObject.getPropertyCount(); 139 | for (int i0=0;i0 < size;i0++) 140 | { 141 | PropertyInfo info=soapObject.getPropertyInfo(i0); 142 | if ( info.name.equals(name)) 143 | { 144 | list.add(info); 145 | } 146 | } 147 | return list; 148 | } 149 | 150 | public static UUID emptyGuid() 151 | { 152 | return new UUID(0,0); 153 | } 154 | } -------------------------------------------------------------------------------- /src/main/java/mernis/KPSPublicSoapStub.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoapStub.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package mernis; 9 | 10 | import java.util.Enumeration; 11 | 12 | public class KPSPublicSoapStub extends org.apache.axis.client.Stub implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 13 | @SuppressWarnings("rawtypes") 14 | private java.util.Vector cachedSerClasses = new java.util.Vector(); 15 | @SuppressWarnings("rawtypes") 16 | private java.util.Vector cachedSerQNames = new java.util.Vector(); 17 | @SuppressWarnings("rawtypes") 18 | private java.util.Vector cachedSerFactories = new java.util.Vector(); 19 | @SuppressWarnings("rawtypes") 20 | private java.util.Vector cachedDeserFactories = new java.util.Vector(); 21 | 22 | static org.apache.axis.description.OperationDesc [] _operations; 23 | 24 | static { 25 | _operations = new org.apache.axis.description.OperationDesc[1]; 26 | _initOperationDesc1(); 27 | } 28 | 29 | private static void _initOperationDesc1(){ 30 | org.apache.axis.description.OperationDesc oper; 31 | org.apache.axis.description.ParameterDesc param; 32 | oper = new org.apache.axis.description.OperationDesc(); 33 | oper.setName("TCKimlikNoDogrula"); 34 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNo"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false); 35 | oper.addParameter(param); 36 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Ad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false); 37 | param.setOmittable(true); 38 | oper.addParameter(param); 39 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Soyad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false); 40 | param.setOmittable(true); 41 | oper.addParameter(param); 42 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "DogumYili"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false); 43 | oper.addParameter(param); 44 | oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean")); 45 | oper.setReturnClass(boolean.class); 46 | oper.setReturnQName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrulaResult")); 47 | oper.setStyle(org.apache.axis.constants.Style.WRAPPED); 48 | oper.setUse(org.apache.axis.constants.Use.LITERAL); 49 | _operations[0] = oper; 50 | 51 | } 52 | 53 | public KPSPublicSoapStub() throws org.apache.axis.AxisFault { 54 | this(null); 55 | } 56 | 57 | public KPSPublicSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 58 | this(service); 59 | super.cachedEndpoint = endpointURL; 60 | } 61 | 62 | public KPSPublicSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 63 | if (service == null) { 64 | super.service = new org.apache.axis.client.Service(); 65 | } else { 66 | super.service = service; 67 | } 68 | ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); 69 | } 70 | 71 | protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 72 | try { 73 | org.apache.axis.client.Call _call = super._createCall(); 74 | if (super.maintainSessionSet) { 75 | _call.setMaintainSession(super.maintainSession); 76 | } 77 | if (super.cachedUsername != null) { 78 | _call.setUsername(super.cachedUsername); 79 | } 80 | if (super.cachedPassword != null) { 81 | _call.setPassword(super.cachedPassword); 82 | } 83 | if (super.cachedEndpoint != null) { 84 | _call.setTargetEndpointAddress(super.cachedEndpoint); 85 | } 86 | if (super.cachedTimeout != null) { 87 | _call.setTimeout(super.cachedTimeout); 88 | } 89 | if (super.cachedPortName != null) { 90 | _call.setPortName(super.cachedPortName); 91 | } 92 | Enumeration keys = super.cachedProperties.keys(); 93 | while (keys.hasMoreElements()) { 94 | String key = (String) keys.nextElement(); 95 | _call.setProperty(key, super.cachedProperties.get(key)); 96 | } 97 | return _call; 98 | } 99 | catch (Throwable _t) { 100 | throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); 101 | } 102 | } 103 | 104 | @SuppressWarnings("deprecation") 105 | public boolean TCKimlikNoDogrula(long TCKimlikNo, String ad, String soyad, int dogumYili) throws java.rmi.RemoteException { 106 | if (super.cachedEndpoint == null) { 107 | throw new org.apache.axis.NoEndPointException(); 108 | } 109 | org.apache.axis.client.Call _call = createCall(); 110 | _call.setOperation(_operations[0]); 111 | _call.setUseSOAPAction(true); 112 | _call.setSOAPActionURI("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"); 113 | _call.setEncodingStyle(null); 114 | _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); 115 | _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); 116 | _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 117 | _call.setOperationName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula")); 118 | 119 | setRequestHeaders(_call); 120 | setAttachments(_call); 121 | try { Object _resp = _call.invoke(new Object[] {new Long(TCKimlikNo), ad, soyad, new Integer(dogumYili)}); 122 | 123 | if (_resp instanceof java.rmi.RemoteException) { 124 | throw (java.rmi.RemoteException)_resp; 125 | } 126 | else { 127 | extractAttachments(_call); 128 | try { 129 | return ((Boolean) _resp).booleanValue(); 130 | } catch (Exception _exception) { 131 | return ((Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue(); 132 | } 133 | } 134 | } catch (org.apache.axis.AxisFault axisFaultException) { 135 | throw axisFaultException; 136 | } 137 | } 138 | 139 | } 140 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPAKPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 5.11.5.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | 13 | 14 | import org.ksoap2.HeaderProperty; 15 | import org.ksoap2.serialization.*; 16 | import org.ksoap2.transport.*; 17 | import org.kxml2.kdom.Element; 18 | 19 | import java.lang.reflect.Constructor; 20 | import java.util.ArrayList; 21 | import java.util.Arrays; 22 | import java.util.List; 23 | 24 | 25 | public class TPAKPSPublicSoap 26 | { 27 | interface TPAIWcfMethod 28 | { 29 | TPAExtendedSoapSerializationEnvelope CreateSoapEnvelope() throws java.lang.Exception; 30 | 31 | java.lang.Object ProcessResult(TPAExtendedSoapSerializationEnvelope __envelope,java.lang.Object result) throws java.lang.Exception; 32 | } 33 | 34 | String url="https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 35 | 36 | int timeOut=60000; 37 | 38 | public List< HeaderProperty> httpHeaders= new ArrayList< HeaderProperty>(); 39 | public boolean enableLogging; 40 | 41 | 42 | public TPAKPSPublicSoap(){} 43 | 44 | public TPAKPSPublicSoap(String url) 45 | { 46 | this.url = url; 47 | } 48 | 49 | public TPAKPSPublicSoap(String url,int timeOut) 50 | { 51 | this.url = url; 52 | this.timeOut=timeOut; 53 | } 54 | 55 | protected org.ksoap2.transport.Transport createTransport() 56 | { 57 | try 58 | { 59 | java.net.URI uri = new java.net.URI(url); 60 | if(uri.getScheme().equalsIgnoreCase("https")) 61 | { 62 | int port=uri.getPort()>0?uri.getPort():443; 63 | String path=uri.getPath(); 64 | if(uri.getQuery()!=null && uri.getQuery()!="") 65 | { 66 | path+="?"+uri.getQuery(); 67 | } 68 | return new com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE(uri.getHost(), port, path, timeOut); 69 | } 70 | else 71 | { 72 | return new com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE(url,timeOut); 73 | } 74 | 75 | } 76 | catch (java.net.URISyntaxException e) 77 | { 78 | } 79 | return null; 80 | } 81 | 82 | protected TPAExtendedSoapSerializationEnvelope createEnvelope() 83 | { 84 | TPAExtendedSoapSerializationEnvelope envelope= new TPAExtendedSoapSerializationEnvelope(TPAExtendedSoapSerializationEnvelope.VER11); 85 | envelope.enableLogging = enableLogging; 86 | 87 | return envelope; 88 | } 89 | 90 | protected java.util.List sendRequest(String methodName,TPAExtendedSoapSerializationEnvelope envelope,org.ksoap2.transport.Transport transport ,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile )throws java.lang.Exception 91 | { 92 | if(transport instanceof com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE ) 93 | { 94 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 95 | } 96 | else 97 | { 98 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 99 | } 100 | } 101 | 102 | java.lang.Object getResult(java.lang.Class destObj,java.lang.Object source,String resultName,TPAExtendedSoapSerializationEnvelope __envelope) throws java.lang.Exception 103 | { 104 | if(source==null) 105 | { 106 | return null; 107 | } 108 | if(source instanceof SoapPrimitive) 109 | { 110 | SoapPrimitive soap =(SoapPrimitive)source; 111 | if(soap.getName().equals(resultName)) 112 | { 113 | java.lang.Object instance=__envelope.get(source,destObj,false); 114 | return instance; 115 | } 116 | } 117 | else 118 | { 119 | SoapObject soap = (SoapObject)source; 120 | if (soap.hasProperty(resultName)) 121 | { 122 | java.lang.Object j=soap.getProperty(resultName); 123 | if(j==null) 124 | { 125 | return null; 126 | } 127 | java.lang.Object instance=__envelope.get(j,destObj,false); 128 | return instance; 129 | } 130 | else if( soap.getName().equals(resultName)) 131 | { 132 | java.lang.Object instance=__envelope.get(source,destObj,false); 133 | return instance; 134 | } 135 | } 136 | 137 | return null; 138 | } 139 | 140 | 141 | 142 | 143 | public Boolean TCKimlikNoDogrula(final Long TCKimlikNo,final String Ad,final String Soyad,final Integer DogumYili) throws java.lang.Exception 144 | { 145 | com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile __profile = new com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile(); 146 | return (Boolean)execute(new TPAIWcfMethod() 147 | { 148 | @Override 149 | public TPAExtendedSoapSerializationEnvelope CreateSoapEnvelope(){ 150 | TPAExtendedSoapSerializationEnvelope __envelope = createEnvelope(); 151 | SoapObject __soapReq = new SoapObject("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula"); 152 | __envelope.setOutputSoapObject(__soapReq); 153 | 154 | PropertyInfo __info=null; 155 | __info = new PropertyInfo(); 156 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 157 | __info.name="TCKimlikNo"; 158 | __info.type=PropertyInfo.LONG_CLASS; 159 | __info.setValue(TCKimlikNo); 160 | __soapReq.addProperty(__info); 161 | __info = new PropertyInfo(); 162 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 163 | __info.name="Ad"; 164 | __info.type=PropertyInfo.STRING_CLASS; 165 | __info.setValue(Ad!=null?Ad:SoapPrimitive.NullSkip); 166 | __soapReq.addProperty(__info); 167 | __info = new PropertyInfo(); 168 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 169 | __info.name="Soyad"; 170 | __info.type=PropertyInfo.STRING_CLASS; 171 | __info.setValue(Soyad!=null?Soyad:SoapPrimitive.NullSkip); 172 | __soapReq.addProperty(__info); 173 | __info = new PropertyInfo(); 174 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 175 | __info.name="DogumYili"; 176 | __info.type=PropertyInfo.INTEGER_CLASS; 177 | __info.setValue(DogumYili); 178 | __soapReq.addProperty(__info); 179 | return __envelope; 180 | } 181 | 182 | @Override 183 | public java.lang.Object ProcessResult(TPAExtendedSoapSerializationEnvelope __envelope,java.lang.Object __result)throws java.lang.Exception { 184 | SoapObject __soap=(SoapObject)__result; 185 | java.lang.Object obj = __soap.getProperty("TCKimlikNoDogrulaResult"); 186 | if (obj instanceof SoapPrimitive) 187 | { 188 | SoapPrimitive j =(SoapPrimitive) obj; 189 | return Boolean.valueOf(j.toString()); 190 | } 191 | else if (obj!= null && obj instanceof Boolean){ 192 | return (Boolean)obj; 193 | } 194 | return null; 195 | } 196 | },"http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula",__profile); 197 | } 198 | 199 | protected java.lang.Object execute(TPAIWcfMethod wcfMethod,String methodName,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile) throws java.lang.Exception 200 | { 201 | org.ksoap2.transport.Transport __httpTransport=createTransport(); 202 | __httpTransport.debug=enableLogging; 203 | TPAExtendedSoapSerializationEnvelope __envelope=wcfMethod.CreateSoapEnvelope(); 204 | try 205 | { 206 | sendRequest(methodName, __envelope, __httpTransport,profile); 207 | } 208 | finally { 209 | if (__httpTransport.debug) { 210 | if (__httpTransport.requestDump != null) { 211 | System.out.println("requestDump: "+__httpTransport.requestDump); 212 | 213 | } 214 | if (__httpTransport.responseDump != null) { 215 | System.out.println("responseDump: "+__httpTransport.responseDump); 216 | } 217 | } 218 | } 219 | java.lang.Object __retObj = __envelope.bodyIn; 220 | if (__retObj instanceof org.ksoap2.SoapFault){ 221 | org.ksoap2.SoapFault __fault = (org.ksoap2.SoapFault)__retObj; 222 | throw convertToException(__fault,__envelope); 223 | }else{ 224 | return wcfMethod.ProcessResult(__envelope,__retObj); 225 | } 226 | } 227 | 228 | 229 | protected java.lang.Exception convertToException(org.ksoap2.SoapFault fault,TPAExtendedSoapSerializationEnvelope envelope) 230 | { 231 | org.ksoap2.SoapFault newException = fault; 232 | return newException; 233 | } 234 | } 235 | 236 | 237 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPAKPSPublicSoap12.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 5.11.5.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | 13 | 14 | import org.ksoap2.HeaderProperty; 15 | import org.ksoap2.serialization.*; 16 | import org.ksoap2.transport.*; 17 | import org.kxml2.kdom.Element; 18 | 19 | import java.lang.reflect.Constructor; 20 | import java.util.ArrayList; 21 | import java.util.Arrays; 22 | import java.util.List; 23 | 24 | 25 | public class TPAKPSPublicSoap12 26 | { 27 | interface TPAIWcfMethod 28 | { 29 | TPAExtendedSoapSerializationEnvelope CreateSoapEnvelope() throws java.lang.Exception; 30 | 31 | java.lang.Object ProcessResult(TPAExtendedSoapSerializationEnvelope __envelope,java.lang.Object result) throws java.lang.Exception; 32 | } 33 | 34 | String url="https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 35 | 36 | int timeOut=60000; 37 | 38 | public List< HeaderProperty> httpHeaders= new ArrayList< HeaderProperty>(); 39 | public boolean enableLogging; 40 | 41 | 42 | public TPAKPSPublicSoap12(){} 43 | 44 | public TPAKPSPublicSoap12(String url) 45 | { 46 | this.url = url; 47 | } 48 | 49 | public TPAKPSPublicSoap12(String url,int timeOut) 50 | { 51 | this.url = url; 52 | this.timeOut=timeOut; 53 | } 54 | 55 | protected org.ksoap2.transport.Transport createTransport() 56 | { 57 | try 58 | { 59 | java.net.URI uri = new java.net.URI(url); 60 | if(uri.getScheme().equalsIgnoreCase("https")) 61 | { 62 | int port=uri.getPort()>0?uri.getPort():443; 63 | String path=uri.getPath(); 64 | if(uri.getQuery()!=null && uri.getQuery()!="") 65 | { 66 | path+="?"+uri.getQuery(); 67 | } 68 | return new com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE(uri.getHost(), port, path, timeOut); 69 | } 70 | else 71 | { 72 | return new com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE(url,timeOut); 73 | } 74 | 75 | } 76 | catch (java.net.URISyntaxException e) 77 | { 78 | } 79 | return null; 80 | } 81 | 82 | protected TPAExtendedSoapSerializationEnvelope createEnvelope() 83 | { 84 | TPAExtendedSoapSerializationEnvelope envelope= new TPAExtendedSoapSerializationEnvelope(TPAExtendedSoapSerializationEnvelope.VER12); 85 | envelope.enableLogging = enableLogging; 86 | 87 | return envelope; 88 | } 89 | 90 | protected java.util.List sendRequest(String methodName,TPAExtendedSoapSerializationEnvelope envelope,org.ksoap2.transport.Transport transport ,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile )throws java.lang.Exception 91 | { 92 | if(transport instanceof com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE ) 93 | { 94 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 95 | } 96 | else 97 | { 98 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 99 | } 100 | } 101 | 102 | java.lang.Object getResult(java.lang.Class destObj,java.lang.Object source,String resultName,TPAExtendedSoapSerializationEnvelope __envelope) throws java.lang.Exception 103 | { 104 | if(source==null) 105 | { 106 | return null; 107 | } 108 | if(source instanceof SoapPrimitive) 109 | { 110 | SoapPrimitive soap =(SoapPrimitive)source; 111 | if(soap.getName().equals(resultName)) 112 | { 113 | java.lang.Object instance=__envelope.get(source,destObj,false); 114 | return instance; 115 | } 116 | } 117 | else 118 | { 119 | SoapObject soap = (SoapObject)source; 120 | if (soap.hasProperty(resultName)) 121 | { 122 | java.lang.Object j=soap.getProperty(resultName); 123 | if(j==null) 124 | { 125 | return null; 126 | } 127 | java.lang.Object instance=__envelope.get(j,destObj,false); 128 | return instance; 129 | } 130 | else if( soap.getName().equals(resultName)) 131 | { 132 | java.lang.Object instance=__envelope.get(source,destObj,false); 133 | return instance; 134 | } 135 | } 136 | 137 | return null; 138 | } 139 | 140 | 141 | 142 | 143 | public Boolean TCKimlikNoDogrula(final Long TCKimlikNo,final String Ad,final String Soyad,final Integer DogumYili) throws java.lang.Exception 144 | { 145 | com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile __profile = new com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile(); 146 | return (Boolean)execute(new TPAIWcfMethod() 147 | { 148 | @Override 149 | public TPAExtendedSoapSerializationEnvelope CreateSoapEnvelope(){ 150 | TPAExtendedSoapSerializationEnvelope __envelope = createEnvelope(); 151 | SoapObject __soapReq = new SoapObject("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula"); 152 | __envelope.setOutputSoapObject(__soapReq); 153 | 154 | PropertyInfo __info=null; 155 | __info = new PropertyInfo(); 156 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 157 | __info.name="TCKimlikNo"; 158 | __info.type=PropertyInfo.LONG_CLASS; 159 | __info.setValue(TCKimlikNo); 160 | __soapReq.addProperty(__info); 161 | __info = new PropertyInfo(); 162 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 163 | __info.name="Ad"; 164 | __info.type=PropertyInfo.STRING_CLASS; 165 | __info.setValue(Ad!=null?Ad:SoapPrimitive.NullSkip); 166 | __soapReq.addProperty(__info); 167 | __info = new PropertyInfo(); 168 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 169 | __info.name="Soyad"; 170 | __info.type=PropertyInfo.STRING_CLASS; 171 | __info.setValue(Soyad!=null?Soyad:SoapPrimitive.NullSkip); 172 | __soapReq.addProperty(__info); 173 | __info = new PropertyInfo(); 174 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 175 | __info.name="DogumYili"; 176 | __info.type=PropertyInfo.INTEGER_CLASS; 177 | __info.setValue(DogumYili); 178 | __soapReq.addProperty(__info); 179 | return __envelope; 180 | } 181 | 182 | @Override 183 | public java.lang.Object ProcessResult(TPAExtendedSoapSerializationEnvelope __envelope,java.lang.Object __result)throws java.lang.Exception { 184 | SoapObject __soap=(SoapObject)__result; 185 | java.lang.Object obj = __soap.getProperty("TCKimlikNoDogrulaResult"); 186 | if (obj instanceof SoapPrimitive) 187 | { 188 | SoapPrimitive j =(SoapPrimitive) obj; 189 | return Boolean.valueOf(j.toString()); 190 | } 191 | else if (obj!= null && obj instanceof Boolean){ 192 | return (Boolean)obj; 193 | } 194 | return null; 195 | } 196 | },"http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula",__profile); 197 | } 198 | 199 | protected java.lang.Object execute(TPAIWcfMethod wcfMethod,String methodName,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile) throws java.lang.Exception 200 | { 201 | org.ksoap2.transport.Transport __httpTransport=createTransport(); 202 | __httpTransport.debug=enableLogging; 203 | TPAExtendedSoapSerializationEnvelope __envelope=wcfMethod.CreateSoapEnvelope(); 204 | try 205 | { 206 | sendRequest(methodName, __envelope, __httpTransport,profile); 207 | } 208 | finally { 209 | if (__httpTransport.debug) { 210 | if (__httpTransport.requestDump != null) { 211 | System.out.println("requestDump: "+__httpTransport.requestDump); 212 | 213 | } 214 | if (__httpTransport.responseDump != null) { 215 | System.out.println("responseDump: "+__httpTransport.responseDump); 216 | } 217 | } 218 | } 219 | java.lang.Object __retObj = __envelope.bodyIn; 220 | if (__retObj instanceof org.ksoap2.SoapFault){ 221 | org.ksoap2.SoapFault __fault = (org.ksoap2.SoapFault)__retObj; 222 | throw convertToException(__fault,__envelope); 223 | }else{ 224 | return wcfMethod.ProcessResult(__envelope,__retObj); 225 | } 226 | } 227 | 228 | 229 | protected java.lang.Exception convertToException(org.ksoap2.SoapFault fault,TPAExtendedSoapSerializationEnvelope envelope) 230 | { 231 | org.ksoap2.SoapFault newException = fault; 232 | return newException; 233 | } 234 | } 235 | 236 | 237 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/main/java/mernis/TPAExtendedSoapSerializationEnvelope.java: -------------------------------------------------------------------------------- 1 | package mernis; 2 | //---------------------------------------------------- 3 | // 4 | // Generated by www.easywsdl.com 5 | // Version: 5.11.5.0 6 | // 7 | // Created by Quasar Development 8 | // 9 | //---------------------------------------------------- 10 | 11 | import org.ksoap2.SoapEnvelope; 12 | import org.ksoap2.serialization.*; 13 | import org.kxml2.io.KXmlParser; 14 | import org.kxml2.kdom.Element; 15 | import org.xmlpull.v1.XmlPullParser; 16 | import org.xmlpull.v1.XmlPullParserFactory; 17 | import org.xmlpull.v1.XmlSerializer; 18 | import org.xmlpull.v1.XmlPullParserException; 19 | 20 | import java.io.IOException; 21 | import java.lang.reflect.InvocationTargetException; 22 | import java.lang.reflect.Constructor; 23 | import java.lang.reflect.Method; 24 | import java.util.HashMap; 25 | import java.util.Vector; 26 | import java.io.StringReader; 27 | import java.io.StringWriter; 28 | 29 | 30 | //If you have a compilation error here then you have to add a reference to ExKsoap2.jar to your project (you can find it in Libs folder in the generated zip file) 31 | public class TPAExtendedSoapSerializationEnvelope extends com.easywsdl.exksoap2.serialization.ExSoapSerializationEnvelope { 32 | static HashMap< java.lang.String,java.lang.Class> classNames = new HashMap< java.lang.String, java.lang.Class>(); 33 | public static String TAG="easyWSDL"; 34 | 35 | protected static final int QNAME_NAMESPACE = 0; 36 | private static final String TYPE_LABEL = "type"; 37 | public boolean enableLogging; 38 | 39 | public static void setDateTimeConverter(TPADateTimeConverter converter) 40 | { 41 | if(converter==null) 42 | { 43 | dateTimeConverter = new TPAStandardDateTimeConverter(); 44 | } 45 | dateTimeConverter=converter; 46 | } 47 | 48 | public static TPADateTimeConverter getDateTimeConverter() 49 | { 50 | return dateTimeConverter; 51 | } 52 | 53 | private static TPADateTimeConverter dateTimeConverter = new TPAStandardDateTimeConverter(); 54 | 55 | public TPAExtendedSoapSerializationEnvelope() { 56 | this(SoapEnvelope.VER11); 57 | } 58 | 59 | public TPAExtendedSoapSerializationEnvelope(int soapVersion) { 60 | super(soapVersion); 61 | implicitTypes = true; 62 | setAddAdornments(false); 63 | new TPAMarshalGuid().register(this); 64 | new MarshalFloat().register(this); 65 | } 66 | 67 | 68 | @Override 69 | protected void writeProperty(XmlSerializer writer, java.lang.Object obj, PropertyInfo type) throws IOException { 70 | //!!!!! If you have a compilation error here then you are using old version of ksoap2 library. Please upgrade to the latest version. 71 | //!!!!! You can find a correct version in Lib folder from generated zip file!!!!! 72 | if (obj == null || obj== SoapPrimitive.NullNilElement) { 73 | writer.attribute(xsi, version >= VER12 ? NIL_LABEL : NULL_LABEL, "true"); 74 | return; 75 | } 76 | if(writeReferenceObject(writer,obj)) 77 | { 78 | return; 79 | } 80 | java.lang.Object[] qName = getInfo(null, obj); 81 | if (!type.multiRef && qName[2] == null ) 82 | { 83 | if (!implicitTypes || (obj.getClass() != type.type && !(obj instanceof Vector ) && type.type!=java.lang.String.class )) { 84 | java.lang.String xmlName=TPAHelper.getKeyByValue(classNames,obj.getClass()); 85 | if(xmlName!=null) { 86 | java.lang.String[] parts = xmlName.split("\\^\\^"); 87 | java.lang.String prefix = writer.getPrefix(parts[0], true); 88 | writer.attribute(xsi, TYPE_LABEL, prefix + ":" + parts[1]); 89 | } 90 | else 91 | { 92 | if(type.type instanceof String) { 93 | java.lang.String xsdPrefix = writer.getPrefix(xsd, true); 94 | java.lang.String myType = (java.lang.String) type.type; 95 | java.lang.String[] parts = myType.split("\\^\\^"); 96 | if (parts.length == 2) { 97 | xsdPrefix = writer.getPrefix(parts[0], true); 98 | myType = parts[1]; 99 | } 100 | 101 | writer.attribute(xsi, TYPE_LABEL, xsdPrefix + ":" + myType); 102 | } 103 | else 104 | { 105 | java.lang.String prefix = writer.getPrefix(type.namespace, true); 106 | writer.attribute(xsi, TYPE_LABEL, prefix + ":" + obj.getClass().getSimpleName()); 107 | } 108 | 109 | } 110 | } 111 | //super.writeProperty(writer,obj,type); 112 | 113 | //!!!!! If you have a compilation error here then you are using old version of ksoap2 library. Please upgrade to the latest version. 114 | //!!!!! You can find a correct version in Lib folder from generated zip file!!!!! 115 | writeElement(writer, obj, type, qName[QNAME_MARSHAL]); 116 | } 117 | else { 118 | super.writeProperty(writer, obj, type); 119 | } 120 | } 121 | 122 | public SoapObject GetExceptionDetail(Element detailElement,java.lang.String exceptionElementNS,java.lang.String exceptionElementName) 123 | { 124 | int index=detailElement.indexOf(exceptionElementNS,exceptionElementName,0); 125 | if(index>-1) 126 | { 127 | Element errorElement=detailElement.getElement(index); 128 | return GetSoapObject(errorElement); 129 | } 130 | return null; 131 | } 132 | 133 | public SoapObject GetSoapObject(Element detailElement) { 134 | try{ 135 | XmlSerializer xmlSerializer = XmlPullParserFactory.newInstance().newSerializer(); 136 | StringWriter writer = new StringWriter(); 137 | xmlSerializer.setOutput(writer); 138 | detailElement.write(xmlSerializer); 139 | xmlSerializer.flush(); 140 | 141 | XmlPullParser xpp = new KXmlParser(); 142 | xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); 143 | 144 | xpp.setInput(new StringReader(writer.toString())); 145 | xpp.nextTag(); 146 | SoapObject soapObj = new SoapObject(detailElement.getNamespace(),detailElement.getName()); 147 | readSerializable(xpp,soapObj); 148 | return soapObj; 149 | } 150 | catch (java.lang.Exception e) 151 | { 152 | if(enableLogging) 153 | { 154 | e.printStackTrace(); 155 | } 156 | } 157 | return null; 158 | } 159 | 160 | public java.lang.Object GetHeader(Element detailElement) { 161 | if(detailElement.getChildCount()>0 && detailElement.getText(0)!=null) 162 | { 163 | SoapPrimitive primitive = new SoapPrimitive(detailElement.getNamespace(),detailElement.getName(),detailElement.getText(0)); 164 | return primitive; 165 | } 166 | 167 | return GetSoapObject(detailElement); 168 | } 169 | private Object createObject(Object soap, Class cl) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { 170 | Object obj=cl.newInstance(); 171 | Method ctor = obj.getClass().getMethod("loadFromSoap",Object.class,TPAExtendedSoapSerializationEnvelope.class); 172 | ctor.invoke(obj,soap,this); 173 | return obj; 174 | } 175 | 176 | public java.lang.Object get(java.lang.Object soap,java.lang.Class cl,boolean typeFromClass) 177 | { 178 | if(soap==null) 179 | { 180 | return null; 181 | } 182 | try 183 | { 184 | if(typeFromClass) 185 | { 186 | return createObject(soap, cl); 187 | } 188 | java.lang.Object refAttr=getReference(soap); 189 | if (refAttr != null) 190 | { 191 | return refAttr; 192 | } 193 | else 194 | { 195 | if(soap instanceof SoapObject) 196 | { 197 | if(cl ==SoapObject.class) 198 | { 199 | return soap; 200 | } 201 | java.lang.String key=String.format("%s^^%s",((SoapObject)soap).getNamespace(),((SoapObject)soap).getName()); 202 | if(classNames.containsKey(key)) 203 | { 204 | cl=classNames.get(key); 205 | } 206 | } 207 | return createObject(soap, cl); 208 | } 209 | } 210 | catch (java.lang.Exception e) 211 | { 212 | if(enableLogging) 213 | { 214 | e.printStackTrace(); 215 | } 216 | return null; 217 | } 218 | } 219 | 220 | 221 | public java.lang.Object getSpecificType(java.lang.Object obj) 222 | { 223 | if(obj==null) 224 | { 225 | return null; 226 | } 227 | if(obj instanceof SoapObject) 228 | { 229 | SoapObject soapObject=(SoapObject)obj; 230 | java.lang.String key=soapObject.getNamespace()+"^^"+soapObject.getName(); 231 | if(classNames.containsKey(key)) 232 | { 233 | java.lang.Class cl=classNames.get(key); 234 | try 235 | { 236 | return createObject(soapObject, cl); 237 | } 238 | catch (java.lang.Exception e) 239 | { 240 | if(enableLogging) 241 | { 242 | e.printStackTrace(); 243 | } 244 | } 245 | } 246 | } 247 | 248 | return obj; 249 | } 250 | 251 | public static java.lang.Object getXSDType(java.lang.Object param) 252 | { 253 | if(param==null) 254 | { 255 | return null; 256 | } 257 | java.lang.Class obj=param.getClass(); 258 | if(obj.equals(java.lang.String.class)) 259 | { 260 | return "string"; 261 | } 262 | if(obj.equals(int.class) || obj.equals(java.lang.Integer.class)) 263 | { 264 | return "int"; 265 | } 266 | if(obj.equals(float.class) || obj.equals(java.lang.Float.class)) 267 | { 268 | return "float"; 269 | } 270 | if(obj.equals(double.class) || obj.equals(java.lang.Double.class)) 271 | { 272 | return "double"; 273 | } 274 | if(obj.equals(java.math.BigDecimal.class)) 275 | { 276 | return "decimal"; 277 | } 278 | if(obj.equals(short.class) || obj.equals(java.lang.Short.class)) 279 | { 280 | return "short"; 281 | } 282 | if(obj.equals(long.class) || obj.equals(java.lang.Long.class)) 283 | { 284 | return "long"; 285 | } 286 | if(obj.equals(boolean.class) || obj.equals(java.lang.Boolean.class)) 287 | { 288 | return "boolean"; 289 | } 290 | java.lang.String xmlName=TPAHelper.getKeyByValue(classNames,obj); 291 | if(xmlName==null) 292 | { 293 | return obj; 294 | } 295 | return xmlName; 296 | }} 297 | 298 | --------------------------------------------------------------------------------