Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard
 
4bc36b7ddf2a9626f60c551cf999ec24052087cc
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
package businessLogic;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import javax.mail.MessagingException;

import common.AccountInterface;

import dataAccess.DB4oManager;
import domain.Account;
import domain.Administrator;

public class AccountManager extends UnicastRemoteObject implements AccountInterface {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private DB4oManager dbMngr;
	
	
	public AccountManager() throws RemoteException {
		try {
			dbMngr = DB4oManager.getInstance();
		} catch (Exception e) {

			e.printStackTrace();
		}
	}
	
	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");
			} catch (MessagingException e) {
				e.printStackTrace();
			}
			return true;
			}
		return false;
		
	}
	
	public boolean removeAccount(int index)throws RemoteException {
		OwnerManager own = new OwnerManager();
		try {
			if(this.dbMngr.removeAccount(own.getOwners().get(index)))
				return true;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
		
	}
}

Commits for RRRRHHHH_CoderuralHouses/src/businessLogic/AccountManager.java

Diff revisions: vs.
Revision Author Commited Message
4bc36b ... Diff Diff camjan Tue 19 May, 2015 23:23:13 +0000

Merge branch ‘master’ of https://xp-dev.com/git/RRRRHHHH_Code

Conflicts:
ruralHouses client/src/gui/HouseFeaturesGUI.java
ruralHouses client/src/gui/ModifyOfferGUI.java
ruralHouses/src/domain/RuralHouse.java

e90cb4 ... Diff Diff camjan Tue 19 May, 2015 19:39:31 +0000

Owner deletion added

ad3773 ... Diff Diff pinene picture pinene Tue 19 May, 2015 18:01:40 +0000

data now is gotten using queries

25898b ... Diff Diff camjan Mon 18 May, 2015 15:26:01 +0000

Account adding and deleting fixed

578bec ... Diff Diff epinzolas001 Mon 18 May, 2015 11:44:38 +0000

New owners now can be created properly.

4f8bcc ... Diff Diff epinzolas001 Mon 18 May, 2015 09:49:54 +0000

Merge conflicts solutioned

6a5d4d ... Diff Diff camjan Sun 17 May, 2015 20:35:45 +0000

Booking confirmation and e-mail service added. Some bugs to be solved.

7bf57b ... camjan Sun 17 May, 2015 11:59:22 +0000

Possibility of registering new owners added