RRRRHHHH_Code
4f8bcc7fa6ac7640915ac3aa5e115b6d37c08a86
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
package businessLogic; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.util.Vector; import common.AdminInterface; import domain.Account; import domain.Administrator; import domain.RuralHouse; public class AdminManager extends UnicastRemoteObject implements AdminInterface { /** * */ private static final long serialVersionUID = 1L; public AdminManager() throws RemoteException { } public Vector<RuralHouse> getAdditionRequests() throws RemoteException { return new Vector<RuralHouse>(Administrator.getInstance() .getAddRequest()); } public Vector<RuralHouse> getDeletionRequests() throws RemoteException { return new Vector<RuralHouse>(Administrator.getInstance() .getRemoveRequest()); } public Vector<Account> getOwnerAdditionRequests() throws RemoteException { return new Vector<Account>(Administrator.getInstance() .getNewOwnerRequest()); } public void removeHouseAdditionRequests(RuralHouse house) throws RemoteException { Administrator.getInstance().getAddRequest().remove(house); } public void removeHouseDeletionRequests(RuralHouse house) throws RemoteException { Administrator.getInstance().getRemoveRequest().remove(house); } public void removeOwnerAdditionRequests(Account acc) throws RemoteException { Administrator.getInstance().getNewOwnerRequest().remove(acc); } public boolean addAdditionRequest(RuralHouse rh) throws RemoteException { if (this.getAdditionRequests().contains(rh)) { return false; } return Administrator.getInstance().getAddRequest().add(rh); } public boolean addDeletionRequest(RuralHouse rh) throws RemoteException { if (this.getDeletionRequests().contains(rh)) return false; return Administrator.getInstance().getRemoveRequest().add(rh); } public boolean addAccount(Account acc) throws RemoteException { if (this.getOwnerAdditionRequests().contains(acc)) { return false; } return Administrator.getInstance().getNewOwnerRequest().add(acc); } @Override public void saveInstance() throws RemoteException { Administrator.saveInstance(); } // public boolean removeAccount(Account acc) { // if (this.getDeletionRequests().contains(acc)) // return false; // return Administrator.getInstance().getNewOwnerRequest().add(acc); // } } |
Commits for RRRRHHHH_CoderuralHouses/src/businessLogic/AdminManager.java
Revision | Author | Commited | Message |
---|---|---|---|
4f8bcc ... Diff | epinzolas001 | Mon 18 May, 2015 09:49:54 +0000 | Merge conflicts solutioned |
7bf57b ... Diff | camjan | Sun 17 May, 2015 11:59:22 +0000 | Possibility of registering new owners added |
0f75b2 ... Diff | camjan | Sat 16 May, 2015 14:34:49 +0000 | Username is saved hashed and password hashed and salted |
46d6c3 ... Diff | camjan | Wed 15 Apr, 2015 17:08:42 +0000 | Debbugin continues... |
e2ae30 ... Diff | Eneko Pinzolas Murua | Tue 14 Apr, 2015 15:07:35 +0000 | imports leaned |
66f0c8 ... | Eneko Pinzolas Murua | Sun 12 Apr, 2015 18:11:42 +0000 | Model modified so that owners now request for a new house insetion or a house removal. Furthermore, all Administrator GUI and bussines logic create. However, Login GUI and BussinesLogic are to be modified so that they integrate Admin identification. |