public interface AdminInterface extends Remote {
-
public Vector<RuralHouse> getAdditionRequests() throws RemoteException;
- public Vector<RuralHouse> getDeletionRequests() throws RemoteException ;
+ public Vector<RuralHouse> getDeletionRequests() throws RemoteException;
- public Vector<Account> getOwnerAdditionRequests() throws RemoteException ;
-
- public void removeHouseAdditionRequests(RuralHouse house) throws RemoteException ;
+ public Vector<Account> getOwnerAdditionRequests() throws RemoteException;
- public void removeHouseDeletionRequests(RuralHouse house) throws RemoteException ;
-
- public void removeOwnerAdditionRequests(int index) throws RemoteException ;
-
- public boolean addAdditionRequest(RuralHouse rh) throws RemoteException ;
+ public Vector<Owner> getAllOwners() throws RemoteException;
+
+ public void removeHouseAdditionRequests(RuralHouse house)
+ throws RemoteException;
+
+ public void removeHouseDeletionRequests(RuralHouse house)
+ throws RemoteException;
+
+ public void removeOwnerAdditionRequests(int index) throws RemoteException;
+
+ public boolean addAdditionRequest(RuralHouse rh) throws RemoteException;
+
+ public boolean addDeletionRequest(RuralHouse rh) throws RemoteException;
+
+ public boolean addAccountRequest(String usr, String pss, Owner ow)
+ throws RemoteException;
- public boolean addDeletionRequest(RuralHouse rh) throws RemoteException ;
-
- public boolean addAccountRequest(String usr,
- String pss, Owner ow) throws RemoteException;
-
public void saveInstance() throws RemoteException;
-
-
+
}
import common.HouseInterface;
import common.OfferInterface;
+
import configuration.___IntNames;
import domain.Offer;
import domain.Owner;
import javax.swing.table.DefaultTableModel;
import common.AccountInterface;
-import common.OwnerInterface;
+import common.AdminInterface;
import configuration.___IntNames;
import domain.Owner;
private JTable table;
private DefaultTableModel tableModel;
- private OwnerInterface Own = null;
+ private AdminInterface AdM = null;
private Vector<Owner> owners = new Vector<Owner>();
/**
setContentPane(contentPane);
contentPane.setLayout(null);
try {
- Own = (OwnerInterface) Naming
- .lookup(___IntNames.OwnerManager);
+ AdM = (AdminInterface) Naming
+ .lookup(___IntNames.AdminManager);
} catch (Exception e1) {
System.out
.println("Error accessing remote authentication: "
+ e1.toString());
}
- this.owners = Own.getOwners();
+ this.owners = AdM.getAllOwners();
JLabel lblNewLabel = new JLabel();
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
lblNewLabel.setBounds(23, 41, 536, 33);
import common.AdminInterface;
+import dataAccess.DB4oManager;
import domain.Account;
import domain.Administrator;
import domain.Owner;
.getNewOwnerRequest());
}
+ public Vector<Owner> getAllOwners()throws RemoteException {
+ try {
+ return new Vector<Owner>(DB4oManager.getInstance().getOwners());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
public void removeHouseAdditionRequests(RuralHouse house) throws RemoteException {
Administrator.getInstance().getAddRequest().remove(house);
}
public Vector<Account> getOwnerAdditionRequests() throws RemoteException ;
+ public Vector<Owner> getAllOwners()throws RemoteException ;
+
public void removeHouseAdditionRequests(RuralHouse house) throws RemoteException ;
public void removeHouseDeletionRequests(RuralHouse house) throws RemoteException ;