├── .gitattributes ├── .gitignore ├── README.md ├── coffeeShopProject ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── coffeeShopProject │ │ ├── BaseCustomerManager.class │ │ ├── Customer.class │ │ ├── CustomerCheckManager.class │ │ ├── CustomerCheckService.class │ │ ├── CustomerService.class │ │ ├── Entity.class │ │ ├── Main.class │ │ ├── MernisServiceAdapter.class │ │ ├── NeroCustomerManager.class │ │ └── StarbucksCustomerManager.class │ └── tr │ │ └── gov │ │ └── nvi │ │ └── tckimlik │ │ └── WS │ │ ├── KPSPublic.class │ │ ├── KPSPublicLocator.class │ │ ├── KPSPublicSoap.class │ │ ├── KPSPublicSoapProxy.class │ │ └── KPSPublicSoapStub.class └── src │ ├── coffeeShopProject │ ├── BaseCustomerManager.java │ ├── Customer.java │ ├── CustomerCheckManager.java │ ├── CustomerCheckService.java │ ├── CustomerService.java │ ├── Entity.java │ ├── Main.java │ ├── MernisServiceAdapter.java │ ├── NeroCustomerManager.java │ └── StarbucksCustomerManager.java │ └── tr │ └── gov │ └── nvi │ └── tckimlik │ └── WS │ ├── KPSPublic.java │ ├── KPSPublicLocator.java │ ├── KPSPublicSoap.java │ ├── KPSPublicSoapProxy.java │ └── KPSPublicSoapStub.java ├── eCommerceAutomation ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ └── eCommerceAutomation │ │ ├── Main.class │ │ ├── business │ │ ├── abstracts │ │ │ ├── UserService.class │ │ │ ├── UserValidationService.class │ │ │ └── VerificationService.class │ │ └── concretes │ │ │ ├── UserManager.class │ │ │ ├── UserValidationManager.class │ │ │ └── VerificationManager.class │ │ ├── core │ │ └── utilities │ │ │ ├── GoogleAuthManagerAdapter.class │ │ │ └── MailValidator.class │ │ ├── dataAccess │ │ ├── abstracts │ │ │ └── UserDao.class │ │ └── concretes │ │ │ └── HibernateUserDao.class │ │ ├── entities │ │ └── concretes │ │ │ └── User.class │ │ └── googleAuth │ │ └── GoogleAuthManager.class └── src │ └── eCommerceAutomation │ ├── Main.java │ ├── business │ ├── abstracts │ │ ├── UserService.java │ │ ├── UserValidationService.java │ │ └── VerificationService.java │ └── concretes │ │ ├── UserManager.java │ │ ├── UserValidationManager.java │ │ └── VerificationManager.java │ ├── core │ └── utilities │ │ ├── GoogleAuthManagerAdapter.java │ │ └── MailValidator.java │ ├── dataAccess │ ├── abstracts │ │ └── UserDao.java │ └── concretes │ │ └── HibernateUserDao.java │ ├── entities │ └── concretes │ │ └── User.java │ └── googleAuth │ └── GoogleAuthManager.java ├── eCommerceSystem ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ └── eCommerceSystem │ │ ├── Main.class │ │ ├── business │ │ ├── abstracts │ │ │ ├── InfoValidationService.class │ │ │ ├── UserService.class │ │ │ └── VerificationService.class │ │ └── concretes │ │ │ ├── InfoValidationManager.class │ │ │ ├── UserManager.class │ │ │ └── VerificationManager.class │ │ ├── core │ │ ├── EMailValidator.class │ │ ├── GoogleAuthManagerAdapter.class │ │ └── GoogleAuthService.class │ │ ├── dataAccess │ │ ├── abstracts │ │ │ └── UserDao.class │ │ └── concretes │ │ │ └── HibernateUserDao.class │ │ ├── entities │ │ ├── abstracts │ │ │ └── Entity.class │ │ └── concretes │ │ │ └── User.class │ │ └── googleAuth │ │ └── GoogleAuthManager.class └── src │ └── eCommerceSystem │ ├── Main.java │ ├── business │ ├── abstracts │ │ ├── InfoValidationService.java │ │ ├── UserService.java │ │ └── VerificationService.java │ └── concretes │ │ ├── InfoValidationManager.java │ │ ├── UserManager.java │ │ └── VerificationManager.java │ ├── core │ ├── EMailValidator.java │ ├── GoogleAuthManagerAdapter.java │ └── GoogleAuthService.java │ ├── dataAccess │ ├── abstracts │ │ └── UserDao.java │ └── concretes │ │ └── HibernateUserDao.java │ ├── entities │ ├── abstracts │ │ └── Entity.java │ └── concretes │ │ └── User.java │ └── googleAuth │ └── GoogleAuthManager.java ├── gameProject ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── gameProject │ │ ├── Campaign.class │ │ ├── CampaignManager.class │ │ ├── CampaignService.class │ │ ├── Entity.class │ │ ├── Game.class │ │ ├── Main.class │ │ ├── MernisServiceAdapter.class │ │ ├── Order.class │ │ ├── OrderManager.class │ │ ├── OrderService.class │ │ ├── PersonCheckService.class │ │ ├── Player.class │ │ ├── PlayerCheckManager.class │ │ ├── PlayerManager.class │ │ ├── PlayerService.class │ │ ├── Salesman.class │ │ ├── SalesmanManager.class │ │ ├── SalesmanService.class │ │ ├── User.class │ │ ├── UserManager.class │ │ └── UserService.class │ └── tr │ │ └── gov │ │ └── nvi │ │ └── tckimlik │ │ └── WS │ │ ├── KPSPublic.class │ │ ├── KPSPublicLocator.class │ │ ├── KPSPublicSoap.class │ │ ├── KPSPublicSoapProxy.class │ │ └── KPSPublicSoapStub.class └── src │ ├── gameProject │ ├── Campaign.java │ ├── CampaignManager.java │ ├── CampaignService.java │ ├── Entity.java │ ├── Game.java │ ├── Main.java │ ├── MernisServiceAdapter.java │ ├── Order.java │ ├── OrderManager.java │ ├── OrderService.java │ ├── PersonCheckService.java │ ├── Player.java │ ├── PlayerCheckManager.java │ ├── PlayerManager.java │ ├── PlayerService.java │ ├── Salesman.java │ ├── SalesmanManager.java │ ├── SalesmanService.java │ ├── User.java │ ├── UserManager.java │ └── UserService.java │ └── tr │ └── gov │ └── nvi │ └── tckimlik │ └── WS │ ├── KPSPublic.java │ ├── KPSPublicLocator.java │ ├── KPSPublicSoap.java │ ├── KPSPublicSoapProxy.java │ └── KPSPublicSoapStub.java ├── gameStoreProject ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── bin │ ├── gameStoreProject │ │ ├── Main.class │ │ ├── business │ │ │ ├── abstracts │ │ │ │ ├── CampaignService.class │ │ │ │ ├── PersonCheckService.class │ │ │ │ ├── PlayerService.class │ │ │ │ └── SaleService.class │ │ │ └── concretes │ │ │ │ ├── CampaignManager.class │ │ │ │ ├── PersonCheckManager.class │ │ │ │ ├── PlayerManager.class │ │ │ │ └── SaleManager.class │ │ ├── core │ │ │ └── adapters │ │ │ │ └── MernisServiceAdapter.class │ │ └── entities │ │ │ └── concretes │ │ │ ├── Campaign.class │ │ │ ├── Game.class │ │ │ ├── Player.class │ │ │ ├── Sale.class │ │ │ └── User.class │ └── tr │ │ └── gov │ │ └── nvi │ │ └── tckimlik │ │ └── WS │ │ ├── KPSPublic.class │ │ ├── KPSPublicLocator.class │ │ ├── KPSPublicSoap.class │ │ ├── KPSPublicSoapProxy.class │ │ └── KPSPublicSoapStub.class └── src │ ├── gameStoreProject │ ├── Main.java │ ├── business │ │ ├── abstracts │ │ │ ├── CampaignService.java │ │ │ ├── PersonCheckService.java │ │ │ ├── PlayerService.java │ │ │ └── SaleService.java │ │ └── concretes │ │ │ ├── CampaignManager.java │ │ │ ├── PersonCheckManager.java │ │ │ ├── PlayerManager.java │ │ │ └── SaleManager.java │ ├── core │ │ └── adapters │ │ │ └── MernisServiceAdapter.java │ └── entities │ │ └── concretes │ │ ├── Campaign.java │ │ ├── Game.java │ │ ├── Player.java │ │ ├── Sale.java │ │ └── User.java │ └── tr │ └── gov │ └── nvi │ └── tckimlik │ └── WS │ ├── KPSPublic.java │ ├── KPSPublicLocator.java │ ├── KPSPublicSoap.java │ ├── KPSPublicSoapProxy.java │ └── KPSPublicSoapStub.java ├── hrms ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── kodlamaio │ │ │ └── hrms │ │ │ ├── HrmsApplication.java │ │ │ ├── api │ │ │ └── controllers │ │ │ │ └── JobPositionsController.java │ │ │ ├── business │ │ │ ├── abstracts │ │ │ │ └── JobPositionService.java │ │ │ └── concretes │ │ │ │ └── JobPositionManager.java │ │ │ ├── core │ │ │ └── utilities │ │ │ │ └── results │ │ │ │ ├── DataResult.java │ │ │ │ ├── ErrorDataResult.java │ │ │ │ ├── ErrorResult.java │ │ │ │ ├── Result.java │ │ │ │ ├── SuccessDataResult.java │ │ │ │ └── SuccessResult.java │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ └── JobPositionDao.java │ │ │ └── entitites │ │ │ └── concretes │ │ │ └── JobPosition.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── kodlamaio │ └── hrms │ └── HrmsApplicationTests.java ├── oopIntroHomework ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── bin │ └── oopIntroHomework │ │ ├── Course.class │ │ ├── CourseManager.class │ │ ├── Instructor.class │ │ ├── InstructorManager.class │ │ ├── Main.class │ │ ├── User.class │ │ └── UserManager.class └── src │ └── oopIntroHomework │ ├── Course.java │ ├── CourseManager.java │ ├── Instructor.java │ ├── InstructorManager.java │ ├── Main.java │ ├── User.java │ └── UserManager.java └── oopSoyutlamaHomework ├── .classpath ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── bin └── oopSoyutlamaHomework │ ├── Course.class │ ├── Instructor.class │ ├── InstructorManager.class │ ├── Main.class │ ├── Student.class │ ├── StudentManager.class │ ├── User.class │ └── UserManager.class └── src └── oopSoyutlamaHomework ├── Course.java ├── Instructor.java ├── InstructorManager.java ├── Main.java ├── Student.java ├── StudentManager.java ├── User.java └── UserManager.java /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | oopIntroHomework/javaKamp/ 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2 | 3 | -------------------------------------------------------------------------------- /coffeeShopProject/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /coffeeShopProject/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | coffeeShopProject 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jem.workbench.JavaEMFNature 16 | org.eclipse.jdt.core.javanature 17 | 18 | 19 | -------------------------------------------------------------------------------- /coffeeShopProject/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublic.java=UTF-8 3 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java=UTF-8 4 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java=UTF-8 5 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java=UTF-8 6 | -------------------------------------------------------------------------------- /coffeeShopProject/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=disabled 14 | org.eclipse.jdt.core.compiler.source=1.8 15 | -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/BaseCustomerManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/BaseCustomerManager.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/Customer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/Customer.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/CustomerCheckManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/CustomerCheckManager.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/CustomerCheckService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/CustomerCheckService.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/CustomerService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/CustomerService.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/Entity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/Entity.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/Main.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/MernisServiceAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/MernisServiceAdapter.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/NeroCustomerManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/NeroCustomerManager.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/coffeeShopProject/StarbucksCustomerManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/coffeeShopProject/StarbucksCustomerManager.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublic.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublic.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.class -------------------------------------------------------------------------------- /coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/coffeeShopProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.class -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/BaseCustomerManager.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public abstract class BaseCustomerManager implements CustomerService{ 4 | 5 | @Override 6 | public abstract void save(Customer customer); 7 | 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/Customer.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public class Customer implements Entity { 4 | private int id; 5 | private String firstName; 6 | private String lastName; 7 | private int dateOfBirth; 8 | private String nationalityId; 9 | 10 | public Customer() { 11 | super(); 12 | } 13 | 14 | public Customer(int id, String firstName, String lastName, int dateOfBirth, String nationalityId) { 15 | super(); 16 | this.id = id; 17 | this.firstName = firstName; 18 | this.lastName = lastName; 19 | this.dateOfBirth = dateOfBirth; 20 | this.nationalityId = nationalityId; 21 | } 22 | 23 | public int getId() { 24 | return id; 25 | } 26 | 27 | public void setId(int id) { 28 | this.id = id; 29 | } 30 | 31 | public String getFirstName() { 32 | return firstName; 33 | } 34 | 35 | public void setFirstName(String firstName) { 36 | this.firstName = firstName; 37 | } 38 | 39 | public String getLastName() { 40 | return lastName; 41 | } 42 | 43 | public void setLastName(String lastName) { 44 | this.lastName = lastName; 45 | } 46 | 47 | public int getDateOfBirth() { 48 | return dateOfBirth; 49 | } 50 | 51 | public void setDateOfBirth(int dateOfBirth) { 52 | this.dateOfBirth = dateOfBirth; 53 | } 54 | 55 | public String getNationalityId() { 56 | return nationalityId; 57 | } 58 | 59 | public void setNationalityId(String nationalityId) { 60 | this.nationalityId = nationalityId; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/CustomerCheckManager.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public class CustomerCheckManager implements CustomerCheckService { 4 | 5 | @Override 6 | public boolean checkIfRealPerson(Customer customer) { 7 | 8 | return true; 9 | 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/CustomerCheckService.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public interface CustomerCheckService { 4 | boolean checkIfRealPerson(Customer customer); 5 | } 6 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/CustomerService.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public interface CustomerService { 4 | void save(Customer customer); 5 | } 6 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/Entity.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/Main.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | 7 | CustomerCheckService checkService=new MernisServiceAdapter(); 8 | Customer customer= new Customer(); 9 | customer.setFirstName("Gonca"); 10 | customer.setLastName("Bal"); 11 | customer.setNationalityId("13513513513"); 12 | customer.setDateOfBirth(1994); 13 | BaseCustomerManager customerManager= new StarbucksCustomerManager(checkService); 14 | customerManager.save(customer); 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 4 | 5 | public class MernisServiceAdapter implements CustomerCheckService { 6 | 7 | @Override 8 | public boolean checkIfRealPerson(Customer customer) { 9 | 10 | KPSPublicSoapProxy client = new KPSPublicSoapProxy(); 11 | try { 12 | 13 | return client.TCKimlikNoDogrula(Long.parseLong(customer.getNationalityId()), customer.getFirstName().toUpperCase(), 14 | customer.getLastName().toUpperCase(), customer.getDateOfBirth()); 15 | 16 | } 17 | catch (Exception e) { 18 | 19 | return false; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/NeroCustomerManager.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public class NeroCustomerManager extends BaseCustomerManager { 4 | 5 | @Override 6 | public void save(Customer customer) { 7 | System.out.println("Save to database: "+customer.getFirstName()); 8 | 9 | } 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /coffeeShopProject/src/coffeeShopProject/StarbucksCustomerManager.java: -------------------------------------------------------------------------------- 1 | package coffeeShopProject; 2 | 3 | public class StarbucksCustomerManager extends BaseCustomerManager { 4 | 5 | CustomerCheckService customerCheckService; 6 | 7 | public StarbucksCustomerManager(CustomerCheckService customerCheckService) { 8 | 9 | this.customerCheckService = customerCheckService; 10 | } 11 | 12 | @Override 13 | public void save(Customer customer) { 14 | 15 | if (customerCheckService.checkIfRealPerson(customer)) { 16 | System.out.println("Save to database: "+customer.getFirstName()); 17 | } 18 | else { 19 | System.out.println("Not a valid person"); 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /coffeeShopProject/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 | -------------------------------------------------------------------------------- /coffeeShopProject/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 | -------------------------------------------------------------------------------- /coffeeShopProject/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 | -------------------------------------------------------------------------------- /coffeeShopProject/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 | } -------------------------------------------------------------------------------- /coffeeShopProject/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 | -------------------------------------------------------------------------------- /eCommerceAutomation/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /eCommerceAutomation/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | eCommerceAutomation 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /eCommerceAutomation/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/Main.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/business/abstracts/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/business/abstracts/UserService.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/business/abstracts/UserValidationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/business/abstracts/UserValidationService.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/business/abstracts/VerificationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/business/abstracts/VerificationService.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/business/concretes/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/business/concretes/UserManager.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/business/concretes/UserValidationManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/business/concretes/UserValidationManager.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/business/concretes/VerificationManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/business/concretes/VerificationManager.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/core/utilities/GoogleAuthManagerAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/core/utilities/GoogleAuthManagerAdapter.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/core/utilities/MailValidator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/core/utilities/MailValidator.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/dataAccess/abstracts/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/dataAccess/abstracts/UserDao.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/dataAccess/concretes/HibernateUserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/dataAccess/concretes/HibernateUserDao.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/entities/concretes/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/entities/concretes/User.class -------------------------------------------------------------------------------- /eCommerceAutomation/bin/eCommerceAutomation/googleAuth/GoogleAuthManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceAutomation/bin/eCommerceAutomation/googleAuth/GoogleAuthManager.class -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/Main.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation; 2 | 3 | import eCommerceAutomation.business.concretes.UserManager; 4 | import eCommerceAutomation.business.concretes.UserValidationManager; 5 | import eCommerceAutomation.business.concretes.VerificationManager; 6 | import eCommerceAutomation.core.utilities.GoogleAuthManagerAdapter; 7 | import eCommerceAutomation.dataAccess.concretes.HibernateUserDao; 8 | import eCommerceAutomation.entities.concretes.User; 9 | 10 | public class Main { 11 | 12 | public static void main(String[] args) { 13 | User user = new User(1, "Gonca", "Bal", "goncabal94@gmail.com", "123456"); 14 | User user2 = new User(2, "Reyhan", "Bal", "goncabal9@gmail.com", "1234567"); 15 | 16 | UserManager userManager = new UserManager(new HibernateUserDao(), new VerificationManager(), 17 | new UserValidationManager(new GoogleAuthManagerAdapter())); 18 | userManager.signUp(user); 19 | userManager.signUp(user2); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceAutomation.entities.concretes.User; 6 | 7 | public interface UserService { 8 | void signUp(User user); 9 | void signIn(User user); 10 | User get(int id); 11 | List getAll(); 12 | } 13 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/business/abstracts/UserValidationService.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.business.abstracts; 2 | 3 | 4 | import eCommerceAutomation.entities.concretes.User; 5 | 6 | public interface UserValidationService { 7 | boolean isValidUserInfo(User user); 8 | boolean isValidName(User user); 9 | boolean isValidMail(User user); 10 | boolean isValidPassword(User user); 11 | boolean isExistMail(User user); 12 | } 13 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/business/abstracts/VerificationService.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.business.abstracts; 2 | 3 | public interface VerificationService { 4 | void verification(String tıkla); 5 | } 6 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceAutomation.business.abstracts.UserService; 6 | import eCommerceAutomation.business.abstracts.UserValidationService; 7 | import eCommerceAutomation.business.abstracts.VerificationService; 8 | import eCommerceAutomation.dataAccess.abstracts.UserDao; 9 | import eCommerceAutomation.entities.concretes.User; 10 | 11 | public class UserManager implements UserService { 12 | private UserDao userDao; 13 | private VerificationService verificationService; 14 | private UserValidationService userValidationService; 15 | 16 | public UserManager(UserDao userDao, VerificationService verificationService, 17 | UserValidationService userValidationService) { 18 | super(); 19 | this.userDao = userDao; 20 | this.verificationService = verificationService; 21 | this.userValidationService = userValidationService; 22 | } 23 | 24 | @Override 25 | public void signUp(User user) { 26 | if (userValidationService.isValidUserInfo(user)) { 27 | System.out.println("Kullanıcı bilgileri boş geçilemez."); 28 | return; 29 | } else if (userValidationService.isValidName(user)) { 30 | System.out.println("Ad soyad 2 karakterden küçük olamaz."); 31 | return; 32 | } else if (userValidationService.isValidPassword(user)) { 33 | System.out.println("Parola en az 6 karakter olmalı"); 34 | return; 35 | } else if (userValidationService.isExistMail(user)) { 36 | System.out.println("Bu mail adresi sistemde kayıtlı!"); 37 | return; 38 | } else if (!userValidationService.isValidMail(user)) { 39 | System.out.println("Geçersiz mail adresi!"); 40 | return; 41 | } 42 | userDao.signUp(user); 43 | verificationService.verification("tıkla"); 44 | } 45 | 46 | @Override 47 | public void signIn(User user) { 48 | if (userValidationService.isValidMail(user)) { 49 | System.out.println("Mail boş geçilemez!"); 50 | return; 51 | } 52 | else if (userValidationService.isValidPassword(user)) { 53 | System.out.println("Parola boş geçilemez."); 54 | return; 55 | } 56 | else if (userValidationService.isExistMail(user)) { 57 | System.out.println("Mail adresi kayıtlı değil! Lütfen kayıt olun."); 58 | return; 59 | } 60 | userDao.signIn(user); 61 | 62 | } 63 | 64 | @Override 65 | public User get(int id) { 66 | return userDao.get(id); 67 | } 68 | 69 | @Override 70 | public List getAll() { 71 | return userDao.getAll(); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/business/concretes/UserValidationManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.business.concretes; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import eCommerceAutomation.business.abstracts.UserValidationService; 7 | import eCommerceAutomation.entities.concretes.User; 8 | 9 | public class UserValidationManager implements UserValidationService { 10 | 11 | List mail=new ArrayList(); 12 | 13 | UserValidationService userValidationService; 14 | 15 | public UserValidationManager(UserValidationService userValidationService) { 16 | super(); 17 | this.userValidationService = userValidationService; 18 | } 19 | 20 | @Override 21 | public boolean isValidUserInfo(User user) { 22 | if (user.getFirstName() == null || user.getLastName() == null || user.getMailAdress() == null 23 | || user.getPassword() == null) { 24 | return true; 25 | } else { 26 | return false; 27 | } 28 | } 29 | 30 | @Override 31 | public boolean isValidName(User user) { 32 | if (user.getFirstName().length() < 2 || user.getLastName().length() < 2) { 33 | return true; 34 | } else { 35 | return false; 36 | } 37 | } 38 | 39 | @Override 40 | public boolean isValidPassword(User user) { 41 | if (user.getPassword().length() < 6) { 42 | return true; 43 | } else { 44 | return false; 45 | } 46 | } 47 | 48 | @Override 49 | public boolean isExistMail(User user) { 50 | if (mail.contains(user.getMailAdress())){ 51 | return true; 52 | }else { 53 | mail.add(user.getMailAdress()); 54 | } 55 | return false; 56 | } 57 | 58 | @Override 59 | public boolean isValidMail(User user) { 60 | if(userValidationService.isValidMail(user)) { 61 | return true; 62 | } 63 | return false; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/business/concretes/VerificationManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.business.concretes; 2 | 3 | import eCommerceAutomation.business.abstracts.VerificationService; 4 | 5 | public class VerificationManager implements VerificationService{ 6 | 7 | @Override 8 | public void verification(String tıkla) { 9 | System.out.println(tıkla+" Aktivasyon işlemi başarılı!"); 10 | 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/core/utilities/GoogleAuthManagerAdapter.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.core.utilities; 2 | 3 | import eCommerceAutomation.business.abstracts.UserValidationService; 4 | import eCommerceAutomation.entities.concretes.User; 5 | import eCommerceAutomation.googleAuth.GoogleAuthManager; 6 | 7 | public class GoogleAuthManagerAdapter implements UserValidationService { 8 | 9 | @Override 10 | public boolean isValidUserInfo(User user) { 11 | // TODO Auto-generated method stub 12 | return false; 13 | } 14 | 15 | @Override 16 | public boolean isValidName(User user) { 17 | // TODO Auto-generated method stub 18 | return false; 19 | } 20 | 21 | @Override 22 | public boolean isValidMail(User user) { 23 | 24 | return GoogleAuthManager.isValidMail(user.getMailAdress()); 25 | 26 | } 27 | 28 | @Override 29 | public boolean isValidPassword(User user) { 30 | // TODO Auto-generated method stub 31 | return false; 32 | } 33 | 34 | @Override 35 | public boolean isExistMail(User user) { 36 | // TODO Auto-generated method stub 37 | return false; 38 | } 39 | 40 | 41 | 42 | 43 | 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/core/utilities/MailValidator.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.core.utilities; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | public class MailValidator { 6 | public static boolean isEmailValid(String email) { 7 | 8 | String emailPattern = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$"; 9 | 10 | Pattern pattern = Pattern.compile(emailPattern, Pattern.CASE_INSENSITIVE); 11 | return pattern.matcher(email).find(); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceAutomation.entities.concretes.User; 6 | 7 | public interface UserDao { 8 | 9 | void signUp(User user); 10 | void signIn(User user); 11 | User get(int id); 12 | List getAll(); 13 | } 14 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/dataAccess/concretes/HibernateUserDao.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.dataAccess.concretes; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import eCommerceAutomation.dataAccess.abstracts.UserDao; 7 | import eCommerceAutomation.entities.concretes.User; 8 | 9 | public class HibernateUserDao implements UserDao { 10 | 11 | List users=new ArrayList(); 12 | 13 | @Override 14 | public void signUp(User user) { 15 | System.out.println("Hibernate ile kayıt olundu! " + user.getMailAdress() 16 | + " Aktivasyon kodu gönderildi! Kaydınızı tamamlamak için lütfen mailinizi kontrol edin."); 17 | } 18 | 19 | @Override 20 | public void signIn(User user) { 21 | System.out.println("Sisteme giriş yapıldı! Hoşgeldin "+user.getFirstName()); 22 | } 23 | 24 | @Override 25 | public User get(int id) { 26 | for (User user : users) { 27 | if (user.getId()==id) { 28 | return user; 29 | } 30 | } 31 | return null; 32 | } 33 | 34 | @Override 35 | public List getAll() { 36 | System.out.println("Sisteme kayıtlı mail adresleri: "); 37 | for (User user : users) { 38 | System.out.println(user.getMailAdress()); 39 | } 40 | return users; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.entities.concretes; 2 | 3 | public class User { 4 | private int id; 5 | private String firstName; 6 | private String lastName; 7 | private String mailAdress; 8 | private String password; 9 | 10 | public User() { 11 | } 12 | 13 | public User(int id, String firstName, String lastName, String mailAdress, String password) { 14 | super(); 15 | this.id = id; 16 | this.firstName = firstName; 17 | this.lastName = lastName; 18 | this.mailAdress = mailAdress; 19 | this.password = password; 20 | } 21 | 22 | public int getId() { 23 | return id; 24 | } 25 | 26 | public void setId(int id) { 27 | this.id = id; 28 | } 29 | 30 | public String getFirstName() { 31 | return firstName; 32 | } 33 | 34 | public void setFirstName(String firstName) { 35 | this.firstName = firstName; 36 | } 37 | 38 | public String getLastName() { 39 | return lastName; 40 | } 41 | 42 | public void setLastName(String lastName) { 43 | this.lastName = lastName; 44 | } 45 | 46 | public String getMailAdress() { 47 | return mailAdress; 48 | } 49 | 50 | public void setMailAdress(String mailAdress) { 51 | this.mailAdress = mailAdress; 52 | } 53 | 54 | public String getPassword() { 55 | return password; 56 | } 57 | 58 | public void setPassword(String password) { 59 | this.password = password; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /eCommerceAutomation/src/eCommerceAutomation/googleAuth/GoogleAuthManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceAutomation.googleAuth; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | public class GoogleAuthManager { 6 | public static boolean isValidMail(String email) { 7 | 8 | String emailPattern = "^[A-Z0-9._%+-]+@(gmail).[A-Z]{2,6}$"; 9 | 10 | Pattern pattern = Pattern.compile(emailPattern, Pattern.CASE_INSENSITIVE); 11 | return pattern.matcher(email).find(); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /eCommerceSystem/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /eCommerceSystem/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | eCommerceSystem 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /eCommerceSystem/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/Main.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/business/abstracts/InfoValidationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/business/abstracts/InfoValidationService.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/business/abstracts/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/business/abstracts/UserService.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/business/abstracts/VerificationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/business/abstracts/VerificationService.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/business/concretes/InfoValidationManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/business/concretes/InfoValidationManager.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/business/concretes/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/business/concretes/UserManager.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/business/concretes/VerificationManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/business/concretes/VerificationManager.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/core/EMailValidator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/core/EMailValidator.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/core/GoogleAuthManagerAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/core/GoogleAuthManagerAdapter.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/core/GoogleAuthService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/core/GoogleAuthService.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/dataAccess/abstracts/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/dataAccess/abstracts/UserDao.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/dataAccess/concretes/HibernateUserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/dataAccess/concretes/HibernateUserDao.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/entities/abstracts/Entity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/entities/abstracts/Entity.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/entities/concretes/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/entities/concretes/User.class -------------------------------------------------------------------------------- /eCommerceSystem/bin/eCommerceSystem/googleAuth/GoogleAuthManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/eCommerceSystem/bin/eCommerceSystem/googleAuth/GoogleAuthManager.class -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/Main.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem; 2 | 3 | import eCommerceSystem.business.abstracts.UserService; 4 | import eCommerceSystem.business.concretes.InfoValidationManager; 5 | import eCommerceSystem.business.concretes.UserManager; 6 | import eCommerceSystem.business.concretes.VerificationManager; 7 | import eCommerceSystem.core.GoogleAuthManagerAdapter; 8 | import eCommerceSystem.core.GoogleAuthService; 9 | import eCommerceSystem.dataAccess.concretes.HibernateUserDao; 10 | import eCommerceSystem.entities.concretes.User; 11 | 12 | public class Main { 13 | 14 | public static void main(String[] args) { 15 | 16 | 17 | User user = new User(); 18 | user.setId(1); 19 | user.setFirstName("Gonca"); 20 | user.setLastName("Bal"); 21 | user.seteMail("goncabal@gmail.com"); 22 | user.setPassword("123456"); 23 | 24 | 25 | 26 | UserService userService = new UserManager(new HibernateUserDao(), new InfoValidationManager(), 27 | new VerificationManager()); 28 | 29 | GoogleAuthService googleService=new GoogleAuthManagerAdapter(); 30 | googleService.signIn(user); 31 | userService.signUp(user); 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/business/abstracts/InfoValidationService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.business.abstracts; 2 | 3 | import eCommerceSystem.entities.concretes.User; 4 | 5 | public interface InfoValidationService { 6 | boolean isValidUserInfo(User user); 7 | boolean isValidName(User user); 8 | boolean isValidPassword(User user); 9 | boolean isExistMail(String mail); 10 | boolean isNullMail(User user); 11 | boolean isNullPassword(User user); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceSystem.entities.concretes.User; 6 | 7 | public interface UserService { 8 | void signUp(User user); 9 | void signIn(User user); 10 | List getAll(); 11 | User get(int id); 12 | } 13 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/business/abstracts/VerificationService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.business.abstracts; 2 | 3 | public interface VerificationService { 4 | void verification(); 5 | } 6 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/business/concretes/InfoValidationManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.business.concretes; 2 | 3 | import eCommerceSystem.business.abstracts.InfoValidationService; 4 | import eCommerceSystem.business.abstracts.UserService; 5 | import eCommerceSystem.entities.concretes.User; 6 | 7 | public class InfoValidationManager implements InfoValidationService { 8 | 9 | UserService userService; 10 | 11 | @Override 12 | public boolean isValidUserInfo(User user) { 13 | if (user.getFirstName() == null || user.getLastName() == null || user.geteMail() == null 14 | || user.getPassword() == null) { 15 | return true; 16 | } else { 17 | return false; 18 | } 19 | 20 | } 21 | 22 | @Override 23 | public boolean isValidName(User user) { 24 | if (user.getFirstName().length() <= 2 || user.getLastName().length() <= 2) { 25 | return true; 26 | } else { 27 | return false; 28 | } 29 | } 30 | 31 | @Override 32 | public boolean isValidPassword(User user) { 33 | if (user.getPassword().length() < 6) { 34 | return true; 35 | } else { 36 | return false; 37 | } 38 | } 39 | 40 | @Override 41 | public boolean isExistMail(String mail) { 42 | for (User user : userService.getAll()) { 43 | if (user.geteMail() == mail) { 44 | return true; 45 | } 46 | } 47 | return false; 48 | } 49 | 50 | @Override 51 | public boolean isNullMail(User user) { 52 | if (user.geteMail() == null) { 53 | return true; 54 | } else { 55 | return false; 56 | } 57 | } 58 | 59 | @Override 60 | public boolean isNullPassword(User user) { 61 | if (user.getPassword() == null) { 62 | return true; 63 | } else { 64 | return false; 65 | } 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.business.concretes; 2 | 3 | import java.util.List; 4 | import eCommerceSystem.business.abstracts.InfoValidationService; 5 | import eCommerceSystem.business.abstracts.UserService; 6 | import eCommerceSystem.business.abstracts.VerificationService; 7 | import eCommerceSystem.core.EMailValidator; 8 | import eCommerceSystem.dataAccess.abstracts.UserDao; 9 | import eCommerceSystem.entities.concretes.User; 10 | 11 | public class UserManager implements UserService { 12 | 13 | private UserDao userDao; 14 | private InfoValidationService infoValidationService; 15 | private VerificationService verificationService; 16 | 17 | public UserManager(UserDao userDao,InfoValidationService infoValidationService,VerificationService verificationService) { 18 | super(); 19 | this.userDao = userDao; 20 | this.infoValidationService=infoValidationService; 21 | this.verificationService=verificationService; 22 | 23 | } 24 | 25 | @Override 26 | public void signUp(User user) { 27 | 28 | if (infoValidationService.isValidUserInfo(user)) { 29 | System.out.println("Bilgilerinizi eksik girdiniz! Zorunlu alanlar boş geçilemez."); 30 | return; 31 | } else if (infoValidationService.isValidName(user)) { 32 | System.out.println("Kullanıcı adı ve ya soyadı 2 karakterden küçük olamaz! Kayıt olma başarısız."); 33 | return; 34 | } else if (infoValidationService.isValidPassword(user)) { 35 | System.out.println("Parola 6 karakterden küçük olamaz!"); 36 | return; 37 | } else if (!EMailValidator.isEmailValid(user.geteMail())) { 38 | System.out.println("Mail bilgisi hatalı! Lütfen kontrol edin."); 39 | return; 40 | } 41 | // else if (infoValidationService.isExistMail(user.geteMail())) { 42 | // System.out.println("E-mail sistemde kayıtlı! Farklı bir mail adresiyle kaydolun."); 43 | // return; 44 | // } 45 | userDao.signUp(user); 46 | verificationService.verification(); 47 | 48 | } 49 | 50 | @Override 51 | public void signIn(User user) { 52 | if (infoValidationService.isNullMail(user)) { 53 | System.out.println("Hata! Mail boş geçilemez."); 54 | return; 55 | } else if (infoValidationService.isNullPassword(user)) { 56 | System.out.println("Hata! Şifre boş geçilemez."); 57 | return; 58 | } 59 | // else if (!infoValidationService.isExistMail(user.geteMail())) { 60 | // System.out.println("Lütfen kayıt olun."); 61 | // return; 62 | // } 63 | userDao.signIn(user); 64 | 65 | } 66 | 67 | @Override 68 | public List getAll() { 69 | 70 | return userDao.getAll(); 71 | } 72 | 73 | @Override 74 | public User get(int id) { 75 | 76 | return userDao.get(id); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/business/concretes/VerificationManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.business.concretes; 2 | 3 | import java.util.Scanner; 4 | 5 | import eCommerceSystem.business.abstracts.VerificationService; 6 | 7 | public class VerificationManager implements VerificationService{ 8 | 9 | @Override 10 | public void verification() { 11 | @SuppressWarnings("resource") 12 | Scanner input=new Scanner(System.in); 13 | System.out.println("Maili doğrulamak için 1'e basın : "); 14 | int test=input.nextInt(); 15 | if(test==1) { 16 | System.out.println("Doğrulama işlemi başarılı."); 17 | } 18 | else { 19 | System.out.println("Doğrulama başarısız oldu. "); 20 | } 21 | 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/core/EMailValidator.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.core; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | public class EMailValidator { 6 | 7 | public static boolean isEmailValid(String email) { 8 | 9 | String emailPattern = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$"; 10 | 11 | Pattern pattern = Pattern.compile(emailPattern, Pattern.CASE_INSENSITIVE); 12 | return pattern.matcher(email).find(); 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/core/GoogleAuthManagerAdapter.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.core; 2 | 3 | import eCommerceSystem.entities.concretes.User; 4 | import eCommerceSystem.googleAuth.GoogleAuthManager; 5 | 6 | public class GoogleAuthManagerAdapter implements GoogleAuthService{ 7 | 8 | 9 | 10 | @Override 11 | public void signUp(User user) { 12 | if(GoogleAuthManager.isEmailValid(user.geteMail())) { 13 | System.out.println("Sisteme google hesabı ile kayıt olundu. "+ user.geteMail()); 14 | } 15 | else { 16 | System.out.println("Hata! Lütfen google hesabı ile kayıt olmayı deneyin."); 17 | } 18 | } 19 | 20 | @Override 21 | public void signIn(User user) { 22 | if(GoogleAuthManager.isEmailValid(user.geteMail())) { 23 | System.out.println("Sisteme google hesabı ile giriş yapıldı. "+user.geteMail()); 24 | } 25 | else { 26 | System.out.println("Hata! Lütfen google hesabınızla giriş yapmayı deneyin."); 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/core/GoogleAuthService.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.core; 2 | 3 | import eCommerceSystem.entities.concretes.User; 4 | 5 | public interface GoogleAuthService { 6 | void signUp(User user); 7 | void signIn(User user); 8 | } 9 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import eCommerceSystem.entities.concretes.User; 6 | 7 | public interface UserDao { 8 | void signUp(User user); 9 | void signIn(User user); 10 | User get(int id); 11 | List getAll(); 12 | } 13 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/dataAccess/concretes/HibernateUserDao.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.dataAccess.concretes; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import eCommerceSystem.dataAccess.abstracts.UserDao; 7 | import eCommerceSystem.entities.concretes.User; 8 | 9 | public class HibernateUserDao implements UserDao { 10 | 11 | List users = new ArrayList(); 12 | 13 | @Override 14 | public void signUp(User user) { 15 | System.out.println("Hibernate ile hesap oluşturuldu! " + user.geteMail()); 16 | System.out.println("Aktivasyon maili gönderildi."); 17 | } 18 | 19 | @Override 20 | public void signIn(User user) { 21 | System.out.println("Sisteme giriş yapıldı. " + user.geteMail()); 22 | 23 | } 24 | 25 | @Override 26 | public List getAll() { 27 | System.out.println("Sisteme kayıtlı kişiler: "); 28 | for(User user:users) { 29 | System.out.println(user.geteMail()); 30 | } 31 | return users; 32 | 33 | } 34 | 35 | @Override 36 | public User get(int id) { 37 | for (User user : users) { 38 | if (user.getId() == id) { 39 | 40 | return user; 41 | } 42 | } 43 | return null; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/entities/abstracts/Entity.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.entities.abstracts; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.entities.concretes; 2 | 3 | import eCommerceSystem.entities.abstracts.Entity; 4 | 5 | public class User implements Entity{ 6 | private int id; 7 | private String firstName; 8 | private String lastName; 9 | private String eMail; 10 | private String password; 11 | 12 | public User() {} 13 | 14 | public User(int id, String firstName, String lastName, String eMail, String password) { 15 | super(); 16 | this.id = id; 17 | this.firstName = firstName; 18 | this.lastName = lastName; 19 | this.eMail = eMail; 20 | this.password = password; 21 | } 22 | 23 | public int getId() { 24 | return id; 25 | } 26 | 27 | public void setId(int id) { 28 | this.id = id; 29 | } 30 | 31 | public String getFirstName() { 32 | return firstName; 33 | } 34 | 35 | public void setFirstName(String firstName) { 36 | this.firstName = firstName; 37 | } 38 | 39 | public String getLastName() { 40 | return lastName; 41 | } 42 | 43 | public void setLastName(String lastName) { 44 | this.lastName = lastName; 45 | } 46 | 47 | public String geteMail() { 48 | return eMail; 49 | } 50 | 51 | public void seteMail(String eMail) { 52 | this.eMail = eMail; 53 | } 54 | 55 | public String getPassword() { 56 | return password; 57 | } 58 | 59 | public void setPassword(String password) { 60 | this.password = password; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /eCommerceSystem/src/eCommerceSystem/googleAuth/GoogleAuthManager.java: -------------------------------------------------------------------------------- 1 | package eCommerceSystem.googleAuth; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | public class GoogleAuthManager { 6 | public static boolean isEmailValid(String email) { 7 | 8 | String emailPattern = "^[A-Z0-9._%+-]+@(gmail).[A-Z]{2,6}$"; 9 | 10 | Pattern pattern = Pattern.compile(emailPattern, Pattern.CASE_INSENSITIVE); 11 | return pattern.matcher(email).find(); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /gameProject/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /gameProject/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | gameProject 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jem.workbench.JavaEMFNature 16 | org.eclipse.jdt.core.javanature 17 | 18 | 19 | -------------------------------------------------------------------------------- /gameProject/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublic.java=UTF-8 3 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java=UTF-8 4 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java=UTF-8 5 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java=UTF-8 6 | -------------------------------------------------------------------------------- /gameProject/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=disabled 14 | org.eclipse.jdt.core.compiler.source=1.8 15 | -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Campaign.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Campaign.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/CampaignManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/CampaignManager.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/CampaignService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/CampaignService.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Entity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Entity.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Game.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Game.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Main.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/MernisServiceAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/MernisServiceAdapter.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Order.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Order.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/OrderManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/OrderManager.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/OrderService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/OrderService.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/PersonCheckService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/PersonCheckService.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Player.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Player.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/PlayerCheckManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/PlayerCheckManager.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/PlayerManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/PlayerManager.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/PlayerService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/PlayerService.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/Salesman.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/Salesman.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/SalesmanManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/SalesmanManager.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/SalesmanService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/SalesmanService.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/User.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/UserManager.class -------------------------------------------------------------------------------- /gameProject/bin/gameProject/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/gameProject/UserService.class -------------------------------------------------------------------------------- /gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublic.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublic.class -------------------------------------------------------------------------------- /gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.class -------------------------------------------------------------------------------- /gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.class -------------------------------------------------------------------------------- /gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.class -------------------------------------------------------------------------------- /gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.class -------------------------------------------------------------------------------- /gameProject/src/gameProject/Campaign.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class Campaign implements Entity { 4 | private int campaignId; 5 | private int orderId; 6 | private int gameId; 7 | private String campaignName; 8 | 9 | private double discount; 10 | double totalPrice; 11 | 12 | public Campaign() {} 13 | 14 | public Campaign(int campaignId, int orderId, int gameId, String campaignName, double unitPrice, double discount, 15 | double totalPrice) { 16 | super(); 17 | this.campaignId = campaignId; 18 | this.orderId = orderId; 19 | this.gameId = gameId; 20 | this.campaignName = campaignName; 21 | 22 | this.discount = discount; 23 | 24 | } 25 | 26 | public int getCampaignId() { 27 | return campaignId; 28 | } 29 | 30 | public void setCampaignId(int campaignId) { 31 | this.campaignId = campaignId; 32 | } 33 | 34 | public int getOrderId() { 35 | return orderId; 36 | } 37 | 38 | public void setOrderId(int orderId) { 39 | this.orderId = orderId; 40 | } 41 | 42 | public int getGameId() { 43 | return gameId; 44 | } 45 | 46 | public void setGameId(int gameId) { 47 | this.gameId = gameId; 48 | } 49 | 50 | public String getCampaignName() { 51 | return campaignName; 52 | } 53 | 54 | public void setCampaignName(String campaignName) { 55 | this.campaignName = campaignName; 56 | } 57 | 58 | 59 | 60 | public double getDiscount() { 61 | return discount; 62 | } 63 | 64 | public void setDiscount(double discount) { 65 | this.discount = discount; 66 | } 67 | 68 | public double getTotalPrice() { 69 | return totalPrice; 70 | } 71 | 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/CampaignManager.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class CampaignManager implements CampaignService { 4 | 5 | @Override 6 | public void addCampaign(Game game, Order order,Campaign campaign) { 7 | System.out.println("Seçili indirim uygulandı: "+campaign.getCampaignName()+". Oyunun ücreti: "+game.getPrice() + "TL. Oyunun indirimden sonraki ücreti: "+(game.getPrice()-(game.getPrice()*campaign.getDiscount()/100))+" TL"); 8 | 9 | } 10 | 11 | @Override 12 | public void updateCampaign(Game game, Order order) { 13 | System.out.println("Kampanya bilgileri güncellendi."); 14 | 15 | } 16 | 17 | @Override 18 | public void deleteCampaign(Game game, Order order) { 19 | System.out.println("Kampanya kaldırıldı."); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/CampaignService.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface CampaignService { 4 | void addCampaign(Game game,Order order,Campaign campaign); 5 | void updateCampaign(Game game,Order order); 6 | void deleteCampaign(Game game, Order order); 7 | } 8 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/Entity.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/Game.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class Game implements Entity { 4 | private int gameId; 5 | private int playerId; 6 | private String gameName; 7 | private String gameInfo; 8 | private double price; 9 | 10 | public Game() { 11 | super(); 12 | } 13 | public Game(int gameId, int playerId, String gameName, String gameInfo, double price) { 14 | super(); 15 | this.gameId = gameId; 16 | this.playerId = playerId; 17 | this.gameName = gameName; 18 | this.gameInfo = gameInfo; 19 | this.price = price; 20 | } 21 | public int getGameId() { 22 | return gameId; 23 | } 24 | public void setGameId(int gameId) { 25 | this.gameId = gameId; 26 | } 27 | public int getPlayerId() { 28 | return playerId; 29 | } 30 | public void setPlayerId(int playerId) { 31 | this.playerId = playerId; 32 | } 33 | public String getGameName() { 34 | return gameName; 35 | } 36 | public void setGameName(String gameName) { 37 | this.gameName = gameName; 38 | } 39 | public String getGameInfo() { 40 | return gameInfo; 41 | } 42 | public void setGameInfo(String gameInfo) { 43 | this.gameInfo = gameInfo; 44 | } 45 | public double getPrice() { 46 | return price; 47 | } 48 | public void setPrice(double price) { 49 | this.price = price; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/Main.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | 7 | PersonCheckService playerCheckService=new MernisServiceAdapter(); 8 | Salesman salesman=new Salesman(); 9 | salesman.setFirstName("Reyhan"); 10 | Player player=new Player(); 11 | player.setDateOfYear(1994); 12 | player.setFirstName("Gonca"); 13 | player.setLastName("Bal"); 14 | player.setNationalIdentity("13131313133"); 15 | player.setUserId(1); 16 | player.setPlayerId(1); 17 | player.setMailadress("goncabal@gmail.com"); 18 | player.setPassword("1234"); 19 | PlayerManager playerManager=new PlayerManager(playerCheckService); 20 | playerManager.createAccount(player); 21 | UserManager userManager=new UserManager(); 22 | userManager.signIn(player); 23 | userManager.signIn(salesman); 24 | 25 | Game game=new Game(); 26 | game.setGameId(1); 27 | game.setGameName("Legendary"); 28 | game.setPrice(100); 29 | 30 | Order order=new Order(); 31 | order.setGameId(1); 32 | order.setOrderId(1); 33 | 34 | 35 | Campaign campaign=new Campaign(); 36 | campaign.setCampaignName("Bahar İndirimi"); 37 | campaign.setDiscount(20); 38 | 39 | CampaignManager campaignManager=new CampaignManager(); 40 | campaignManager.addCampaign(game, order,campaign); 41 | 42 | OrderManager orderManager=new OrderManager(campaignManager); 43 | orderManager.buy(player, salesman, game); 44 | 45 | 46 | 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 4 | 5 | public class MernisServiceAdapter implements PersonCheckService { 6 | 7 | @Override 8 | public boolean checkIfRealPerson(Player player) { 9 | 10 | KPSPublicSoapProxy client = new KPSPublicSoapProxy(); 11 | 12 | try { 13 | return client.TCKimlikNoDogrula(Long.parseLong(player.getNationalIdentity()), 14 | player.getFirstName().toUpperCase(), player.getLastName().toUpperCase(), player.getDateOfYear()); 15 | } catch (Exception e) { 16 | return false; 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/Order.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class Order implements Entity { 4 | private int orderId; 5 | private int gameId; 6 | private int playerId; 7 | private int salesmanId; 8 | 9 | 10 | public Order() {} 11 | 12 | public Order(int orderId, int gameId, int playerId, int salesmanId, double totalPrice) { 13 | super(); 14 | this.orderId = orderId; 15 | this.gameId = gameId; 16 | this.playerId = playerId; 17 | this.salesmanId = salesmanId; 18 | 19 | } 20 | 21 | public int getOrderId() { 22 | return orderId; 23 | } 24 | 25 | public void setOrderId(int orderId) { 26 | this.orderId = orderId; 27 | } 28 | 29 | public int getGameId() { 30 | return gameId; 31 | } 32 | 33 | public void setGameId(int gameId) { 34 | this.gameId = gameId; 35 | } 36 | 37 | public int getPlayerId() { 38 | return playerId; 39 | } 40 | 41 | public void setPlayerId(int playerId) { 42 | this.playerId = playerId; 43 | } 44 | 45 | public int getSalesmanId() { 46 | return salesmanId; 47 | } 48 | 49 | public void setSalesmanId(int salesmanId) { 50 | this.salesmanId = salesmanId; 51 | } 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/OrderManager.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class OrderManager implements OrderService { 4 | CampaignService campaignService; 5 | 6 | public OrderManager(CampaignService campaignService) { 7 | super(); 8 | this.campaignService = campaignService; 9 | } 10 | 11 | @Override 12 | public void buy(Player player, Salesman salesman,Game game) { 13 | System.out.println(player.getFirstName()+" adlı kullanıcı "+ game.getGameName() +" adlı oyunu satın aldı. İşlemi yapan: "+salesman.getFirstName()); 14 | 15 | } 16 | 17 | @Override 18 | public void addToCart(Game game) { 19 | System.out.println(game.getGameName()+" sepete eklendi. Oyunun ücreti: "+game.getPrice()); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/OrderService.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface OrderService { 4 | void buy(Player player,Salesman salesman,Game game); 5 | void addToCart(Game game); 6 | } 7 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/PersonCheckService.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface PersonCheckService { 4 | 5 | boolean checkIfRealPerson(Player player); 6 | } 7 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/Player.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class Player extends User implements Entity { 4 | private int playerId; 5 | private String nationalIdentity; 6 | private String firstName; 7 | private String lastName; 8 | private int dateOfYear; 9 | 10 | public Player() { 11 | super(); 12 | } 13 | 14 | public Player(int userId, int playerId, String mailadress, String password, String nationalIdentity, 15 | String firstName, String lastName, int dateOfYear) { 16 | super(userId, mailadress, password); 17 | this.playerId = playerId; 18 | this.nationalIdentity = nationalIdentity; 19 | this.firstName = firstName; 20 | this.lastName = lastName; 21 | this.dateOfYear = dateOfYear; 22 | } 23 | 24 | public int getPlayerId() { 25 | return playerId; 26 | } 27 | 28 | public void setPlayerId(int playerId) { 29 | this.playerId = playerId; 30 | } 31 | 32 | public String getNationalIdentity() { 33 | return nationalIdentity; 34 | } 35 | 36 | public void setNationalIdentity(String nationalIdentity) { 37 | this.nationalIdentity = nationalIdentity; 38 | } 39 | 40 | public String getFirstName() { 41 | return firstName; 42 | } 43 | 44 | public void setFirstName(String firstName) { 45 | this.firstName = firstName; 46 | } 47 | 48 | public String getLastName() { 49 | return lastName; 50 | } 51 | 52 | public void setLastName(String lastName) { 53 | this.lastName = lastName; 54 | } 55 | 56 | public int getDateOfYear() { 57 | return dateOfYear; 58 | } 59 | 60 | public void setDateOfYear(int dateOfYear) { 61 | this.dateOfYear = dateOfYear; 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /gameProject/src/gameProject/PlayerCheckManager.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class PlayerCheckManager implements PersonCheckService { 4 | 5 | @Override 6 | public boolean checkIfRealPerson(Player player) { 7 | return true; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/PlayerManager.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class PlayerManager implements PlayerService{ 4 | 5 | private PersonCheckService personCheckService; 6 | 7 | public PlayerManager(PersonCheckService personCheckService) { 8 | super(); 9 | this.personCheckService = personCheckService; 10 | } 11 | 12 | @Override 13 | public void createAccount(Player player) { 14 | if (personCheckService.checkIfRealPerson(player)) { 15 | System.out.println("Your account has been created successfully."); 16 | } else { 17 | System.out.println("Not a valid person!"); 18 | } 19 | 20 | } 21 | 22 | @Override 23 | public void updateInfo(Player player) { 24 | 25 | System.out.println("Your information has been updated successfully."); 26 | 27 | } 28 | 29 | @Override 30 | public void deleteAccount(Player player) { 31 | 32 | System.out.println("Your account has been deleted successfully."); 33 | } 34 | 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/PlayerService.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface PlayerService { 4 | void createAccount(Player player); 5 | void updateInfo(Player player); 6 | void deleteAccount(Player player); 7 | } 8 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/Salesman.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class Salesman extends User implements Entity { 4 | private int salesmanId; 5 | private String nationalIdentity; 6 | private String firstName; 7 | private String lastName; 8 | private int dateOfYear; 9 | 10 | public Salesman() { 11 | super(); 12 | } 13 | 14 | public Salesman(int userId, int salesmanId,String firstName, String lastName,String nationalIdentity , int dateOfYear,String mailadress, String password) { 15 | super(userId,mailadress,password); 16 | this.salesmanId = salesmanId; 17 | this.nationalIdentity = nationalIdentity; 18 | this.firstName = firstName; 19 | this.lastName = lastName; 20 | this.dateOfYear = dateOfYear; 21 | } 22 | 23 | public int getSalesmanId() { 24 | return salesmanId; 25 | } 26 | 27 | public void setSalesmanId(int salesmanId) { 28 | this.salesmanId = salesmanId; 29 | } 30 | 31 | public String getNationalIdentity() { 32 | return nationalIdentity; 33 | } 34 | 35 | public void setNationalIdentity(String nationalIdentity) { 36 | this.nationalIdentity = nationalIdentity; 37 | } 38 | 39 | public String getFirstName() { 40 | return firstName; 41 | } 42 | 43 | public void setFirstName(String firstName) { 44 | this.firstName = firstName; 45 | } 46 | 47 | public String getLastName() { 48 | return lastName; 49 | } 50 | 51 | public void setLastName(String lastName) { 52 | this.lastName = lastName; 53 | } 54 | 55 | public int getDateOfYear() { 56 | return dateOfYear; 57 | } 58 | 59 | public void setDateOfYear(int dateOfYear) { 60 | this.dateOfYear = dateOfYear; 61 | } 62 | } -------------------------------------------------------------------------------- /gameProject/src/gameProject/SalesmanManager.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class SalesmanManager implements SalesmanService { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/SalesmanService.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface SalesmanService { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/User.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class User implements Entity { 4 | 5 | private int userId; 6 | private String mailadress; 7 | private String password; 8 | 9 | public User() {} 10 | 11 | public User(int userId, String mailadress, String password) { 12 | super(); 13 | this.userId = userId; 14 | this.mailadress = mailadress; 15 | this.password = password; 16 | } 17 | 18 | public int getUserId() { 19 | return userId; 20 | } 21 | 22 | public void setUserId(int userId) { 23 | this.userId = userId; 24 | } 25 | 26 | public String getMailadress() { 27 | return mailadress; 28 | } 29 | 30 | public void setMailadress(String mailadress) { 31 | this.mailadress = mailadress; 32 | } 33 | 34 | public String getPassword() { 35 | return password; 36 | } 37 | 38 | public void setPassword(String password) { 39 | this.password = password; 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /gameProject/src/gameProject/UserManager.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public class UserManager implements UserService { 4 | 5 | @Override 6 | public void signIn(User user) { 7 | System.out.println("Login successful"); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /gameProject/src/gameProject/UserService.java: -------------------------------------------------------------------------------- 1 | package gameProject; 2 | 3 | public interface UserService { 4 | void signIn(User user); 5 | } 6 | -------------------------------------------------------------------------------- /gameProject/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 | -------------------------------------------------------------------------------- /gameProject/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 | -------------------------------------------------------------------------------- /gameProject/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 | -------------------------------------------------------------------------------- /gameProject/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 | } -------------------------------------------------------------------------------- /gameProject/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 | -------------------------------------------------------------------------------- /gameStoreProject/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gameStoreProject/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | gameStoreProject 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jem.workbench.JavaEMFNature 16 | org.eclipse.jdt.core.javanature 17 | 18 | 19 | -------------------------------------------------------------------------------- /gameStoreProject/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublic.java=UTF-8 3 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java=UTF-8 4 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java=UTF-8 5 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java=UTF-8 6 | -------------------------------------------------------------------------------- /gameStoreProject/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=disabled 14 | org.eclipse.jdt.core.compiler.source=1.8 15 | -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/Main.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/abstracts/CampaignService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/abstracts/CampaignService.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/abstracts/PersonCheckService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/abstracts/PersonCheckService.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/abstracts/PlayerService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/abstracts/PlayerService.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/abstracts/SaleService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/abstracts/SaleService.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/concretes/CampaignManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/concretes/CampaignManager.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/concretes/PersonCheckManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/concretes/PersonCheckManager.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/concretes/PlayerManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/concretes/PlayerManager.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/business/concretes/SaleManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/business/concretes/SaleManager.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/core/adapters/MernisServiceAdapter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/core/adapters/MernisServiceAdapter.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/entities/concretes/Campaign.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/entities/concretes/Campaign.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/entities/concretes/Game.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/entities/concretes/Game.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/entities/concretes/Player.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/entities/concretes/Player.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/entities/concretes/Sale.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/entities/concretes/Sale.class -------------------------------------------------------------------------------- /gameStoreProject/bin/gameStoreProject/entities/concretes/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/gameStoreProject/entities/concretes/User.class -------------------------------------------------------------------------------- /gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublic.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublic.class -------------------------------------------------------------------------------- /gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.class -------------------------------------------------------------------------------- /gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.class -------------------------------------------------------------------------------- /gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.class -------------------------------------------------------------------------------- /gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/gameStoreProject/bin/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.class -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/Main.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject; 2 | 3 | import gameStoreProject.business.concretes.CampaignManager; 4 | import gameStoreProject.business.concretes.PlayerManager; 5 | import gameStoreProject.business.concretes.SaleManager; 6 | import gameStoreProject.core.adapters.MernisServiceAdapter; 7 | import gameStoreProject.entities.concretes.Campaign; 8 | import gameStoreProject.entities.concretes.Game; 9 | import gameStoreProject.entities.concretes.Player; 10 | import gameStoreProject.entities.concretes.Sale; 11 | 12 | public class Main { 13 | 14 | public static void main(String[] args) { 15 | 16 | PlayerManager playerManager = new PlayerManager(new MernisServiceAdapter()); 17 | SaleManager saleManager=new SaleManager(); 18 | CampaignManager campaignManager=new CampaignManager(); 19 | 20 | Player player = new Player(1, "Gonca", "Bal", 1994, "13513513535"); 21 | 22 | playerManager.save(player); 23 | 24 | Game game=new Game(1, "Stardew Valley", 50); 25 | Sale sale=new Sale(1,1); 26 | ; 27 | 28 | 29 | Campaign campaign =new Campaign(1, "Yaz indirimi", 20, 3); 30 | campaignManager.add(campaign); 31 | 32 | saleManager.sale(player,game,campaign); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/abstracts/CampaignService.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.abstracts; 2 | 3 | import gameStoreProject.entities.concretes.Campaign; 4 | 5 | public interface CampaignService { 6 | void add(Campaign campaign); 7 | void update(Campaign campaign); 8 | void delete(Campaign campaign); 9 | } 10 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/abstracts/PersonCheckService.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.abstracts; 2 | 3 | import gameStoreProject.entities.concretes.Player; 4 | 5 | public interface PersonCheckService { 6 | boolean checkIfRealPerson(Player player); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/abstracts/PlayerService.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.abstracts; 2 | 3 | import gameStoreProject.entities.concretes.Player; 4 | 5 | public interface PlayerService { 6 | void save(Player player); 7 | void update(Player player); 8 | void delete(Player player); 9 | } 10 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/abstracts/SaleService.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.abstracts; 2 | 3 | import gameStoreProject.entities.concretes.Campaign; 4 | import gameStoreProject.entities.concretes.Game; 5 | import gameStoreProject.entities.concretes.Player; 6 | 7 | public interface SaleService { 8 | void sale(Player player,Game game,Campaign campaign); 9 | } 10 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/concretes/CampaignManager.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.concretes; 2 | 3 | import gameStoreProject.business.abstracts.CampaignService; 4 | import gameStoreProject.entities.concretes.Campaign; 5 | 6 | public class CampaignManager implements CampaignService { 7 | 8 | @Override 9 | public void add(Campaign campaign) { 10 | System.out.println("Kampanya "+campaign.getCampaignDuration() +" ay süreliğine eklendi! "+campaign.getCampaignName()); 11 | } 12 | 13 | @Override 14 | public void update(Campaign campaign) { 15 | System.out.println("Kampanya bilgileri güncellendi: "+campaign.getCampaignName()); 16 | } 17 | 18 | @Override 19 | public void delete(Campaign campaign) { 20 | System.out.println("Kampanya silindi! "+campaign.getCampaignName()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/concretes/PersonCheckManager.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.concretes; 2 | 3 | import gameStoreProject.business.abstracts.PersonCheckService; 4 | import gameStoreProject.entities.concretes.Player; 5 | 6 | public class PersonCheckManager implements PersonCheckService { 7 | 8 | @Override 9 | public boolean checkIfRealPerson(Player player) { 10 | return true; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/concretes/PlayerManager.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.concretes; 2 | 3 | import gameStoreProject.business.abstracts.PersonCheckService; 4 | import gameStoreProject.business.abstracts.PlayerService; 5 | import gameStoreProject.entities.concretes.Player; 6 | 7 | public class PlayerManager implements PlayerService{ 8 | 9 | PersonCheckService personCheckService; 10 | 11 | public PlayerManager(PersonCheckService personCheckService) { 12 | super(); 13 | this.personCheckService = personCheckService; 14 | } 15 | 16 | @Override 17 | public void save(Player player) { 18 | if (personCheckService.checkIfRealPerson(player)) { 19 | System.out.println("Kayıt olundu! Hoşgeldin "+player.getFirstName()+" !"); 20 | } else { 21 | System.out.println("Not a valid person!"); 22 | } 23 | 24 | } 25 | 26 | @Override 27 | public void update(Player player) { 28 | System.out.println("Bilgiler güncellendi!"); 29 | 30 | } 31 | 32 | @Override 33 | public void delete(Player player) { 34 | System.out.println("Kayıt silindi."); 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/business/concretes/SaleManager.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.business.concretes; 2 | 3 | import gameStoreProject.business.abstracts.SaleService; 4 | import gameStoreProject.entities.concretes.Campaign; 5 | import gameStoreProject.entities.concretes.Game; 6 | import gameStoreProject.entities.concretes.Player; 7 | 8 | public class SaleManager implements SaleService { 9 | 10 | 11 | @Override 12 | public void sale(Player player,Game game,Campaign campaign) { 13 | System.out.println(game.getGameName()+" için siparişiniz alındı! Sevgili "+player.getFirstName()+"! "+campaign.getCampaignName()+" kampanyası uygulandı!"); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/core/adapters/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.core.adapters; 2 | 3 | import gameStoreProject.business.abstracts.PersonCheckService; 4 | import gameStoreProject.entities.concretes.Player; 5 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 6 | 7 | public class MernisServiceAdapter implements PersonCheckService { 8 | 9 | @Override 10 | public boolean checkIfRealPerson(Player player) { 11 | KPSPublicSoapProxy client = new KPSPublicSoapProxy(); 12 | try { 13 | return client.TCKimlikNoDogrula(Long.parseLong(player.getNationalityIdentity()), 14 | player.getFirstName().toUpperCase(), player.getLastName().toUpperCase(), player.getDateOfBirth()); 15 | 16 | } catch (Exception e) { 17 | return false; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/entities/concretes/Campaign.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.entities.concretes; 2 | 3 | public class Campaign extends Game { 4 | private int id; 5 | private String campaignName; 6 | private double discount; 7 | private int campaignDuration; 8 | 9 | public Campaign() { 10 | super(); 11 | } 12 | public Campaign(int id, String campaignName, double discount, int campaignDuration) { 13 | super(); 14 | this.id = id; 15 | this.campaignName = campaignName; 16 | this.discount = discount; 17 | this.campaignDuration = campaignDuration; 18 | } 19 | public Campaign(int id, String gameName, double unitPrice) { 20 | super(id, gameName, unitPrice); 21 | } 22 | public int getId() { 23 | return id; 24 | } 25 | public void setId(int id) { 26 | this.id = id; 27 | } 28 | public String getCampaignName() { 29 | return campaignName; 30 | } 31 | public void setCampaignName(String campaignName) { 32 | this.campaignName = campaignName; 33 | } 34 | public double getDiscount() { 35 | return discount; 36 | } 37 | public void setDiscount(double discount) { 38 | this.discount = discount; 39 | } 40 | public int getCampaignDuration() { 41 | return campaignDuration; 42 | } 43 | public void setCampaignDuration(int campaignDuration) { 44 | this.campaignDuration = campaignDuration; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/entities/concretes/Game.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.entities.concretes; 2 | 3 | public class Game { 4 | private int id; 5 | private String gameName; 6 | private double unitPrice; 7 | 8 | public Game() { 9 | }; 10 | 11 | public Game(int id, String gameName, double unitPrice) { 12 | super(); 13 | this.id = id; 14 | this.gameName = gameName; 15 | this.unitPrice = unitPrice; 16 | } 17 | 18 | public int getId() { 19 | return id; 20 | } 21 | 22 | public void setId(int id) { 23 | this.id = id; 24 | } 25 | 26 | public String getGameName() { 27 | return gameName; 28 | } 29 | 30 | public void setGameName(String gameName) { 31 | this.gameName = gameName; 32 | } 33 | 34 | public double getUnitPrice() { 35 | return unitPrice; 36 | } 37 | 38 | public void setUnitPrice(double unitPrice) { 39 | this.unitPrice = unitPrice; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/entities/concretes/Player.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.entities.concretes; 2 | 3 | public class Player extends User { 4 | private int playerId; 5 | private String firstName; 6 | private String lastName; 7 | private int dateOfBirth; 8 | private String nationalityIdentity; 9 | public Player() { 10 | super(); 11 | } 12 | public Player(int playerId, String firstName, String lastName, int dateOfBirth, String nationalityIdentity) { 13 | super(); 14 | this.playerId = playerId; 15 | this.firstName = firstName; 16 | this.lastName = lastName; 17 | this.dateOfBirth = dateOfBirth; 18 | this.nationalityIdentity = nationalityIdentity; 19 | } 20 | public int getPlayerId() { 21 | return playerId; 22 | } 23 | public void setPlayerId(int playerId) { 24 | this.playerId = playerId; 25 | } 26 | public String getFirstName() { 27 | return firstName; 28 | } 29 | public void setFirstName(String firstName) { 30 | this.firstName = firstName; 31 | } 32 | public String getLastName() { 33 | return lastName; 34 | } 35 | public void setLastName(String lastName) { 36 | this.lastName = lastName; 37 | } 38 | public int getDateOfBirth() { 39 | return dateOfBirth; 40 | } 41 | public void setDateOfBirth(int dateOfBirth) { 42 | this.dateOfBirth = dateOfBirth; 43 | } 44 | public String getNationalityIdentity() { 45 | return nationalityIdentity; 46 | } 47 | public void setNationalityIdentity(String nationalityIdentity) { 48 | this.nationalityIdentity = nationalityIdentity; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/entities/concretes/Sale.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.entities.concretes; 2 | 3 | public class Sale extends Game { 4 | private int id; 5 | private int quantity; 6 | 7 | public Sale() {} 8 | 9 | public Sale(int id, int quantity) { 10 | super(); 11 | this.id = id; 12 | this.quantity = quantity; 13 | } 14 | public Sale(int id, String gameName, double unitPrice) { 15 | super(id, gameName, unitPrice); 16 | }; 17 | 18 | public int getId() { 19 | return id; 20 | } 21 | 22 | public void setId(int id) { 23 | this.id = id; 24 | } 25 | 26 | public int getQuantity() { 27 | return quantity; 28 | } 29 | 30 | public void setQuantity(int quantity) { 31 | this.quantity = quantity; 32 | } 33 | 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /gameStoreProject/src/gameStoreProject/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package gameStoreProject.entities.concretes; 2 | 3 | public class User { 4 | private int id; 5 | private String mailAdress; 6 | private String password; 7 | public User() { 8 | super(); 9 | } 10 | public User(int id, String mailAdress, String password) { 11 | super(); 12 | this.id = id; 13 | this.mailAdress = mailAdress; 14 | this.password = password; 15 | } 16 | public int getId() { 17 | return id; 18 | } 19 | public void setId(int id) { 20 | this.id = id; 21 | } 22 | public String getMailAdress() { 23 | return mailAdress; 24 | } 25 | public void setMailAdress(String mailAdress) { 26 | this.mailAdress = mailAdress; 27 | } 28 | public String getPassword() { 29 | return password; 30 | } 31 | public void setPassword(String password) { 32 | this.password = password; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gameStoreProject/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 | -------------------------------------------------------------------------------- /gameStoreProject/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 | -------------------------------------------------------------------------------- /gameStoreProject/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 | -------------------------------------------------------------------------------- /gameStoreProject/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 | } -------------------------------------------------------------------------------- /gameStoreProject/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 | -------------------------------------------------------------------------------- /hrms/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /hrms/.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import java.net.*; 17 | import java.io.*; 18 | import java.nio.channels.*; 19 | import java.util.Properties; 20 | 21 | public class MavenWrapperDownloader { 22 | 23 | private static final String WRAPPER_VERSION = "0.5.6"; 24 | /** 25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 26 | */ 27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; 29 | 30 | /** 31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 32 | * use instead of the default one. 33 | */ 34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 35 | ".mvn/wrapper/maven-wrapper.properties"; 36 | 37 | /** 38 | * Path where the maven-wrapper.jar will be saved to. 39 | */ 40 | private static final String MAVEN_WRAPPER_JAR_PATH = 41 | ".mvn/wrapper/maven-wrapper.jar"; 42 | 43 | /** 44 | * Name of the property which should be used to override the default download url for the wrapper. 45 | */ 46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 47 | 48 | public static void main(String args[]) { 49 | System.out.println("- Downloader started"); 50 | File baseDirectory = new File(args[0]); 51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 52 | 53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 54 | // wrapperUrl parameter. 55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 56 | String url = DEFAULT_DOWNLOAD_URL; 57 | if(mavenWrapperPropertyFile.exists()) { 58 | FileInputStream mavenWrapperPropertyFileInputStream = null; 59 | try { 60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 61 | Properties mavenWrapperProperties = new Properties(); 62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 64 | } catch (IOException e) { 65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 66 | } finally { 67 | try { 68 | if(mavenWrapperPropertyFileInputStream != null) { 69 | mavenWrapperPropertyFileInputStream.close(); 70 | } 71 | } catch (IOException e) { 72 | // Ignore ... 73 | } 74 | } 75 | } 76 | System.out.println("- Downloading from: " + url); 77 | 78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 79 | if(!outputFile.getParentFile().exists()) { 80 | if(!outputFile.getParentFile().mkdirs()) { 81 | System.out.println( 82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 83 | } 84 | } 85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 86 | try { 87 | downloadFileFromURL(url, outputFile); 88 | System.out.println("Done"); 89 | System.exit(0); 90 | } catch (Throwable e) { 91 | System.out.println("- Error downloading"); 92 | e.printStackTrace(); 93 | System.exit(1); 94 | } 95 | } 96 | 97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 99 | String username = System.getenv("MVNW_USERNAME"); 100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 101 | Authenticator.setDefault(new Authenticator() { 102 | @Override 103 | protected PasswordAuthentication getPasswordAuthentication() { 104 | return new PasswordAuthentication(username, password); 105 | } 106 | }); 107 | } 108 | URL website = new URL(urlString); 109 | ReadableByteChannel rbc; 110 | rbc = Channels.newChannel(website.openStream()); 111 | FileOutputStream fos = new FileOutputStream(destination); 112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 113 | fos.close(); 114 | rbc.close(); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /hrms/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/hrms/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /hrms/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /hrms/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 | -------------------------------------------------------------------------------- /hrms/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /hrms/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.5.0 10 | 11 | 12 | kodlamaio 13 | hrms 14 | 0.0.1-SNAPSHOT 15 | hrms 16 | Demo project for Spring Boot 17 | 18 | 11 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-web 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-devtools 33 | runtime 34 | true 35 | 36 | 37 | org.postgresql 38 | postgresql 39 | runtime 40 | 41 | 42 | org.projectlombok 43 | lombok 44 | true 45 | 46 | 47 | org.springframework.boot 48 | spring-boot-starter-test 49 | test 50 | 51 | 52 | io.springfox 53 | springfox-swagger2 54 | 2.9.2 55 | 56 | 57 | io.springfox 58 | springfox-swagger-ui 59 | 2.9.2 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | org.springframework.boot 69 | spring-boot-maven-plugin 70 | 71 | 72 | 73 | org.projectlombok 74 | lombok 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/HrmsApplication.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | @SpringBootApplication 13 | @EnableSwagger2 14 | public class HrmsApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(HrmsApplication.class, args); 18 | } 19 | @Bean 20 | public Docket api() { 21 | return new Docket(DocumentationType.SWAGGER_2).select() 22 | .apis(RequestHandlerSelectors.basePackage("kodlamaio.hrms")) 23 | .build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/api/controllers/JobPositionsController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.api.controllers; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import kodlamaio.hrms.business.abstracts.JobPositionService; 13 | import kodlamaio.hrms.core.utilities.results.DataResult; 14 | import kodlamaio.hrms.core.utilities.results.Result; 15 | import kodlamaio.hrms.entitites.concretes.JobPosition; 16 | 17 | @RestController 18 | @RequestMapping("/api/job_positions") 19 | public class JobPositionsController { 20 | 21 | private JobPositionService jobPositionService; 22 | 23 | @Autowired 24 | public JobPositionsController(JobPositionService jobPositionService) { 25 | super(); 26 | this.jobPositionService = jobPositionService; 27 | } 28 | 29 | @GetMapping("/getall") 30 | public DataResult> getAll(){ 31 | return this.jobPositionService.getAll(); 32 | } 33 | 34 | @PostMapping("/add") 35 | public Result add(@RequestBody JobPosition jobPosition) { 36 | return this.jobPositionService.add(jobPosition); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/abstracts/JobPositionService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import kodlamaio.hrms.core.utilities.results.DataResult; 6 | import kodlamaio.hrms.core.utilities.results.Result; 7 | import kodlamaio.hrms.entitites.concretes.JobPosition; 8 | 9 | public interface JobPositionService { 10 | DataResult> getAll(); 11 | Result add(JobPosition jobPosition); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/business/concretes/JobPositionManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import kodlamaio.hrms.business.abstracts.JobPositionService; 9 | 10 | import kodlamaio.hrms.core.utilities.results.DataResult; 11 | import kodlamaio.hrms.core.utilities.results.Result; 12 | import kodlamaio.hrms.core.utilities.results.SuccessDataResult; 13 | import kodlamaio.hrms.core.utilities.results.SuccessResult; 14 | import kodlamaio.hrms.dataAccess.abstracts.JobPositionDao; 15 | import kodlamaio.hrms.entitites.concretes.JobPosition; 16 | 17 | @Service 18 | public class JobPositionManager implements JobPositionService { 19 | 20 | private JobPositionDao jobPositionDao; 21 | 22 | @Autowired 23 | public JobPositionManager(JobPositionDao jobPositionDao) { 24 | super(); 25 | this.jobPositionDao = jobPositionDao; 26 | } 27 | 28 | @Override 29 | public DataResult> getAll() { 30 | return new SuccessDataResult>(this.jobPositionDao.findAll(), "Data listelendi"); 31 | } 32 | 33 | @Override 34 | public Result add(JobPosition jobPosition) { 35 | this.jobPositionDao.save(jobPosition); 36 | return new SuccessResult("Ürün eklendi"); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class DataResult extends Result{ 4 | 5 | private T data; 6 | 7 | public DataResult(T data,boolean success, String message) { 8 | super(success, message); 9 | this.data=data; 10 | } 11 | public DataResult(T data,boolean success) { 12 | super(success); 13 | this.data=data; 14 | } 15 | public T getData() { 16 | return this.data; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class ErrorDataResult extends DataResult { 4 | 5 | public ErrorDataResult(T data,String message) { 6 | super(data, false,message); 7 | 8 | } 9 | public ErrorDataResult(T data) { 10 | super(data,false); 11 | } 12 | public ErrorDataResult(String message) { 13 | super(null,false,message); 14 | } 15 | public ErrorDataResult() { 16 | super(null,false); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class ErrorResult extends Result { 4 | public ErrorResult() { 5 | super(false); 6 | } 7 | public ErrorResult(String message) { 8 | super(false,message); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class Result { 4 | private boolean success; 5 | private String message; 6 | 7 | public Result(boolean success) { 8 | this.success=success; 9 | } 10 | public Result(boolean success, String message) { 11 | this(success); 12 | this.message=message; 13 | } 14 | public boolean isSuccess() { 15 | return this.success; 16 | } 17 | public String getMessage() { 18 | return this.message; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class SuccessDataResult extends DataResult { 4 | 5 | public SuccessDataResult(T data,String message) { 6 | super(data, true,message); 7 | 8 | } 9 | public SuccessDataResult(T data) { 10 | super(data,true); 11 | } 12 | public SuccessDataResult(String message) { 13 | super(null,true,message); 14 | } 15 | public SuccessDataResult() { 16 | super(null,true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.core.utilities.results; 2 | 3 | public class SuccessResult extends Result{ 4 | public SuccessResult() { 5 | super(true); 6 | } 7 | public SuccessResult(String message) { 8 | super(true,message); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/dataAccess/abstracts/JobPositionDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.dataAccess.abstracts; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.hrms.entitites.concretes.JobPosition; 6 | 7 | public interface JobPositionDao extends JpaRepository{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /hrms/src/main/java/kodlamaio/hrms/entitites/concretes/JobPosition.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms.entitites.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import lombok.AllArgsConstructor; 11 | import lombok.Data; 12 | import lombok.NoArgsConstructor; 13 | 14 | @Data 15 | @Entity 16 | @Table(name="job_positions") 17 | @AllArgsConstructor 18 | @NoArgsConstructor 19 | public class JobPosition { 20 | 21 | @Id 22 | @GeneratedValue(strategy = GenerationType.IDENTITY) 23 | @Column(name="id") 24 | private int id; 25 | 26 | @Column(name="employee_id") 27 | private int employeeId; 28 | 29 | @Column(name="job_title") 30 | private String jobTitle; 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /hrms/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect 3 | spring.jpa.hibernate.ddl-auto=update 4 | spring.jpa.hibernate.show-sql=true 5 | spring.datasource.url=jdbc:postgresql://localhost:5432/hrms 6 | spring.datasource.username=postgres 7 | spring.datasource.password=1234 8 | spring.jpa.properties.javax.persistence.validation.mode = none 9 | -------------------------------------------------------------------------------- /hrms/src/test/java/kodlamaio/hrms/HrmsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.hrms; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class HrmsApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /oopIntroHomework/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /oopIntroHomework/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | oopIntroHomework 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /oopIntroHomework/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/Course.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/Course.class -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/CourseManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/CourseManager.class -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/Instructor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/Instructor.class -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/InstructorManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/InstructorManager.class -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/Main.class -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/User.class -------------------------------------------------------------------------------- /oopIntroHomework/bin/oopIntroHomework/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopIntroHomework/bin/oopIntroHomework/UserManager.class -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/Course.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | public class Course { 4 | public Course(int id, String name, String instructorFirstName, String instructorLastName,String info) { 5 | super(); 6 | this.id = id; 7 | this.name = name; 8 | this.instructorFirstName = instructorFirstName; 9 | this.instructorLastName=instructorLastName; 10 | this.info = info; 11 | } 12 | public Course() {} 13 | int id; 14 | String name; 15 | String instructorFirstName; 16 | String instructorLastName; 17 | String info; 18 | } 19 | -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/CourseManager.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | public class CourseManager { 4 | public void addCourse(Course course) { 5 | System.out.println("Kurs listeye eklendi."); 6 | } 7 | 8 | public void deleteCourse(Course course) { 9 | System.out.println("Kurs listeden silindi."); 10 | } 11 | 12 | public void updateCourse(Course course) { 13 | System.out.println("Kurs adı güncellendi."); 14 | } 15 | 16 | public void addInfo(Course course) { 17 | System.out.println(course.name+" infosu başarıyla eklendi."); 18 | } 19 | 20 | public void updateInfo(Course course) { 21 | System.out.println(course.name+" infosu güncellendi."); 22 | } 23 | 24 | public void deleteInfo(Course course) { 25 | System.out.println(course.name+" info bilgisi silindi."); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/Instructor.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | public class Instructor { 4 | 5 | public Instructor() { } 6 | 7 | public Instructor(int id, String firstname, String lastName, String mail) { 8 | super(); 9 | this.id = id; 10 | this.firstname = firstname; 11 | this.lastName = lastName; 12 | this.mail = mail; 13 | } 14 | int id; 15 | String firstname; 16 | String lastName; 17 | String mail; 18 | } 19 | -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/InstructorManager.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | 4 | public class InstructorManager { 5 | 6 | private Instructor instructor; 7 | public InstructorManager(Instructor instructor) { 8 | this.instructor=instructor; 9 | } 10 | 11 | 12 | public void addToInstructor(Course course) { 13 | System.out.println(course.name+" hocası "+instructor.firstname+" "+instructor.lastName+" olarak eklendi."); 14 | } 15 | public void updateToInstructor(Course course) { 16 | System.out.println(course.name+" hocası "+instructor.firstname+" "+instructor.lastName+"olarak güncellendi."); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/Main.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | Course course1 = new Course(1, "C# + ANGULAR Kursu", "Engin", "Demiroğ", " "); 7 | Course course2 = new Course(2, "JAVA + REACT Kursu", "Engin", "Demiroğ", " "); 8 | Course[] courses = { course1, course2 }; 9 | for (Course course : courses) { 10 | System.out.println(course.name); 11 | } 12 | CourseManager courseManager = new CourseManager(); 13 | courseManager.addInfo(course2); 14 | Instructor instructor1 = new Instructor(1, "Engin", "Demiroğ", "engindemirog@gmail.com"); 15 | 16 | InstructorManager instructorManager=new InstructorManager(instructor1); 17 | instructorManager.addToInstructor(course1); 18 | 19 | User user1=new User(1, "Gonca", "goncabal@gmail.com", "1234"); 20 | 21 | UserManager userManager=new UserManager(); 22 | userManager.updateUserInfo(user1); 23 | 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/User.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | public class User { 4 | 5 | public User(int userId,String userName,String userMail,String userPassword) { 6 | this.userId=userId; 7 | this.userName=userName; 8 | this.userMail=userMail; 9 | this.userPassword=userPassword; 10 | } 11 | public User() { } 12 | 13 | int userId; 14 | String userName; 15 | String userMail; 16 | String userPassword; 17 | } 18 | -------------------------------------------------------------------------------- /oopIntroHomework/src/oopIntroHomework/UserManager.java: -------------------------------------------------------------------------------- 1 | package oopIntroHomework; 2 | 3 | public class UserManager { 4 | public void updateUserInfo(User user) { 5 | 6 | System.out.println(user.userName +" kişisinin bilgileri güncellendi."); 7 | } 8 | public void deleteUserInfo(User user) { 9 | 10 | System.out.println(user.userName +" kişisinin bilgileri silindi."); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | oopSoyutlamaHomework 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Course.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Course.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Instructor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Instructor.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/InstructorManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/InstructorManager.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Main.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/Student.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/StudentManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/StudentManager.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/User.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/bin/oopSoyutlamaHomework/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoncaBal/javaCamp/dcf4c1236e03ad268ba04e778f9d08b94115f1fa/oopSoyutlamaHomework/bin/oopSoyutlamaHomework/UserManager.class -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/Course.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class Course { 4 | int courseId; 5 | String courseName; 6 | 7 | public Course() {} 8 | 9 | public Course(int courseId, String courseName) { 10 | super(); 11 | this.courseId = courseId; 12 | this.courseName = courseName; 13 | } 14 | 15 | public int getCourseId() { 16 | return courseId; 17 | } 18 | 19 | public void setCourseId(int courseId) { 20 | this.courseId = courseId; 21 | } 22 | 23 | public String getCourseName() { 24 | return courseName; 25 | } 26 | 27 | public void setCourseName(String courseName) { 28 | this.courseName = courseName; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/Instructor.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class Instructor extends User { 4 | int instructorId; 5 | String instructorCourseName; 6 | 7 | public Instructor() {} 8 | 9 | public Instructor(int instructorId, String instructorCourseName) { 10 | super(); 11 | this.instructorId = instructorId; 12 | this.instructorCourseName = instructorCourseName; 13 | } 14 | 15 | public int getInstructorId() { 16 | return instructorId; 17 | } 18 | 19 | public void setInstructorId(int instructorId) { 20 | this.instructorId = instructorId; 21 | } 22 | 23 | public String getInstructorCourseName() { 24 | return instructorCourseName; 25 | } 26 | 27 | public void setInstructorCourseName(String instructorCourseName) { 28 | this.instructorCourseName = instructorCourseName; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/InstructorManager.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class InstructorManager { 4 | public void addCourse(Instructor instructor,String course) { 5 | System.out.println("Sisteme "+instructor.firstName+" hoca tarafından "+course+" dersi eklendi."); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/Main.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | 7 | Student student1= new Student(); 8 | student1.setId(1); 9 | student1.setStudentId(1); 10 | student1.setFirstName("Gonca"); 11 | student1.setLastName("Bal"); 12 | student1.setUserName("gonca"); 13 | student1.setMailadress("goncabal@gmail.com"); 14 | student1.setPassword("1234"); 15 | 16 | Instructor instructor1=new Instructor(); 17 | instructor1.setId(2); 18 | instructor1.setInstructorId(1); 19 | instructor1.setFirstName("Engin"); 20 | instructor1.setLastName("Demiroğ"); 21 | instructor1.setUserName("engin"); 22 | instructor1.setMailadress("engindemirog@gmail.com"); 23 | instructor1.setPassword("78910"); 24 | 25 | Course course1= new Course(1, "C# + React"); 26 | Course course2=new Course(2, "Java + Spring"); 27 | 28 | StudentManager studentManager=new StudentManager(); 29 | studentManager.registerCourse(student1,course1); 30 | studentManager.registerCourse(student1,course2); 31 | studentManager.attendance(); 32 | 33 | InstructorManager instructorManager=new InstructorManager(); 34 | instructorManager.addCourse(instructor1, "Python"); 35 | 36 | Student student2=new Student(); 37 | student2.setUserName("Reyhan"); 38 | Instructor instructor2=new Instructor(); 39 | instructor2.setUserName("Kerem"); 40 | 41 | UserManager userManager=new UserManager(); 42 | userManager.registerSystem(student2); 43 | userManager.registerSystem(instructor2); 44 | 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/Student.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class Student extends User { 4 | int studentId; 5 | String registeredCourse; 6 | 7 | 8 | public Student() {} 9 | 10 | public Student(int studentId, String registeredCourse) { 11 | super(); 12 | this.studentId = studentId; 13 | this.registeredCourse = registeredCourse; 14 | 15 | } 16 | 17 | public int getStudentId() { 18 | return studentId; 19 | } 20 | 21 | public void setStudentId(int studentId) { 22 | this.studentId = studentId; 23 | } 24 | 25 | public String getRegisteredCourse() { 26 | return registeredCourse; 27 | } 28 | 29 | public void setRegisteredCourse(String registeredCourse) { 30 | this.registeredCourse = registeredCourse; 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/StudentManager.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class StudentManager { 4 | 5 | 6 | 7 | public void registerCourse(Student student,Course course) { 8 | System.out.println(student.userName+", "+course.courseName+" dersine başarıyla kayıt oldunuz."); 9 | } 10 | public void attendance() { 11 | System.out.println("Yoklamanız alındı."); 12 | } 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/User.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class User { 4 | int id; 5 | String userName; 6 | String firstName; 7 | String lastName; 8 | String mailadress; 9 | String password; 10 | 11 | public User() { 12 | } 13 | 14 | public User(int id, String userName, String firstName, String lastName, String mailadress, String password) { 15 | super(); 16 | this.id = id; 17 | this.userName = userName; 18 | this.firstName = firstName; 19 | this.lastName = lastName; 20 | this.mailadress = mailadress; 21 | this.password = password; 22 | } 23 | 24 | public int getId() { 25 | return id; 26 | } 27 | 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | 32 | public String getUserName() { 33 | return userName; 34 | } 35 | 36 | public void setUserName(String userName) { 37 | this.userName = userName; 38 | } 39 | 40 | public String getFirstName() { 41 | return firstName; 42 | } 43 | 44 | public void setFirstName(String firstName) { 45 | this.firstName = firstName; 46 | } 47 | 48 | public String getLastName() { 49 | return lastName; 50 | } 51 | 52 | public void setLastName(String lastName) { 53 | this.lastName = lastName; 54 | } 55 | 56 | public String getMailadress() { 57 | return mailadress; 58 | } 59 | 60 | public void setMailadress(String mailadress) { 61 | this.mailadress = mailadress; 62 | } 63 | 64 | public String getPassword() { 65 | return password; 66 | } 67 | 68 | public void setPassword(String password) { 69 | this.password = password; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /oopSoyutlamaHomework/src/oopSoyutlamaHomework/UserManager.java: -------------------------------------------------------------------------------- 1 | package oopSoyutlamaHomework; 2 | 3 | public class UserManager { 4 | 5 | public void registerSystem(User user) { 6 | System.out.println("Sisteme başarıyla kayıt oldu: "+user.userName); 7 | } 8 | } 9 | --------------------------------------------------------------------------------