View Javadoc

1   /*
2    * This file is a part of CAST project.
3    * (c) Copyright 2007, AGH University of Science & Technology
4    * https://caribou.iisg.agh.edu.pl/trac/cast
5    *
6    * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7    * You may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    * http://www.eclipse.org/legal/epl-v10.html
10   */
11  /*
12   * File: GeneralConversionRulesSelectionPageComposite.java
13   * Created: 2009-04-01
14   * Author: bmilos
15   * $Id$
16   */
17  
18  package pl.edu.agh.cast.importer.wizard.general;
19  
20  import java.util.HashMap;
21  import java.util.List;
22  import java.util.Map;
23  
24  import org.eclipse.jface.viewers.TableViewer;
25  import org.eclipse.swt.SWT;
26  import org.eclipse.swt.events.SelectionAdapter;
27  import org.eclipse.swt.events.SelectionEvent;
28  import org.eclipse.swt.layout.GridData;
29  import org.eclipse.swt.layout.GridLayout;
30  import org.eclipse.swt.widgets.Button;
31  import org.eclipse.swt.widgets.Combo;
32  import org.eclipse.swt.widgets.Composite;
33  import org.eclipse.swt.widgets.Group;
34  import org.eclipse.swt.widgets.Label;
35  
36  import pl.edu.agh.cast.importer.base.converter.rules.IConversionRule;
37  import pl.edu.agh.cast.importer.base.data.TabularData;
38  import pl.edu.agh.cast.importer.base.general.IDateConversionRule;
39  import pl.edu.agh.cast.importer.base.general.ISourceNodeConversionRule;
40  import pl.edu.agh.cast.importer.base.general.ITargetNodeConversionRule;
41  import pl.edu.agh.cast.importer.wizard.dialog.rule.AbstractConversionRuleConfigDialog;
42  import pl.edu.agh.cast.importer.wizard.util.Messages;
43  import pl.edu.agh.cast.importer.wizard.utils.TableViewerHelper;
44  
45  /**
46   * The main composite of the {@link GeneralConversionRulesSelectionPage}.
47   *
48   * @author AGH CAST Team
49   */
50  public class GeneralConversionRulesSelectionPageComposite extends Composite {
51  
52  	private GeneralConversionRulesSelectionPage mediator;
53  
54  	private Group sourceGroup;
55  
56  	private Group conversionPreviewGroup;
57  
58  	private Label sourceEntityLbl;
59  
60  	private Button dateConfigBtn;
61  
62  	private Combo dateCombo;
63  
64  	private Label dateLbl;
65  
66  	private Button targetEntityConfigBtn;
67  
68  	private Combo targetEntityCombo;
69  
70  	private Label targetEntityLbl;
71  
72  	private Button sourceEntityConfigBtn;
73  
74  	private Combo sourceEntityCombo;
75  
76  	private Group connectionGroup;
77  
78  	private Group targetGroup;
79  
80  	private Group filePreviewGroup;
81  
82  	private Label sourceRuleDescriptionLbl;
83  
84  	private Label targetRuleDescriptionLbl;
85  
86  	private Label dateRuleDescriptionLbl;
87  
88  	private TableViewer previewTableViewer;
89  
90  	private TableViewer conversionPreviewTableViewer;
91  
92  	private TabularData data;
93  
94  	private String sourceEntityRuleIdCache;
95  
96  	private String targetEntityRuleIdCache;
97  
98  	private String dateRuleIdCache;
99  
100 	/**
101 	 * The default constructor.
102 	 *
103 	 * @param parent
104 	 *            the parent composite
105 	 * @param style
106 	 *            the style of widget to construct
107 	 * @param mediator
108 	 *            the mediating wizard page
109 	 */
110 	GeneralConversionRulesSelectionPageComposite(Composite parent, int style,
111 	        GeneralConversionRulesSelectionPage mediator) {
112 		super(parent, style);
113 		this.mediator = mediator;
114 		initGUI();
115 	}
116 
117 	private void initGUI() {
118 		GridLayout thisLayout = new GridLayout(2, true);
119 		this.setLayout(thisLayout);
120 		this.setSize(800, 600);
121 
122 		sourceGroup = new Group(this, SWT.NONE);
123 		GridLayout sourceGroupLayout = new GridLayout(3, false);
124 		sourceGroup.setLayout(sourceGroupLayout);
125 		GridData sourceGroupLData = new GridData(SWT.FILL, SWT.FILL, true, true);
126 		sourceGroup.setLayoutData(sourceGroupLData);
127 		sourceGroup.setText(Messages.GeneralConversionRulesSelectionPageComposite_SourceGroupTitle);
128 
129 		sourceEntityLbl = new Label(sourceGroup, SWT.NONE);
130 		sourceEntityLbl.setText(Messages.GeneralConversionRulesSelectionPageComposite_SourceEntityLbl);
131 
132 		sourceEntityCombo = new Combo(sourceGroup, SWT.READ_ONLY);
133 		GridData sourceEntityComboLData = new GridData(SWT.FILL, SWT.FILL, true, false);
134 		sourceEntityComboLData.minimumWidth = 80;
135 		sourceEntityComboLData.minimumHeight = 25;
136 		sourceEntityCombo.setLayoutData(sourceEntityComboLData);
137 		if (mediator != null) {
138 			mediator.setRuleComboData(sourceEntityCombo, ISourceNodeConversionRule.class);
139 		}
140 		sourceEntityCombo.addSelectionListener(new SelectionAdapter() {
141 			@Override
142 			public void widgetSelected(SelectionEvent event) {
143 				handleSourceEntityComboSelection();
144 			}
145 		});
146 
147 		sourceEntityConfigBtn = new Button(sourceGroup, SWT.PUSH | SWT.CENTER);
148 		GridData sourceEntityConfigBtnLData = new GridData(SWT.FILL, SWT.CENTER, false, false);
149 		sourceEntityConfigBtnLData.minimumHeight = 20;
150 		sourceEntityConfigBtn.setLayoutData(sourceEntityConfigBtnLData);
151 		sourceEntityConfigBtn.setText(Messages.GeneralConversionRulesSelectionPageComposite_Configure);
152 		sourceEntityConfigBtn.setEnabled(false);
153 		sourceEntityConfigBtn.addSelectionListener(new SelectionAdapter() {
154 			@Override
155 			public void widgetSelected(SelectionEvent event) {
156 				handleSourceEntityConfigBtnPressed();
157 			}
158 		});
159 
160 		sourceRuleDescriptionLbl = new Label(sourceGroup, SWT.WRAP);
161 		GridData sourceRuleDescriptionLblLData = new GridData(SWT.FILL, SWT.FILL, true, true);
162 		sourceRuleDescriptionLblLData.horizontalSpan = 3;
163 		sourceRuleDescriptionLbl.setLayoutData(sourceRuleDescriptionLblLData);
164 		sourceRuleDescriptionLbl.setText(Messages.GeneralConversionRulesSelectionPageComposite_NoRuleDesc);
165 
166 		targetGroup = new Group(this, SWT.NONE);
167 		GridLayout targetGroupLayout = new GridLayout(3, false);
168 		targetGroup.setLayout(targetGroupLayout);
169 		GridData targetGroupLData = new GridData(SWT.FILL, SWT.FILL, true, true);
170 		targetGroup.setLayoutData(targetGroupLData);
171 		targetGroup.setText(Messages.GeneralConversionRulesSelectionPageComposite_TargetGroupTitle);
172 
173 		targetEntityLbl = new Label(targetGroup, SWT.NONE);
174 		targetEntityLbl.setText(Messages.GeneralConversionRulesSelectionPageComposite_TargetEntityLbl);
175 
176 		targetEntityCombo = new Combo(targetGroup, SWT.READ_ONLY);
177 		GridData targetEntityComboLData = new GridData(SWT.FILL, SWT.FILL, true, false);
178 		targetEntityComboLData.minimumWidth = 80;
179 		targetEntityComboLData.minimumHeight = 25;
180 		targetEntityCombo.setLayoutData(targetEntityComboLData);
181 		if (mediator != null) {
182 			mediator.setRuleComboData(targetEntityCombo, ITargetNodeConversionRule.class);
183 		}
184 		targetEntityCombo.addSelectionListener(new SelectionAdapter() {
185 			@Override
186 			public void widgetSelected(SelectionEvent event) {
187 				handleTargetEntityComboSelection();
188 			}
189 		});
190 
191 		targetEntityConfigBtn = new Button(targetGroup, SWT.PUSH | SWT.CENTER);
192 		targetEntityConfigBtn.setText(Messages.GeneralConversionRulesSelectionPageComposite_Configure);
193 		GridData targetEntityConfigBtnLData = new GridData(SWT.FILL, SWT.CENTER, false, false);
194 		targetEntityConfigBtnLData.minimumHeight = 20;
195 		targetEntityConfigBtn.setLayoutData(targetEntityConfigBtnLData);
196 		targetEntityConfigBtn.setEnabled(false);
197 		targetEntityConfigBtn.addSelectionListener(new SelectionAdapter() {
198 			@Override
199 			public void widgetSelected(SelectionEvent event) {
200 				handleTargetEntityConfigBtnPressed();
201 			}
202 		});
203 
204 		targetRuleDescriptionLbl = new Label(targetGroup, SWT.WRAP);
205 		GridData targetRuleDescriptionLblLData = new GridData(SWT.FILL, SWT.FILL, true, true);
206 		targetRuleDescriptionLblLData.horizontalSpan = 3;
207 		targetRuleDescriptionLbl.setLayoutData(targetRuleDescriptionLblLData);
208 		targetRuleDescriptionLbl.setText(Messages.GeneralConversionRulesSelectionPageComposite_NoRuleDesc);
209 
210 		connectionGroup = new Group(this, SWT.NONE);
211 		GridLayout connectionGroupLayout = new GridLayout(3, false);
212 		connectionGroup.setLayout(connectionGroupLayout);
213 		GridData connectionGroupLData = new GridData(SWT.FILL, SWT.FILL, true, true);
214 		connectionGroupLData.horizontalSpan = 2;
215 		connectionGroup.setLayoutData(connectionGroupLData);
216 		connectionGroup.setText(Messages.GeneralConversionRulesSelectionPageComposite_ConnectionGroupTitle);
217 
218 		dateLbl = new Label(connectionGroup, SWT.NONE);
219 		dateLbl.setText(Messages.GeneralConversionRulesSelectionPageComposite_ConnectionDateLbl);
220 
221 		dateCombo = new Combo(connectionGroup, SWT.READ_ONLY);
222 		GridData dateComboLData = new GridData(SWT.FILL, SWT.FILL, true, false);
223 		dateCombo.setLayoutData(dateComboLData);
224 		if (mediator != null) {
225 			mediator.setRuleComboData(dateCombo, IDateConversionRule.class);
226 		}
227 		dateCombo.addSelectionListener(new SelectionAdapter() {
228 			@Override
229 			public void widgetSelected(SelectionEvent event) {
230 				handleDateComboSelection();
231 			}
232 		});
233 
234 		dateConfigBtn = new Button(connectionGroup, SWT.PUSH | SWT.CENTER);
235 		GridData dateConfigBtnLData = new GridData(SWT.FILL, SWT.CENTER, false, false);
236 		dateConfigBtnLData.minimumHeight = 20;
237 		dateConfigBtn.setLayoutData(dateConfigBtnLData);
238 		dateConfigBtn.setText(Messages.GeneralConversionRulesSelectionPageComposite_Configure);
239 		dateConfigBtn.setEnabled(false);
240 		dateConfigBtn.addSelectionListener(new SelectionAdapter() {
241 			@Override
242 			public void widgetSelected(SelectionEvent event) {
243 				handleDateConfigBtnPressed();
244 			}
245 		});
246 
247 		dateRuleDescriptionLbl = new Label(connectionGroup, SWT.WRAP);
248 		GridData dateRuleDescriptionLblLData = new GridData(SWT.FILL, SWT.FILL, true, true);
249 		dateRuleDescriptionLblLData.horizontalSpan = 3;
250 		dateRuleDescriptionLbl.setLayoutData(sourceRuleDescriptionLblLData);
251 		dateRuleDescriptionLbl.setText(Messages.GeneralConversionRulesSelectionPageComposite_NoRuleDesc);
252 
253 		filePreviewGroup = new Group(this, SWT.NONE);
254 		GridLayout filePreviewGroupLayout = new GridLayout();
255 		filePreviewGroup.setLayout(filePreviewGroupLayout);
256 		GridData filePreviewGroupLData = new GridData(SWT.FILL, SWT.FILL, true, true);
257 		filePreviewGroupLData.heightHint = 150;
258 		filePreviewGroup.setLayoutData(filePreviewGroupLData);
259 		filePreviewGroup.setText(Messages.GeneralConversionRulesSelectionPageComposite_FilePreview);
260 
261 		previewTableViewer = new TableViewer(filePreviewGroup, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL
262 		        | SWT.H_SCROLL);
263 		GridData previewTableViewerLData = new GridData(SWT.FILL, SWT.FILL, true, true);
264 		previewTableViewerLData.heightHint = 100;
265 		previewTableViewerLData.widthHint = 320;
266 		previewTableViewer.getControl().setLayoutData(previewTableViewerLData);
267 
268 		conversionPreviewGroup = new Group(this, SWT.NONE);
269 		GridLayout conversionPreviewGroupLayout = new GridLayout();
270 		conversionPreviewGroup.setLayout(conversionPreviewGroupLayout);
271 		GridData conversionPreviewGroupLData = new GridData(SWT.FILL, SWT.FILL, true, true);
272 		conversionPreviewGroup.setLayoutData(conversionPreviewGroupLData);
273 		conversionPreviewGroup.setText(Messages.GeneralConversionRulesSelectionPageComposite_ConversionPreview);
274 
275 		conversionPreviewTableViewer = new TableViewer(conversionPreviewGroup, SWT.BORDER | SWT.FULL_SELECTION
276 		        | SWT.V_SCROLL | SWT.H_SCROLL);
277 		GridData conversionPreviewTableViewerLData = new GridData(SWT.FILL, SWT.FILL, true, true);
278 		conversionPreviewTableViewerLData.heightHint = 100;
279 		conversionPreviewTableViewerLData.widthHint = 320;
280 		conversionPreviewTableViewer.getControl().setLayoutData(conversionPreviewTableViewerLData);
281 		conversionPreviewTableViewer.getTable().setEnabled(false);
282 
283 		setRuleCombosMap();
284 	}
285 
286 	/*
287 	 * -----------------------------------------------------------------------------------------------------------
288 	 * --------------------------ACTION METHODS------------------------------------------------------------
289 	 * -----------------------------------------------------------------------------------------------------------
290 	 */
291 
292 	private void handleSourceEntityConfigBtnPressed() {
293 		AbstractConversionRuleConfigDialog dialog = mediator
294 		        .getConversionRuleConfigDialog(getSelectedSourceEntityRuleId());
295 		dialog.setData(mediator, data,
296 		        new String[] { Messages.GeneralConversionRulesSelectionPageComposite_DialogDescSourceEntity }, mediator
297 		                .getSourceNodeRule());
298 		dialog.open();
299 	}
300 
301 	private void handleTargetEntityConfigBtnPressed() {
302 		AbstractConversionRuleConfigDialog dialog = mediator
303 		        .getConversionRuleConfigDialog(getSelectedTargetEntityRuleId());
304 		dialog.setData(mediator, data,
305 		        new String[] { Messages.GeneralConversionRulesSelectionPageComposite_DialogDescTargetEntity }, mediator
306 		                .getTargetNodeRule());
307 		dialog.open();
308 	}
309 
310 	private void handleDateConfigBtnPressed() {
311 		String id = getSelectedDateRuleId();
312 		AbstractConversionRuleConfigDialog dialog = mediator.getConversionRuleConfigDialog(id);
313 		dialog.setData(mediator, data,
314 		        new String[] { Messages.GeneralConversionRulesSelectionPageComposite_DialogDescDate }, mediator
315 		                .getDateRule());
316 		dialog.open();
317 	}
318 
319 	private void handleSourceEntityComboSelection() {
320 		String ruleId = getSelectedSourceEntityRuleId();
321 		if (sourceEntityRuleIdCache != null && sourceEntityRuleIdCache.equals(ruleId)) {
322 			return;
323 		}
324 
325 		sourceEntityConfigBtn.setEnabled(ruleId != null);
326 		sourceEntityRuleIdCache = ruleId;
327 
328 		mediator.setRuleDescriptionLabel(ruleId, sourceRuleDescriptionLbl);
329 		IConversionRule oldRule = mediator.getSourceNodeRule();
330 		mediator.setSourceNodeRule(ruleId);
331 		IConversionRule newRule = mediator.getSourceNodeRule();
332 		mediator.checkBlocking(oldRule, newRule, ISourceNodeConversionRule.class);
333 		mediator.widgetModified();
334 	}
335 
336 	private void handleTargetEntityComboSelection() {
337 		String ruleId = getSelectedTargetEntityRuleId();
338 		if (targetEntityRuleIdCache != null && targetEntityRuleIdCache.equals(ruleId)) {
339 			return;
340 		}
341 
342 		targetEntityConfigBtn.setEnabled(ruleId != null);
343 		targetEntityRuleIdCache = ruleId;
344 
345 		mediator.setRuleDescriptionLabel(ruleId, targetRuleDescriptionLbl);
346 		IConversionRule oldRule = mediator.getTargetNodeRule();
347 		mediator.setTargetNodeRule(ruleId);
348 		IConversionRule newRule = mediator.getTargetNodeRule();
349 		mediator.checkBlocking(oldRule, newRule, ITargetNodeConversionRule.class);
350 		mediator.widgetModified();
351 	}
352 
353 	private void handleDateComboSelection() {
354 		String ruleId = getSelectedDateRuleId();
355 		if (dateRuleIdCache != null && dateRuleIdCache.equals(ruleId)) {
356 			return;
357 		}
358 
359 		dateConfigBtn.setEnabled(ruleId != null);
360 		dateRuleIdCache = ruleId;
361 
362 		mediator.setRuleDescriptionLabel(ruleId, dateRuleDescriptionLbl);
363 		IConversionRule oldRule = mediator.getDateRule();
364 		mediator.setDateRule(ruleId);
365 		IConversionRule newRule = mediator.getDateRule();
366 		mediator.checkBlocking(oldRule, newRule, IDateConversionRule.class);
367 		mediator.widgetModified();
368 	}
369 
370 	/*----------------------------------------------------------------------------------------------------------*/
371 
372 	/*
373 	 * -----------------------------------------------------------------------------------------------------------
374 	 * --------------------------HELPER METHODS------------------------------------------------------------
375 	 * -----------------------------------------------------------------------------------------------------------
376 	 */
377 
378 	/**
379 	 * Refreshes the file preview.
380 	 *
381 	 * @param tabData
382 	 *            the parsed tabular data
383 	 */
384 	public void refreshFilePreview(TabularData tabData) {
385 		this.data = tabData;
386 		if (data != null) {
387 			TableViewerHelper.initTable(previewTableViewer, data);
388 			previewTableViewer.getTable().setLinesVisible(true);
389 			previewTableViewer.getTable().setHeaderVisible(true);
390 			TableViewerHelper.adjustColumnWidth(previewTableViewer);
391 			previewTableViewer.refresh();
392 		}
393 	}
394 
395 	/**
396 	 * Refreshes the conversion preview table by creating a new tabular data with only the columns selected and
397 	 * configured by the user as domain fields.
398 	 */
399 	public void refreshConversionPreview() {
400 		final List<TabularData> convPreviews = mediator.getConversionPreview(data);
401 		if (convPreviews != null && !convPreviews.isEmpty()) {
402 			// TODO handle LIST of tabular data
403 			final TabularData convData = convPreviews.get(0);
404 
405 			if (convData != null && !convData.isEmpty()) {
406 				conversionPreviewTableViewer.getTable().setEnabled(true);
407 				TableViewerHelper.initTable(conversionPreviewTableViewer, convData);
408 				conversionPreviewTableViewer.getTable().setLinesVisible(true);
409 				conversionPreviewTableViewer.getTable().setHeaderVisible(true);
410 				TableViewerHelper.adjustColumnWidth(conversionPreviewTableViewer);
411 				conversionPreviewTableViewer.refresh();
412 
413 				return;
414 			}
415 		}
416 
417 		conversionPreviewTableViewer.getTable().setHeaderVisible(false);
418 		conversionPreviewTableViewer.getTable().removeAll();
419 		conversionPreviewTableViewer.getTable().setEnabled(false);
420 	}
421 
422 	/**
423 	 * Enables comboboxes after non-blocking rule selection.
424 	 *
425 	 * @param combos
426 	 *            the comboboxes to enable
427 	 */
428 	public void enableCombos(List<Combo> combos) {
429 		for (Combo combo : combos) {
430 			combo.setEnabled(true);
431 
432 			if (combo.equals(sourceEntityCombo)) {
433 				handleSourceEntityComboSelection();
434 			} else if (combo.equals(targetEntityCombo)) {
435 				handleTargetEntityComboSelection();
436 			} else if (combo.equals(dateCombo)) {
437 				handleDateComboSelection();
438 			}
439 		}
440 
441 		mediator.widgetModified();
442 		refreshConversionPreview();
443 	}
444 
445 	/**
446 	 * Disables comboboxes after blocking rule selection.
447 	 *
448 	 * @param combos
449 	 *            the comboboxes to disable
450 	 * @param rule
451 	 *            the selected conversion rule
452 	 */
453 	public void disableCombos(List<Combo> combos, IConversionRule rule) {
454 		for (Combo combo : combos) {
455 			combo.setEnabled(false);
456 			combo.deselectAll();
457 
458 			if (combo.equals(sourceEntityCombo)) {
459 				sourceEntityConfigBtn.setEnabled(false);
460 				sourceEntityRuleIdCache = null;
461 				mediator.setRuleDescriptionLabel(null, sourceRuleDescriptionLbl);
462 				mediator.setSourceNodeRule((ISourceNodeConversionRule)rule);
463 
464 			} else if (combo.equals(targetEntityCombo)) {
465 				targetEntityConfigBtn.setEnabled(false);
466 				targetEntityRuleIdCache = null;
467 				mediator.setRuleDescriptionLabel(null, targetRuleDescriptionLbl);
468 				mediator.setTargetNodeRule((ITargetNodeConversionRule)rule);
469 
470 			} else if (combo.equals(dateCombo)) {
471 				dateConfigBtn.setEnabled(false);
472 				dateRuleIdCache = null;
473 				mediator.setRuleDescriptionLabel(null, dateRuleDescriptionLbl);
474 				mediator.setDateRule((IDateConversionRule)rule);
475 			}
476 		}
477 
478 		mediator.widgetModified();
479 		refreshConversionPreview();
480 	}
481 
482 	/*----------------------------------------------------------------------------------------------------------*/
483 
484 	/*
485 	 * -----------------------------------------------------------------------------------------------------------
486 	 * --------------------------GETTERS AND SETTERS------------------------------------------------------
487 	 * -----------------------------------------------------------------------------------------------------------
488 	 */
489 
490 	/**
491 	 * Sets the mediator's mapping of rules to the comboboxes that handle their configuration.
492 	 */
493 	public void setRuleCombosMap() {
494 		Map<Class<? extends IConversionRule>, Combo> ruleCombosMap = new HashMap<Class<? extends IConversionRule>, Combo>();
495 		ruleCombosMap.put(ISourceNodeConversionRule.class, sourceEntityCombo);
496 		ruleCombosMap.put(ITargetNodeConversionRule.class, targetEntityCombo);
497 		ruleCombosMap.put(IDateConversionRule.class, dateCombo);
498 		mediator.setRuleCombosMap(ruleCombosMap);
499 	}
500 
501 	/**
502 	 * Retrieves the selected source entity rule identifier. If the source entity combo is disabled, returns
503 	 * <code>null</code>.
504 	 *
505 	 * @return the selected source rule identifier
506 	 */
507 	private String getSelectedSourceEntityRuleId() {
508 		if (!sourceEntityCombo.isEnabled()) {
509 			return null;
510 		}
511 
512 		return mediator.getSelectedRuleId(sourceEntityCombo);
513 	}
514 
515 	/**
516 	 * Retrieves the selected target entity rule identifier. If the target entity combo is disabled, returns
517 	 * <code>null</code>.
518 	 *
519 	 * @return the selected target rule identifier
520 	 */
521 	private String getSelectedTargetEntityRuleId() {
522 		if (!targetEntityCombo.isEnabled()) {
523 			return null;
524 		}
525 
526 		return mediator.getSelectedRuleId(targetEntityCombo);
527 	}
528 
529 	/**
530 	 * Retrieves the selected date rule identifier. If the date combo is disabled, returns <code>null</code>.
531 	 *
532 	 * @return the selected date rule identifier
533 	 */
534 	private String getSelectedDateRuleId() {
535 		if (!dateCombo.isEnabled()) {
536 			return null;
537 		}
538 
539 		return mediator.getSelectedRuleId(dateCombo);
540 	}
541 
542 	/*----------------------------------------------------------------------------------------------------------*/
543 }