| @@ -0,0 +1,154 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.Element; | ||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static Administrator get(){ | ||
| if(ADMIN == null){ | ||
| ADMIN = new Administrator(); | ||
| } | ||
| return ADMIN; | ||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
|
|
||
| public String[] getNames(Element[] e){ | ||
| String[] result = new String[e.length]; | ||
| for(int i = 0; i < e.length; i++){ | ||
| result[i] = e[i].getName(); | ||
| } | ||
| return result; | ||
| } | ||
| } |
| @@ -0,0 +1,45 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private static GUI gui; | ||
|
|
||
| private Main main; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| private GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.main = main; | ||
|
|
||
| this.groupView = new GroupView(); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(); | ||
| } | ||
|
|
||
| public static GUI getGUI(){ | ||
| if(gui == null){ | ||
| gui = new GUI(); | ||
| } | ||
| return gui; | ||
| } | ||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,28 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private GUI gui; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(GUI gui){ | ||
| this.gui = gui; | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
|
|
||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,32 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private View currentView; | ||
|
|
||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.groupView = new GroupView(this); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,142 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static void getAdmin(){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
| } |
| @@ -0,0 +1,138 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private final Administrator ADMIN = new Administrator(); | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(){ | ||
| text = new JLabel("Select a category"); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| gui.add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,156 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import java.util.ArrayList; | ||
|
|
||
| import privatekey.modules.administratie.Element; | ||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private ArrayList<Group> groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static Administrator get(){ | ||
| if(ADMIN == null){ | ||
| ADMIN = new Administrator(); | ||
| } | ||
| return ADMIN; | ||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public ArrayList<Group> allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
|
|
||
| public String[] getNames(ArrayList<Element> e){ | ||
| String[] result = new String[e.size()]; | ||
| for(int i = 0; i < e.size(); i++){ | ||
| result[i] = e.get(i).getName(); | ||
| } | ||
| return result; | ||
| } | ||
| } |
| @@ -0,0 +1,17 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.gui.GUI; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args){ | ||
|
|
||
| GUI gui = GUI.getGUI(); | ||
| gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
|
|
||
| gui.setSize(500, 200); | ||
| gui.setVisible(true); | ||
| } | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(){ | ||
| text = new JLabel("Select a category"); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| GUI.get().add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,154 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.Element; | ||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static Administrator get(){ | ||
| if(ADMIN == null){ | ||
| ADMIN = new Administrator(); | ||
| } | ||
| return ADMIN; | ||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
|
|
||
| public String[] getNames(Element[] e){ | ||
| String[] result = new String[e.length]; | ||
| for(int i = 0; i < e.length; i++){ | ||
| result[i] = e[i].getName(); | ||
| } | ||
| return result; | ||
| } | ||
| } |
| @@ -0,0 +1,24 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,8 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| public interface View { | ||
|
|
||
| public void set(); | ||
|
|
||
| public void close(); | ||
| } |
| @@ -0,0 +1,156 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import java.util.ArrayList; | ||
|
|
||
| import privatekey.modules.administratie.Element; | ||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static Administrator get(){ | ||
| if(ADMIN == null){ | ||
| ADMIN = new Administrator(); | ||
| } | ||
| return ADMIN; | ||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
|
|
||
| public String[] getNames(ArrayList<Element> e){ | ||
| String[] result = new String[e.size()]; | ||
| for(int i = 0; i < e.size(); i++){ | ||
| result[i] = e.get(i).getName(); | ||
| } | ||
| return result; | ||
| } | ||
| } |
| @@ -0,0 +1,45 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private static GUI gui; | ||
|
|
||
| private Main main; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| private GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.main = main; | ||
|
|
||
| this.groupView = new GroupView(); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(); | ||
| } | ||
|
|
||
| public static GUI get(){ | ||
| if(gui == null){ | ||
| gui = new GUI(); | ||
| } | ||
| return gui; | ||
| } | ||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,45 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
| private Main main; | ||
|
|
||
| private GUI gui; | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(Main main, GUI gui){ | ||
| this.gui = gui; | ||
| this.main = main; | ||
|
|
||
| text = new JLabel("Select a category"); | ||
|
|
||
|
|
||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| gui.add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private Main main; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.main = main; | ||
|
|
||
| this.groupView = new GroupView(); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,16 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.gui.GUI; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args){ | ||
| GUI gui = new GUI(); | ||
| gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
|
|
||
| gui.setSize(500, 250); | ||
| gui.setVisible(true); | ||
| } | ||
| } |
| @@ -0,0 +1,31 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private View currentView; | ||
|
|
||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.groupView = new GroupView(this); | ||
|
|
||
| this.currentView = this.groupView; | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(){ | ||
| text = new JLabel("Select a category"); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| // gui.add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,41 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private GUI gui; | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(GUI gui){ | ||
| this.gui = gui; | ||
|
|
||
| text = new JLabel("Select a category"); | ||
|
|
||
|
|
||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| gui.add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,16 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.gui.GUI; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args){ | ||
| GUI gui = new GUI(); | ||
| gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
|
|
||
| gui.setSize(200, 100); | ||
| gui.setVisible(true); | ||
| } | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(){ | ||
| text = new JLabel("Select a category"); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| GUI.get().add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,142 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static void get(){ | ||
| // if(admin) | ||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
| } |
| @@ -0,0 +1,42 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private static GUI gui; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| private GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.groupView = new GroupView(); | ||
| } | ||
|
|
||
| public static GUI get(){ | ||
| if(gui == null){ | ||
| gui = new GUI(); | ||
| } | ||
| return gui; | ||
| } | ||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| private void setup(){ | ||
| currentView = groupView; | ||
| currentView.set(); | ||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,199 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import java.util.ArrayList; | ||
|
|
||
| <<<<<<< HEAD | ||
| import privatekey.modules.administratie.Element; | ||
| ======= | ||
| >>>>>>> branch 'master' of https://github.com/JeroenPeterBos/PrivateKey.git | ||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| <<<<<<< HEAD | ||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| ======= | ||
| private Sql sql; | ||
| >>>>>>> branch 'master' of https://github.com/JeroenPeterBos/PrivateKey.git | ||
| private ArrayList<Group> groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static Administrator get(){ | ||
| if(ADMIN == null){ | ||
| ADMIN = new Administrator(); | ||
| } | ||
| return ADMIN; | ||
| } | ||
|
|
||
| public Administrator(){ | ||
| this.sql = new Sql(); | ||
| this.groups = sql.getGroups(); | ||
| } | ||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| <<<<<<< HEAD | ||
| public ArrayList<Group> allGroups(){ | ||
| ======= | ||
| public ArrayList<Group> getGroups(){ | ||
| >>>>>>> branch 'master' of https://github.com/JeroenPeterBos/PrivateKey.git | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public ArrayList<Service> getServices(Group group){ | ||
| if(group.getServices() == null){ | ||
| group.setServices(sql.getServices(group)); | ||
| } | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public ArrayList<Account> getAccounts(Service service){ | ||
| if(service.getAccounts() == null){ | ||
| service.setAccounts(sql.getAccounts(service)); | ||
| } | ||
| return service.getAccounts(); | ||
| } | ||
|
|
||
| <<<<<<< HEAD | ||
| public String[] getNames(ArrayList<Group> e){ | ||
| String[] result = new String[e.size()]; | ||
| for(int i = 0; i < e.size(); i++){ | ||
| result[i] = e.get(i).getName(); | ||
| } | ||
| return result; | ||
| ======= | ||
| // ----------------------------------- Dev Methods -------------------------------------------- // | ||
|
|
||
| public static void main(String[] args){ | ||
| Administrator admin = new Administrator(); | ||
|
|
||
| ArrayList<Group> groups = admin.getGroups(); | ||
| for(Group g: groups){ | ||
| System.out.println("Group: " + g.getName() + " , " + g.getId() + " , " + g.getNoServices()); | ||
| } | ||
|
|
||
| ArrayList<Service> services = admin.getServices(groups.get(0)); | ||
| for(Service s: services){ | ||
| System.out.println("Service: " + s.getGroup().getId() + " , " + s.getName() + " , " + s.getId() + " , " + s.getNoAccounts()); | ||
| } | ||
|
|
||
| ArrayList<Account> accounts = admin.getAccounts(services.get(0)); | ||
| for(Account a: accounts){ | ||
| System.out.println("Account: " + a.getService().getGroup() + " , " + a.getName() + " , " + a.getId() + " , " + a.getPassCipher()); | ||
| } | ||
| >>>>>>> branch 'master' of https://github.com/JeroenPeterBos/PrivateKey.git | ||
| } | ||
| } |
| @@ -0,0 +1,5 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| public class GroupView { | ||
|
|
||
| } |
| @@ -0,0 +1,10 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.gui.GUI; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args){ | ||
| GUI gui = new GUI(); | ||
| } | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(){ | ||
| text = new JLabel("Select a category"); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| gui.add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private Main main; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.main = main; | ||
|
|
||
| this.groupView = new GroupView(this); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,39 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private GUI gui; | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(GUI gui){ | ||
| this.gui = gui; | ||
|
|
||
| text = new JLabel("Select a category"); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| gui.add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,15 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.gui.GUI; | ||
|
|
||
| public class Main { | ||
|
|
||
| public static void main(String[] args){ | ||
| GUI gui = new GUI(); | ||
| gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
|
|
||
| gui.setSize(200, 100); | ||
| } | ||
| } |
| @@ -0,0 +1,142 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private static Administrator ADMIN; | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| private Administrator(){ | ||
|
|
||
| } | ||
|
|
||
| public static void get(){ | ||
| if(admin) | ||
| } | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
| } |
| @@ -0,0 +1,24 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.gui.GUI; | ||
|
|
||
| public class Main { | ||
|
|
||
| private Administrator admin; | ||
|
|
||
| public Main(){ | ||
| this.admin = new Administrator(); | ||
| this. | ||
| } | ||
| public static void main(String[] args){ | ||
| Main main = new Main(); | ||
|
|
||
| GUI gui = new GUI(main); | ||
| gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
|
|
||
| gui.setSize(500, 200); | ||
| gui.setVisible(true); | ||
| } | ||
| } |
| @@ -0,0 +1,41 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private static GUI gui; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| private GUI(){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.groupView = new GroupView(); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(this); | ||
| } | ||
|
|
||
| public static GUI get(){ | ||
| if(gui == null){ | ||
| gui = new GUI(); | ||
| } | ||
| return gui; | ||
| } | ||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,37 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import java.awt.FlowLayout; | ||
|
|
||
| import javax.swing.JFrame; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GUI extends JFrame { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private Main main; | ||
|
|
||
| private View currentView; | ||
| private GroupView groupView; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GUI(Main main){ | ||
| super("PrivateKey"); | ||
| setLayout(new FlowLayout()); | ||
|
|
||
| this.main = main; | ||
|
|
||
| this.groupView = new GroupView(this); | ||
|
|
||
| this.currentView = this.groupView; | ||
| this.currentView.set(); | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| // ------------------------------- Queries ----------------------------------------- // | ||
| } |
| @@ -0,0 +1,132 @@ | ||
| package privatekey.modules; | ||
|
|
||
| import privatekey.modules.administratie.elements.Account; | ||
| import privatekey.modules.administratie.elements.Group; | ||
| import privatekey.modules.administratie.elements.Service; | ||
| import privatekey.modules.administratie.sql.Sql; | ||
|
|
||
| public class Administrator { | ||
| // -------------------------------- Instance Variables -------------------------------- // | ||
|
|
||
| private Sql sql = new Sql(); | ||
| private Group[] groups; | ||
|
|
||
| // -------------------------------- Constructors -------------------------------------- // | ||
|
|
||
| // -------------------------------- Commands ------------------------------------------ // | ||
|
|
||
| /** | ||
| * Adds a new user <code>Account</code> to the database and adds a newly generated encrypted password. | ||
| * @param service name of the new service | ||
| * @param username the username you will have for this <code>Service</code> | ||
| * @param superSecretKey the personal key for encryption | ||
| */ | ||
| public void addAccount(Service service, String username, String superSectretKey){ | ||
| int passCipher = 0; | ||
| Account acc = new Account(service, username, passCipher); | ||
|
|
||
| service.add(acc); | ||
| sql.add(acc); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a new <code>Service</code> to the database. | ||
| * @param service the service to add to the database. | ||
| */ | ||
| public void addService(Group group, String name){ | ||
| Service ser = new Service(group, name, 0); | ||
|
|
||
| group.add(ser); | ||
| sql.add(ser); | ||
| } | ||
|
|
||
| /** | ||
| * Adds a <code>Group</code> to the database | ||
| * @param group the group to add to the database. | ||
| */ | ||
| public void addGroup(String name){ | ||
| Group gro = new Group(name, 0); | ||
|
|
||
| // TODO: add gro to group array | ||
| sql.add(gro); | ||
| } | ||
|
|
||
| /** | ||
| * Edits the account in the database. | ||
| * @param oldAccount the account that is being modified | ||
| * @param newAccount the new status of the account | ||
| */ | ||
| public void editAccount(Account oldAccount, Account newAccount){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Service in the database. | ||
| * @param oldService the Service that is being modified | ||
| * @param newService the new status of the Service | ||
| */ | ||
| public void editService(Service oldService, Service newService){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Edits the Group in the database. | ||
| * @param oldGroup the Group that is being modified | ||
| * @param newGroup the new status of the Group | ||
| */ | ||
| public void editGroup(Group oldGroup, Group newGroup){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain account from the database. | ||
| * @param account the account to be deleted | ||
| */ | ||
| public void removeAccount(Account account){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Service from the database. | ||
| * @param service the service to be deleted | ||
| */ | ||
| public void removeService(Service service){ | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Deletes a certain Group from the database. | ||
| * @param group the group to be deleted | ||
| */ | ||
| public void removeGroup(Group group){ | ||
|
|
||
| } | ||
|
|
||
| // -------------------------------- Queries ------------------------------------------- // | ||
|
|
||
| /** | ||
| * Returns a list of all the groups in the database; | ||
| * @return list of groups | ||
| */ | ||
| public Group[] allGroups(){ | ||
| return groups; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a list of all services in a certain category which an account is registered. | ||
| * @param group group which in the services are | ||
| * @return list of services | ||
| */ | ||
| public Service[] allServices(Group group){ | ||
| return group.getServices(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns all accounts registered at this service. | ||
| * @param service the service from which the accounts are requested. | ||
| * @return list of accounts. | ||
| */ | ||
| public Account[] allAccounts(Service service){ | ||
| return service.getAccounts(); | ||
| } | ||
| } |
| @@ -0,0 +1,5 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| public interface View { | ||
|
|
||
| } |
| @@ -0,0 +1,39 @@ | ||
| package privatekey.modules.gui; | ||
|
|
||
| import javax.swing.JButton; | ||
| import javax.swing.JComboBox; | ||
| import javax.swing.JLabel; | ||
|
|
||
| import privatekey.modules.Main; | ||
|
|
||
| public class GroupView implements View { | ||
|
|
||
| // ------------------------------- Enumerations ------------------------------------ // | ||
|
|
||
| // ------------------------------- Instance Variables ------------------------------ // | ||
|
|
||
| private JLabel text; | ||
| private JComboBox groups; | ||
| private JButton button; | ||
|
|
||
| // ------------------------------- Constructors ------------------------------------ // | ||
|
|
||
| public GroupView(){ | ||
| text = new JLabel("Select a category"); | ||
|
|
||
| String[] options = | ||
| } | ||
|
|
||
| // ------------------------------- Commands ---------------------------------------- // | ||
|
|
||
| public void set(){ | ||
| GUI.get().add(text); | ||
| } | ||
|
|
||
|
|
||
| public void close(){ | ||
|
|
||
| } | ||
| // ------------------------------- Queries ----------------------------------------- // | ||
|
|
||
| } |
| @@ -0,0 +1,3 @@ | ||
| #GitProjectData | ||
| #Sun Nov 22 00:45:53 CET 2015 | ||
| .gitdir=../.git |
| @@ -0,0 +1 @@ | ||
| @@ -0,0 +1 @@ | ||
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| version=1 |
| @@ -0,0 +1,5 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n | ||
| org.eclipse.debug.ui.cancel_launch_with_compile_errors=always | ||
| org.eclipse.debug.ui.save_dirty_editors_before_launch=always | ||
| preferredTargets=default\:default| |
| @@ -0,0 +1,2 @@ | ||
| GitRepositoriesView.GitDirectories=C\:\\Users\\Jeroen\\Documents\\Prive\\EclipseWorkspace\\PrivateKey\\.git;C\:\\Users\\Jeroen\\Documents\\Studie\\Module2\\eclipseWorkspace\\Studie_Module2\\.git; | ||
| eclipse.preferences.version=1 |
| @@ -0,0 +1,3 @@ | ||
| BranchProjectTracker__C\:\\Users\\Jeroen\\Documents\\Prive\\EclipseWorkspace\\PrivateKey\\.git_GuiDev=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<projects branch\="GuiDev">\r\n<project>\\PrivateKey</project>\r\n</projects> | ||
| commit_dialog_history_messages=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<messages>\r\n<message>metadata shit</message>\r\n<message>metadata config errors</message>\r\n<message>Gui shit toevoegen</message>\r\n<message>Merge branch 'master' of&\#x0A;https\://github.com/JeroenPeterBos/PrivateKey.git&\#x0A;&\#x0A;Conflicts\:&\#x0A;&\#x09;PrivateKey/src/privatekey/modules/Administrator.java&\#x0A;</message>\r\n<message>did some shit</message>\r\n<message>Created a start on the gui dev</message>\r\n</messages> | ||
| eclipse.preferences.version=1 |
| @@ -0,0 +1,2 @@ | ||
| CatalogDescriptor=http\://marketplace.eclipse.org | ||
| eclipse.preferences.version=1 |
| @@ -0,0 +1,15 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.jdt.core.classpathVariable.JRE_LIB=C\:/Program Files/Java/jre1.8.0_65/lib/rt.jar | ||
| org.eclipse.jdt.core.classpathVariable.JRE_SRC= | ||
| org.eclipse.jdt.core.classpathVariable.JRE_SRCROOT= | ||
| org.eclipse.jdt.core.classpathVariable.JUNIT_HOME=C\:/Users/Jeroen/Documents/SSHome/eclipse/plugins/org.junit_4.12.0.v201504281640/ | ||
| org.eclipse.jdt.core.classpathVariable.M2_REPO=C\:/Users/Jeroen/.m2/repository | ||
| org.eclipse.jdt.core.classpathVariable.OPENJML_PLUGIN=C\:/Users/Jeroen/Documents/SSHome/eclipse/configuration/org.eclipse.osgi/498/0/.cp | ||
| org.eclipse.jdt.core.classpathVariable.OPENJML_RUNTIME_LIBRARY=C\:/Users/Jeroen/Documents/SSHome/eclipse/configuration/org.eclipse.osgi/498/0/.cp/jmlruntime.jar | ||
| org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled | ||
| org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
| org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
| org.eclipse.jdt.core.compiler.compliance=1.8 | ||
| org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
| org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
| org.eclipse.jdt.core.compiler.source=1.8 |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.jdt.junit.do_filter_stack=false |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1447179028300" defaultVMConnector\="">\r\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n<vm id\="1447179028300" name\="jre1.8.0_65" path\="C\:\\Program Files\\Java\\jre1.8.0_65"/>\r\n</vmType>\r\n</vmSettings>\r\n |
| @@ -0,0 +1,21 @@ | ||
| command=C\:\\Program Files\\Java\\jdk1.8.0_65\\bin\\javadoc.exe | ||
| content_assist_disabled_computers=org.eclipse.jdt.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000org.eclipse.recommenders.calls.rcp.proposalCategory.templates\u0000org.eclipse.recommenders.chain.rcp.proposalCategory.chain\u0000org.eclipse.mylyn.java.ui.javaAllProposalCategory\u0000 | ||
| content_assist_lru_history=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><history maxLHS\="100" maxRHS\="10"><lhs name\="java.lang.Enum"><rhs name\="ss.week2.Lamp$Setting"/></lhs><lhs name\="ss.week2.Lamp$Setting"><rhs name\="ss.week2.Lamp$Setting"/></lhs></history> | ||
| content_assist_number_of_computers=21 | ||
| content_assist_proposals_background=255,255,255 | ||
| content_assist_proposals_foreground=0,0,0 | ||
| eclipse.preferences.version=1 | ||
| fontPropagated=true | ||
| org.eclipse.jdt.ui.editor.tab.width= | ||
| org.eclipse.jdt.ui.formatterprofiles.version=12 | ||
| org.eclipse.jdt.ui.javadoclocations.migrated=true | ||
| org.eclipse.jdt.ui.text.code_templates_migrated=true | ||
| org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/> | ||
| org.eclipse.jdt.ui.text.custom_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="java" deleted\="false" description\="Add all my standard class comments" enabled\="true" name\="// ---">---------------------------- Enumerations ------------------------------------ //&\#13;\r\n&\#13;\r\n\t// ------------------------------- Instance Variables ------------------------------ //&\#13;\r\n&\#13;\r\n\t// ------------------------------- Constructors ------------------------------------ //&\#13;\r\n&\#13;\r\n\t// ------------------------------- Commands ---------------------------------------- //&\#13;\r\n&\#13;\r\n\t// ------------------------------- Queries ----------------------------------------- //</template></templates> | ||
| org.eclipse.jdt.ui.text.templates_migrated=true | ||
| org.eclipse.jface.textfont=1|Courier New|10.0|0|WINDOWS|1|0|0|0|0|0|0|0|0|1|0|0|0|0|Courier New; | ||
| proposalOrderMigrated=true | ||
| spelling_locale_initialized=true | ||
| tabWidthPropagated=true | ||
| useAnnotationsPrefPage=true | ||
| useQuickDiffPrefPage=true |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.m2e.discovery.pref.projects= |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| mylyn.attention.migrated=true |
| @@ -0,0 +1,3 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.mylyn.java.ui.run.count.3_10_0=1 | ||
| org.eclipse.mylyn.java.ui.run.count.3_1_0=1 |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true |
| @@ -0,0 +1,4 @@ | ||
| eclipse.preferences.version=1 | ||
| migrated.task.repositories.secure.store=true | ||
| org.eclipse.mylyn.tasks.ui.filters.nonmatching=true | ||
| org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| enable.preference.recorder=true |
| @@ -0,0 +1,2 @@ | ||
| completion_tips_seen=org.eclipse.recommenders.completion.rcp.tips.discovery\:org.eclipse.recommenders.completion.rcp.tips.types | ||
| eclipse.preferences.version=1 |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| news-last-check=1448208406913 |
| @@ -0,0 +1,4 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.team.ui.first_time=false | ||
| org.eclipse.team.ui.sychronizing_default_participant=org.eclipse.egit.ui.modelCompareParticipant | ||
| org.eclipse.team.ui.sychronizing_default_participant_sec_id=1449535017778 |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| internalWebBrowserHistory=file\:///C\:/Users/Jeroen/Documents/Studie/Module2/eclipseWorkspace/ss/src/week1/hotel/Password.html|*|file\:/C\:/Users/Jeroen/Documents/Studie/Module2/eclipseWorkspace/ss/src/week1/hotel/Password.html|*|file\:///C\:/Users/Jeroen/Documents/Studie/Module2/eclipseWorkspace/ss/src/week1/hotel/Guest.html|*|file\:/C\:/Users/Jeroen/Documents/Studie/Module2/eclipseWorkspace/ss/src/week1/hotel/Guest.html|*| |
| @@ -0,0 +1,3 @@ | ||
| eclipse.preferences.version=1 | ||
| lineNumberRuler=true | ||
| overviewRuler_migration=migrated_3.1 |
| @@ -0,0 +1,8 @@ | ||
| EXIT_PROMPT_ON_CLOSE_LAST_WINDOW=false | ||
| IMPORT_FILES_AND_FOLDERS_MODE=prompt | ||
| IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt | ||
| PROBLEMS_FILTERS_MIGRATE=true | ||
| eclipse.preferences.version=1 | ||
| platformState=1447170416742 | ||
| quickStart=false | ||
| tipsAndTricks=true |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| showIntro=false |
| @@ -0,0 +1,10 @@ | ||
| activate=true | ||
| column2=666 | ||
| column3=150 | ||
| column4=150 | ||
| eclipse.preferences.version=1 | ||
| groupBy=0 | ||
| maxLogTailSize=1 | ||
| orderType=2 | ||
| orderValue=-1 | ||
| show_filter_text=true |
| @@ -0,0 +1,4 @@ | ||
| //org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false | ||
| PLUGINS_NOT_ACTIVATED_ON_STARTUP=org.eclipse.m2e.discovery; | ||
| RUN_IN_BACKGROUND=true | ||
| eclipse.preferences.version=1 |
| @@ -0,0 +1,4 @@ | ||
| content_assist_number_of_computers=2 | ||
| eclipse.preferences.version=1 | ||
| useAnnotationsPrefPage=true | ||
| useQuickDiffPrefPage=true |
| @@ -0,0 +1,2 @@ | ||
| eclipse.preferences.version=1 | ||
| org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.lastActivePage=1 |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/Test/src/AB.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="AB"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Test"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/Test/src/topCoder/BinaryCode.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="topCoder.BinaryCode"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Test"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,16 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/test/CustomRectangleTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.test.CustomRectangleTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/week1/test/DollarsAndCentsCounterTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="week1.test.DollarsAndCentsCounterTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/week1/test/GuestTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="week1.test.GuestTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/week1/src/week1/Hello.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="week1.Hello"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="week1"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/test/HotelTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.test.HotelTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/Lamp.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.Lamp"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/Lamp.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.Lamp"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/Test/src/topCoder/Lottery.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="topCoder.Lottery"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Test"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/PrivateKey/src/privatekey/modules/Main.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="privatekey.modules.Main"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="PrivateKey"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/week1/test/PasswordTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="week1.test.PasswordTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/test/RectangleTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.test.RectangleTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/test/RoomTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.test.RoomTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,16 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/test/SafeTest.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
| <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | ||
| <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.test.SafeTest"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/ss/src/ss/week2/hotel/Safe.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ss.week2.hotel.Safe"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ss"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
| <listEntry value="/Test/src/topCoder/mainTesting.java"/> | ||
| </listAttribute> | ||
| <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
| <listEntry value="1"/> | ||
| </listAttribute> | ||
| <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="topCoder.mainTesting"/> | ||
| <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Test"/> | ||
| </launchConfiguration> |
| @@ -0,0 +1,21 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <section name="Workbench"> | ||
| <section name="org.eclipse.debug.ui.SCOPED_SAVE_SELECTION_DIALOG"> | ||
| <item value="309" key="DIALOG_WIDTH"/> | ||
| <item value="377" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| <section name="org.eclipse.debug.ui.LAUNCH_CONFIGURATIONS_DIALOG_SECTION"> | ||
| <item value="800" key="DIALOG_WIDTH"/> | ||
| <item value=", org.eclipse.jdt.launching.localJavaApplication, org.eclipse.jdt.junit.launchconfig, " key="org.eclipse.debug.ui.EXPANDED_NODES"/> | ||
| <item value="640" key="DIALOG_HEIGHT"/> | ||
| <item value="237" key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_1"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| <item value="762" key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_2"/> | ||
| </section> | ||
| <section name="org.eclipse.debug.ui.SELECT_LAUNCH_SHORTCUT_DIALOG"> | ||
| <item value="270" key="DIALOG_WIDTH"/> | ||
| <item value="436" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| </section> |
| @@ -0,0 +1,29 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <launchHistory> | ||
| <launchGroup id="org.eclipse.ui.externaltools.launchGroup"> | ||
| <mruHistory/> | ||
| <favorites/> | ||
| </launchGroup> | ||
| <launchGroup id="com.mountainminds.eclemma.ui.launchGroup.coverage"> | ||
| <mruHistory> | ||
| <launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Main"/> "/> | ||
| </mruHistory> | ||
| <favorites/> | ||
| </launchGroup> | ||
| <launchGroup id="org.eclipse.debug.ui.launchGroup.profile"> | ||
| <mruHistory/> | ||
| <favorites/> | ||
| </launchGroup> | ||
| <launchGroup id="org.eclipse.debug.ui.launchGroup.debug"> | ||
| <mruHistory> | ||
| <launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Main"/> "/> | ||
| </mruHistory> | ||
| <favorites/> | ||
| </launchGroup> | ||
| <launchGroup id="org.eclipse.debug.ui.launchGroup.run"> | ||
| <mruHistory> | ||
| <launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Main"/> "/> | ||
| </mruHistory> | ||
| <favorites/> | ||
| </launchGroup> | ||
| </launchHistory> |
| @@ -0,0 +1,10 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <section name="Workbench"> | ||
| <section name="ShowViewDialog"> | ||
| <item value="311" key="DIALOG_WIDTH"/> | ||
| <item value="80" key="DIALOG_Y_ORIGIN"/> | ||
| <item value="439" key="DIALOG_HEIGHT"/> | ||
| <item value="536" key="DIALOG_X_ORIGIN"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| </section> |
| @@ -0,0 +1,53 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <section name="Workbench"> | ||
| <item value="true" key="CommitDialog.showUntracked"/> | ||
| <list key="CommitDialog.authorValues"> | ||
| <item value="JeroenPeterBos <jeroenbosleusden@gmail.com>"/> | ||
| </list> | ||
| <list key="CommitDialog.committerValues"> | ||
| <item value="JeroenPeterBos <jeroenbosleusden@gmail.com>"/> | ||
| </list> | ||
| <section name="GitImportWizard"> | ||
| </section> | ||
| <section name="GitCommitMessageComponent"> | ||
| </section> | ||
| <section name="org.eclipse.egit.ui.internal.dialogs.MergeTargetSelectionDialog.dialogBounds"> | ||
| <item value="538" key="DIALOG_WIDTH"/> | ||
| <item value="8" key="DIALOG_Y_ORIGIN"/> | ||
| <item value="422" key="DIALOG_X_ORIGIN"/> | ||
| <item value="679" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| <section name="org.eclipse.egit.ui.COMMIT_DIALOG_SECTION"> | ||
| <item value="642" key="DIALOG_WIDTH"/> | ||
| <item value="8" key="DIALOG_Y_ORIGIN"/> | ||
| <item value="370" key="DIALOG_X_ORIGIN"/> | ||
| <item value="641" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| <section name="org.eclipse.egit.ui.internal.pull.PullResultDialog.dialogBounds"> | ||
| <item value="530" key="DIALOG_WIDTH"/> | ||
| <item value="245" key="DIALOG_Y_ORIGIN"/> | ||
| <item value="537" key="DIALOG_X_ORIGIN"/> | ||
| <item value="275" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| <section name="org.eclipse.egit.ui.internal.merge.MergeResultDialog.dialogBounds"> | ||
| <item value="573" key="DIALOG_WIDTH"/> | ||
| <item value="226" key="DIALOG_Y_ORIGIN"/> | ||
| <item value="405" key="DIALOG_X_ORIGIN"/> | ||
| <item value="219" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| </section> | ||
| <section name="org.eclipse.egit.ui.internal.push.PushResultDialog.dialogBounds"> | ||
| <item value="666" key="DIALOG_WIDTH"/> | ||
| <item value="67" key="DIALOG_Y_ORIGIN"/> | ||
| <item value="358" key="DIALOG_X_ORIGIN"/> | ||
| <item value="458" key="DIALOG_HEIGHT"/> | ||
| <item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/> | ||
| <list key="sashWeights"> | ||
| <item value="600"/> | ||
| <item value="400"/> | ||
| </list> | ||
| </section> | ||
| </section> |
| @@ -0,0 +1 @@ | ||
| ����version |
| @@ -0,0 +1 @@ | ||
| NRM� |