├── gameProject ├── .gitignore └── src │ ├── interfaces │ ├── IEntity.java │ ├── PlayerValidationService.java │ ├── GameService.java │ ├── PlayerService.java │ ├── SaleService.java │ └── CampaignService.java │ ├── Main.java │ ├── classes │ ├── GameManager.java │ ├── PlayerManager.java │ ├── SaleManager.java │ ├── CampaignManager.java │ └── EDevletValidationService.java │ ├── utilities │ └── BusinessRules.java │ └── entities │ ├── Game.java │ ├── Campaign.java │ └── Player.java ├── coffeCustomerProject ├── .gitignore └── src │ ├── Main.java │ ├── entities │ └── Customer.java │ ├── interfaces │ ├── CustomerService.java │ ├── CustomerCheckService.java │ └── BaseCustomerManager.java │ ├── classes │ ├── CustomerCheckManager.java │ ├── NeroCustomerManager.java │ └── StarbuckCustomerManager.java │ ├── tr │ └── gov │ │ └── nvi │ │ └── tckimlik │ │ └── WS │ │ ├── KPSPublicSoap.java │ │ ├── KPSPublic.java │ │ ├── KPSPublicSoapProxy.java │ │ ├── KPSPublicLocator.java │ │ └── KPSPublicSoapStub.java │ └── adapters │ └── MernisServiceAdapter.java ├── eCommerceSimulation ├── .gitignore └── src │ └── eCommerceSimulation │ ├── entities │ ├── abstracts │ │ └── Entity.java │ └── concretes │ │ └── User.java │ ├── business │ ├── abstracts │ │ ├── EmailService.java │ │ ├── UserValidationService.java │ │ └── UserService.java │ └── concretes │ │ ├── EmailManager.java │ │ ├── UserManager.java │ │ ├── UserValidationManager.java │ │ └── AuthManager.java │ ├── dataAccess │ ├── concretes │ │ └── InMemoryUserDao.java │ └── abstracts │ │ └── UserDao.java │ ├── core │ ├── AuthService.java │ ├── utils │ │ ├── BusinessRules.java │ │ └── ValidationRules.java │ └── GoogleAuthManagerAdapter.java │ ├── googleAuth │ └── GoogleAuthManager.java │ └── Main.java ├── odev2 └── src │ └── odev2 │ ├── Main.java │ ├── UserManager.java │ ├── StudentManager.java │ ├── InstructorManager.java │ ├── Instructor.java │ ├── Student.java │ └── User.java └── .gitignore /gameProject/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /coffeCustomerProject/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /eCommerceSimulation/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /gameProject/src/interfaces/IEntity.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public interface IEntity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /gameProject/src/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/gameProject/src/Main.java -------------------------------------------------------------------------------- /odev2/src/odev2/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/odev2/src/odev2/Main.java -------------------------------------------------------------------------------- /odev2/src/odev2/UserManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/odev2/src/odev2/UserManager.java -------------------------------------------------------------------------------- /coffeCustomerProject/src/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/coffeCustomerProject/src/Main.java -------------------------------------------------------------------------------- /odev2/src/odev2/StudentManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/odev2/src/odev2/StudentManager.java -------------------------------------------------------------------------------- /odev2/src/odev2/InstructorManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/odev2/src/odev2/InstructorManager.java -------------------------------------------------------------------------------- /gameProject/src/classes/GameManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/gameProject/src/classes/GameManager.java -------------------------------------------------------------------------------- /gameProject/src/classes/PlayerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/gameProject/src/classes/PlayerManager.java -------------------------------------------------------------------------------- /gameProject/src/classes/SaleManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/gameProject/src/classes/SaleManager.java -------------------------------------------------------------------------------- /gameProject/src/classes/CampaignManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/gameProject/src/classes/CampaignManager.java -------------------------------------------------------------------------------- /coffeCustomerProject/src/entities/Customer.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/coffeCustomerProject/src/entities/Customer.java -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/entities/abstracts/Entity.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.entities.abstracts; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /gameProject/src/classes/EDevletValidationService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/gameProject/src/classes/EDevletValidationService.java -------------------------------------------------------------------------------- /coffeCustomerProject/src/interfaces/CustomerService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import entities.Customer; 4 | 5 | public interface CustomerService { 6 | void save(Customer customer); 7 | } 8 | -------------------------------------------------------------------------------- /gameProject/src/interfaces/PlayerValidationService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import entities.Player; 4 | 5 | public interface PlayerValidationService { 6 | boolean isPlayerValid(Player player); 7 | } 8 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/interfaces/CustomerCheckService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | 4 | import entities.Customer; 5 | 6 | public interface CustomerCheckService { 7 | boolean CheckPerson(Customer customer); 8 | } 9 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/abstracts/EmailService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.abstracts; 2 | 3 | public interface EmailService { 4 | void send(String message, String to); 5 | } 6 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/dataAccess/concretes/InMemoryUserDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halitkalayci/JavaKampProject/HEAD/eCommerceSimulation/src/eCommerceSimulation/dataAccess/concretes/InMemoryUserDao.java -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/abstracts/UserValidationService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.abstracts; 2 | 3 | import eCommerceSimulation.entities.concretes.User; 4 | 5 | public interface UserValidationService { 6 | boolean validate(User user); 7 | } 8 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/core/AuthService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.core; 2 | 3 | public interface AuthService { 4 | void register(int id, String email,String password,String firstName,String lastName); 5 | void login(String email, String password); 6 | } 7 | -------------------------------------------------------------------------------- /gameProject/src/interfaces/GameService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import java.util.List; 4 | 5 | import entities.Game; 6 | 7 | public interface GameService { 8 | void add(Game game); 9 | void remove(Game game); 10 | void update(Game game); 11 | List getAll(); 12 | } 13 | -------------------------------------------------------------------------------- /gameProject/src/interfaces/PlayerService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import java.util.*; 4 | 5 | import entities.Player; 6 | 7 | public interface PlayerService { 8 | void add(Player player); 9 | void remove(Player player); 10 | void update(Player player); 11 | List getAll(); 12 | } 13 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/interfaces/BaseCustomerManager.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import entities.Customer; 4 | 5 | public class BaseCustomerManager implements CustomerService { 6 | 7 | @Override 8 | public void save(Customer customer) { 9 | System.out.println("Customer succesfully added to database."); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/classes/CustomerCheckManager.java: -------------------------------------------------------------------------------- 1 | package classes; 2 | 3 | import entities.Customer; 4 | import interfaces.CustomerCheckService; 5 | 6 | public class CustomerCheckManager implements CustomerCheckService{ 7 | 8 | @Override 9 | public boolean CheckPerson(Customer customer) { 10 | return true; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /gameProject/src/interfaces/SaleService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import entities.Campaign; 4 | import entities.Game; 5 | import entities.Player; 6 | 7 | public interface SaleService { 8 | // Method overloading 9 | void sale(Game game,Player player); 10 | void sale(Game game,Player player, Campaign campaign); 11 | } 12 | -------------------------------------------------------------------------------- /gameProject/src/utilities/BusinessRules.java: -------------------------------------------------------------------------------- 1 | package utilities; 2 | 3 | public class BusinessRules { 4 | // TO DO : IResult Implementation instead of boolean 5 | public static boolean Run(boolean... logics) { 6 | for(boolean logic : logics) { 7 | if(logic==false) return false; 8 | } 9 | return true; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /gameProject/src/interfaces/CampaignService.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | import java.util.List; 4 | 5 | import entities.Campaign; 6 | 7 | 8 | public interface CampaignService { 9 | void add(Campaign campaign); 10 | void remove(Campaign campaign); 11 | void update(Campaign campaign); 12 | List getAll(); 13 | } 14 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/core/utils/BusinessRules.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.core.utils; 2 | 3 | public class BusinessRules { 4 | // TODO : Implementation of IResult 5 | public static boolean run(boolean... logics) { 6 | for(boolean b : logics) { 7 | if(!b) return false; 8 | } 9 | return true; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/core/utils/ValidationRules.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.core.utils; 2 | 3 | public class ValidationRules { 4 | // TODO : Implementation of IResult 5 | public static boolean run(boolean... logics) { 6 | for(boolean b : logics) { 7 | if(!b) return false; 8 | } 9 | return true; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/concretes/EmailManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.concretes; 2 | 3 | import eCommerceSimulation.business.abstracts.EmailService; 4 | 5 | public class EmailManager implements EmailService{ 6 | 7 | @Override 8 | public void send(String message, String to) { 9 | System.out.println("E-posta Manager : " + message + " mesajı " + to + " adresine gönderildi."); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /odev2/src/odev2/Instructor.java: -------------------------------------------------------------------------------- 1 | package odev2; 2 | 3 | public class Instructor extends User{ 4 | 5 | private String[] courses; 6 | private String biography; 7 | public String[] getCourses() { 8 | return courses; 9 | } 10 | public void setCourses(String[] courses) { 11 | this.courses = courses; 12 | } 13 | public String getBiography() { 14 | return biography; 15 | } 16 | public void setBiography(String biography) { 17 | this.biography = biography; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | # Eclipse 26 | .classpath 27 | .project 28 | .settings/ 29 | /.metadata/ 30 | .metadata/ 31 | .metadata 32 | **/metadata/* -------------------------------------------------------------------------------- /odev2/src/odev2/Student.java: -------------------------------------------------------------------------------- 1 | package odev2; 2 | 3 | public class Student extends User { 4 | private String[] certificates; 5 | private String[] comments; 6 | public String[] getCertificates() { 7 | return certificates; 8 | } 9 | public void setCertificates(String[] certificates) { 10 | this.certificates = certificates; 11 | } 12 | public String[] getComments() { 13 | return comments; 14 | } 15 | public void setComments(String[] comments) { 16 | this.comments = comments; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceSimulation.entities.concretes.User; 6 | 7 | public interface UserDao { 8 | void add(User user); 9 | void remove(User user); 10 | void update(User user); 11 | User get(int id); 12 | User getByEmail(String email); 13 | User getByEmailAndPassword(String email,String password); 14 | List getAll(); 15 | } 16 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceSimulation.entities.concretes.User; 6 | 7 | public interface UserService { 8 | void add(User user); 9 | void remove(User user); 10 | void update(User user); 11 | void verifyUser(int id); 12 | User get(int id); 13 | User getByEmail(String email); 14 | User getByEmailAndPassword(String email,String password); 15 | List getAll(); 16 | } 17 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/googleAuth/GoogleAuthManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.googleAuth; 2 | 3 | public class GoogleAuthManager { 4 | public void register(String email,String password) { 5 | //Google kodları, geri dönüşler vs gerçek kodlara göre ele alınabilir. Şimdilik her şartta kayıt alındı döndürelim. 6 | System.out.println("Google ile kayıt alındı :" + email); 7 | } 8 | public void login(String email,String password) { 9 | System.out.println("Google ile giriş yapıldı : " + email); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/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 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/core/GoogleAuthManagerAdapter.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.core; 2 | import eCommerceSimulation.googleAuth.GoogleAuthManager; 3 | 4 | public class GoogleAuthManagerAdapter implements AuthService { 5 | 6 | @Override 7 | public void register(int id, String email,String password,String firstName,String lastName) { 8 | GoogleAuthManager googleAuthManager = new GoogleAuthManager(); 9 | googleAuthManager.register(email,password); 10 | } 11 | 12 | @Override 13 | public void login(String email, String password) { 14 | GoogleAuthManager googleAuthManager = new GoogleAuthManager(); 15 | googleAuthManager.login(email,password); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /odev2/src/odev2/User.java: -------------------------------------------------------------------------------- 1 | package odev2; 2 | 3 | public class User { 4 | 5 | private int id; 6 | private String name; 7 | private String surname; 8 | private String avatarPath; 9 | public String getAvatarPath() { 10 | return avatarPath; 11 | } 12 | public void setAvatarPath(String avatarPath) { 13 | this.avatarPath = avatarPath; 14 | } 15 | public int getId() { 16 | return id; 17 | } 18 | public void setId(int id) { 19 | this.id = id; 20 | } 21 | public String getName() { 22 | return name; 23 | } 24 | public void setName(String name) { 25 | this.name = name; 26 | } 27 | public String getSurname() { 28 | return surname; 29 | } 30 | public void setSurname(String surname) { 31 | this.surname = surname; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /gameProject/src/entities/Game.java: -------------------------------------------------------------------------------- 1 | package entities; 2 | 3 | import interfaces.IEntity; 4 | 5 | public class Game implements IEntity{ 6 | int id; 7 | String name; 8 | double price; 9 | public Game() { 10 | 11 | } 12 | public Game(int id, String name, Double price) { 13 | super(); 14 | this.id = id; 15 | this.name = name; 16 | this.price = price; 17 | } 18 | public int getId() { 19 | return id; 20 | } 21 | public void setId(int id) { 22 | this.id = id; 23 | } 24 | public String getName() { 25 | return name; 26 | } 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | public double getPrice() { 31 | return price; 32 | } 33 | public void setPrice(double price) { 34 | this.price = price; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/classes/NeroCustomerManager.java: -------------------------------------------------------------------------------- 1 | package classes; 2 | 3 | import entities.Customer; 4 | import interfaces.BaseCustomerManager; 5 | import interfaces.CustomerCheckService; 6 | 7 | public class NeroCustomerManager extends BaseCustomerManager { 8 | 9 | CustomerCheckService customerCheckService; 10 | 11 | public NeroCustomerManager(CustomerCheckService customerCheckService) { 12 | this.customerCheckService = customerCheckService; 13 | } 14 | 15 | @Override 16 | public void save(Customer customer) { 17 | if(customerCheckService.CheckPerson(customer)) { 18 | System.out.println("Nero customer manager : validation successfull."); 19 | super.save(customer); 20 | }else { 21 | System.out.println("Nero Customer Manager : Validation Error - Not a valid person."); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/classes/StarbuckCustomerManager.java: -------------------------------------------------------------------------------- 1 | package classes; 2 | 3 | import entities.Customer; 4 | import interfaces.BaseCustomerManager; 5 | import interfaces.CustomerCheckService; 6 | 7 | public class StarbuckCustomerManager extends BaseCustomerManager{ 8 | 9 | CustomerCheckService customerCheckService; 10 | 11 | public StarbuckCustomerManager(CustomerCheckService customerCheckService) { 12 | this.customerCheckService = customerCheckService; 13 | } 14 | 15 | @Override 16 | public void save(Customer customer) { 17 | if(customerCheckService.CheckPerson(customer)) { 18 | System.out.println("Starbucks Manager : Validation successfull."); 19 | super.save(customer); 20 | }else { 21 | System.out.println("Starbucks Manager : Validation Error - Not a valid person."); 22 | } 23 | 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /gameProject/src/entities/Campaign.java: -------------------------------------------------------------------------------- 1 | package entities; 2 | 3 | import interfaces.IEntity; 4 | 5 | public class Campaign implements IEntity{ 6 | int id; 7 | String campaignName; 8 | int discount; 9 | public Campaign() { 10 | } 11 | public Campaign(int id, String campaignName, int discount) { 12 | super(); 13 | this.id = id; 14 | this.campaignName = campaignName; 15 | this.discount = discount; 16 | } 17 | public int getId() { 18 | return id; 19 | } 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | public String getCampaignName() { 24 | return campaignName; 25 | } 26 | public void setCampaignName(String campaignName) { 27 | this.campaignName = campaignName; 28 | } 29 | public int getDiscount() { 30 | return discount; 31 | } 32 | public void setDiscount(int discount) { 33 | this.discount = discount; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/adapters/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package adapters; 2 | 3 | 4 | import java.rmi.RemoteException; 5 | 6 | import entities.Customer; 7 | import interfaces.CustomerCheckService; 8 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoap; 9 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 10 | 11 | public class MernisServiceAdapter implements CustomerCheckService{ 12 | 13 | @Override 14 | public boolean CheckPerson(Customer customer) { 15 | KPSPublicSoap soapClient = new KPSPublicSoapProxy(); 16 | boolean result = false; 17 | try { 18 | result = soapClient. 19 | TCKimlikNoDogrula( 20 | Long.parseLong(customer.getTckn()), 21 | customer.getFirstName(), 22 | customer.getLastName(), 23 | customer.getDateOfBirth().getYear()); 24 | } catch (NumberFormatException e) { 25 | e.printStackTrace(); 26 | } catch (RemoteException e) { 27 | e.printStackTrace(); 28 | } 29 | return result; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceSimulation.business.abstracts.UserService; 6 | import eCommerceSimulation.dataAccess.abstracts.UserDao; 7 | import eCommerceSimulation.entities.concretes.User; 8 | 9 | public class UserManager implements UserService{ 10 | 11 | private UserDao userDao; 12 | 13 | 14 | public UserManager(UserDao userDao) { 15 | super(); 16 | this.userDao = userDao; 17 | } 18 | 19 | 20 | @Override 21 | public void add(User user) { 22 | userDao.add(user); 23 | } 24 | 25 | 26 | @Override 27 | public void remove(User user) { 28 | userDao.remove(user); 29 | } 30 | 31 | 32 | @Override 33 | public void update(User user) { 34 | userDao.update(user); 35 | } 36 | 37 | 38 | @Override 39 | public User get(int id) { 40 | return userDao.get(id); 41 | } 42 | 43 | 44 | @Override 45 | public User getByEmail(String email) { 46 | return userDao.getByEmail(email); 47 | } 48 | 49 | 50 | @Override 51 | public User getByEmailAndPassword(String email, String password) { 52 | return userDao.getByEmailAndPassword(email, password); 53 | } 54 | 55 | 56 | @Override 57 | public List getAll() { 58 | return userDao.getAll(); 59 | } 60 | 61 | 62 | @Override 63 | public void verifyUser(int id) { 64 | User user = userDao.get(id); 65 | user.setVerified(true); 66 | System.out.println("Kullanıcı başarıyla doğrulandı.."); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /gameProject/src/entities/Player.java: -------------------------------------------------------------------------------- 1 | package entities; 2 | 3 | import java.util.Date; 4 | 5 | import interfaces.IEntity; 6 | 7 | public class Player implements IEntity{ 8 | int id; 9 | String userName; 10 | String firstName; 11 | String lastName; 12 | String tckn; 13 | Date dateOfBirth; 14 | public Player() { 15 | } 16 | public Player(int id, String userName, String firstName, String lastName, Date dateOfBirth,String tckn) { 17 | super(); 18 | this.id = id; 19 | this.userName = userName; 20 | this.firstName = firstName; 21 | this.lastName = lastName; 22 | this.dateOfBirth = dateOfBirth; 23 | this.tckn = tckn; 24 | } 25 | public int getId() { 26 | return id; 27 | } 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | public String getUserName() { 32 | return userName; 33 | } 34 | public void setUserName(String userName) { 35 | this.userName = userName; 36 | } 37 | public String getFirstName() { 38 | return firstName; 39 | } 40 | public void setFirstName(String firstName) { 41 | this.firstName = firstName; 42 | } 43 | public String getLastName() { 44 | return lastName; 45 | } 46 | public void setLastName(String lastName) { 47 | this.lastName = lastName; 48 | } 49 | public Date getDateOfBirth() { 50 | return dateOfBirth; 51 | } 52 | public void setDateOfBirth(Date dateOfBirth) { 53 | this.dateOfBirth = dateOfBirth; 54 | } 55 | public String getTckn() { 56 | return tckn; 57 | } 58 | public void setTckn(String tckn) { 59 | this.tckn = tckn; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.entities.concretes; 2 | 3 | import eCommerceSimulation.entities.abstracts.Entity; 4 | 5 | public class User implements Entity{ 6 | private int id; 7 | private String email; 8 | private String password; 9 | private String firstName; 10 | private String lastName; 11 | private boolean verified; 12 | 13 | public User() { 14 | } 15 | 16 | public User(int id, String email, String password, String firstName, String lastName,boolean verified) { 17 | super(); 18 | this.id = id; 19 | this.email = email; 20 | this.password = password; 21 | this.firstName = firstName; 22 | this.lastName = lastName; 23 | this.verified=verified; 24 | } 25 | 26 | public int getId() { 27 | return id; 28 | } 29 | 30 | public void setId(int id) { 31 | this.id = id; 32 | } 33 | 34 | public String getEmail() { 35 | return email; 36 | } 37 | 38 | public void setEmail(String email) { 39 | this.email = email; 40 | } 41 | 42 | public String getPassword() { 43 | return password; 44 | } 45 | 46 | public void setPassword(String password) { 47 | this.password = password; 48 | } 49 | 50 | public String getFirstName() { 51 | return firstName; 52 | } 53 | 54 | public void setFirstName(String firstName) { 55 | this.firstName = firstName; 56 | } 57 | 58 | public String getLastName() { 59 | return lastName; 60 | } 61 | 62 | public void setLastName(String lastName) { 63 | this.lastName = lastName; 64 | } 65 | 66 | public boolean isVerified() { 67 | return verified; 68 | } 69 | 70 | public void setVerified(boolean verified) { 71 | this.verified = verified; 72 | } 73 | 74 | 75 | 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/concretes/UserValidationManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.concretes; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | import eCommerceSimulation.business.abstracts.UserValidationService; 6 | import eCommerceSimulation.core.utils.ValidationRules; 7 | import eCommerceSimulation.entities.concretes.User; 8 | 9 | public class UserValidationManager implements UserValidationService{ 10 | 11 | // Kaynak : https://stackoverflow.com/a/8204716/13150378 12 | public static final Pattern VALID_EMAIL_ADDRESS_REGEX = 13 | Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); 14 | 15 | @Override 16 | public boolean validate(User user) { 17 | boolean result = ValidationRules.run( 18 | isEmailFormatValid(user.getEmail()), 19 | isPasswordLengthValid(user.getPassword()), 20 | isFirstNameLengthValid(user.getFirstName()), 21 | isLastNameLengthValid(user.getLastName()), 22 | isAllFieldsFilled(user.getFirstName(), user.getLastName(), user.getEmail(), user.getPassword()) 23 | ); 24 | return result; 25 | } 26 | 27 | private boolean isEmailFormatValid(String email) { 28 | return VALID_EMAIL_ADDRESS_REGEX.matcher(email).find(); 29 | } 30 | 31 | private boolean isPasswordLengthValid(String password) { 32 | return password.length() > 6; 33 | } 34 | private boolean isFirstNameLengthValid(String firstName) { 35 | return firstName.length() > 2; 36 | } 37 | private boolean isLastNameLengthValid(String lastName) { 38 | return lastName.length() > 2; 39 | } 40 | private boolean isAllFieldsFilled(String firstName,String lastName,String email, String password) { 41 | if(firstName.length() <= 0 || lastName.length() <= 0 || email.length() <= 0 || password.length() <= 0) { 42 | return false; 43 | }return true; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/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 | } -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/Main.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation; 2 | 3 | import eCommerceSimulation.business.abstracts.UserService; 4 | import eCommerceSimulation.business.concretes.AuthManager; 5 | import eCommerceSimulation.business.concretes.EmailManager; 6 | import eCommerceSimulation.business.concretes.UserManager; 7 | import eCommerceSimulation.business.concretes.UserValidationManager; 8 | import eCommerceSimulation.core.AuthService; 9 | import eCommerceSimulation.core.GoogleAuthManagerAdapter; 10 | import eCommerceSimulation.dataAccess.concretes.InMemoryUserDao; 11 | 12 | public class Main { 13 | 14 | public static void main(String[] args) { 15 | 16 | 17 | UserService userService = new UserManager(new InMemoryUserDao()); 18 | AuthService authService = new AuthManager(userService, new UserValidationManager(), new EmailManager()); 19 | authService.register(1, "halitenes.kalayci@gmail.com", "123halit1234", "Halit Enes", "Kalaycı"); // Başarılı 20 | authService.register(2, "bubirepostadeðil..", "þifrevalid", "Halit Enes", "Kalaycı"); // Başarısız eposta invalid 21 | authService.register(3, "bubireposta@gmail.com", "s", "Halit Enes", "Kalaycı"); // Başarısız şifre invalid 22 | authService.register(4, "bubireposta@gmail.com", "s", "H", "K"); // Başarısız ad-soyad invalid 23 | authService.register(5, "halitenes.kalayci@gmail.com", "123halit1234", "Halit Enes", "Kalaycı"); // Başarısız e-posta mevcut 24 | 25 | 26 | authService.login("halitenes.kalayci@gmail.com", "123halit1234"); // Başarşsşz üye doşrulama yapmamşş. 27 | userService.verifyUser(1); // Kullanşcşyş doşrulayalşm. 28 | authService.login("halitenes.kalayci@gmail.com", "123halit123"); // Başarısız şifre yanlış. 29 | authService.login("halitenes.kalayci@gmail.com", "123halit1234"); // Başarşlş. 30 | authService.login("", ""); // Başarşsşz e-posta parola zorunlu 31 | 32 | authService.login("halitenes.kalayci@gmail.com", "123halit1234"); // Başarısız üye doğrulama yapmamış. 33 | userService.verifyUser(1); // Kullanıcıyı doğrulayalım. 34 | authService.login("halitenes.kalayci@gmail.com", "123halit123"); // Başarısız şifre yanlış. 35 | authService.login("halitenes.kalayci@gmail.com", "123halit1234"); // Başarılı. 36 | authService.login("", ""); // Başarısız e-posta parola zorunlu 37 | 38 | 39 | AuthService googleAuthService = new GoogleAuthManagerAdapter(); 40 | googleAuthService.register(6, "klyyc7@gmail.com", "123halit1234", "Halit Enes", "Kalaycı"); 41 | googleAuthService.login("klyyc7@gmail.com", "123halit1234"); 42 | 43 | 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /eCommerceSimulation/src/eCommerceSimulation/business/concretes/AuthManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSimulation.business.concretes; 2 | 3 | import eCommerceSimulation.business.abstracts.EmailService; 4 | import eCommerceSimulation.business.abstracts.UserService; 5 | import eCommerceSimulation.business.abstracts.UserValidationService; 6 | import eCommerceSimulation.core.AuthService; 7 | import eCommerceSimulation.core.utils.BusinessRules; 8 | import eCommerceSimulation.entities.concretes.User; 9 | 10 | public class AuthManager implements AuthService{ 11 | 12 | UserService userService; 13 | UserValidationService userValidationService; 14 | EmailService emailService; 15 | 16 | 17 | public AuthManager(UserService userService, UserValidationService userValidationService, EmailService emailService) { 18 | super(); 19 | this.userService = userService; 20 | this.userValidationService = userValidationService; 21 | this.emailService = emailService; 22 | } 23 | 24 | @Override 25 | public void register(int id, String email,String password,String firstName,String lastName) { 26 | User userToRegister = new User(id,email,password,firstName,lastName,false); 27 | 28 | if(!userValidationService.validate(userToRegister)) { 29 | System.out.println("Validasyon işlemi başarısız. Lütfen tüm alanları doğru girdiğinizden emin olunuz."); 30 | return; 31 | } 32 | 33 | if(!BusinessRules.run(checkIfUserExists(email))) { 34 | System.out.println("Kayıt olma işlemi başarısız. Bu email ile bir başka üye mevcut."); 35 | return; 36 | } 37 | 38 | System.out.println("Başarıyla kayıt olundu. Üyeliğinizi doğrulamak için lütfen e-posta adresinizi kontrol ediniz."); 39 | emailService.send("Deneme doğrulama mesajıdır. Doğrulamak için kodlama.io/dogrula?id=xyz&token=abc adresine gidin.", userToRegister.getEmail()); 40 | userService.add(userToRegister); 41 | } 42 | 43 | @Override 44 | public void login(String email, String password) { 45 | if(!BusinessRules.run(checkIfAllFieldsFilled(email, password))) { 46 | System.out.println("Giriş başarısız. Inputlar doğru doldurulmadı."); 47 | return; 48 | } 49 | 50 | User userToLogin = userService.getByEmailAndPassword(email, password); 51 | 52 | if(userToLogin == null) { 53 | System.out.println("Giriş başarısız. E-posta adresiniz veya şifreniz yanlış."); 54 | return; 55 | } 56 | 57 | if(!checkIfUserVerified(userToLogin)) { 58 | System.out.println("Giriş başarısız. Üyeliğinizi doğrulamadınız."); 59 | return; 60 | } 61 | System.out.println("Giriş başarılı. Hoşgeldiniz : " + userToLogin.getFirstName() + " " + userToLogin.getLastName()); 62 | } 63 | 64 | 65 | private boolean checkIfUserExists(String email) { 66 | return userService.getByEmail(email) == null; 67 | } 68 | private boolean checkIfUserVerified(User user) { 69 | return user.isVerified(); 70 | } 71 | private boolean checkIfAllFieldsFilled(String email,String password) { 72 | if(email.length()<=0 || password.length() <=0) { 73 | return false; 74 | } 75 | return true; 76 | } 77 | 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/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 | -------------------------------------------------------------------------------- /coffeCustomerProject/src/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 | --------------------------------------------------------------------------------