diff --git a/javax.mail.jar b/javax.mail.jar new file mode 100644 index 00000000..ab4d0212 Binary files /dev/null and b/javax.mail.jar differ diff --git a/src/main/java/TestUserDatabase3.csv b/src/main/java/TestUserDatabase3.csv new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/entities/user_entities/BasicUser.java b/src/main/java/entities/user_entities/BasicUser.java deleted file mode 100644 index 31ac0154..00000000 --- a/src/main/java/entities/user_entities/BasicUser.java +++ /dev/null @@ -1,10 +0,0 @@ -package entities.user_entities; - -import java.util.ArrayList; -import entities.chat.Chat; - -public class BasicUser extends User{ - public BasicUser(String Username, String Password, String Email, ArrayList userChats){ - super(Username, Password, Email, userChats); - } -} diff --git a/src/main/java/entities/user_entities/User.java b/src/main/java/entities/user_entities/User.java deleted file mode 100644 index 4817552d..00000000 --- a/src/main/java/entities/user_entities/User.java +++ /dev/null @@ -1,67 +0,0 @@ -package entities.user_entities; - -import data_access.UserDatabase; -import entities.chat.Chat; -import interface_adapters.profile_modification_IA.UserAuthenticationI; -import use_cases.user_attribute_modification_use_case.Changeable; -import interface_adapters.appscreen.UserAppScreenGateway; -import use_cases.user_login_use_cases.Loginable; - -import java.io.Serializable; -import java.util.ArrayList; - -public abstract class User implements Serializable, Changeable, Loginable, UserAuthenticationI { - protected String username; - protected String password; - protected String email; - - protected ArrayList userChats; - boolean verified = false; - boolean online = false; - public User(String username, String password, String email, ArrayList userChats){ - this.username = username; - this.password = password; - this.email = email; - this.userChats = userChats; - } - public String getEmail(){ - return this.email; - } - public String getUsername(){ - return this.username; - } - private String getPassword(){ - return this.password; - } - public ArrayList getUserChats(){ - return this.userChats; - } - - @Override -// from Changeable - public void changeFeature(String feature, String newFeature){ - if (feature == "Username"){ - this.username = newFeature; - } else if (feature == "Password"){ - this.password = newFeature; - } else if (feature == "Email"){ - this.email = newFeature; - } - } - - @Override - public Boolean PasswordMatch(String attempt){ - return (this.getPassword().equals(attempt)); - } - - public void login(){ - UserAppScreenGateway appScreenGateway = new UserAppScreenGateway(this.getUsername()); - appScreenGateway.login(); - } - - public ArrayList getChats() { - return this.userChats; - } - - -} diff --git a/src/main/java/entities/user_entities/UserFactory.java b/src/main/java/entities/user_entities/UserFactory.java deleted file mode 100644 index f013ed39..00000000 --- a/src/main/java/entities/user_entities/UserFactory.java +++ /dev/null @@ -1,11 +0,0 @@ -package entities.user_entities; -import entities.chat.Chat; -import entities.user_entities.*; -import java.util.ArrayList; - -public class UserFactory { - //Following the factory design pattern, just in case in the future we decide to add various different types of Users - public static User BirthUser(String Username, String Password, String Email, String type){ - return new BasicUser(Username, Password, Email, new ArrayList<>()); - } -} diff --git a/src/test/java/TestUserDatabase2.csv b/src/test/java/TestUserDatabase2.csv new file mode 100644 index 00000000..e69de29b