├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ ├── JavaProject │ │ └── hrms │ │ │ ├── HrmsApplication.java │ │ │ ├── api │ │ │ └── controllers │ │ │ │ ├── AuthController.java │ │ │ │ ├── CitiesController.java │ │ │ │ ├── CurriculumVitaesController.java │ │ │ │ ├── EmailVerificationsController.java │ │ │ │ ├── EmployeesController.java │ │ │ │ ├── EmployerActivationByEmployeesController.java │ │ │ │ ├── EmployersController.java │ │ │ │ ├── FavoritesController.java │ │ │ │ ├── JobPositionsController.java │ │ │ │ ├── JobPostingsController.java │ │ │ │ ├── JobSeekerEducationsController.java │ │ │ │ ├── JobSeekerExperiencesController.java │ │ │ │ ├── JobSeekerForeignLanguagesController.java │ │ │ │ ├── JobSeekerSkillsController.java │ │ │ │ ├── JobSeekersController.java │ │ │ │ ├── TypesOfWorkingController.java │ │ │ │ └── WaysOfWorkingController.java │ │ │ ├── business │ │ │ ├── abstracts │ │ │ │ ├── ActivationCodeToEmployerService.java │ │ │ │ ├── ActivationCodeToJobSeekerService.java │ │ │ │ ├── AuthService.java │ │ │ │ ├── CityService.java │ │ │ │ ├── CurriculumVitaeService.java │ │ │ │ ├── EmployeeService.java │ │ │ │ ├── EmployerActivationByEmployeeService.java │ │ │ │ ├── EmployerService.java │ │ │ │ ├── FavoriteService.java │ │ │ │ ├── JobPositionService.java │ │ │ │ ├── JobPostingService.java │ │ │ │ ├── JobSeekerEducationService.java │ │ │ │ ├── JobSeekerExperienceService.java │ │ │ │ ├── JobSeekerForeignLanguageService.java │ │ │ │ ├── JobSeekerService.java │ │ │ │ ├── JobSeekerSkillService.java │ │ │ │ ├── TypeOfWorkingService.java │ │ │ │ ├── UserService.java │ │ │ │ └── WayOfWorkingService.java │ │ │ └── concretes │ │ │ │ ├── ActivationCodeToEmployerManager.java │ │ │ │ ├── ActivationCodeToJobSeekerManager.java │ │ │ │ ├── AuthManager.java │ │ │ │ ├── CityManager.java │ │ │ │ ├── CurriculumVitaeManager.java │ │ │ │ ├── EmployeeManager.java │ │ │ │ ├── EmployerActivationByEmployeeManager.java │ │ │ │ ├── EmployerManager.java │ │ │ │ ├── FavoriteManager.java │ │ │ │ ├── JobPositionManager.java │ │ │ │ ├── JobPostingManager.java │ │ │ │ ├── JobSeekerEducationManager.java │ │ │ │ ├── JobSeekerExperienceManager.java │ │ │ │ ├── JobSeekerForeignLanguageManager.java │ │ │ │ ├── JobSeekerManager.java │ │ │ │ ├── JobSeekerSkillManager.java │ │ │ │ ├── TypeOfWorkingManager.java │ │ │ │ ├── UserManager.java │ │ │ │ └── WayOfWorkingManager.java │ │ │ ├── core │ │ │ ├── adapters │ │ │ │ ├── image │ │ │ │ │ ├── CloudinaryManager.java │ │ │ │ │ └── ImageService.java │ │ │ │ └── mernis │ │ │ │ │ ├── MernisServiceAdapter.java │ │ │ │ │ └── UserCheckService.java │ │ │ └── utilities │ │ │ │ ├── business │ │ │ │ └── BusinessRules.java │ │ │ │ ├── helpers │ │ │ │ └── email │ │ │ │ │ ├── EmailManager.java │ │ │ │ │ └── EmailService.java │ │ │ │ └── results │ │ │ │ ├── DataResult.java │ │ │ │ ├── ErrorDataResult.java │ │ │ │ ├── ErrorResult.java │ │ │ │ ├── Result.java │ │ │ │ ├── SuccessDataResult.java │ │ │ │ └── SuccessResult.java │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ ├── ActivationCodeDao.java │ │ │ │ ├── ActivationCodeToEmployerDao.java │ │ │ │ ├── ActivationCodeToJobSeekerDao.java │ │ │ │ ├── CityDao.java │ │ │ │ ├── CurriculumVitaeDao.java │ │ │ │ ├── EmployeeDao.java │ │ │ │ ├── EmployerActivationByEmployeeDao.java │ │ │ │ ├── EmployerDao.java │ │ │ │ ├── FavoriteDao.java │ │ │ │ ├── JobPositionDao.java │ │ │ │ ├── JobPostingDao.java │ │ │ │ ├── JobSeekerDao.java │ │ │ │ ├── JobSeekerEducationDao.java │ │ │ │ ├── JobSeekerExperienceDao.java │ │ │ │ ├── JobSeekerForeignLanguageDao.java │ │ │ │ ├── JobSeekerSkillDao.java │ │ │ │ ├── TypeOfWorkingDao.java │ │ │ │ ├── UserDao.java │ │ │ │ └── WayOfWorkingDao.java │ │ │ └── entities │ │ │ ├── concretes │ │ │ ├── ActivationCode.java │ │ │ ├── ActivationCodeToEmployer.java │ │ │ ├── ActivationCodeToJobSeeker.java │ │ │ ├── City.java │ │ │ ├── CurriculumVitae.java │ │ │ ├── Employee.java │ │ │ ├── Employer.java │ │ │ ├── EmployerActivationByEmployee.java │ │ │ ├── Favorite.java │ │ │ ├── JobPosition.java │ │ │ ├── JobPosting.java │ │ │ ├── JobSeeker.java │ │ │ ├── JobSeekerEducation.java │ │ │ ├── JobSeekerExperience.java │ │ │ ├── JobSeekerForeignLanguage.java │ │ │ ├── JobSeekerSkill.java │ │ │ ├── TypeOfWorking.java │ │ │ ├── User.java │ │ │ └── WayOfWorking.java │ │ │ └── dtos │ │ │ ├── EmployerForRegisterDto.java │ │ │ ├── JobPostingAddDto.java │ │ │ ├── JobPostingFilter.java │ │ │ └── JobSeekerForRegisterDto.java │ └── tr │ │ └── gov │ │ └── nvi │ │ └── tckimlik │ │ └── WS │ │ ├── KPSPublic.java │ │ ├── KPSPublicLocator.java │ │ ├── KPSPublicSoap.java │ │ ├── KPSPublicSoapProxy.java │ │ └── KPSPublicSoapStub.java └── resources │ └── application.properties └── test └── java └── JavaProject └── hrms └── HrmsApplicationTests.java /.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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MetehanOzalp/HumanResourcesManagementSystem-Backend/2a6d102b25ea76d334b55fd4695c58fbc9f30c0c/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.4.5 10 | 11 | 12 | JavaProject 13 | hrms 14 | 0.0.1-SNAPSHOT 15 | hrms 16 | Demo project for Spring Boot 17 | 18 | 15 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-web 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-devtools 33 | runtime 34 | true 35 | 36 | 37 | org.postgresql 38 | postgresql 39 | runtime 40 | 41 | 42 | org.projectlombok 43 | lombok 44 | true 45 | 46 | 47 | org.springframework.boot 48 | spring-boot-starter-test 49 | test 50 | 51 | 52 | io.springfox 53 | springfox-swagger2 54 | 2.9.2 55 | 56 | 57 | io.springfox 58 | springfox-swagger-ui 59 | 2.9.2 60 | 61 | 62 | com.cloudinary 63 | cloudinary-http44 64 | 1.29.0 65 | 66 | 67 | org.springframework.boot 68 | spring-boot-starter-validation 69 | 70 | 71 | 72 | 73 | 74 | 75 | org.springframework.boot 76 | spring-boot-maven-plugin 77 | 78 | 79 | 80 | org.projectlombok 81 | lombok 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/HrmsApplication.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | @SpringBootApplication 13 | @EnableSwagger2 14 | public class HrmsApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(HrmsApplication.class, args); 18 | } 19 | 20 | @Bean 21 | public Docket api() { 22 | return new Docket(DocumentationType.SWAGGER_2).select() 23 | .apis(RequestHandlerSelectors.basePackage("JavaProject.hrms")).build(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/AuthController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import javax.validation.Valid; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.ResponseEntity; 10 | import org.springframework.validation.FieldError; 11 | import org.springframework.web.bind.MethodArgumentNotValidException; 12 | import org.springframework.web.bind.annotation.ExceptionHandler; 13 | import org.springframework.web.bind.annotation.PostMapping; 14 | import org.springframework.web.bind.annotation.RequestBody; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.ResponseStatus; 17 | import org.springframework.web.bind.annotation.RestController; 18 | 19 | import JavaProject.hrms.business.abstracts.AuthService; 20 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 21 | import JavaProject.hrms.entities.dtos.EmployerForRegisterDto; 22 | import JavaProject.hrms.entities.dtos.JobSeekerForRegisterDto; 23 | 24 | import org.springframework.http.HttpStatus; 25 | 26 | @RestController 27 | @RequestMapping("/api/auth/") 28 | public class AuthController { 29 | 30 | private AuthService authService; 31 | 32 | @Autowired 33 | public AuthController(AuthService authService) { 34 | super(); 35 | this.authService = authService; 36 | } 37 | 38 | @PostMapping("registerForJobSeeker") 39 | public ResponseEntity registerForJobSeeker(@Valid @RequestBody JobSeekerForRegisterDto jobSeekerForRegisterDto) { 40 | var result = authService.registerForJobSeeker(jobSeekerForRegisterDto); 41 | if (!result.isSuccess()) { 42 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 43 | } 44 | return ResponseEntity.ok(result); 45 | } 46 | 47 | @PostMapping("registerForEmployer") 48 | public ResponseEntity registerForEmployer(@Valid @RequestBody EmployerForRegisterDto employerForRegisterDto) { 49 | var result = authService.registerForEmployer(employerForRegisterDto); 50 | if (!result.isSuccess()) { 51 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 52 | } 53 | return ResponseEntity.ok(result); 54 | } 55 | 56 | @ExceptionHandler(MethodArgumentNotValidException.class) 57 | @ResponseStatus(HttpStatus.BAD_REQUEST) 58 | public ErrorDataResult handleValidationExceptions(MethodArgumentNotValidException exceptions) { 59 | Map validationErrors = new HashMap(); 60 | for (FieldError fieldError : exceptions.getBindingResult().getFieldErrors()) { 61 | validationErrors.put(fieldError.getField(), fieldError.getDefaultMessage()); 62 | } 63 | return new ErrorDataResult(validationErrors, "Doğrulama hataları"); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/CitiesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import JavaProject.hrms.business.abstracts.CityService; 12 | import JavaProject.hrms.core.utilities.results.DataResult; 13 | import JavaProject.hrms.entities.concretes.City; 14 | 15 | @RestController 16 | @RequestMapping("/api/cities/") 17 | @CrossOrigin 18 | public class CitiesController { 19 | 20 | private CityService cityService; 21 | 22 | @Autowired 23 | public CitiesController(CityService cityService) { 24 | super(); 25 | this.cityService = cityService; 26 | } 27 | 28 | @GetMapping("getAll") 29 | public DataResult> getAll() { 30 | return cityService.getAll(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/CurriculumVitaesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.HttpStatus; 5 | import org.springframework.http.ResponseEntity; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.PutMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.RestController; 14 | import org.springframework.web.multipart.MultipartFile; 15 | 16 | import JavaProject.hrms.business.abstracts.CurriculumVitaeService; 17 | import JavaProject.hrms.entities.concretes.CurriculumVitae; 18 | 19 | @RestController 20 | @RequestMapping("/api/curriculumVitaes/") 21 | @CrossOrigin 22 | public class CurriculumVitaesController { 23 | 24 | private CurriculumVitaeService curriculumVitaeService; 25 | 26 | @Autowired 27 | public CurriculumVitaesController(CurriculumVitaeService curriculumVitaeService) { 28 | super(); 29 | this.curriculumVitaeService = curriculumVitaeService; 30 | } 31 | 32 | @PostMapping("add") 33 | public ResponseEntity add(@RequestBody CurriculumVitae curriculumVitae) { 34 | var result = curriculumVitaeService.add(curriculumVitae); 35 | if (!result.isSuccess()) { 36 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 37 | } 38 | return ResponseEntity.ok(result); 39 | } 40 | 41 | @PostMapping("imageAdd") 42 | public ResponseEntity imageAdd(@RequestParam int curriculumVitaeId, @RequestParam MultipartFile file) { 43 | var result = curriculumVitaeService.imageAdd(curriculumVitaeId, file); 44 | if (!result.isSuccess()) { 45 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 46 | } 47 | return ResponseEntity.ok(result); 48 | } 49 | 50 | @PutMapping("imageUpdate") 51 | public ResponseEntity imageUpdate(@RequestParam int curriculumVitaeId, @RequestBody MultipartFile file) { 52 | var result = curriculumVitaeService.imageUpdate(curriculumVitaeId, file); 53 | if (!result.isSuccess()) { 54 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 55 | } 56 | return ResponseEntity.ok(result); 57 | } 58 | 59 | @GetMapping("getAll") 60 | public ResponseEntity getAll() { 61 | var result = curriculumVitaeService.getAll(); 62 | if (!result.isSuccess()) { 63 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 64 | } 65 | return ResponseEntity.ok(result); 66 | } 67 | 68 | @GetMapping("getByJobSeekerId") 69 | public ResponseEntity getByJobSeekerId(@RequestParam int getByJobSeekerId) { 70 | var result = curriculumVitaeService.getByJobSeekerId(getByJobSeekerId); 71 | if (!result.isSuccess()) { 72 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 73 | } 74 | return ResponseEntity.ok(result); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/EmailVerificationsController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.HttpStatus; 5 | import org.springframework.http.ResponseEntity; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import JavaProject.hrms.business.abstracts.ActivationCodeToEmployerService; 12 | import JavaProject.hrms.business.abstracts.ActivationCodeToJobSeekerService; 13 | 14 | @RestController 15 | @RequestMapping("/api/emailVerifications/") 16 | public class EmailVerificationsController { 17 | 18 | private ActivationCodeToEmployerService activationCodeToEmployerService; 19 | private ActivationCodeToJobSeekerService activationCodeToJobSeekerService; 20 | 21 | @Autowired 22 | public EmailVerificationsController(ActivationCodeToEmployerService activationCodeToEmployerService, 23 | ActivationCodeToJobSeekerService activationCodeToJobSeekerService) { 24 | super(); 25 | this.activationCodeToEmployerService = activationCodeToEmployerService; 26 | this.activationCodeToJobSeekerService = activationCodeToJobSeekerService; 27 | } 28 | 29 | @GetMapping("employerActivation") 30 | public ResponseEntity employerActivation(@RequestParam String code) { 31 | var result = activationCodeToEmployerService.verify(code); 32 | if (!result.isSuccess()) { 33 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 34 | } 35 | return ResponseEntity.ok(result); 36 | } 37 | 38 | @GetMapping("jobSeekerActivation") 39 | public ResponseEntity jobSeekerActivation(@RequestParam String code) { 40 | var result = activationCodeToJobSeekerService.verify(code); 41 | if (!result.isSuccess()) { 42 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 43 | } 44 | return ResponseEntity.ok(result); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/EmployeesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import JavaProject.hrms.business.abstracts.EmployeeService; 14 | import JavaProject.hrms.core.utilities.results.DataResult; 15 | import JavaProject.hrms.core.utilities.results.Result; 16 | import JavaProject.hrms.entities.concretes.Employee; 17 | 18 | @RestController 19 | @RequestMapping("/api/employees/") 20 | @CrossOrigin 21 | public class EmployeesController { 22 | 23 | private EmployeeService employeeService; 24 | 25 | @Autowired 26 | public EmployeesController(EmployeeService employeeService) { 27 | super(); 28 | this.employeeService = employeeService; 29 | } 30 | 31 | @PostMapping("add") 32 | public Result add(@RequestBody Employee employee) { 33 | return employeeService.add(employee); 34 | } 35 | 36 | @PostMapping("update") 37 | public Result update(@RequestBody Employee employee) { 38 | return employeeService.update(employee); 39 | } 40 | 41 | @GetMapping("getall") 42 | public DataResult> getAll() { 43 | return employeeService.getAll(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/EmployerActivationByEmployeesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.PostMapping; 5 | import org.springframework.web.bind.annotation.RequestBody; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import JavaProject.hrms.business.abstracts.EmployerActivationByEmployeeService; 10 | import JavaProject.hrms.core.utilities.results.Result; 11 | import JavaProject.hrms.entities.concretes.EmployerActivationByEmployee; 12 | 13 | @RestController 14 | @RequestMapping("/api/employerActivationByEmployees/") 15 | public class EmployerActivationByEmployeesController { 16 | 17 | private EmployerActivationByEmployeeService employerActivationByEmployeeService; 18 | 19 | @Autowired 20 | public EmployerActivationByEmployeesController( 21 | EmployerActivationByEmployeeService employerActivationByEmployeeService) { 22 | super(); 23 | this.employerActivationByEmployeeService = employerActivationByEmployeeService; 24 | } 25 | 26 | @PostMapping("add") 27 | public Result add(@RequestBody EmployerActivationByEmployee employerActivationByEmployee) { 28 | return employerActivationByEmployeeService.add(employerActivationByEmployee); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/EmployersController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import JavaProject.hrms.business.abstracts.EmployerService; 14 | import JavaProject.hrms.core.utilities.results.DataResult; 15 | import JavaProject.hrms.core.utilities.results.Result; 16 | import JavaProject.hrms.entities.concretes.Employer; 17 | 18 | @RestController 19 | @RequestMapping("/api/employers/") 20 | @CrossOrigin 21 | public class EmployersController { 22 | 23 | private EmployerService employerService; 24 | 25 | @Autowired 26 | public EmployersController(EmployerService employerService) { 27 | super(); 28 | this.employerService = employerService; 29 | } 30 | 31 | @PostMapping("update") 32 | public Result update(@RequestBody Employer employer) { 33 | return employerService.update(employer); 34 | } 35 | 36 | @GetMapping("getall") 37 | public DataResult> getAll() { 38 | return employerService.getAll(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/FavoritesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.CrossOrigin; 6 | import org.springframework.web.bind.annotation.DeleteMapping; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RequestParam; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import JavaProject.hrms.business.abstracts.FavoriteService; 15 | import JavaProject.hrms.entities.concretes.Favorite; 16 | 17 | @RestController 18 | @RequestMapping("/api/favorites/") 19 | @CrossOrigin 20 | public class FavoritesController { 21 | 22 | private FavoriteService favoriteService; 23 | 24 | public FavoritesController(FavoriteService favoriteService) { 25 | super(); 26 | this.favoriteService = favoriteService; 27 | } 28 | 29 | @PostMapping("add") 30 | public ResponseEntity add(@RequestBody Favorite favorite) { 31 | var result = favoriteService.add(favorite); 32 | if (!result.isSuccess()) { 33 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 34 | } 35 | return ResponseEntity.ok(result); 36 | } 37 | 38 | @DeleteMapping("delete") 39 | public ResponseEntity delete(@RequestParam int id) { 40 | var result = favoriteService.delete(id); 41 | if (!result.isSuccess()) { 42 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 43 | } 44 | return ResponseEntity.ok(result); 45 | } 46 | 47 | @GetMapping("getByJobSeekerId") 48 | public ResponseEntity getByJobSeekerId(@RequestParam int id) { 49 | var result = favoriteService.getByJobSeekerId(id); 50 | if (!result.isSuccess()) { 51 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 52 | } 53 | return ResponseEntity.ok(result); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobPositionsController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import JavaProject.hrms.business.abstracts.JobPositionService; 13 | import JavaProject.hrms.core.utilities.results.DataResult; 14 | import JavaProject.hrms.core.utilities.results.Result; 15 | import JavaProject.hrms.entities.concretes.JobPosition; 16 | 17 | @RestController 18 | @RequestMapping("/api/jobPositions/") 19 | @CrossOrigin 20 | public class JobPositionsController { 21 | 22 | private JobPositionService jobPositionService; 23 | 24 | @Autowired 25 | public JobPositionsController(JobPositionService jobPositionService) { 26 | super(); 27 | this.jobPositionService = jobPositionService; 28 | } 29 | 30 | @PostMapping 31 | public Result add(JobPosition jobPosition) { 32 | return jobPositionService.add(jobPosition); 33 | } 34 | 35 | @GetMapping("getall") 36 | public DataResult> getAll() { 37 | return jobPositionService.getAll(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobPostingsController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.HttpStatus; 5 | import org.springframework.http.ResponseEntity; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RequestParam; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import JavaProject.hrms.business.abstracts.JobPostingService; 16 | import JavaProject.hrms.entities.concretes.JobPosting; 17 | import JavaProject.hrms.entities.dtos.JobPostingFilter; 18 | 19 | @RestController 20 | @RequestMapping("api/jobPosting/") 21 | @CrossOrigin 22 | public class JobPostingsController { 23 | 24 | private JobPostingService jobPostingService; 25 | 26 | @Autowired 27 | public JobPostingsController(JobPostingService jobPostingService) { 28 | super(); 29 | this.jobPostingService = jobPostingService; 30 | } 31 | 32 | @PostMapping("add") 33 | public ResponseEntity add(@RequestBody JobPosting jobPosting) { 34 | var result = jobPostingService.add(jobPosting); 35 | if (!result.isSuccess()) { 36 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 37 | } 38 | return ResponseEntity.ok(result); 39 | } 40 | 41 | @PostMapping("delete") 42 | public ResponseEntity delete(@RequestParam int jobPostingId) { 43 | var result = jobPostingService.delete(jobPostingId); 44 | if (!result.isSuccess()) { 45 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 46 | } 47 | return ResponseEntity.ok(result); 48 | } 49 | 50 | @PostMapping("changeStatus") 51 | public ResponseEntity changeStatus(@RequestParam int jobPostingId) { 52 | var result = jobPostingService.changeJobPostingStatus(jobPostingId); 53 | if (!result.isSuccess()) { 54 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 55 | } 56 | return ResponseEntity.ok(result); 57 | } 58 | 59 | @GetMapping("getByActive") 60 | public ResponseEntity getByActive() { 61 | var result = jobPostingService.getByActiveOrPassiveJobPostings(true); 62 | if (!result.isSuccess()) { 63 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 64 | } 65 | return ResponseEntity.ok(result); 66 | } 67 | 68 | @GetMapping("getByActiveAndPageable") 69 | public ResponseEntity getByActiveAndPageable(@RequestParam int pageNumber) { 70 | var result = jobPostingService.getByIsConfirmAndPageNumber(true, pageNumber); 71 | if (!result.isSuccess()) { 72 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 73 | } 74 | return ResponseEntity.ok(result); 75 | } 76 | 77 | @PostMapping("getByActiveAndFilter") 78 | @ResponseBody 79 | public ResponseEntity getByActiveAndFilter(@RequestParam int pageNumber, 80 | @RequestBody JobPostingFilter jobPostingFilter) { 81 | var result = jobPostingService.getByIsConfirmAndPageNumberAndFilter(true, pageNumber, jobPostingFilter); 82 | if (!result.isSuccess()) { 83 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 84 | } 85 | return ResponseEntity.ok(result); 86 | } 87 | 88 | @GetMapping("getByPassive") 89 | public ResponseEntity getByPassive() { 90 | var result = jobPostingService.getByActiveOrPassiveJobPostings(false); 91 | if (!result.isSuccess()) { 92 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 93 | } 94 | return ResponseEntity.ok(result); 95 | } 96 | 97 | @GetMapping("getByReleaseDate") 98 | public ResponseEntity getByReleaseDate(@RequestParam int value) { 99 | var result = jobPostingService.getByReleaseDateJobPosting(value); 100 | if (!result.isSuccess()) { 101 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 102 | } 103 | return ResponseEntity.ok(result); 104 | } 105 | 106 | @GetMapping("getByEmployer") 107 | public ResponseEntity getByEmployer(@RequestParam int employerId) { 108 | var result = jobPostingService.getByEmployerJobPosting(employerId); 109 | if (!result.isSuccess()) { 110 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 111 | } 112 | return ResponseEntity.ok(result); 113 | } 114 | 115 | @GetMapping("getById") 116 | public ResponseEntity getById(@RequestParam int id) { 117 | var result = jobPostingService.getByJobPostingId(id); 118 | if (!result.isSuccess()) { 119 | return new ResponseEntity(result, HttpStatus.BAD_REQUEST); 120 | } 121 | return ResponseEntity.ok(result); 122 | } 123 | 124 | } 125 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobSeekerEducationsController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.DeleteMapping; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.PutMapping; 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import JavaProject.hrms.business.abstracts.JobSeekerEducationService; 17 | import JavaProject.hrms.core.utilities.results.DataResult; 18 | import JavaProject.hrms.core.utilities.results.Result; 19 | import JavaProject.hrms.entities.concretes.JobSeekerEducation; 20 | 21 | @RestController 22 | @RequestMapping("/api/jobSeekerEducations/") 23 | @CrossOrigin 24 | public class JobSeekerEducationsController { 25 | 26 | private JobSeekerEducationService jobSeekerEducationService; 27 | 28 | @Autowired 29 | public JobSeekerEducationsController(JobSeekerEducationService jobSeekerEducationService) { 30 | super(); 31 | this.jobSeekerEducationService = jobSeekerEducationService; 32 | } 33 | 34 | @PostMapping("add") 35 | public Result add(@RequestBody JobSeekerEducation jobSeekerEducation) { 36 | return jobSeekerEducationService.add(jobSeekerEducation); 37 | } 38 | 39 | @PutMapping("update") 40 | public Result update(@RequestBody JobSeekerEducation jobSeekerEducation) { 41 | return jobSeekerEducationService.update(jobSeekerEducation); 42 | } 43 | 44 | @DeleteMapping("delete") 45 | public Result delete(@RequestParam int id) { 46 | return jobSeekerEducationService.delete(id); 47 | } 48 | 49 | @GetMapping("getByDateOfGraduationSorted") 50 | public DataResult> getByDateOfGraduationSorted(@RequestParam int jobSeekerId) { 51 | return jobSeekerEducationService.getByDateOfGraduationSorted(jobSeekerId); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobSeekerExperiencesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.web.bind.annotation.CrossOrigin; 6 | import org.springframework.web.bind.annotation.DeleteMapping; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.PutMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import JavaProject.hrms.business.abstracts.JobSeekerExperienceService; 16 | import JavaProject.hrms.core.utilities.results.DataResult; 17 | import JavaProject.hrms.core.utilities.results.Result; 18 | import JavaProject.hrms.entities.concretes.JobSeekerExperience; 19 | 20 | @RestController 21 | @RequestMapping("/api/jobExperiences/") 22 | @CrossOrigin 23 | public class JobSeekerExperiencesController { 24 | 25 | private JobSeekerExperienceService jobSeekerExperienceService; 26 | 27 | public JobSeekerExperiencesController(JobSeekerExperienceService jobSeekerExperienceService) { 28 | super(); 29 | this.jobSeekerExperienceService = jobSeekerExperienceService; 30 | } 31 | 32 | @PostMapping("add") 33 | public Result add(@RequestBody JobSeekerExperience jobSeekerExperience) { 34 | return jobSeekerExperienceService.add(jobSeekerExperience); 35 | } 36 | 37 | @PutMapping("update") 38 | public Result update(@RequestBody JobSeekerExperience jobSeekerExperience) { 39 | return jobSeekerExperienceService.update(jobSeekerExperience); 40 | } 41 | 42 | @DeleteMapping("delete") 43 | public Result delete(@RequestParam int id) { 44 | return jobSeekerExperienceService.delete(id); 45 | } 46 | 47 | @GetMapping("getByDateOfFinishSorted") 48 | public DataResult> getByDateOfFinishSorted(@RequestParam int jobSeekerId) { 49 | return jobSeekerExperienceService.getByDateOfFinishSorted(jobSeekerId); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobSeekerForeignLanguagesController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.CrossOrigin; 5 | import org.springframework.web.bind.annotation.DeleteMapping; 6 | import org.springframework.web.bind.annotation.PostMapping; 7 | import org.springframework.web.bind.annotation.PutMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import JavaProject.hrms.business.abstracts.JobSeekerForeignLanguageService; 14 | import JavaProject.hrms.core.utilities.results.Result; 15 | import JavaProject.hrms.entities.concretes.JobSeekerForeignLanguage; 16 | 17 | @RestController 18 | @RequestMapping("/api/jobSeekerForeignLanguages/") 19 | @CrossOrigin 20 | public class JobSeekerForeignLanguagesController { 21 | 22 | private JobSeekerForeignLanguageService jobSeekerForeignLanguageService; 23 | 24 | @Autowired 25 | public JobSeekerForeignLanguagesController(JobSeekerForeignLanguageService jobSeekerForeignLanguageService) { 26 | super(); 27 | this.jobSeekerForeignLanguageService = jobSeekerForeignLanguageService; 28 | } 29 | 30 | @PostMapping("add") 31 | public Result add(@RequestBody JobSeekerForeignLanguage jobSeekerForeignLanguage) { 32 | return jobSeekerForeignLanguageService.add(jobSeekerForeignLanguage); 33 | } 34 | 35 | @PutMapping("update") 36 | public Result update(@RequestBody JobSeekerForeignLanguage jobSeekerForeignLanguage) { 37 | return jobSeekerForeignLanguageService.update(jobSeekerForeignLanguage); 38 | } 39 | 40 | @DeleteMapping("delete") 41 | public Result delete(@RequestParam int id) { 42 | return jobSeekerForeignLanguageService.delete(id); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobSeekerSkillsController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import org.springframework.web.bind.annotation.CrossOrigin; 4 | import org.springframework.web.bind.annotation.DeleteMapping; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.PutMapping; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestParam; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import JavaProject.hrms.business.abstracts.JobSeekerSkillService; 13 | import JavaProject.hrms.core.utilities.results.Result; 14 | import JavaProject.hrms.entities.concretes.JobSeekerSkill; 15 | 16 | @RestController 17 | @RequestMapping("/api/jobSeekerSkills/") 18 | @CrossOrigin 19 | public class JobSeekerSkillsController { 20 | 21 | private JobSeekerSkillService jobSeekerSkillService; 22 | 23 | public JobSeekerSkillsController(JobSeekerSkillService jobSeekerSkillService) { 24 | super(); 25 | this.jobSeekerSkillService = jobSeekerSkillService; 26 | } 27 | 28 | @PostMapping("add") 29 | public Result add(@RequestBody JobSeekerSkill jobSeekerSkill) { 30 | return jobSeekerSkillService.add(jobSeekerSkill); 31 | } 32 | 33 | @PutMapping("update") 34 | public Result update(@RequestBody JobSeekerSkill jobSeekerSkill) { 35 | return jobSeekerSkillService.update(jobSeekerSkill); 36 | } 37 | 38 | @DeleteMapping("delete") 39 | public Result delete(@RequestParam int id) { 40 | return jobSeekerSkillService.delete(id); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/JobSeekersController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import JavaProject.hrms.business.abstracts.JobSeekerService; 12 | import JavaProject.hrms.core.utilities.results.DataResult; 13 | import JavaProject.hrms.entities.concretes.JobSeeker; 14 | 15 | @RestController 16 | @RequestMapping("/api/jobSeekers/") 17 | @CrossOrigin 18 | public class JobSeekersController { 19 | 20 | private JobSeekerService jobSeekerService; 21 | 22 | @Autowired 23 | public JobSeekersController(JobSeekerService jobSeekerService) { 24 | super(); 25 | this.jobSeekerService = jobSeekerService; 26 | } 27 | 28 | @GetMapping("getall") 29 | public DataResult> getAll() { 30 | return jobSeekerService.getAll(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/TypesOfWorkingController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import JavaProject.hrms.business.abstracts.TypeOfWorkingService; 13 | import JavaProject.hrms.core.utilities.results.DataResult; 14 | import JavaProject.hrms.core.utilities.results.Result; 15 | import JavaProject.hrms.entities.concretes.TypeOfWorking; 16 | 17 | @RestController 18 | @RequestMapping("/api/typesOfWorking/") 19 | @CrossOrigin 20 | public class TypesOfWorkingController { 21 | 22 | private TypeOfWorkingService typeOfWorkingService; 23 | 24 | @Autowired 25 | public TypesOfWorkingController(TypeOfWorkingService typeOfWorkingService) { 26 | super(); 27 | this.typeOfWorkingService = typeOfWorkingService; 28 | } 29 | 30 | @PostMapping("add") 31 | public Result add(TypeOfWorking typeOfWorking) { 32 | return typeOfWorkingService.add(typeOfWorking); 33 | } 34 | 35 | @GetMapping("getAll") 36 | public DataResult> getAll() { 37 | return typeOfWorkingService.getAll(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/api/controllers/WaysOfWorkingController.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import JavaProject.hrms.business.abstracts.WayOfWorkingService; 13 | import JavaProject.hrms.core.utilities.results.DataResult; 14 | import JavaProject.hrms.core.utilities.results.Result; 15 | import JavaProject.hrms.entities.concretes.WayOfWorking; 16 | 17 | @RestController 18 | @RequestMapping("/api/waysOfWorking/") 19 | @CrossOrigin 20 | public class WaysOfWorkingController { 21 | 22 | private WayOfWorkingService wayOfWorkingService; 23 | 24 | @Autowired 25 | public WaysOfWorkingController(WayOfWorkingService wayOfWorkingService) { 26 | super(); 27 | this.wayOfWorkingService = wayOfWorkingService; 28 | } 29 | 30 | @PostMapping("add") 31 | public Result add(WayOfWorking wayOfWorking) { 32 | return wayOfWorkingService.add(wayOfWorking); 33 | } 34 | 35 | @GetMapping("getAll") 36 | public DataResult> getAll() { 37 | return wayOfWorkingService.getAll(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/ActivationCodeToEmployerService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.DataResult; 4 | import JavaProject.hrms.core.utilities.results.Result; 5 | import JavaProject.hrms.entities.concretes.ActivationCodeToEmployer; 6 | 7 | public interface ActivationCodeToEmployerService { 8 | 9 | Result add(ActivationCodeToEmployer activationCodeToEmployer); 10 | 11 | Result verify(String code); 12 | 13 | DataResult getByEmployerId(int id); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/ActivationCodeToJobSeekerService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.DataResult; 4 | import JavaProject.hrms.core.utilities.results.Result; 5 | import JavaProject.hrms.entities.concretes.ActivationCodeToJobSeeker; 6 | 7 | public interface ActivationCodeToJobSeekerService { 8 | 9 | Result add(ActivationCodeToJobSeeker activationCodeToJobSeeker); 10 | 11 | Result verify(String code); 12 | 13 | DataResult getByJobSeekerId(int id); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/AuthService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.Result; 4 | import JavaProject.hrms.entities.dtos.EmployerForRegisterDto; 5 | import JavaProject.hrms.entities.dtos.JobSeekerForRegisterDto; 6 | 7 | public interface AuthService { 8 | 9 | Result registerForJobSeeker(JobSeekerForRegisterDto jobSeekerForRegisterDto); 10 | 11 | Result registerForEmployer(EmployerForRegisterDto employerForRegisterDto); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/CityService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.entities.concretes.City; 7 | 8 | public interface CityService { 9 | 10 | DataResult> getAll(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/CurriculumVitaeService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import JavaProject.hrms.core.utilities.results.DataResult; 8 | import JavaProject.hrms.core.utilities.results.Result; 9 | import JavaProject.hrms.entities.concretes.CurriculumVitae; 10 | 11 | public interface CurriculumVitaeService { 12 | 13 | Result add(CurriculumVitae curriculumVitae); 14 | 15 | Result imageAdd(int id, MultipartFile file); 16 | 17 | Result imageUpdate(int id, MultipartFile file); 18 | 19 | DataResult> getAll(); 20 | 21 | DataResult> getByJobSeekerId(int id); 22 | 23 | DataResult getById(int id); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/EmployeeService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.Employee; 8 | 9 | public interface EmployeeService { 10 | 11 | Result add(Employee employee); 12 | 13 | Result update(Employee employee); 14 | 15 | DataResult> getAll(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/EmployerActivationByEmployeeService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.Result; 4 | import JavaProject.hrms.entities.concretes.EmployerActivationByEmployee; 5 | 6 | public interface EmployerActivationByEmployeeService { 7 | 8 | Result add(EmployerActivationByEmployee employerActivationByEmployee); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/EmployerService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.Employer; 8 | 9 | public interface EmployerService { 10 | 11 | Result add(Employer employer); 12 | 13 | Result update(Employer employer); 14 | 15 | DataResult> getAll(); 16 | 17 | DataResult getById(int id); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/FavoriteService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.Favorite; 8 | 9 | public interface FavoriteService { 10 | 11 | Result add(Favorite favorite); 12 | 13 | Result delete(int id); 14 | 15 | DataResult> getByJobSeekerId(int id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobPositionService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.JobPosition; 8 | 9 | public interface JobPositionService { 10 | 11 | Result add(JobPosition jobPosition); 12 | 13 | DataResult> getAll(); 14 | 15 | DataResult getById(int id); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobPostingService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.JobPosting; 8 | import JavaProject.hrms.entities.dtos.JobPostingFilter; 9 | 10 | public interface JobPostingService { 11 | 12 | Result add(JobPosting jobPosting); 13 | 14 | Result delete(int jobPostingId); 15 | 16 | Result changeJobPostingStatus(int jobPostingId); 17 | 18 | DataResult getByJobPostingId(int jobPostingId); 19 | 20 | DataResult> getByIsConfirmAndPageNumber(boolean isActice, int pageNumber); 21 | 22 | DataResult> getByIsConfirmAndPageNumberAndFilter(boolean isActice, int pageNumber, 23 | JobPostingFilter jobPostingFilter); 24 | 25 | DataResult> getByActiveOrPassiveJobPostings(boolean isActive); 26 | 27 | DataResult> getByReleaseDateJobPosting(int value); 28 | 29 | DataResult> getByEmployerJobPosting(int employerId); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobSeekerEducationService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.JobSeekerEducation; 8 | 9 | public interface JobSeekerEducationService { 10 | 11 | Result add(JobSeekerEducation jobSeekerEducation); 12 | 13 | Result update(JobSeekerEducation jobSeekerEducation); 14 | 15 | Result delete(int id); 16 | 17 | DataResult> getByDateOfGraduationSorted(int jobSeekerId); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobSeekerExperienceService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.JobSeekerExperience; 8 | 9 | public interface JobSeekerExperienceService { 10 | 11 | Result add(JobSeekerExperience jobSeekerExperience); 12 | 13 | Result update(JobSeekerExperience jobSeekerExperience); 14 | 15 | Result delete(int id); 16 | 17 | DataResult> getByDateOfFinishSorted(int jobSeekerId); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobSeekerForeignLanguageService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.Result; 4 | import JavaProject.hrms.entities.concretes.JobSeekerForeignLanguage; 5 | 6 | public interface JobSeekerForeignLanguageService { 7 | 8 | Result add(JobSeekerForeignLanguage jobSeekerForeignLanguage); 9 | 10 | Result update(JobSeekerForeignLanguage jobSeekerForeignLanguage); 11 | 12 | Result delete(int id); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobSeekerService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.JobSeeker; 8 | 9 | public interface JobSeekerService { 10 | 11 | Result add(JobSeeker jobSeeker); 12 | 13 | DataResult> getAll(); 14 | 15 | DataResult getByNationalityNumber(String nationalityNumber); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/JobSeekerSkillService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.Result; 4 | import JavaProject.hrms.entities.concretes.JobSeekerSkill; 5 | 6 | public interface JobSeekerSkillService { 7 | 8 | Result add(JobSeekerSkill jobSeekerSkill); 9 | 10 | Result update(JobSeekerSkill jobSeekerSkill); 11 | 12 | Result delete(int id); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/TypeOfWorkingService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.TypeOfWorking; 8 | 9 | public interface TypeOfWorkingService { 10 | 11 | Result add(TypeOfWorking typeOfWorking); 12 | 13 | DataResult> getAll(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import JavaProject.hrms.core.utilities.results.DataResult; 4 | import JavaProject.hrms.entities.concretes.User; 5 | 6 | public interface UserService { 7 | 8 | DataResult getByEmail(String email); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/abstracts/WayOfWorkingService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.entities.concretes.WayOfWorking; 8 | 9 | public interface WayOfWorkingService { 10 | 11 | Result add(WayOfWorking wayOfWorking); 12 | 13 | DataResult> getAll(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/ActivationCodeToEmployerManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.ActivationCodeToEmployerService; 9 | import JavaProject.hrms.core.utilities.results.DataResult; 10 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 11 | import JavaProject.hrms.core.utilities.results.ErrorResult; 12 | import JavaProject.hrms.core.utilities.results.Result; 13 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 14 | import JavaProject.hrms.core.utilities.results.SuccessResult; 15 | import JavaProject.hrms.dataAccess.abstracts.ActivationCodeToEmployerDao; 16 | import JavaProject.hrms.entities.concretes.ActivationCodeToEmployer; 17 | 18 | @Service 19 | public class ActivationCodeToEmployerManager implements ActivationCodeToEmployerService { 20 | 21 | private ActivationCodeToEmployerDao activationCodeToEmployerDao; 22 | 23 | @Autowired 24 | public ActivationCodeToEmployerManager(ActivationCodeToEmployerDao activationCodeToEmployerDao) { 25 | super(); 26 | this.activationCodeToEmployerDao = activationCodeToEmployerDao; 27 | } 28 | 29 | @Override 30 | public Result add(ActivationCodeToEmployer activationCodeToEmployer) { 31 | activationCodeToEmployerDao.save(activationCodeToEmployer); 32 | return new SuccessResult("Aktivasyon kodu eklendi"); 33 | } 34 | 35 | @Override 36 | public Result verify(String code) { 37 | String[] parse = code.split("-"); 38 | var result = getByEmployerId(Integer.parseInt(parse[1])); 39 | if (!result.isSuccess()) { 40 | return new ErrorResult(result.getMessage()); 41 | } 42 | if (!result.getData().getActivationCode().equals(code)) { 43 | return new ErrorResult("Doğrulama geçersiz"); 44 | } 45 | result.getData().setVerified(true); 46 | result.getData().setVerifiedDate(LocalDate.now()); 47 | activationCodeToEmployerDao.save(result.getData()); 48 | return new SuccessResult("Doğrulama başarılı"); 49 | } 50 | 51 | public DataResult getByEmployerId(int id) { 52 | var result = activationCodeToEmployerDao.getByEmployerId(id); 53 | if (result == null) { 54 | return new ErrorDataResult("Kullanıcıya ait kod bulunamadı"); 55 | } 56 | return new SuccessDataResult(result); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/ActivationCodeToJobSeekerManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | import JavaProject.hrms.business.abstracts.ActivationCodeToJobSeekerService; 8 | import JavaProject.hrms.core.utilities.results.DataResult; 9 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 10 | import JavaProject.hrms.core.utilities.results.ErrorResult; 11 | import JavaProject.hrms.core.utilities.results.Result; 12 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 13 | import JavaProject.hrms.core.utilities.results.SuccessResult; 14 | import JavaProject.hrms.dataAccess.abstracts.ActivationCodeToJobSeekerDao; 15 | import JavaProject.hrms.entities.concretes.ActivationCodeToJobSeeker; 16 | 17 | @Service 18 | public class ActivationCodeToJobSeekerManager implements ActivationCodeToJobSeekerService { 19 | 20 | private ActivationCodeToJobSeekerDao activationCodeToJobSeekerDao; 21 | 22 | public ActivationCodeToJobSeekerManager(ActivationCodeToJobSeekerDao activationCodeToJobSeekerDao) { 23 | super(); 24 | this.activationCodeToJobSeekerDao = activationCodeToJobSeekerDao; 25 | } 26 | 27 | @Override 28 | public Result add(ActivationCodeToJobSeeker activationCodeToJobSeeker) { 29 | activationCodeToJobSeekerDao.save(activationCodeToJobSeeker); 30 | return new SuccessResult("Aktivasyon kodu eklendi"); 31 | } 32 | 33 | @Override 34 | public Result verify(String code) { 35 | String[] parse = code.split("-"); 36 | var result = getByJobSeekerId(Integer.parseInt(parse[1])); 37 | if (!result.isSuccess()) { 38 | return new ErrorResult(result.getMessage()); 39 | } 40 | if (!result.getData().getActivationCode().equals(code)) { 41 | return new ErrorResult("Doğrulama başarısız"); 42 | } 43 | result.getData().setVerified(true); 44 | result.getData().setVerifiedDate(LocalDate.now()); 45 | activationCodeToJobSeekerDao.save(result.getData()); 46 | return new SuccessResult("Doğrulama başarılı"); 47 | } 48 | 49 | @Override 50 | public DataResult getByJobSeekerId(int id) { 51 | var result = activationCodeToJobSeekerDao.getByJobSeekerId(id); 52 | if (result == null) { 53 | return new ErrorDataResult("Kullanıcıya ait kod bulunamadı"); 54 | } 55 | return new SuccessDataResult(result); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/AuthManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.Random; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import JavaProject.hrms.business.abstracts.ActivationCodeToEmployerService; 10 | import JavaProject.hrms.business.abstracts.ActivationCodeToJobSeekerService; 11 | import JavaProject.hrms.business.abstracts.AuthService; 12 | import JavaProject.hrms.business.abstracts.EmployerService; 13 | import JavaProject.hrms.business.abstracts.JobSeekerService; 14 | import JavaProject.hrms.business.abstracts.UserService; 15 | import JavaProject.hrms.core.adapters.mernis.MernisServiceAdapter; 16 | import JavaProject.hrms.core.adapters.mernis.UserCheckService; 17 | import JavaProject.hrms.core.utilities.business.BusinessRules; 18 | import JavaProject.hrms.core.utilities.helpers.email.EmailService; 19 | import JavaProject.hrms.core.utilities.results.DataResult; 20 | import JavaProject.hrms.core.utilities.results.ErrorResult; 21 | import JavaProject.hrms.core.utilities.results.Result; 22 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 23 | import JavaProject.hrms.core.utilities.results.SuccessResult; 24 | import JavaProject.hrms.entities.concretes.ActivationCode; 25 | import JavaProject.hrms.entities.concretes.ActivationCodeToEmployer; 26 | import JavaProject.hrms.entities.concretes.ActivationCodeToJobSeeker; 27 | import JavaProject.hrms.entities.concretes.Employer; 28 | import JavaProject.hrms.entities.concretes.JobSeeker; 29 | import JavaProject.hrms.entities.dtos.EmployerForRegisterDto; 30 | import JavaProject.hrms.entities.dtos.JobSeekerForRegisterDto; 31 | 32 | @Service 33 | public class AuthManager implements AuthService { 34 | 35 | private UserService userService; 36 | private JobSeekerService jobSeekerService; 37 | private EmployerService employerService; 38 | private ActivationCodeToJobSeekerService activationCodeToJobSeekerService; 39 | private ActivationCodeToEmployerService activationCodeToEmployerService; 40 | private EmailService emailService; 41 | 42 | @Autowired 43 | public AuthManager(UserService userService, JobSeekerService jobSeekerService, EmployerService employerService, 44 | ActivationCodeToJobSeekerService activationCodeToJobSeekerService, 45 | ActivationCodeToEmployerService activationCodeToEmployerService, EmailService emailService) { 46 | super(); 47 | this.userService = userService; 48 | this.jobSeekerService = jobSeekerService; 49 | this.employerService = employerService; 50 | this.activationCodeToJobSeekerService = activationCodeToJobSeekerService; 51 | this.activationCodeToEmployerService = activationCodeToEmployerService; 52 | this.emailService = emailService; 53 | } 54 | 55 | @Override 56 | public Result registerForJobSeeker(JobSeekerForRegisterDto jobSeekerForRegisterDto) { 57 | var result = BusinessRules.run(checkIfEmailExists(jobSeekerForRegisterDto.getEmail()), 58 | checkIfNationalityNumberExists(jobSeekerForRegisterDto.getNationalityId()), 59 | checkIfPasswordsSame(jobSeekerForRegisterDto.getPassword(), 60 | jobSeekerForRegisterDto.getPasswordRepeat()), 61 | checkIfRealPerson(jobSeekerForRegisterDto.getNationalityId(), jobSeekerForRegisterDto.getFirstName(), 62 | jobSeekerForRegisterDto.getLastName(), jobSeekerForRegisterDto.getBirthYear())); 63 | if (result != null) { 64 | return result; 65 | } 66 | 67 | JobSeeker jobSeeker = new JobSeeker(0, jobSeekerForRegisterDto.getEmail(), 68 | jobSeekerForRegisterDto.getPassword(), jobSeekerForRegisterDto.getFirstName(), 69 | jobSeekerForRegisterDto.getLastName(), jobSeekerForRegisterDto.getNationalityId(), 70 | jobSeekerForRegisterDto.getBirthYear()); 71 | 72 | var added = jobSeekerService.add(jobSeeker); 73 | if (!added.isSuccess()) { 74 | return added; 75 | } 76 | var list = jobSeekerService.getAll().getData(); 77 | var lastId = list.get(list.size() - 1).getId(); 78 | var code = generateCode(lastId).getData(); 79 | activationCodeToJobSeekerService 80 | .add(new ActivationCodeToJobSeeker(0, code.getActivationCode(), false, LocalDate.now(), lastId)); 81 | sendEmail(jobSeekerForRegisterDto.getEmail(), "Doğrulama Linki", 82 | "http://localhost:8080/api/emailVerifications/jobSeekerActivation?code=" + code.getActivationCode()); 83 | return added; 84 | } 85 | 86 | @Override 87 | public Result registerForEmployer(EmployerForRegisterDto employerForRegisterDto) { 88 | var result = BusinessRules.run( 89 | checkIfPasswordsSame(employerForRegisterDto.getPassword(), employerForRegisterDto.getPasswordRepeat()), 90 | checkIfDomainSame(employerForRegisterDto.getEmail(), employerForRegisterDto.getWebSite()), 91 | checkIfEmailExists(employerForRegisterDto.getEmail())); 92 | if (result != null) { 93 | return result; 94 | } 95 | Employer employer = new Employer(0, employerForRegisterDto.getEmail(), employerForRegisterDto.getPassword(), 96 | employerForRegisterDto.getCompanyName(), employerForRegisterDto.getWebSite(), 97 | employerForRegisterDto.getPhoneNumber()); 98 | var added = employerService.add(employer); 99 | if (!added.isSuccess()) { 100 | return added; 101 | } 102 | var list = employerService.getAll().getData(); 103 | var lastId = list.get(list.size() - 1).getId(); 104 | var code = generateCode(lastId).getData(); 105 | System.out.print(lastId); 106 | activationCodeToEmployerService 107 | .add(new ActivationCodeToEmployer(0, code.getActivationCode(), false, LocalDate.now(), lastId)); 108 | sendEmail(employerForRegisterDto.getEmail(), "Doğrulama Linki", 109 | "http://localhost:8080/api/emailVerifications/employerActivation?code=" + code.getActivationCode()); 110 | return added; 111 | } 112 | 113 | public Result checkIfRealPerson(String nationalityId, String firstName, String lastName, int birthYear) { 114 | UserCheckService userCheckService = new MernisServiceAdapter(); 115 | var result = userCheckService.validate(nationalityId, firstName, lastName, birthYear); 116 | if (!result) { 117 | return new ErrorResult("Kimlik bilgileri yanlış"); 118 | } 119 | 120 | return new SuccessResult(); 121 | } 122 | 123 | public Result checkIfEmailExists(String email) { 124 | var result = userService.getByEmail(email); 125 | if (result.getData() != null) { 126 | return new ErrorResult("Bu e-posta zaten kayıtlı"); 127 | } 128 | return new SuccessResult(); 129 | } 130 | 131 | public Result checkIfNationalityNumberExists(String nationalityNumber) { 132 | var result = jobSeekerService.getByNationalityNumber(nationalityNumber); 133 | if (result.getData() != null) { 134 | return new ErrorResult("Bu TC kimlik numarası zaten kayıtlı"); 135 | } 136 | return new SuccessResult(); 137 | } 138 | 139 | public Result checkIfPasswordsSame(String password, String passwordRepeat) { 140 | if (!password.equals(passwordRepeat)) { 141 | return new ErrorResult("Şifreler farklı"); 142 | } 143 | return new SuccessResult(); 144 | } 145 | 146 | public Result checkIfDomainSame(String email, String webSite) { 147 | String[] emailDomain = email.split("@"); 148 | if (!emailDomain[1].equals(webSite)) { 149 | return new ErrorResult("E-posta ve web site alan isimleri farklı"); 150 | } 151 | return new SuccessResult(); 152 | } 153 | 154 | public DataResult generateCode(int id) { 155 | Random random = new Random(); 156 | var number = random.nextInt(90) + 10; 157 | var date = LocalDate.now(); 158 | String activationCode = number + "-" + id + "-" + date; 159 | return new SuccessDataResult(new ActivationCode(0, activationCode, false, LocalDate.now())); 160 | } 161 | 162 | public Result sendEmail(String to, String title, String body) { 163 | var result = emailService.sendEmail(to, title, body); 164 | if (!result.isSuccess()) { 165 | return result; 166 | } 167 | return result; 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/CityManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.CityService; 9 | import JavaProject.hrms.core.utilities.results.DataResult; 10 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 11 | import JavaProject.hrms.dataAccess.abstracts.CityDao; 12 | import JavaProject.hrms.entities.concretes.City; 13 | 14 | @Service 15 | public class CityManager implements CityService { 16 | 17 | private CityDao cityDao; 18 | 19 | @Autowired 20 | public CityManager(CityDao cityDao) { 21 | super(); 22 | this.cityDao = cityDao; 23 | } 24 | 25 | @Override 26 | public DataResult> getAll() { 27 | return new SuccessDataResult>(cityDao.findAll()); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/CurriculumVitaeManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.web.multipart.MultipartFile; 10 | 11 | import JavaProject.hrms.business.abstracts.CurriculumVitaeService; 12 | import JavaProject.hrms.core.adapters.image.CloudinaryManager; 13 | import JavaProject.hrms.core.adapters.image.ImageService; 14 | import JavaProject.hrms.core.utilities.results.DataResult; 15 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 16 | import JavaProject.hrms.core.utilities.results.ErrorResult; 17 | import JavaProject.hrms.core.utilities.results.Result; 18 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 19 | import JavaProject.hrms.core.utilities.results.SuccessResult; 20 | import JavaProject.hrms.dataAccess.abstracts.CurriculumVitaeDao; 21 | import JavaProject.hrms.entities.concretes.CurriculumVitae; 22 | 23 | @Service 24 | public class CurriculumVitaeManager implements CurriculumVitaeService { 25 | 26 | private CurriculumVitaeDao curriculumVitaeDao; 27 | 28 | @Autowired 29 | public CurriculumVitaeManager(CurriculumVitaeDao curriculumVitaeDao) { 30 | super(); 31 | this.curriculumVitaeDao = curriculumVitaeDao; 32 | } 33 | 34 | @Override 35 | public Result add(CurriculumVitae curriculumVitae) { 36 | curriculumVitae.setCreatedDate(LocalDate.now()); 37 | curriculumVitaeDao.save(curriculumVitae); 38 | return new SuccessResult("CV eklendi"); 39 | } 40 | 41 | @Override 42 | public Result imageAdd(int id, MultipartFile file) { 43 | var result = getById(id); 44 | if (!result.isSuccess()) { 45 | return new ErrorResult(result.getMessage()); 46 | } 47 | ImageService imageService = new CloudinaryManager(); 48 | Map upload = (Map) imageService.uploadImage(file).getData(); 49 | result.getData().setImagePath(upload.get("url")); 50 | curriculumVitaeDao.save(result.getData()); 51 | return new SuccessResult("Resim yüklendi"); 52 | } 53 | 54 | @Override 55 | public Result imageUpdate(int id, MultipartFile file) { 56 | var result = getById(id); 57 | if (!result.isSuccess()) { 58 | return new ErrorResult(result.getMessage()); 59 | } 60 | ImageService imageService = new CloudinaryManager(); 61 | Map upload = (Map) imageService.uploadImage(file).getData(); 62 | result.getData().setImagePath(upload.get("url")); 63 | curriculumVitaeDao.save(result.getData()); 64 | return new SuccessResult("Resim yüklendi"); 65 | } 66 | 67 | @Override 68 | public DataResult> getAll() { 69 | return new SuccessDataResult>(curriculumVitaeDao.findAll(), "CV'ler listelendi"); 70 | } 71 | 72 | @Override 73 | public DataResult> getByJobSeekerId(int id) { 74 | return new SuccessDataResult>(curriculumVitaeDao.getByJobSeeker_id(id), 75 | "Kullanıcıya ait CV'ler listelendi"); 76 | } 77 | 78 | @Override 79 | public DataResult getById(int id) { 80 | var result = curriculumVitaeDao.findById(id).get(); 81 | if (result == null) { 82 | return new ErrorDataResult("Böyle bir CV bulunamadı"); 83 | } 84 | return new SuccessDataResult(result); 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/EmployeeManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.EmployeeService; 9 | import JavaProject.hrms.core.utilities.results.DataResult; 10 | import JavaProject.hrms.core.utilities.results.Result; 11 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 12 | import JavaProject.hrms.core.utilities.results.SuccessResult; 13 | import JavaProject.hrms.dataAccess.abstracts.EmployeeDao; 14 | import JavaProject.hrms.entities.concretes.Employee; 15 | 16 | @Service 17 | public class EmployeeManager implements EmployeeService { 18 | 19 | private EmployeeDao employeeDao; 20 | 21 | @Autowired 22 | public EmployeeManager(EmployeeDao employeeDao) { 23 | super(); 24 | this.employeeDao = employeeDao; 25 | } 26 | 27 | @Override 28 | public Result add(Employee employee) { 29 | employeeDao.save(employee); 30 | return new SuccessResult("Sistem personeli eklendi"); 31 | } 32 | 33 | @Override 34 | public Result update(Employee employee) { 35 | employeeDao.save(employee); 36 | return new SuccessResult("Sistem personeli bilgisi güncellendi"); 37 | } 38 | 39 | @Override 40 | public DataResult> getAll() { 41 | return new SuccessDataResult>(employeeDao.findAll(), "Çalışanlar listelendi"); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/EmployerActivationByEmployeeManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.EmployerActivationByEmployeeService; 9 | import JavaProject.hrms.core.utilities.results.Result; 10 | import JavaProject.hrms.core.utilities.results.SuccessResult; 11 | import JavaProject.hrms.dataAccess.abstracts.EmployerActivationByEmployeeDao; 12 | import JavaProject.hrms.entities.concretes.EmployerActivationByEmployee; 13 | 14 | @Service 15 | public class EmployerActivationByEmployeeManager implements EmployerActivationByEmployeeService { 16 | 17 | private EmployerActivationByEmployeeDao employerActivationByEmployeeDao; 18 | 19 | @Autowired 20 | public EmployerActivationByEmployeeManager(EmployerActivationByEmployeeDao employerActivationByEmployeeDao) { 21 | super(); 22 | this.employerActivationByEmployeeDao = employerActivationByEmployeeDao; 23 | } 24 | 25 | @Override 26 | public Result add(EmployerActivationByEmployee employerActivationByEmployee) { 27 | employerActivationByEmployee.setVerified(true); 28 | employerActivationByEmployee.setVerifiedDate(LocalDate.now()); 29 | employerActivationByEmployeeDao.save(employerActivationByEmployee); 30 | return new SuccessResult("İşveren onaylandı"); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/EmployerManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.EmployerService; 9 | import JavaProject.hrms.core.utilities.business.BusinessRules; 10 | import JavaProject.hrms.core.utilities.results.DataResult; 11 | import JavaProject.hrms.core.utilities.results.ErrorResult; 12 | import JavaProject.hrms.core.utilities.results.Result; 13 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 14 | import JavaProject.hrms.core.utilities.results.SuccessResult; 15 | import JavaProject.hrms.dataAccess.abstracts.EmployerDao; 16 | import JavaProject.hrms.entities.concretes.Employer; 17 | 18 | @Service 19 | public class EmployerManager implements EmployerService { 20 | 21 | private EmployerDao employerDao; 22 | 23 | @Autowired 24 | public EmployerManager(EmployerDao employerDao) { 25 | super(); 26 | this.employerDao = employerDao; 27 | } 28 | 29 | @Override 30 | public Result add(Employer employer) { 31 | var result = BusinessRules.run(checkIfInformation(employer)); 32 | if (result != null) { 33 | return result; 34 | } 35 | employerDao.save(employer); 36 | return new SuccessResult("İşveren eklendi"); 37 | } 38 | 39 | @Override 40 | public Result update(Employer employer) { 41 | employerDao.save(employer); 42 | return new SuccessResult("İşveren güncellendi"); 43 | } 44 | 45 | @Override 46 | public DataResult> getAll() { 47 | return new SuccessDataResult>(employerDao.findAll(), "İşverenler listelendi"); 48 | } 49 | 50 | @Override 51 | public DataResult getById(int id) { 52 | return new SuccessDataResult(employerDao.getById(id)); 53 | } 54 | 55 | public Result checkIfInformation(Employer employer) { 56 | if (employer.getEmail() == "" || employer.getCompanyName() == "" || employer.getPassword() == "" 57 | || employer.getPhoneNumber() == "" || employer.getWebSite() == "") { 58 | return new ErrorResult("Lütfen tüm alanları doldurun"); 59 | } 60 | return new SuccessResult(); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/FavoriteManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | import JavaProject.hrms.business.abstracts.FavoriteService; 8 | import JavaProject.hrms.core.utilities.results.DataResult; 9 | import JavaProject.hrms.core.utilities.results.Result; 10 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 11 | import JavaProject.hrms.core.utilities.results.SuccessResult; 12 | import JavaProject.hrms.dataAccess.abstracts.FavoriteDao; 13 | import JavaProject.hrms.entities.concretes.Favorite; 14 | 15 | @Service 16 | public class FavoriteManager implements FavoriteService { 17 | 18 | private FavoriteDao favoriteDao; 19 | 20 | public FavoriteManager(FavoriteDao favoriteDao) { 21 | super(); 22 | this.favoriteDao = favoriteDao; 23 | } 24 | 25 | @Override 26 | public Result add(Favorite favorite) { 27 | favoriteDao.save(favorite); 28 | return new SuccessResult("Favorilere eklendi"); 29 | } 30 | 31 | @Override 32 | public Result delete(int id) { 33 | favoriteDao.deleteById(id); 34 | return new SuccessResult("Favorilerden silindi"); 35 | } 36 | 37 | @Override 38 | public DataResult> getByJobSeekerId(int id) { 39 | return new SuccessDataResult>(favoriteDao.getByJobSeeker_Id(id)); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobPositionManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.JobPositionService; 9 | import JavaProject.hrms.core.utilities.business.BusinessRules; 10 | import JavaProject.hrms.core.utilities.results.DataResult; 11 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 12 | import JavaProject.hrms.core.utilities.results.ErrorResult; 13 | import JavaProject.hrms.core.utilities.results.Result; 14 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 15 | import JavaProject.hrms.core.utilities.results.SuccessResult; 16 | import JavaProject.hrms.dataAccess.abstracts.JobPositionDao; 17 | import JavaProject.hrms.entities.concretes.JobPosition; 18 | 19 | @Service 20 | public class JobPositionManager implements JobPositionService { 21 | 22 | private JobPositionDao jobPositionDao; 23 | 24 | @Autowired 25 | public JobPositionManager(JobPositionDao jobPositionDao) { 26 | super(); 27 | this.jobPositionDao = jobPositionDao; 28 | } 29 | 30 | @Override 31 | public Result add(JobPosition jobPosition) { 32 | var result = BusinessRules.run(checkIfJobPositionExists(jobPosition.getName())); 33 | if (result != null) { 34 | return result; 35 | } 36 | this.jobPositionDao.save(jobPosition); 37 | return new SuccessResult("İş pozisyonu eklendi"); 38 | } 39 | 40 | @Override 41 | public DataResult> getAll() { 42 | return new SuccessDataResult>(jobPositionDao.findAll(), "İş pozisyonları listelendi"); 43 | } 44 | 45 | @Override 46 | public DataResult getById(int id) { 47 | var result = jobPositionDao.getById(id); 48 | if (result == null) { 49 | return new ErrorDataResult("Böyle bir iş pozisyonu bulunamadı"); 50 | } 51 | return new SuccessDataResult(result); 52 | } 53 | 54 | public Result checkIfJobPositionExists(String jobPositionName) { 55 | var result = jobPositionDao.getByName(jobPositionName); 56 | if (result != null) { 57 | return new ErrorResult("Bu isimde zaten bir pozisyon var"); 58 | } 59 | return new SuccessResult(); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobPostingManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.PageRequest; 8 | import org.springframework.data.domain.Pageable; 9 | import org.springframework.data.domain.Sort; 10 | import org.springframework.stereotype.Service; 11 | 12 | import JavaProject.hrms.business.abstracts.JobPositionService; 13 | import JavaProject.hrms.business.abstracts.JobPostingService; 14 | import JavaProject.hrms.core.utilities.business.BusinessRules; 15 | import JavaProject.hrms.core.utilities.results.DataResult; 16 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 17 | import JavaProject.hrms.core.utilities.results.ErrorResult; 18 | import JavaProject.hrms.core.utilities.results.Result; 19 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 20 | import JavaProject.hrms.core.utilities.results.SuccessResult; 21 | import JavaProject.hrms.dataAccess.abstracts.JobPostingDao; 22 | import JavaProject.hrms.entities.concretes.JobPosting; 23 | import JavaProject.hrms.entities.dtos.JobPostingFilter; 24 | 25 | @Service 26 | public class JobPostingManager implements JobPostingService { 27 | 28 | private JobPostingDao jobPostingDao; 29 | private JobPositionService jobPositionService; 30 | 31 | @Autowired 32 | public JobPostingManager(JobPostingDao jobPostingDao, JobPositionService jobPositionService) { 33 | super(); 34 | this.jobPostingDao = jobPostingDao; 35 | this.jobPositionService = jobPositionService; 36 | } 37 | 38 | @Override 39 | public Result add(JobPosting jobPosting) { 40 | /* 41 | * JobPosting jobPosting = new JobPosting(0, 42 | * jobPostingAddDto.getJobDescription(), jobPostingAddDto.getMinSalary(), 43 | * jobPostingAddDto.getMaxSalary(), jobPostingAddDto.getOpenPositionCount(), 44 | * jobPostingAddDto.getApplicationDeadline(), false, null, new 45 | * TypeOfWorking(jobPostingAddDto.getTypeOfWorkingId(), null, null), new 46 | * WayOfWorking(jobPostingAddDto.getWayOfWorkingId(), null, null), new 47 | * Employer(jobPostingAddDto.getEmployerId(), null, null, null, null, null), new 48 | * JobPosition(jobPostingAddDto.getJobPositionId(), null, null), new 49 | * City(jobPostingAddDto.getCityId(), null, null), null); 50 | */ 51 | var result = BusinessRules.run(checkIfEndDateValid(jobPosting), 52 | checkIfJobPositionExists(jobPosting.getJobPositionId())); 53 | if (result != null) { 54 | return result; 55 | } 56 | jobPosting.setConfirm(false); 57 | jobPosting.setActive(true); 58 | jobPosting.setReleaseDate(LocalDate.now()); 59 | jobPostingDao.save(jobPosting); 60 | return new SuccessResult("İş ilanı eklendi"); 61 | } 62 | 63 | @Override 64 | public Result delete(int jobPostingId) { 65 | jobPostingDao.deleteById(jobPostingId); 66 | return new SuccessResult("İş ilanı silindi"); 67 | } 68 | 69 | @Override 70 | public Result changeJobPostingStatus(int jobPostingId) { 71 | var jobPosting = getByJobPostingId(jobPostingId); 72 | if (!jobPosting.isSuccess()) { 73 | return new ErrorResult(jobPosting.getMessage()); 74 | } 75 | jobPosting.getData().setConfirm(!jobPosting.getData().isConfirm()); 76 | jobPostingDao.save(jobPosting.getData()); 77 | return new SuccessResult("İlan durumu değiştirildi"); 78 | } 79 | 80 | @Override 81 | public DataResult getByJobPostingId(int jobPostingId) { 82 | var result = jobPostingDao.getById(jobPostingId); 83 | if (result == null) { 84 | return new ErrorDataResult("Böyle bir iş ilanı bulunamadı"); 85 | } 86 | return new SuccessDataResult(result); 87 | } 88 | 89 | @Override 90 | public DataResult> getByIsConfirmAndPageNumber(boolean isActice, int pageNumber) { 91 | Pageable pageable = PageRequest.of(pageNumber - 1, 10); 92 | return new SuccessDataResult>(jobPostingDao.getByIsConfirm(isActice, pageable)); 93 | } 94 | 95 | @Override 96 | public DataResult> getByIsConfirmAndPageNumberAndFilter(boolean isActive, int pageNumber, 97 | JobPostingFilter jobPostingFilter) { 98 | Pageable pageable = PageRequest.of(pageNumber - 1, 10); 99 | var result = BusinessRules.run(deadlineCheck()); 100 | if (result != null) { 101 | return new ErrorDataResult>(result.getMessage()); 102 | } 103 | return new SuccessDataResult>(jobPostingDao.getByFilter(isActive, jobPostingFilter, pageable)); 104 | } 105 | 106 | @Override 107 | public DataResult> getByActiveOrPassiveJobPostings(boolean isActive) { 108 | return new SuccessDataResult>(jobPostingDao.getByIsConfirm(isActive)); 109 | } 110 | 111 | @Override 112 | public DataResult> getByReleaseDateJobPosting(int value) { 113 | Sort sort; 114 | if (value == 0) { 115 | sort = Sort.by(Sort.Direction.DESC, "releaseDate"); 116 | } else { 117 | sort = Sort.by(Sort.Direction.ASC, "releaseDate"); 118 | } 119 | return new SuccessDataResult>(jobPostingDao.getByIsConfirm(true, sort)); 120 | } 121 | 122 | @Override 123 | public DataResult> getByEmployerJobPosting(int employerId) { 124 | return new SuccessDataResult>(jobPostingDao.getByIsActiveAndEmployer_id(true, employerId)); 125 | } 126 | 127 | public Result checkIfEndDateValid(JobPosting jobPosting) { 128 | if (jobPosting.getApplicationDeadline().isBefore(LocalDate.now())) { 129 | return new ErrorResult("Son başvuru tarihi bu tarihten önce olamaz"); 130 | } 131 | return new SuccessResult(); 132 | } 133 | 134 | public Result checkIfJobPositionExists(int jobPositionId) { 135 | var result = jobPositionService.getById(jobPositionId); 136 | if (!result.isSuccess()) { 137 | return new ErrorResult(result.getMessage()); 138 | } 139 | return new SuccessResult(); 140 | } 141 | 142 | public Result deadlineCheck() { 143 | var result = jobPostingDao.findAll(); 144 | for (JobPosting jobPosting : result) { 145 | if (jobPosting.getApplicationDeadline().isBefore(LocalDate.now())) { 146 | jobPosting.setActive(false); 147 | jobPostingDao.save(jobPosting); 148 | } 149 | } 150 | return new SuccessResult(); 151 | } 152 | 153 | } 154 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobSeekerEducationManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.Sort; 7 | import org.springframework.stereotype.Service; 8 | 9 | import JavaProject.hrms.business.abstracts.JobSeekerEducationService; 10 | import JavaProject.hrms.core.utilities.results.DataResult; 11 | import JavaProject.hrms.core.utilities.results.Result; 12 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 13 | import JavaProject.hrms.core.utilities.results.SuccessResult; 14 | import JavaProject.hrms.dataAccess.abstracts.JobSeekerEducationDao; 15 | import JavaProject.hrms.entities.concretes.JobSeekerEducation; 16 | 17 | @Service 18 | public class JobSeekerEducationManager implements JobSeekerEducationService { 19 | 20 | private JobSeekerEducationDao jobSeekerEducationDao; 21 | 22 | @Autowired 23 | public JobSeekerEducationManager(JobSeekerEducationDao jobSeekerEducationDao) { 24 | super(); 25 | this.jobSeekerEducationDao = jobSeekerEducationDao; 26 | } 27 | 28 | @Override 29 | public Result add(JobSeekerEducation jobSeekerEducation) { 30 | jobSeekerEducationDao.save(jobSeekerEducation); 31 | return new SuccessResult("Eğitim eklendi"); 32 | } 33 | 34 | @Override 35 | public Result update(JobSeekerEducation jobSeekerEducation) { 36 | jobSeekerEducationDao.save(jobSeekerEducation); 37 | return new SuccessResult("Eğitim bilgisi güncellendi"); 38 | } 39 | 40 | @Override 41 | public Result delete(int id) { 42 | jobSeekerEducationDao.deleteById(id); 43 | return new SuccessResult("Eğitim bilgisi silindi"); 44 | } 45 | 46 | @Override 47 | public DataResult> getByDateOfGraduationSorted(int jobSeekerId) { 48 | Sort sort = Sort.by(Sort.Direction.DESC, "endDate"); 49 | return new SuccessDataResult>( 50 | jobSeekerEducationDao.getByCurriculumVitae_JobSeeker_id(jobSeekerId, sort)); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobSeekerExperienceManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.Sort; 7 | import org.springframework.stereotype.Service; 8 | 9 | import JavaProject.hrms.business.abstracts.JobSeekerExperienceService; 10 | import JavaProject.hrms.core.utilities.results.DataResult; 11 | import JavaProject.hrms.core.utilities.results.Result; 12 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 13 | import JavaProject.hrms.core.utilities.results.SuccessResult; 14 | import JavaProject.hrms.dataAccess.abstracts.JobSeekerExperienceDao; 15 | import JavaProject.hrms.entities.concretes.JobSeekerExperience; 16 | 17 | @Service 18 | public class JobSeekerExperienceManager implements JobSeekerExperienceService { 19 | 20 | private JobSeekerExperienceDao jobSeekerExperienceDao; 21 | 22 | @Autowired 23 | public JobSeekerExperienceManager(JobSeekerExperienceDao jobSeekerExperienceDao) { 24 | super(); 25 | this.jobSeekerExperienceDao = jobSeekerExperienceDao; 26 | } 27 | 28 | @Override 29 | public Result add(JobSeekerExperience jobSeekerExperience) { 30 | jobSeekerExperienceDao.save(jobSeekerExperience); 31 | return new SuccessResult("Deneyim eklendi"); 32 | } 33 | 34 | @Override 35 | public Result update(JobSeekerExperience jobSeekerExperience) { 36 | jobSeekerExperienceDao.save(jobSeekerExperience); 37 | return new SuccessResult("Deneyim bilgisi güncellendi!"); 38 | } 39 | 40 | @Override 41 | public Result delete(int id) { 42 | jobSeekerExperienceDao.deleteById(id); 43 | return new SuccessResult("Deneyim bilgisi silindi"); 44 | } 45 | 46 | @Override 47 | public DataResult> getByDateOfFinishSorted(int jobSeekerId) { 48 | Sort sort = Sort.by(Sort.Direction.DESC, "endDate"); 49 | return new SuccessDataResult>( 50 | jobSeekerExperienceDao.getByCurriculumVitae_JobSeeker_id(jobSeekerId, sort)); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobSeekerForeignLanguageManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import JavaProject.hrms.business.abstracts.JobSeekerForeignLanguageService; 7 | import JavaProject.hrms.core.utilities.results.Result; 8 | import JavaProject.hrms.core.utilities.results.SuccessResult; 9 | import JavaProject.hrms.dataAccess.abstracts.JobSeekerForeignLanguageDao; 10 | import JavaProject.hrms.entities.concretes.JobSeekerForeignLanguage; 11 | 12 | @Service 13 | public class JobSeekerForeignLanguageManager implements JobSeekerForeignLanguageService { 14 | 15 | private JobSeekerForeignLanguageDao jobSeekerForeignLanguageDao; 16 | 17 | @Autowired 18 | public JobSeekerForeignLanguageManager(JobSeekerForeignLanguageDao jobSeekerForeignLanguageDao) { 19 | super(); 20 | this.jobSeekerForeignLanguageDao = jobSeekerForeignLanguageDao; 21 | } 22 | 23 | @Override 24 | public Result add(JobSeekerForeignLanguage jobSeekerForeignLanguage) { 25 | jobSeekerForeignLanguageDao.save(jobSeekerForeignLanguage); 26 | return new SuccessResult("Yabancı dil eklendi"); 27 | } 28 | 29 | @Override 30 | public Result update(JobSeekerForeignLanguage jobSeekerForeignLanguage) { 31 | jobSeekerForeignLanguageDao.save(jobSeekerForeignLanguage); 32 | return new SuccessResult("Yabancı dil bilgisi güncellendi"); 33 | } 34 | 35 | @Override 36 | public Result delete(int id) { 37 | jobSeekerForeignLanguageDao.deleteById(id); 38 | return new SuccessResult("Yabancı dil bilgisi silindi"); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobSeekerManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.JobSeekerService; 9 | import JavaProject.hrms.core.utilities.business.BusinessRules; 10 | import JavaProject.hrms.core.utilities.results.DataResult; 11 | import JavaProject.hrms.core.utilities.results.ErrorResult; 12 | import JavaProject.hrms.core.utilities.results.Result; 13 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 14 | import JavaProject.hrms.core.utilities.results.SuccessResult; 15 | import JavaProject.hrms.dataAccess.abstracts.JobSeekerDao; 16 | import JavaProject.hrms.entities.concretes.JobSeeker; 17 | 18 | @Service 19 | public class JobSeekerManager implements JobSeekerService { 20 | 21 | private JobSeekerDao jobSeekerDao; 22 | 23 | @Autowired 24 | public JobSeekerManager(JobSeekerDao jobSeekerDao) { 25 | super(); 26 | this.jobSeekerDao = jobSeekerDao; 27 | } 28 | 29 | @Override 30 | public Result add(JobSeeker jobSeeker) { 31 | var result = BusinessRules.run(checkIfInformation(jobSeeker)); 32 | if (result != null) { 33 | return result; 34 | } 35 | this.jobSeekerDao.save(jobSeeker); 36 | return new SuccessResult("İş arayan eklendi"); 37 | } 38 | 39 | @Override 40 | public DataResult> getAll() { 41 | return new SuccessDataResult>(jobSeekerDao.findAll()); 42 | } 43 | 44 | @Override 45 | public DataResult getByNationalityNumber(String nationalityNumber) { 46 | return new SuccessDataResult(jobSeekerDao.getByNationalityId(nationalityNumber)); 47 | } 48 | 49 | public Result checkIfInformation(JobSeeker jobSeeker) { 50 | if (jobSeeker.getEmail() == "" || jobSeeker.getPassword() == "" || jobSeeker.getFirstName() == "" 51 | || jobSeeker.getLastName() == "" || jobSeeker.getNationalityId() == "" 52 | || jobSeeker.getBirthYear() == 0) { 53 | return new ErrorResult("Lütfen tüm alanları doldurun"); 54 | } 55 | return new SuccessResult(); 56 | 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/JobSeekerSkillManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import JavaProject.hrms.business.abstracts.JobSeekerSkillService; 6 | import JavaProject.hrms.core.utilities.results.Result; 7 | import JavaProject.hrms.core.utilities.results.SuccessResult; 8 | import JavaProject.hrms.dataAccess.abstracts.JobSeekerSkillDao; 9 | import JavaProject.hrms.entities.concretes.JobSeekerSkill; 10 | 11 | @Service 12 | public class JobSeekerSkillManager implements JobSeekerSkillService { 13 | 14 | private JobSeekerSkillDao jobSeekerSkillDao; 15 | 16 | public JobSeekerSkillManager(JobSeekerSkillDao jobSeekerSkillDao) { 17 | super(); 18 | this.jobSeekerSkillDao = jobSeekerSkillDao; 19 | } 20 | 21 | @Override 22 | public Result add(JobSeekerSkill jobSeekerSkill) { 23 | jobSeekerSkillDao.save(jobSeekerSkill); 24 | return new SuccessResult("Yetenek eklendi"); 25 | } 26 | 27 | @Override 28 | public Result update(JobSeekerSkill jobSeekerSkill) { 29 | jobSeekerSkillDao.save(jobSeekerSkill); 30 | return new SuccessResult("Yetenek bilgisi güncellendi"); 31 | } 32 | 33 | @Override 34 | public Result delete(int id) { 35 | jobSeekerSkillDao.deleteById(id); 36 | return new SuccessResult("Yetenek bilgisi silindi"); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/TypeOfWorkingManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import JavaProject.hrms.business.abstracts.TypeOfWorkingService; 9 | import JavaProject.hrms.core.utilities.results.DataResult; 10 | import JavaProject.hrms.core.utilities.results.Result; 11 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 12 | import JavaProject.hrms.core.utilities.results.SuccessResult; 13 | import JavaProject.hrms.dataAccess.abstracts.TypeOfWorkingDao; 14 | import JavaProject.hrms.entities.concretes.TypeOfWorking; 15 | 16 | @Service 17 | public class TypeOfWorkingManager implements TypeOfWorkingService { 18 | 19 | private TypeOfWorkingDao typeOfWorkingDao; 20 | 21 | @Autowired 22 | public TypeOfWorkingManager(TypeOfWorkingDao typeOfWorkingDao) { 23 | super(); 24 | this.typeOfWorkingDao = typeOfWorkingDao; 25 | } 26 | 27 | @Override 28 | public Result add(TypeOfWorking typeOfWorking) { 29 | typeOfWorkingDao.save(typeOfWorking); 30 | return new SuccessResult("Çalışma türü eklendi"); 31 | } 32 | 33 | @Override 34 | public DataResult> getAll() { 35 | return new SuccessDataResult>(typeOfWorkingDao.findAll()); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import JavaProject.hrms.business.abstracts.UserService; 6 | import JavaProject.hrms.core.utilities.results.DataResult; 7 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 8 | import JavaProject.hrms.dataAccess.abstracts.UserDao; 9 | import JavaProject.hrms.entities.concretes.User; 10 | 11 | @Service 12 | public class UserManager implements UserService { 13 | 14 | private UserDao userDao; 15 | 16 | public UserManager(UserDao userDao) { 17 | super(); 18 | this.userDao = userDao; 19 | } 20 | 21 | @Override 22 | public DataResult getByEmail(String email) { 23 | return new SuccessDataResult(userDao.getByEmail(email)); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/business/concretes/WayOfWorkingManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | import JavaProject.hrms.business.abstracts.WayOfWorkingService; 8 | import JavaProject.hrms.core.utilities.results.DataResult; 9 | import JavaProject.hrms.core.utilities.results.Result; 10 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 11 | import JavaProject.hrms.core.utilities.results.SuccessResult; 12 | import JavaProject.hrms.dataAccess.abstracts.WayOfWorkingDao; 13 | import JavaProject.hrms.entities.concretes.WayOfWorking; 14 | 15 | @Service 16 | public class WayOfWorkingManager implements WayOfWorkingService { 17 | 18 | private WayOfWorkingDao wayOfWorkingDao; 19 | 20 | public WayOfWorkingManager(WayOfWorkingDao wayOfWorkingDao) { 21 | super(); 22 | this.wayOfWorkingDao = wayOfWorkingDao; 23 | } 24 | 25 | @Override 26 | public Result add(WayOfWorking wayOfWorking) { 27 | wayOfWorkingDao.save(wayOfWorking); 28 | return new SuccessResult("Çalışma şekli eklendi"); 29 | } 30 | 31 | @Override 32 | public DataResult> getAll() { 33 | return new SuccessDataResult>(wayOfWorkingDao.findAll()); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/adapters/image/CloudinaryManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.adapters.image; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | 6 | import org.springframework.web.multipart.MultipartFile; 7 | 8 | import com.cloudinary.Cloudinary; 9 | import com.cloudinary.utils.ObjectUtils; 10 | 11 | import JavaProject.hrms.core.utilities.results.DataResult; 12 | import JavaProject.hrms.core.utilities.results.ErrorDataResult; 13 | import JavaProject.hrms.core.utilities.results.SuccessDataResult; 14 | 15 | public class CloudinaryManager implements ImageService { 16 | 17 | Cloudinary cloudinary = new Cloudinary(ObjectUtils.asMap("cloud_name", "metcloud", "api_key", "944519468684757", 18 | "api_secret", "CPqAjCpyyURWvcg84ix4CPnQaWY")); 19 | 20 | @Override 21 | public DataResult uploadImage(MultipartFile file) { 22 | try { 23 | Map upload = cloudinary.uploader().upload(file.getBytes(), ObjectUtils.emptyMap()); 24 | return new SuccessDataResult(upload); 25 | } catch (IOException e) { 26 | e.printStackTrace(); 27 | return new ErrorDataResult(); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/adapters/image/ImageService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.adapters.image; 2 | 3 | import org.springframework.web.multipart.MultipartFile; 4 | 5 | import JavaProject.hrms.core.utilities.results.DataResult; 6 | 7 | public interface ImageService { 8 | 9 | DataResult uploadImage(MultipartFile file); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/adapters/mernis/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.adapters.mernis; 2 | 3 | import java.util.Locale; 4 | 5 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 6 | 7 | public class MernisServiceAdapter implements UserCheckService { 8 | 9 | @Override 10 | public boolean validate(String nationalityId, String firstName, String lastName, int birthYear) { 11 | KPSPublicSoapProxy kpsPublicSoapProxy = new KPSPublicSoapProxy(); 12 | boolean result = false; 13 | try { 14 | result = kpsPublicSoapProxy.TCKimlikNoDogrula(Long.parseLong(nationalityId), 15 | firstName.toUpperCase(new Locale("tr")), lastName.toUpperCase(new Locale("tr")), birthYear); 16 | } catch (Exception ex) { 17 | ex.printStackTrace(); 18 | } 19 | 20 | return result; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/adapters/mernis/UserCheckService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.adapters.mernis; 2 | 3 | public interface UserCheckService { 4 | 5 | boolean validate(String nationalityId, String firstName, String lastName, int birthYear); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/business/BusinessRules.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.business; 2 | 3 | import JavaProject.hrms.core.utilities.results.Result; 4 | 5 | public class BusinessRules { 6 | 7 | public static Result run(Result... logics) { 8 | for (var logic : logics) { 9 | if (!logic.isSuccess()) { 10 | return logic; 11 | } 12 | } 13 | return null; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/helpers/email/EmailManager.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.helpers.email; 2 | 3 | import java.util.Properties; 4 | 5 | import javax.mail.Message; 6 | import javax.mail.MessagingException; 7 | import javax.mail.PasswordAuthentication; 8 | import javax.mail.Session; 9 | import javax.mail.Transport; 10 | import javax.mail.internet.InternetAddress; 11 | import javax.mail.internet.MimeMessage; 12 | 13 | import org.springframework.stereotype.Service; 14 | 15 | import JavaProject.hrms.core.utilities.results.ErrorResult; 16 | import JavaProject.hrms.core.utilities.results.Result; 17 | import JavaProject.hrms.core.utilities.results.SuccessResult; 18 | 19 | @Service 20 | public class EmailManager implements EmailService { 21 | 22 | @Override 23 | public Result sendEmail(String to, String title, String body) { 24 | 25 | String from = "*****@gmail.com"; 26 | 27 | final String username = "******@gmail.com"; 28 | final String password = "******"; 29 | 30 | String host = "smtp.gmail.com"; 31 | 32 | Properties props = new Properties(); 33 | props.put("mail.smtp.auth", "true"); 34 | props.put("mail.smtp.starttls.enable", "true"); 35 | props.put("mail.smtp.host", host); 36 | props.put("mail.smtp.port", "587"); 37 | props.put("mail.smtp.ssl.trust", host); 38 | 39 | Session session = Session.getInstance(props, new javax.mail.Authenticator() { 40 | protected PasswordAuthentication getPasswordAuthentication() { 41 | return new PasswordAuthentication(username, password); 42 | } 43 | }); 44 | 45 | try { 46 | Message message = new MimeMessage(session); 47 | message.setFrom(new InternetAddress(from)); 48 | message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to)); 49 | message.setSubject(title); 50 | message.setText(body); 51 | Transport.send(message); 52 | 53 | System.out.println("Email sending : " + body); 54 | return new SuccessResult("Email send"); 55 | 56 | } catch (MessagingException e) { 57 | return new ErrorResult(e.getMessage()); 58 | } 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/helpers/email/EmailService.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.helpers.email; 2 | 3 | import JavaProject.hrms.core.utilities.results.Result; 4 | 5 | public interface EmailService { 6 | 7 | Result sendEmail(String to, String title, String body); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.results; 2 | 3 | public class DataResult extends Result { 4 | 5 | private T data; 6 | 7 | public DataResult(T data, boolean success) { 8 | super(success); 9 | this.data = data; 10 | } 11 | 12 | public DataResult(T data, boolean success, String message) { 13 | super(success, message); 14 | this.data = data; 15 | } 16 | 17 | public T getData() { 18 | return this.data; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.results; 2 | 3 | public class ErrorDataResult extends DataResult { 4 | 5 | public ErrorDataResult() { 6 | super(null, false); 7 | } 8 | 9 | public ErrorDataResult(T data) { 10 | super(data, false); 11 | } 12 | 13 | public ErrorDataResult(String message) { 14 | super(null, false, message); 15 | } 16 | 17 | public ErrorDataResult(T data, String message) { 18 | super(data, false, message); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.results; 2 | 3 | public class ErrorResult extends Result { 4 | 5 | public ErrorResult() { 6 | super(false); 7 | } 8 | 9 | public ErrorResult(String message) { 10 | super(false, message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.results; 2 | 3 | public class Result { 4 | 5 | private boolean success; 6 | private String message; 7 | 8 | public Result(boolean success) { 9 | this.success = success; 10 | } 11 | 12 | public Result(boolean success, String message) { 13 | this(success); 14 | this.message = message; 15 | } 16 | 17 | public boolean isSuccess() { 18 | return this.success; 19 | } 20 | 21 | public String getMessage() { 22 | return this.message; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.results; 2 | 3 | public class SuccessDataResult extends DataResult { 4 | 5 | public SuccessDataResult() { 6 | super(null, true); 7 | } 8 | 9 | public SuccessDataResult(T data) { 10 | super(data, true); 11 | } 12 | 13 | public SuccessDataResult(String message) { 14 | super(null, true, message); 15 | } 16 | 17 | public SuccessDataResult(T data, String message) { 18 | super(data, true, message); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.core.utilities.results; 2 | 3 | public class SuccessResult extends Result { 4 | 5 | public SuccessResult() { 6 | super(true); 7 | } 8 | 9 | public SuccessResult(String message) { 10 | super(true, message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/ActivationCodeDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.ActivationCode; 6 | 7 | public interface ActivationCodeDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/ActivationCodeToEmployerDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.ActivationCodeToEmployer; 6 | 7 | public interface ActivationCodeToEmployerDao extends JpaRepository { 8 | ActivationCodeToEmployer getByEmployerId(int employerId); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/ActivationCodeToJobSeekerDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.ActivationCodeToJobSeeker; 6 | 7 | public interface ActivationCodeToJobSeekerDao extends JpaRepository { 8 | ActivationCodeToJobSeeker getByJobSeekerId(int id); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/CityDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.City; 6 | 7 | public interface CityDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/CurriculumVitaeDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import JavaProject.hrms.entities.concretes.CurriculumVitae; 8 | 9 | public interface CurriculumVitaeDao extends JpaRepository { 10 | 11 | List getByJobSeeker_id(int id); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/EmployeeDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.Employee; 6 | 7 | public interface EmployeeDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/EmployerActivationByEmployeeDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.EmployerActivationByEmployee; 6 | 7 | public interface EmployerActivationByEmployeeDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/EmployerDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.Employer; 6 | 7 | public interface EmployerDao extends JpaRepository { 8 | Employer getById(int id); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/FavoriteDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | 7 | import JavaProject.hrms.entities.concretes.Favorite; 8 | 9 | public interface FavoriteDao extends JpaRepository { 10 | 11 | List getByJobSeeker_Id(int id); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobPositionDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.JobPosition; 6 | 7 | public interface JobPositionDao extends JpaRepository { 8 | 9 | JobPosition getById(int id); 10 | 11 | JobPosition getByName(String jobPositionName); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobPostingDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.domain.Sort; 7 | import org.springframework.data.jpa.repository.JpaRepository; 8 | import org.springframework.data.jpa.repository.Query; 9 | import org.springframework.data.repository.query.Param; 10 | 11 | import JavaProject.hrms.entities.concretes.JobPosting; 12 | import JavaProject.hrms.entities.dtos.JobPostingFilter; 13 | 14 | public interface JobPostingDao extends JpaRepository { 15 | 16 | JobPosting getById(int id); 17 | 18 | List getByIsConfirm(boolean isActive); 19 | 20 | List getByIsConfirm(boolean isActive, Sort sort); 21 | 22 | List getByIsConfirm(boolean isActive, Pageable pageable); 23 | 24 | @Query("Select j from JavaProject.hrms.entities.concretes.JobPosting j where ((:#{#filter.cityId}) IS NULL OR j.city.id IN (:#{#filter.cityId}))" 25 | + " and ((:#{#filter.jobPositionId}) IS NULL OR j.jobPosition.id IN (:#{#filter.jobPositionId}))" 26 | + " and ((:#{#filter.wayOfWorkingId}) IS NULL OR j.wayOfWorking.id IN (:#{#filter.wayOfWorkingId}))" 27 | + " and ((:#{#filter.typeOfWorkingId}) IS NULL OR j.typeOfWorking.id IN (:#{#filter.typeOfWorkingId}))" 28 | + " and (j.isConfirm = (:#{#isConfirm})) and j.isActive = true" 29 | + " and (j.minSalary >= (:#{#filter.minSalary}))" 30 | + " and (j.maxSalary <= (:#{#filter.maxSalary}) OR (:#{#filter.maxSalary}) = 0)") 31 | List getByFilter(@Param("isConfirm") boolean isConfirm, 32 | @Param("filter") JobPostingFilter jobPostingFilter, Pageable pageable); 33 | 34 | List getByIsActiveAndEmployer_id(boolean isActive, int id); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobSeekerDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.JobSeeker; 6 | 7 | public interface JobSeekerDao extends JpaRepository { 8 | JobSeeker getByNationalityId(String nationalityId); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobSeekerEducationDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.domain.Sort; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | 8 | import JavaProject.hrms.entities.concretes.JobSeekerEducation; 9 | 10 | public interface JobSeekerEducationDao extends JpaRepository { 11 | 12 | List getByCurriculumVitae_JobSeeker_id(int id); 13 | 14 | List getByCurriculumVitae_JobSeeker_id(int id, Sort sort); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobSeekerExperienceDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.domain.Sort; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | 8 | import JavaProject.hrms.entities.concretes.JobSeekerExperience; 9 | 10 | public interface JobSeekerExperienceDao extends JpaRepository { 11 | 12 | List getByCurriculumVitae_JobSeeker_id(int id); 13 | 14 | List getByCurriculumVitae_JobSeeker_id(int id, Sort sort); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobSeekerForeignLanguageDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.JobSeekerForeignLanguage; 6 | 7 | public interface JobSeekerForeignLanguageDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/JobSeekerSkillDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.JobSeekerSkill; 6 | 7 | public interface JobSeekerSkillDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/TypeOfWorkingDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.TypeOfWorking; 6 | 7 | public interface TypeOfWorkingDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.User; 6 | 7 | public interface UserDao extends JpaRepository { 8 | User getByEmail(String email); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/dataAccess/abstracts/WayOfWorkingDao.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import JavaProject.hrms.entities.concretes.WayOfWorking; 6 | 7 | public interface WayOfWorkingDao extends JpaRepository { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/ActivationCode.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.Inheritance; 11 | import javax.persistence.InheritanceType; 12 | import javax.persistence.Table; 13 | 14 | import lombok.AllArgsConstructor; 15 | import lombok.Data; 16 | import lombok.NoArgsConstructor; 17 | 18 | @Data 19 | @Entity 20 | @Table(name = "activation_codes") 21 | @Inheritance(strategy = InheritanceType.JOINED) 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | public class ActivationCode { 25 | 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | @Column(name = "id") 29 | private int id; 30 | 31 | @Column(name = "activation_code") 32 | private String activationCode; 33 | 34 | @Column(name = "is_verified") 35 | private boolean isVerified; 36 | 37 | @Column(name = "verified_date", columnDefinition = "Data default CURRENT_DATE") 38 | private LocalDate verifiedDate; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/ActivationCodeToEmployer.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.FetchType; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.OneToOne; 10 | import javax.persistence.PrimaryKeyJoinColumn; 11 | import javax.persistence.Table; 12 | 13 | import lombok.NoArgsConstructor; 14 | 15 | @Entity 16 | @Table(name = "activation_code_to_employers") 17 | @PrimaryKeyJoinColumn(name = "id") 18 | @NoArgsConstructor 19 | public class ActivationCodeToEmployer extends ActivationCode { 20 | 21 | @Column(name = "employer_id") 22 | private int employerId; 23 | 24 | @OneToOne(fetch = FetchType.LAZY, optional = false) 25 | @JoinColumn(name = "employer_id", insertable = false, updatable = false) 26 | private Employer employer; 27 | 28 | public ActivationCodeToEmployer(int id, String activationCode, boolean isVerified, LocalDate verifiedDate, 29 | int employerId) { 30 | super(id, activationCode, isVerified, verifiedDate); 31 | this.employerId = employerId; 32 | } 33 | 34 | public int getEmployerId() { 35 | return employerId; 36 | } 37 | 38 | public void setEmployerId(int employerId) { 39 | this.employerId = employerId; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/ActivationCodeToJobSeeker.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.FetchType; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.OneToOne; 10 | import javax.persistence.PrimaryKeyJoinColumn; 11 | import javax.persistence.Table; 12 | 13 | import lombok.NoArgsConstructor; 14 | 15 | @Entity 16 | @Table(name = "activation_code_to_job_seekers") 17 | @PrimaryKeyJoinColumn(name = "id") 18 | @NoArgsConstructor 19 | public class ActivationCodeToJobSeeker extends ActivationCode { 20 | 21 | @Column(name = "job_seeker_id") 22 | private int jobSeekerId; 23 | 24 | @OneToOne(fetch = FetchType.LAZY, optional = false) 25 | @JoinColumn(name = "job_seeker_id", nullable = false, insertable = false, updatable = false) 26 | private JobSeeker jobSeeker; 27 | 28 | public ActivationCodeToJobSeeker(int id, String activationCode, boolean isVerified, LocalDate verifiedDate, 29 | int jobSeekerId) { 30 | super(id, activationCode, isVerified, verifiedDate); 31 | this.jobSeekerId = jobSeekerId; 32 | } 33 | 34 | public int getJobSeekerId() { 35 | return jobSeekerId; 36 | } 37 | 38 | public void setJobSeekerId(int jobSeekerId) { 39 | this.jobSeekerId = jobSeekerId; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/City.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name = "cities") 22 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class City { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "name") 33 | private String name; 34 | 35 | @OneToMany(mappedBy = "city") 36 | private List jobPostings; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/CurriculumVitae.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.OneToMany; 14 | import javax.persistence.Table; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "curriculum_vitaes") 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class CurriculumVitae { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @ManyToOne 33 | @JoinColumn(name = "job_seeker_id") 34 | private JobSeeker jobSeeker; 35 | 36 | @Column(name = "image_path") 37 | private String imagePath; 38 | 39 | @Column(name = "github_link") 40 | private String githubLink; 41 | 42 | @Column(name = "linkedin_link") 43 | private String linkedinLink; 44 | 45 | @Column(name = "cover_letter") 46 | private String coverLetter; 47 | 48 | @Column(name = "created_date") 49 | private LocalDate createdDate; 50 | 51 | @OneToMany(mappedBy = "curriculumVitae") 52 | private List jobSeekerEducations; 53 | 54 | @OneToMany(mappedBy = "curriculumVitae") 55 | private List jobSeekerExperiences; 56 | 57 | @OneToMany(mappedBy = "curriculumVitae") 58 | private List jobSeekerForeignLanguages; 59 | 60 | @OneToMany(mappedBy = "curriculumVitae") 61 | private List jobSeekerSkills; 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/Employee.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.PrimaryKeyJoinColumn; 6 | import javax.persistence.Table; 7 | 8 | import lombok.NoArgsConstructor; 9 | 10 | @Entity 11 | @Table(name = "employees") 12 | @PrimaryKeyJoinColumn(name = "user_id") 13 | @NoArgsConstructor 14 | public class Employee extends User { 15 | 16 | @Column(name = "first_name") 17 | private String firstName; 18 | 19 | @Column(name = "last_name") 20 | private String lastName; 21 | 22 | public Employee(int id, String email, String password, String firstName, String lastName) { 23 | super(id, email, password); 24 | this.firstName = firstName; 25 | this.lastName = lastName; 26 | } 27 | 28 | public String getFirstName() { 29 | return firstName; 30 | } 31 | 32 | public void setFirstName(String firstName) { 33 | this.firstName = firstName; 34 | } 35 | 36 | public String getLastName() { 37 | return lastName; 38 | } 39 | 40 | public void setLastName(String lastName) { 41 | this.lastName = lastName; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/Employer.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.OneToMany; 10 | import javax.persistence.OneToOne; 11 | import javax.persistence.PrimaryKeyJoinColumn; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.EqualsAndHashCode; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @EqualsAndHashCode(callSuper = false) 23 | @Entity 24 | @Table(name = "employers") 25 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 26 | @PrimaryKeyJoinColumn(name = "user_id") 27 | @AllArgsConstructor 28 | @NoArgsConstructor 29 | public class Employer extends User { 30 | 31 | @Column(name = "company_name") 32 | private String companyName; 33 | 34 | @Column(name = "website") 35 | private String webSite; 36 | 37 | @Column(name = "phone_number") 38 | private String phoneNumber; 39 | 40 | @OneToMany(mappedBy = "employer") 41 | private List jobPostings; 42 | 43 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "employer") 44 | private EmployerActivationByEmployee employerActivationByEmployee; 45 | 46 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "employer") 47 | private ActivationCodeToEmployer activationCodeToEmployer; 48 | 49 | public Employer(int id, String email, String password, String companyName, String webSite, String phoneNumber) { 50 | super(id, email, password); 51 | this.companyName = companyName; 52 | this.webSite = webSite; 53 | this.phoneNumber = phoneNumber; 54 | } 55 | 56 | public String getCompanyName() { 57 | return companyName; 58 | } 59 | 60 | public void setCompanyName(String companyName) { 61 | this.companyName = companyName; 62 | } 63 | 64 | public String getWebSite() { 65 | return webSite; 66 | } 67 | 68 | public void setWebSite(String webSite) { 69 | this.webSite = webSite; 70 | } 71 | 72 | public String getPhoneNumber() { 73 | return phoneNumber; 74 | } 75 | 76 | public void setPhoneNumber(String phoneNumber) { 77 | this.phoneNumber = phoneNumber; 78 | } 79 | 80 | public ActivationCodeToEmployer getActivationCodeToEmployer() { 81 | return activationCodeToEmployer; 82 | } 83 | 84 | public void setActivationCodeToEmployer(ActivationCodeToEmployer activationCodeToEmployer) { 85 | this.activationCodeToEmployer = activationCodeToEmployer; 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/EmployerActivationByEmployee.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.FetchType; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.OneToOne; 13 | import javax.persistence.Table; 14 | 15 | import lombok.NoArgsConstructor; 16 | 17 | @Entity 18 | @Table(name = "employer_activation_by_employees") 19 | @NoArgsConstructor 20 | public class EmployerActivationByEmployee { 21 | 22 | @Id 23 | @GeneratedValue(strategy = GenerationType.IDENTITY) 24 | @Column(name = "id") 25 | private int id; 26 | 27 | @Column(name = "employer_id") 28 | private int employerId; 29 | 30 | @Column(name = "employee_id") 31 | private int employeeId; 32 | 33 | @Column(name = "is_verified") 34 | private boolean isVerified; 35 | 36 | @Column(name = "verified_date", columnDefinition = "Date default CURRENT_DATE") 37 | private LocalDate verifiedDate; 38 | 39 | @OneToOne(fetch = FetchType.LAZY, optional = false) 40 | @JoinColumn(name = "employer_id", nullable = false, insertable = false, updatable = false) 41 | private Employer employer; 42 | 43 | public EmployerActivationByEmployee(int id, int employerId, int employeeId, boolean isVerified, 44 | LocalDate verifiedDate) { 45 | super(); 46 | this.id = id; 47 | this.employerId = employerId; 48 | this.employeeId = employeeId; 49 | this.isVerified = isVerified; 50 | this.verifiedDate = verifiedDate; 51 | } 52 | 53 | public int getId() { 54 | return id; 55 | } 56 | 57 | public void setId(int id) { 58 | this.id = id; 59 | } 60 | 61 | public int getEmployerId() { 62 | return employerId; 63 | } 64 | 65 | public void setEmployerId(int employerId) { 66 | this.employerId = employerId; 67 | } 68 | 69 | public int getEmployeeId() { 70 | return employeeId; 71 | } 72 | 73 | public void setEmployeeId(int employeeId) { 74 | this.employeeId = employeeId; 75 | } 76 | 77 | public boolean isVerified() { 78 | return isVerified; 79 | } 80 | 81 | public void setVerified(boolean isVerified) { 82 | this.isVerified = isVerified; 83 | } 84 | 85 | public LocalDate getVerifiedDate() { 86 | return verifiedDate; 87 | } 88 | 89 | public void setVerifiedDate(LocalDate verifiedDate) { 90 | this.verifiedDate = verifiedDate; 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/Favorite.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.ManyToOne; 10 | import javax.persistence.Table; 11 | 12 | import lombok.AllArgsConstructor; 13 | import lombok.Data; 14 | import lombok.NoArgsConstructor; 15 | 16 | @Data 17 | @Entity 18 | @Table(name = "favorites") 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | public class Favorite { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name = "id") 26 | private int id; 27 | 28 | @Column(name = "user_id") 29 | private int userId; 30 | 31 | @Column(name = "job_posting_id") 32 | private int jobPostingId; 33 | 34 | @ManyToOne 35 | @JoinColumn(name = "user_id", insertable = false, updatable = false) 36 | private JobSeeker jobSeeker; 37 | 38 | @ManyToOne 39 | @JoinColumn(name = "job_posting_id", insertable = false, updatable = false) 40 | private JobPosting jobPosting; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobPosition.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name = "job_positions") 22 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class JobPosition { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "name") 33 | private String name; 34 | 35 | @OneToMany(mappedBy = "jobPosition") 36 | private List jobPostings; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobPosting.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.time.LocalDate; 4 | import java.util.List; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.OneToMany; 14 | import javax.persistence.Table; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "job_postings") 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class JobPosting { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "job_description") 33 | private String jobDescription; 34 | 35 | @Column(name = "min_salary") 36 | private int minSalary; 37 | 38 | @Column(name = "max_salary") 39 | private int maxSalary; 40 | 41 | @Column(name = "open_position_count") 42 | private int openPositionCount; 43 | 44 | @Column(name = "application_deadline") 45 | private LocalDate applicationDeadline; 46 | 47 | @Column(name = "is_active") 48 | private boolean isActive; 49 | 50 | @Column(name = "is_confirm") 51 | private boolean isConfirm; 52 | 53 | @Column(name = "release_date") 54 | private LocalDate releaseDate; 55 | 56 | @Column(name = "type_of_working_id") 57 | private int typeOfWorkingId; 58 | 59 | @Column(name = "way_of_working_id") 60 | private int wayOfWorkingId; 61 | 62 | @Column(name = "employer_id") 63 | private int employerId; 64 | 65 | @Column(name = "job_position_id") 66 | private int jobPositionId; 67 | 68 | @Column(name = "city_id") 69 | private int cityId; 70 | 71 | @ManyToOne() 72 | @JoinColumn(name = "type_of_working_id", insertable = false, updatable = false) 73 | private TypeOfWorking typeOfWorking; 74 | 75 | @ManyToOne 76 | @JoinColumn(name = "way_of_working_id", insertable = false, updatable = false) 77 | private WayOfWorking wayOfWorking; 78 | 79 | @ManyToOne() 80 | @JoinColumn(name = "employer_id", insertable = false, updatable = false) 81 | private Employer employer; 82 | 83 | @ManyToOne() 84 | @JoinColumn(name = "job_position_id", insertable = false, updatable = false) 85 | private JobPosition jobPosition; 86 | 87 | @ManyToOne 88 | @JoinColumn(name = "city_id", insertable = false, updatable = false) 89 | private City city; 90 | 91 | @OneToMany(mappedBy = "jobSeeker") 92 | private List favorites; 93 | 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobSeeker.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.OneToMany; 10 | import javax.persistence.OneToOne; 11 | import javax.persistence.PrimaryKeyJoinColumn; 12 | import javax.persistence.Table; 13 | 14 | import lombok.NoArgsConstructor; 15 | 16 | @Entity 17 | @Table(name = "job_seekers") 18 | @PrimaryKeyJoinColumn(name = "user_id") 19 | @NoArgsConstructor 20 | public class JobSeeker extends User { 21 | 22 | @Column(name = "first_name") 23 | private String firstName; 24 | 25 | @Column(name = "last_name") 26 | private String lastName; 27 | 28 | @Column(name = "nationality_id") 29 | private String nationalityId; 30 | 31 | @Column(name = "birth_year") 32 | private int birthYear; 33 | 34 | @OneToMany(mappedBy = "jobSeeker") 35 | private List curriculumVitaes; 36 | 37 | @OneToMany(mappedBy = "jobSeeker") 38 | private List favorites; 39 | 40 | @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "jobSeeker") 41 | private ActivationCodeToJobSeeker activationCodeToJobSeeker; 42 | 43 | public JobSeeker(int id, String email, String password, String firstName, String lastName, String nationalityId, 44 | int birthYear) { 45 | super(0, email, password); 46 | this.firstName = firstName; 47 | this.lastName = lastName; 48 | this.nationalityId = nationalityId; 49 | this.birthYear = birthYear; 50 | } 51 | 52 | public String getFirstName() { 53 | return firstName; 54 | } 55 | 56 | public void setFirstName(String firstName) { 57 | this.firstName = firstName; 58 | } 59 | 60 | public String getLastName() { 61 | return lastName; 62 | } 63 | 64 | public void setLastName(String lastName) { 65 | this.lastName = lastName; 66 | } 67 | 68 | public String getNationalityId() { 69 | return nationalityId; 70 | } 71 | 72 | public void setNationalityId(String nationalityId) { 73 | this.nationalityId = nationalityId; 74 | } 75 | 76 | public int getBirthYear() { 77 | return birthYear; 78 | } 79 | 80 | public void setBirthYear(int birthYear) { 81 | this.birthYear = birthYear; 82 | } 83 | 84 | public ActivationCodeToJobSeeker getActivationCodeToJobSeeker() { 85 | return activationCodeToJobSeeker; 86 | } 87 | 88 | public void setActivationCodeToJobSeeker(ActivationCodeToJobSeeker activationCodeToJobSeeker) { 89 | this.activationCodeToJobSeeker = activationCodeToJobSeeker; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobSeekerEducation.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.sql.Date; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "job_seeker_educations") 23 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "curriculumVitae" }) 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class JobSeekerEducation { 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private int id; 32 | 33 | @ManyToOne 34 | @JoinColumn(name = "curriculum_vitaes_id", insertable = false, updatable = false) 35 | private CurriculumVitae curriculumVitae; 36 | 37 | @Column(name = "curriculum_vitaes_id") 38 | private int cvId; 39 | 40 | @Column(name = "school_name") 41 | private String schoolName; 42 | 43 | @Column(name = "field_of_study") 44 | private String fieldOfStudy; 45 | 46 | @Column(name = "degree") 47 | private String degree; 48 | 49 | @Column(name = "start_date") 50 | private Date startDate; 51 | 52 | @Column(name = "end_date") 53 | private Date endDate; 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobSeekerExperience.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.sql.Date; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.JoinColumn; 11 | import javax.persistence.ManyToOne; 12 | import javax.persistence.Table; 13 | 14 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Data; 18 | import lombok.NoArgsConstructor; 19 | 20 | @Data 21 | @Entity 22 | @Table(name = "job_seeker_experiences") 23 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "curriculumVitae" }) 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | public class JobSeekerExperience { 27 | 28 | @Id 29 | @GeneratedValue(strategy = GenerationType.IDENTITY) 30 | @Column(name = "id") 31 | private int id; 32 | 33 | @ManyToOne 34 | @JoinColumn(name = "curriculum_vitaes_id", insertable = false, updatable = false) 35 | private CurriculumVitae curriculumVitae; 36 | 37 | @Column(name = "curriculum_vitaes_id") 38 | private int cvId; 39 | 40 | @Column(name = "business_name") 41 | private String businessName; 42 | 43 | @Column(name = "position_name") 44 | private String positionName; 45 | 46 | @Column(name = "start_date") 47 | private Date startDate; 48 | 49 | @Column(name = "end_date") 50 | private Date endDate; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobSeekerForeignLanguage.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.ManyToOne; 10 | import javax.persistence.Table; 11 | 12 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 13 | 14 | import lombok.AllArgsConstructor; 15 | import lombok.Data; 16 | import lombok.NoArgsConstructor; 17 | 18 | @Data 19 | @Entity 20 | @Table(name = "job_seeker_foreign_languages") 21 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "curriculumVitae" }) 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | public class JobSeekerForeignLanguage { 25 | 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | @Column(name = "id") 29 | private int id; 30 | 31 | @ManyToOne 32 | @JoinColumn(name = "curriculum_vitaes_id", insertable = false, updatable = false) 33 | private CurriculumVitae curriculumVitae; 34 | 35 | @Column(name = "curriculum_vitaes_id") 36 | private int cvId; 37 | 38 | @Column(name = "language_name") 39 | private String languageName; 40 | 41 | @Column(name = "language_level") 42 | private int languageLevel; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/JobSeekerSkill.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.ManyToOne; 10 | import javax.persistence.Table; 11 | 12 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 13 | 14 | import lombok.AllArgsConstructor; 15 | import lombok.Data; 16 | import lombok.NoArgsConstructor; 17 | 18 | @Data 19 | @Entity 20 | @Table(name = "job_seeker_skills") 21 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "curriculumVitae" }) 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | public class JobSeekerSkill { 25 | 26 | @Id 27 | @GeneratedValue(strategy = GenerationType.IDENTITY) 28 | @Column(name = "id") 29 | private int id; 30 | 31 | @ManyToOne 32 | @JoinColumn(name = "curriculum_vitaes_id", insertable = false, updatable = false) 33 | private CurriculumVitae curriculumVitae; 34 | 35 | @Column(name = "curriculum_vitaes_id") 36 | private int cvId; 37 | 38 | @Column(name = "skill_name") 39 | private String skillName; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/TypeOfWorking.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name = "types_of_working") 22 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class TypeOfWorking { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "name") 33 | private String name; 34 | 35 | @OneToMany(mappedBy = "typeOfWorking") 36 | private List jobPostings; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Inheritance; 9 | import javax.persistence.InheritanceType; 10 | import javax.persistence.Table; 11 | 12 | import lombok.AllArgsConstructor; 13 | import lombok.Data; 14 | import lombok.NoArgsConstructor; 15 | 16 | @Data 17 | @Entity 18 | @Table(name = "users") 19 | @Inheritance(strategy = InheritanceType.JOINED) 20 | @AllArgsConstructor 21 | @NoArgsConstructor 22 | public class User { 23 | 24 | @Id 25 | @GeneratedValue(strategy = GenerationType.IDENTITY) 26 | @Column(name = "id") 27 | private int id; 28 | 29 | @Column(name = "email") 30 | private String email; 31 | 32 | @Column(name = "password") 33 | private String password; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/concretes/WayOfWorking.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.concretes; 2 | 3 | import java.util.List; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @Entity 21 | @Table(name = "ways_of_working") 22 | @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler", "jobPostings" }) 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class WayOfWorking { 26 | 27 | @Id 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) 29 | @Column(name = "id") 30 | private int id; 31 | 32 | @Column(name = "name") 33 | private String name; 34 | 35 | @OneToMany(mappedBy = "wayOfWorking") 36 | private List jobPostings; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/dtos/EmployerForRegisterDto.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.dtos; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import com.sun.istack.NotNull; 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | public class EmployerForRegisterDto { 15 | 16 | @NotBlank(message = "E-Posta alanı boş olamaz") 17 | @NotNull 18 | private String email; 19 | 20 | @NotBlank(message = "Şirket adı alanı boş olamaz") 21 | @NotNull 22 | private String companyName; 23 | 24 | @NotBlank(message = "Web site alanı boş olamaz") 25 | @NotNull 26 | private String webSite; 27 | 28 | @NotBlank(message = "Telefon numarası alanı boş olamaz") 29 | @NotNull 30 | private String phoneNumber; 31 | 32 | @NotBlank(message = "Şifre alanı boş olamaz") 33 | @NotNull 34 | private String password; 35 | 36 | @NotBlank(message = "Şifre tekrarı alanı boş olamaz") 37 | @NotNull 38 | private String passwordRepeat; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/dtos/JobPostingAddDto.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.dtos; 2 | 3 | import java.time.LocalDate; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class JobPostingAddDto { 13 | 14 | private String jobDescription; 15 | private int minSalary; 16 | private int maxSalary; 17 | private int openPositionCount; 18 | private LocalDate applicationDeadline; 19 | private int typeOfWorkingId; 20 | private int wayOfWorkingId; 21 | private int employerId; 22 | private int JobPositionId; 23 | private int cityId; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/dtos/JobPostingFilter.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.dtos; 2 | 3 | import java.util.List; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class JobPostingFilter { 13 | 14 | private List cityId; 15 | private List jobPositionId; 16 | private List wayOfWorkingId; 17 | private List typeOfWorkingId; 18 | private int minSalary; 19 | private int maxSalary; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/JavaProject/hrms/entities/dtos/JobSeekerForRegisterDto.java: -------------------------------------------------------------------------------- 1 | package JavaProject.hrms.entities.dtos; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import com.sun.istack.NotNull; 6 | 7 | import lombok.AllArgsConstructor; 8 | import lombok.Data; 9 | import lombok.NoArgsConstructor; 10 | 11 | @Data 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | public class JobSeekerForRegisterDto { 15 | 16 | @NotBlank(message = "İsim alanı boş bırakılamaz") 17 | @NotNull 18 | private String firstName; 19 | 20 | @NotBlank(message = "Soyisim alanı boş bırakılamaz") 21 | @NotNull 22 | private String lastName; 23 | 24 | @NotBlank(message = "TC kimlik numarası boş bırakılamaz") 25 | @NotNull 26 | private String nationalityId; 27 | 28 | @NotNull 29 | private int birthYear; 30 | 31 | @NotBlank(message = "E-Posta alanı boş bırakılamaz") 32 | @NotNull 33 | private String email; 34 | 35 | @NotBlank(message = "Şifre alanı boş bırakılamaz") 36 | @NotNull 37 | private String password; 38 | 39 | @NotBlank(message = "Şifre tekrarı alanı boş bırakılamaz") 40 | @NotNull 41 | private String passwordRepeat; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublic.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublic.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public interface KPSPublic extends javax.xml.rpc.Service { 11 | public java.lang.String getKPSPublicSoapAddress(); 12 | 13 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException; 14 | 15 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicLocator.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public class KPSPublicLocator extends org.apache.axis.client.Service implements tr.gov.nvi.tckimlik.WS.KPSPublic { 11 | 12 | public KPSPublicLocator() { 13 | } 14 | 15 | 16 | public KPSPublicLocator(org.apache.axis.EngineConfiguration config) { 17 | super(config); 18 | } 19 | 20 | public KPSPublicLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { 21 | super(wsdlLoc, sName); 22 | } 23 | 24 | // Use to get a proxy class for KPSPublicSoap 25 | private java.lang.String KPSPublicSoap_address = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 26 | 27 | public java.lang.String getKPSPublicSoapAddress() { 28 | return KPSPublicSoap_address; 29 | } 30 | 31 | // The WSDD service name defaults to the port name. 32 | private java.lang.String KPSPublicSoapWSDDServiceName = "KPSPublicSoap"; 33 | 34 | public java.lang.String getKPSPublicSoapWSDDServiceName() { 35 | return KPSPublicSoapWSDDServiceName; 36 | } 37 | 38 | public void setKPSPublicSoapWSDDServiceName(java.lang.String name) { 39 | KPSPublicSoapWSDDServiceName = name; 40 | } 41 | 42 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException { 43 | java.net.URL endpoint; 44 | try { 45 | endpoint = new java.net.URL(KPSPublicSoap_address); 46 | } 47 | catch (java.net.MalformedURLException e) { 48 | throw new javax.xml.rpc.ServiceException(e); 49 | } 50 | return getKPSPublicSoap(endpoint); 51 | } 52 | 53 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { 54 | try { 55 | tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub _stub = new tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub(portAddress, this); 56 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 57 | return _stub; 58 | } 59 | catch (org.apache.axis.AxisFault e) { 60 | return null; 61 | } 62 | } 63 | 64 | public void setKPSPublicSoapEndpointAddress(java.lang.String address) { 65 | KPSPublicSoap_address = address; 66 | } 67 | 68 | /** 69 | * For the given interface, get the stub implementation. 70 | * If this service has no port for the given interface, 71 | * then ServiceException is thrown. 72 | */ 73 | public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 74 | try { 75 | if (tr.gov.nvi.tckimlik.WS.KPSPublicSoap.class.isAssignableFrom(serviceEndpointInterface)) { 76 | tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub _stub = new tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub(new java.net.URL(KPSPublicSoap_address), this); 77 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 78 | return _stub; 79 | } 80 | } 81 | catch (java.lang.Throwable t) { 82 | throw new javax.xml.rpc.ServiceException(t); 83 | } 84 | throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); 85 | } 86 | 87 | /** 88 | * For the given interface, get the stub implementation. 89 | * If this service has no port for the given interface, 90 | * then ServiceException is thrown. 91 | */ 92 | public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 93 | if (portName == null) { 94 | return getPort(serviceEndpointInterface); 95 | } 96 | java.lang.String inputPortName = portName.getLocalPart(); 97 | if ("KPSPublicSoap".equals(inputPortName)) { 98 | return getKPSPublicSoap(); 99 | } 100 | else { 101 | java.rmi.Remote _stub = getPort(serviceEndpointInterface); 102 | ((org.apache.axis.client.Stub) _stub).setPortName(portName); 103 | return _stub; 104 | } 105 | } 106 | 107 | public javax.xml.namespace.QName getServiceName() { 108 | return new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublic"); 109 | } 110 | 111 | private java.util.HashSet ports = null; 112 | 113 | public java.util.Iterator getPorts() { 114 | if (ports == null) { 115 | ports = new java.util.HashSet(); 116 | ports.add(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap")); 117 | } 118 | return ports.iterator(); 119 | } 120 | 121 | /** 122 | * Set the endpoint address for the specified port name. 123 | */ 124 | public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 125 | 126 | if ("KPSPublicSoap".equals(portName)) { 127 | setKPSPublicSoapEndpointAddress(address); 128 | } 129 | else 130 | { // Unknown Port Name 131 | throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); 132 | } 133 | } 134 | 135 | /** 136 | * Set the endpoint address for the specified port name. 137 | */ 138 | public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 139 | setEndpointAddress(portName.getLocalPart(), address); 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoap.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public interface KPSPublicSoap extends java.rmi.Remote { 11 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.java: -------------------------------------------------------------------------------- 1 | package tr.gov.nvi.tckimlik.WS; 2 | 3 | public class KPSPublicSoapProxy implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 4 | private String _endpoint = null; 5 | private tr.gov.nvi.tckimlik.WS.KPSPublicSoap kPSPublicSoap = null; 6 | 7 | public KPSPublicSoapProxy() { 8 | _initKPSPublicSoapProxy(); 9 | } 10 | 11 | public KPSPublicSoapProxy(String endpoint) { 12 | _endpoint = endpoint; 13 | _initKPSPublicSoapProxy(); 14 | } 15 | 16 | private void _initKPSPublicSoapProxy() { 17 | try { 18 | kPSPublicSoap = (new tr.gov.nvi.tckimlik.WS.KPSPublicLocator()).getKPSPublicSoap(); 19 | if (kPSPublicSoap != null) { 20 | if (_endpoint != null) 21 | ((javax.xml.rpc.Stub)kPSPublicSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); 22 | else 23 | _endpoint = (String)((javax.xml.rpc.Stub)kPSPublicSoap)._getProperty("javax.xml.rpc.service.endpoint.address"); 24 | } 25 | 26 | } 27 | catch (javax.xml.rpc.ServiceException serviceException) {} 28 | } 29 | 30 | public String getEndpoint() { 31 | return _endpoint; 32 | } 33 | 34 | public void setEndpoint(String endpoint) { 35 | _endpoint = endpoint; 36 | if (kPSPublicSoap != null) 37 | ((javax.xml.rpc.Stub)kPSPublicSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); 38 | 39 | } 40 | 41 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() { 42 | if (kPSPublicSoap == null) 43 | _initKPSPublicSoapProxy(); 44 | return kPSPublicSoap; 45 | } 46 | 47 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException{ 48 | if (kPSPublicSoap == null) 49 | _initKPSPublicSoapProxy(); 50 | return kPSPublicSoap.TCKimlikNoDogrula(TCKimlikNo, ad, soyad, dogumYili); 51 | } 52 | 53 | 54 | } -------------------------------------------------------------------------------- /src/main/java/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoapStub.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public class KPSPublicSoapStub extends org.apache.axis.client.Stub implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 11 | private java.util.Vector cachedSerClasses = new java.util.Vector(); 12 | private java.util.Vector cachedSerQNames = new java.util.Vector(); 13 | private java.util.Vector cachedSerFactories = new java.util.Vector(); 14 | private java.util.Vector cachedDeserFactories = new java.util.Vector(); 15 | 16 | static org.apache.axis.description.OperationDesc [] _operations; 17 | 18 | static { 19 | _operations = new org.apache.axis.description.OperationDesc[1]; 20 | _initOperationDesc1(); 21 | } 22 | 23 | private static void _initOperationDesc1(){ 24 | org.apache.axis.description.OperationDesc oper; 25 | org.apache.axis.description.ParameterDesc param; 26 | oper = new org.apache.axis.description.OperationDesc(); 27 | oper.setName("TCKimlikNoDogrula"); 28 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNo"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false); 29 | oper.addParameter(param); 30 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Ad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false); 31 | param.setOmittable(true); 32 | oper.addParameter(param); 33 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Soyad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false); 34 | param.setOmittable(true); 35 | oper.addParameter(param); 36 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "DogumYili"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false); 37 | oper.addParameter(param); 38 | oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean")); 39 | oper.setReturnClass(boolean.class); 40 | oper.setReturnQName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrulaResult")); 41 | oper.setStyle(org.apache.axis.constants.Style.WRAPPED); 42 | oper.setUse(org.apache.axis.constants.Use.LITERAL); 43 | _operations[0] = oper; 44 | 45 | } 46 | 47 | public KPSPublicSoapStub() throws org.apache.axis.AxisFault { 48 | this(null); 49 | } 50 | 51 | public KPSPublicSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 52 | this(service); 53 | super.cachedEndpoint = endpointURL; 54 | } 55 | 56 | public KPSPublicSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 57 | if (service == null) { 58 | super.service = new org.apache.axis.client.Service(); 59 | } else { 60 | super.service = service; 61 | } 62 | ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); 63 | } 64 | 65 | protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 66 | try { 67 | org.apache.axis.client.Call _call = super._createCall(); 68 | if (super.maintainSessionSet) { 69 | _call.setMaintainSession(super.maintainSession); 70 | } 71 | if (super.cachedUsername != null) { 72 | _call.setUsername(super.cachedUsername); 73 | } 74 | if (super.cachedPassword != null) { 75 | _call.setPassword(super.cachedPassword); 76 | } 77 | if (super.cachedEndpoint != null) { 78 | _call.setTargetEndpointAddress(super.cachedEndpoint); 79 | } 80 | if (super.cachedTimeout != null) { 81 | _call.setTimeout(super.cachedTimeout); 82 | } 83 | if (super.cachedPortName != null) { 84 | _call.setPortName(super.cachedPortName); 85 | } 86 | java.util.Enumeration keys = super.cachedProperties.keys(); 87 | while (keys.hasMoreElements()) { 88 | java.lang.String key = (java.lang.String) keys.nextElement(); 89 | _call.setProperty(key, super.cachedProperties.get(key)); 90 | } 91 | return _call; 92 | } 93 | catch (java.lang.Throwable _t) { 94 | throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); 95 | } 96 | } 97 | 98 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException { 99 | if (super.cachedEndpoint == null) { 100 | throw new org.apache.axis.NoEndPointException(); 101 | } 102 | org.apache.axis.client.Call _call = createCall(); 103 | _call.setOperation(_operations[0]); 104 | _call.setUseSOAPAction(true); 105 | _call.setSOAPActionURI("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"); 106 | _call.setEncodingStyle(null); 107 | _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); 108 | _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); 109 | _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 110 | _call.setOperationName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula")); 111 | 112 | setRequestHeaders(_call); 113 | setAttachments(_call); 114 | try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(TCKimlikNo), ad, soyad, new java.lang.Integer(dogumYili)}); 115 | 116 | if (_resp instanceof java.rmi.RemoteException) { 117 | throw (java.rmi.RemoteException)_resp; 118 | } 119 | else { 120 | extractAttachments(_call); 121 | try { 122 | return ((java.lang.Boolean) _resp).booleanValue(); 123 | } catch (java.lang.Exception _exception) { 124 | return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue(); 125 | } 126 | } 127 | } catch (org.apache.axis.AxisFault axisFaultException) { 128 | throw axisFaultException; 129 | } 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /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=superuser123 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | -------------------------------------------------------------------------------- /src/test/java/JavaProject/hrms/HrmsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package JavaProject.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 | --------------------------------------------------------------------------------