Subversion Repositories eFlore/Archives.cel-v1

Rev

Rev 10 | Rev 12 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 11
Line 14... Line 14...
14
public class Mediator {
14
public class Mediator {
Line 15... Line 15...
15
		
15
		
16
		
16
		
17
		private String serviceBaseUrl = getServiceBaseUrlFromDictionnary();
17
		private String serviceBaseUrl = getServiceBaseUrlFromDictionnary();
18
		private String user = null;
18
		private String user = null;
-
 
19
		private InventoryItemList inventoryItemList = null;
-
 
20
		private LocationList locationList = null;
-
 
21
		private NameAssistant nameAssistant=null;
19
		private TaxonList taxonlist = null;
22
		private LocationAssistant locationAssistant=null;
Line 20... Line 23...
20
		private LocationList locationList = null;
23
		
Line 35... Line 38...
35
			getUserFromService();
38
			getUserFromService();
Line 36... Line 39...
36
			
39
			
Line 37... Line 40...
37
		}
40
		}
38
	
41
	
39
		/**
42
		/**
40
		 * Action sur selection d'un lieu
43
		 * Action sur selection d'un lieu : affichage de la liste des taxons correspondants
Line 41... Line 44...
41
		 *
44
		 *
Line 42... Line 45...
42
		 */
45
		 */
43
		
46
		
Line -... Line 47...
-
 
47
		public void onLocationSelected(String loc) {
-
 
48
		
-
 
49
			inventoryItemList.setLocation(loc);
-
 
50
			inventoryItemList.updateCount();
-
 
51
			
-
 
52
			if ((loc.compareTo("000null")==0) || (loc.compareTo("all")==0)) {
Line 44... Line 53...
44
		public void onLocationSelected(String loc) {
53
				locationAssistant.setText("");
Line 45... Line 54...
45
		
54
			}
46
			taxonlist.setLocation(loc);
55
			else {
47
			taxonlist.updateCount();
56
				locationAssistant.setText(loc);
Line 48... Line 57...
48
			
57
			}
Line 49... Line 58...
49
			
58
			
50
		}
59
		}
Line 51... Line 60...
51
	
60
	
Line 52... Line 61...
52
		/**
61
		/**
53
		 * Action sur ajout d'un taxon
62
		 * Action sur ajout d'un taxon : affichage du lieu corresondant
54
		 */
63
		 */
55
		
64
		
Line 56... Line 65...
56
	
65
	
Line 57... Line 66...
57
		public void onTaxonListUpdate(String loc) {
66
		public void onInventoryItemUpdate(String loc) {
Line 58... Line 67...
58
 
67
 
Line 59... Line 68...
59
			locationList.setLocation(loc);
68
			locationList.setLocation(loc);
60
			locationList.update();
69
			locationList.updateCount();
61
		
70
		
62
		}
71
		}
Line 63... Line 72...
63
		
72
		
Line 64... Line 73...
64
		/**
73
		/**
65
		 * Enregistrement TaxonList
74
		 * Declaration InventoryItemList 
Line 66... Line 75...
66
		 * @param taxonlist
75
		 * @param inventoryItemList
67
		 */
76
		 */
68
		
77
		
69
		public void registerTaxonList(TaxonList taxonlist) {
78
		public void registerInventoryItemList(InventoryItemList inventoryItemList) {
Line 70... Line 79...
70
			
79
			
Line 71... Line 80...
71
			this.taxonlist=taxonlist;
80
			this.inventoryItemList=inventoryItemList;
72
		
81
		
Line -... Line 82...
-
 
82
		}
-
 
83
	
-
 
84
		/**
-
 
85
		 * Declaration LocationList
-
 
86
		 * @param locationList
-
 
87
		 */
-
 
88
		
-
 
89
		public void registerLocationList(LocationList locationList) {
-
 
90
			
-
 
91
			this.locationList=locationList;
-
 
92
		}
-
 
93
		
-
 
94
		/**
-
 
95
		 * Declaration Cel
-
 
96
		 * @param cel
-
 
97
		 */
-
 
98
 
-
 
99
		public void registerCel(Cel cel) {
-
 
100
			
-
 
101
			this.cel=cel;
Line 73... Line 102...
73
		}
102
		}
74
	
103
 
75
		/**
104
		
76
		 * Enregistremnt LocationList
105
		/**
77
		 * @param locationList
106
		 * Declaration NameAssistant 
Line 78... Line 107...
78
		 */
107
		 * @param nameassistant
Line 149... Line 178...
149
		 */
178
		 */
Line 150... Line 179...
150
		
179
		
151
		public String getUser() {
180
		public String getUser() {
152
			return user;
181
			return user;
-
 
182
		}
-
 
183
		
-
 
184
 
-
 
185
		
-
 
186
		public InventoryItemList getInventoryItemList() {
-
 
187
			return inventoryItemList;
-
 
188
		}
-
 
189
 
-
 
190
		public LocationList getLocationList() {
-
 
191
			return locationList;
-
 
192
		}
-
 
193
 
-
 
194
		public NameAssistant getNameAssistant() {
-
 
195
			return nameAssistant;
-
 
196
		}
-
 
197
 
-
 
198
		public LocationAssistant getLocationAssistant() {
-
 
199
			return locationAssistant;
Line 153... Line 200...
153
		}
200
		}