1
2
3
4
5
6
7
8
9
10
11
12 package fr.hyphonem.conges;
13
14 import fr.hyphonem.conges.data.CalendarData;
15 import fr.hyphonem.conges.data.EmployeeData;
16
17
18
19
20 public class AccessDataMng {
21
22
23
24
25 public AccessDataMng() {
26 super();
27 }
28
29 String type = "XML";
30
31
32
33
34 public AccessData getInstance() {
35 AccessData ad = null;
36 if ("XML".equals(type)) {
37 ad = new AccessDataXMLImpl();
38 }
39 return ad;
40 }
41
42
43
44
45
46
47
48
49 public AccessData getInstance(EmployeeData ed, String dataDirPath,
50 String fromDate, String toDate) {
51 AccessData ad = null;
52 if ("XML".equals(type)) {
53 ad = new AccessDataXMLImpl(ed, dataDirPath, fromDate, toDate);
54 }
55 return ad;
56 }
57
58
59
60
61
62
63
64
65
66 public AccessData getInstance(EmployeeData ed, CalendarData cd,
67 String dataDirPath, String fromDate, String toDate) {
68 AccessData ad = null;
69 if ("XML".equals(type)) {
70 ad = new AccessDataXMLImpl(ed, cd, dataDirPath, fromDate, toDate);
71 }
72 return ad;
73 }
74
75
76
77
78
79 public AccessData getInstance(String dataPath) {
80 AccessData ad = null;
81 if ("XML".equals(type)) {
82 ad = new AccessDataXMLImpl(dataPath);
83 }
84 return ad;
85 }
86 }