New owners now can be created properly.
[RRRRHHHH_Code] / ruralHouses / src / businessLogic / AccountManager.java
index 3f0bc5b..3747973 100644 (file)
@@ -8,6 +8,7 @@ import javax.mail.MessagingException;
 import common.AccountInterface;
 import dataAccess.DB4oManager;
 import domain.Account;
+import domain.Administrator;
 
 public class AccountManager extends UnicastRemoteObject implements AccountInterface {
        
@@ -27,7 +28,8 @@ public class AccountManager extends UnicastRemoteObject implements AccountInterf
                }
        }
        
-       public boolean addAccount(Account ac) throws RemoteException {
+       public boolean addAccount(int index) throws RemoteException {
+               Account ac = Administrator.getInstance().getNewOwnerRequest().get(index);
                if(this.dbMngr.addAccount(ac)){
                        try {
                                MailManager.getInstance().Send(ac.getOwner().getMailAccount(), "Entered into the system", "Congratulations");