1 package org.rcfaces.core.component;
2
3 import org.rcfaces.core.component.capability.IVisibilityCapability;
4 import org.rcfaces.core.internal.component.Properties;
5 import org.rcfaces.core.component.capability.ILayoutPositionCapability;
6 import java.util.Map;
7 import org.rcfaces.core.component.capability.IUserEventCapability;
8 import java.util.Collections;
9 import org.apache.commons.logging.LogFactory;
10 import org.rcfaces.core.internal.manager.IClientDataManager;
11 import org.rcfaces.core.component.capability.IForCapability;
12 import javax.faces.context.FacesContext;
13 import org.rcfaces.core.internal.tools.MarginTools;
14 import org.rcfaces.core.internal.Constants;
15 import org.rcfaces.core.internal.component.CameliaMessageComponent;
16 import org.rcfaces.core.component.capability.IServerDataCapability;
17 import org.rcfaces.core.internal.component.CameliaBaseComponent;
18 import org.apache.commons.logging.Log;
19 import java.util.Set;
20 import org.rcfaces.core.component.capability.IInitEventCapability;
21 import org.rcfaces.core.internal.tools.ComponentTools;
22 import org.rcfaces.core.component.capability.IPositionCapability;
23 import java.lang.Object;
24 import org.rcfaces.core.component.capability.IUnlockedClientAttributesCapability;
25 import org.rcfaces.core.component.capability.IPartialRenderingCapability;
26 import org.rcfaces.core.component.capability.IWAIRoleCapability;
27 import java.lang.String;
28 import org.rcfaces.core.component.capability.ILookAndFeelCapability;
29 import org.rcfaces.core.component.capability.IForegroundBackgroundColorCapability;
30 import org.rcfaces.core.component.capability.IHiddenModeCapability;
31 import org.rcfaces.core.component.capability.IPropertyChangeEventCapability;
32 import org.rcfaces.core.internal.component.IDataMapAccessor;
33 import org.rcfaces.core.internal.manager.IServerDataManager;
34 import org.rcfaces.core.component.capability.IMouseEventCapability;
35 import org.rcfaces.core.component.capability.IErrorEventCapability;
36 import javax.el.ValueExpression;
37 import org.rcfaces.core.component.capability.ISizeCapability;
38 import java.util.HashSet;
39 import org.rcfaces.core.component.capability.IClientDataCapability;
40 import org.rcfaces.core.component.capability.IHelpCapability;
41 import org.rcfaces.core.component.capability.IStyleClassCapability;
42 import java.util.Arrays;
43 import org.rcfaces.core.internal.converter.HiddenModeConverter;
44 import org.rcfaces.core.component.capability.IMarginCapability;
45
46
47
48
49 public abstract class AbstractMessageComponent extends CameliaMessageComponent implements
50 IMarginCapability,
51 IUserEventCapability,
52 IPositionCapability,
53 IHelpCapability,
54 IClientDataCapability,
55 IPartialRenderingCapability,
56 IStyleClassCapability,
57 ILookAndFeelCapability,
58 ISizeCapability,
59 IForegroundBackgroundColorCapability,
60 IVisibilityCapability,
61 IErrorEventCapability,
62 IWAIRoleCapability,
63 ILayoutPositionCapability,
64 IMouseEventCapability,
65 IUnlockedClientAttributesCapability,
66 IInitEventCapability,
67 IPropertyChangeEventCapability,
68 IHiddenModeCapability,
69 IServerDataCapability,
70 IClientDataManager,
71 IForCapability,
72 IServerDataManager {
73
74 private static final Log LOG = LogFactory.getLog(AbstractMessageComponent.class);
75
76 protected static final Set CAMELIA_ATTRIBUTES=new HashSet(CameliaMessageComponent.CAMELIA_ATTRIBUTES);
77 static {
78 CAMELIA_ATTRIBUTES.addAll(Arrays.asList(new String[] {"showSummary","visible","for","marginLeft","backgroundColor","errorListener","propertyChangeListener","helpURL","ariaLevel","height","hiddenMode","mouseOverListener","left","right","mouseOutListener","foregroundColor","waiRole","top","lookId","helpMessage","userEventListener","marginTop","styleClass","marginRight","width","partialRendering","showDetail","ariaLabel","initListener","unlockedClientAttributeNames","marginBottom","bottom","toolTipText","y","margins","x"}));
79 }
80
81
82 public Map getServerDataMap(FacesContext facesContext) {
83
84
85 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(facesContext, "serverData", false);
86 if (dataMapAccessor==null) {
87 return Collections.EMPTY_MAP;
88 }
89
90 Map map=dataMapAccessor.getDataMap(facesContext);
91 if (Constants.READ_ONLY_COLLECTION_LOCK_ENABLED) {
92 if (map.isEmpty()) {
93 return Collections.EMPTY_MAP;
94 }
95 map=Collections.unmodifiableMap(map);
96 }
97 return map;
98
99 }
100
101 public Object setServerData(String name, Object value) {
102
103
104 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", true);
105
106 return dataMapAccessor.setData(name, value, null);
107
108 }
109
110 public Map getClientDataMap(FacesContext facesContext) {
111
112
113 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(facesContext, "clientData", false);
114 if (dataMapAccessor==null) {
115 return Collections.EMPTY_MAP;
116 }
117
118 return dataMapAccessor.getDataMap(facesContext);
119
120 }
121
122 public String setClientData(String name, String value) {
123
124
125 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "clientData", true);
126
127 return (String)dataMapAccessor.setData(name, value, null);
128
129 }
130
131 public void setServerData(String name, ValueExpression value) {
132
133
134 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", true);
135
136 dataMapAccessor.setData(name, value, null);
137
138 }
139
140 public String[] listClientDataKeys(FacesContext facesContext) {
141
142
143 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "clientData", false);
144 if (dataMapAccessor==null) {
145 return ComponentTools.STRING_EMPTY_ARRAY;
146 }
147
148 return dataMapAccessor.listDataKeys(facesContext);
149
150 }
151
152 public void setClientData(String name, ValueExpression value) {
153
154
155 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "clientData", true);
156
157 dataMapAccessor.setData(name, value, null);
158
159 }
160
161 public String getClientData(String name, FacesContext facesContext) {
162
163
164 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "clientData", false);
165 if (dataMapAccessor==null) {
166 return null;
167 }
168
169 return (String)dataMapAccessor.getData(name, facesContext);
170
171 }
172
173 public Object getServerData(String name, FacesContext facesContext) {
174
175
176 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", false);
177 if (dataMapAccessor==null) {
178 return null;
179 }
180
181 return dataMapAccessor.getData(name, facesContext);
182
183 }
184
185 public void setMargins(String margins) {
186
187
188 MarginTools.setMargins(this, margins);
189
190 }
191
192 public String[] listServerDataKeys(FacesContext facesContext) {
193
194
195 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", false);
196 if (dataMapAccessor==null) {
197 return ComponentTools.STRING_EMPTY_ARRAY;
198 }
199
200 return dataMapAccessor.listDataKeys(facesContext);
201
202 }
203
204 public void setHiddenMode(String hiddenMode) {
205
206
207 setHiddenMode(((Integer)HiddenModeConverter.SINGLETON.getAsObject(null, this, hiddenMode)).intValue());
208
209 }
210
211 public Boolean getVisibleState(FacesContext facesContext) {
212
213
214 if (engine.isPropertySetted(Properties.VISIBLE)==false) {
215 return null;
216 }
217
218 return Boolean.valueOf(isVisible(facesContext));
219
220 }
221
222 public java.lang.String getMarginBottom() {
223 return getMarginBottom(null);
224 }
225
226
227
228
229 public java.lang.String getMarginBottom(javax.faces.context.FacesContext facesContext) {
230 return engine.getStringProperty(Properties.MARGIN_BOTTOM, facesContext);
231 }
232
233
234
235
236
237 public final boolean isMarginBottomSetted() {
238 return engine.isPropertySetted(Properties.MARGIN_BOTTOM);
239 }
240
241 public void setMarginBottom(java.lang.String marginBottom) {
242 engine.setProperty(Properties.MARGIN_BOTTOM, marginBottom);
243 }
244
245 public java.lang.String getMarginLeft() {
246 return getMarginLeft(null);
247 }
248
249
250
251
252 public java.lang.String getMarginLeft(javax.faces.context.FacesContext facesContext) {
253 return engine.getStringProperty(Properties.MARGIN_LEFT, facesContext);
254 }
255
256
257
258
259
260 public final boolean isMarginLeftSetted() {
261 return engine.isPropertySetted(Properties.MARGIN_LEFT);
262 }
263
264 public void setMarginLeft(java.lang.String marginLeft) {
265 engine.setProperty(Properties.MARGIN_LEFT, marginLeft);
266 }
267
268 public java.lang.String getMarginRight() {
269 return getMarginRight(null);
270 }
271
272
273
274
275 public java.lang.String getMarginRight(javax.faces.context.FacesContext facesContext) {
276 return engine.getStringProperty(Properties.MARGIN_RIGHT, facesContext);
277 }
278
279
280
281
282
283 public final boolean isMarginRightSetted() {
284 return engine.isPropertySetted(Properties.MARGIN_RIGHT);
285 }
286
287 public void setMarginRight(java.lang.String marginRight) {
288 engine.setProperty(Properties.MARGIN_RIGHT, marginRight);
289 }
290
291 public java.lang.String getMarginTop() {
292 return getMarginTop(null);
293 }
294
295
296
297
298 public java.lang.String getMarginTop(javax.faces.context.FacesContext facesContext) {
299 return engine.getStringProperty(Properties.MARGIN_TOP, facesContext);
300 }
301
302
303
304
305
306 public final boolean isMarginTopSetted() {
307 return engine.isPropertySetted(Properties.MARGIN_TOP);
308 }
309
310 public void setMarginTop(java.lang.String marginTop) {
311 engine.setProperty(Properties.MARGIN_TOP, marginTop);
312 }
313
314 public final void addUserEventListener(org.rcfaces.core.event.IUserEventListener listener) {
315 addFacesListener(listener);
316 }
317
318 public final void removeUserEventListener(org.rcfaces.core.event.IUserEventListener listener) {
319 removeFacesListener(listener);
320 }
321
322 public final javax.faces.event.FacesListener [] listUserEventListeners() {
323 return getFacesListeners(org.rcfaces.core.event.IUserEventListener.class);
324 }
325
326 public java.lang.String getX() {
327 return getX(null);
328 }
329
330
331
332
333 public java.lang.String getX(javax.faces.context.FacesContext facesContext) {
334 return engine.getStringProperty(Properties.X, facesContext);
335 }
336
337
338
339
340
341 public final boolean isXSetted() {
342 return engine.isPropertySetted(Properties.X);
343 }
344
345 public void setX(java.lang.String x) {
346 engine.setProperty(Properties.X, x);
347 }
348
349 public java.lang.String getY() {
350 return getY(null);
351 }
352
353
354
355
356 public java.lang.String getY(javax.faces.context.FacesContext facesContext) {
357 return engine.getStringProperty(Properties.Y, facesContext);
358 }
359
360
361
362
363
364 public final boolean isYSetted() {
365 return engine.isPropertySetted(Properties.Y);
366 }
367
368 public void setY(java.lang.String y) {
369 engine.setProperty(Properties.Y, y);
370 }
371
372 public java.lang.String getHelpMessage() {
373 return getHelpMessage(null);
374 }
375
376
377
378
379 public java.lang.String getHelpMessage(javax.faces.context.FacesContext facesContext) {
380 return engine.getStringProperty(Properties.HELP_MESSAGE, facesContext);
381 }
382
383
384
385
386
387 public final boolean isHelpMessageSetted() {
388 return engine.isPropertySetted(Properties.HELP_MESSAGE);
389 }
390
391 public void setHelpMessage(java.lang.String helpMessage) {
392 engine.setProperty(Properties.HELP_MESSAGE, helpMessage);
393 }
394
395 public java.lang.String getHelpURL() {
396 return getHelpURL(null);
397 }
398
399
400
401
402 public java.lang.String getHelpURL(javax.faces.context.FacesContext facesContext) {
403 return engine.getStringProperty(Properties.HELP_URL, facesContext);
404 }
405
406
407
408
409
410 public final boolean isHelpURLSetted() {
411 return engine.isPropertySetted(Properties.HELP_URL);
412 }
413
414 public void setHelpURL(java.lang.String helpURL) {
415 engine.setProperty(Properties.HELP_URL, helpURL);
416 }
417
418 public java.lang.String getToolTipText() {
419 return getToolTipText(null);
420 }
421
422
423
424
425 public java.lang.String getToolTipText(javax.faces.context.FacesContext facesContext) {
426 return engine.getStringProperty(Properties.TOOL_TIP_TEXT, facesContext);
427 }
428
429
430
431
432
433 public final boolean isToolTipTextSetted() {
434 return engine.isPropertySetted(Properties.TOOL_TIP_TEXT);
435 }
436
437 public void setToolTipText(java.lang.String toolTipText) {
438 engine.setProperty(Properties.TOOL_TIP_TEXT, toolTipText);
439 }
440
441 public int getClientDataCount() {
442
443
444 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "clientData", false);
445 if (dataMapAccessor==null) {
446 return 0;
447 }
448
449 return dataMapAccessor.getDataCount();
450
451 }
452
453 public String[] listClientDataKeys() {
454
455
456 return listClientDataKeys(null);
457
458 }
459
460 public String removeClientData(String name) {
461
462
463 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "clientData", false);
464 if (dataMapAccessor==null) {
465 return null;
466 }
467
468 return (String)dataMapAccessor.removeData(name, null);
469
470 }
471
472 public String getClientData(String name) {
473
474
475 return getClientData(name, null);
476
477 }
478
479 public Map getClientDataMap() {
480
481
482 return getClientDataMap(null);
483
484 }
485
486 public boolean isPartialRendering() {
487 return isPartialRendering(null);
488 }
489
490
491
492
493 public boolean isPartialRendering(javax.faces.context.FacesContext facesContext) {
494 return engine.getBoolProperty(Properties.PARTIAL_RENDERING, false, facesContext);
495 }
496
497
498
499
500
501 public final boolean isPartialRenderingSetted() {
502 return engine.isPropertySetted(Properties.PARTIAL_RENDERING);
503 }
504
505 public void setPartialRendering(boolean partialRendering) {
506 engine.setProperty(Properties.PARTIAL_RENDERING, partialRendering);
507 }
508
509 public java.lang.String getStyleClass() {
510 return getStyleClass(null);
511 }
512
513
514
515
516 public java.lang.String getStyleClass(javax.faces.context.FacesContext facesContext) {
517 return engine.getStringProperty(Properties.STYLE_CLASS, facesContext);
518 }
519
520
521
522
523
524 public final boolean isStyleClassSetted() {
525 return engine.isPropertySetted(Properties.STYLE_CLASS);
526 }
527
528 public void setStyleClass(java.lang.String styleClass) {
529 engine.setProperty(Properties.STYLE_CLASS, styleClass);
530 }
531
532 public java.lang.String getLookId() {
533 return getLookId(null);
534 }
535
536
537
538
539 public java.lang.String getLookId(javax.faces.context.FacesContext facesContext) {
540 return engine.getStringProperty(Properties.LOOK_ID, facesContext);
541 }
542
543
544
545
546
547 public final boolean isLookIdSetted() {
548 return engine.isPropertySetted(Properties.LOOK_ID);
549 }
550
551 public void setLookId(java.lang.String lookId) {
552 engine.setProperty(Properties.LOOK_ID, lookId);
553 }
554
555 public java.lang.String getWidth() {
556 return getWidth(null);
557 }
558
559
560
561
562 public java.lang.String getWidth(javax.faces.context.FacesContext facesContext) {
563 return engine.getStringProperty(Properties.WIDTH, facesContext);
564 }
565
566
567
568
569
570 public final boolean isWidthSetted() {
571 return engine.isPropertySetted(Properties.WIDTH);
572 }
573
574 public void setWidth(java.lang.String width) {
575 engine.setProperty(Properties.WIDTH, width);
576 }
577
578 public java.lang.String getHeight() {
579 return getHeight(null);
580 }
581
582
583
584
585 public java.lang.String getHeight(javax.faces.context.FacesContext facesContext) {
586 return engine.getStringProperty(Properties.HEIGHT, facesContext);
587 }
588
589
590
591
592
593 public final boolean isHeightSetted() {
594 return engine.isPropertySetted(Properties.HEIGHT);
595 }
596
597 public void setHeight(java.lang.String height) {
598 engine.setProperty(Properties.HEIGHT, height);
599 }
600
601 public java.lang.String getBackgroundColor() {
602 return getBackgroundColor(null);
603 }
604
605
606
607
608 public java.lang.String getBackgroundColor(javax.faces.context.FacesContext facesContext) {
609 return engine.getStringProperty(Properties.BACKGROUND_COLOR, facesContext);
610 }
611
612
613
614
615
616 public final boolean isBackgroundColorSetted() {
617 return engine.isPropertySetted(Properties.BACKGROUND_COLOR);
618 }
619
620 public void setBackgroundColor(java.lang.String backgroundColor) {
621 engine.setProperty(Properties.BACKGROUND_COLOR, backgroundColor);
622 }
623
624 public java.lang.String getForegroundColor() {
625 return getForegroundColor(null);
626 }
627
628
629
630
631 public java.lang.String getForegroundColor(javax.faces.context.FacesContext facesContext) {
632 return engine.getStringProperty(Properties.FOREGROUND_COLOR, facesContext);
633 }
634
635
636
637
638
639 public final boolean isForegroundColorSetted() {
640 return engine.isPropertySetted(Properties.FOREGROUND_COLOR);
641 }
642
643 public void setForegroundColor(java.lang.String foregroundColor) {
644 engine.setProperty(Properties.FOREGROUND_COLOR, foregroundColor);
645 }
646
647 public boolean isVisible() {
648 return isVisible(null);
649 }
650
651
652
653
654 public boolean isVisible(javax.faces.context.FacesContext facesContext) {
655 return engine.getBoolProperty(Properties.VISIBLE, true, facesContext);
656 }
657
658
659
660
661
662 public final boolean isVisibleSetted() {
663 return engine.isPropertySetted(Properties.VISIBLE);
664 }
665
666 public void setVisible(boolean visible) {
667 engine.setProperty(Properties.VISIBLE, visible);
668 }
669
670 public Boolean getVisibleState() {
671
672
673 return getVisibleState(null);
674
675 }
676
677 public final void addErrorListener(org.rcfaces.core.event.IErrorListener listener) {
678 addFacesListener(listener);
679 }
680
681 public final void removeErrorListener(org.rcfaces.core.event.IErrorListener listener) {
682 removeFacesListener(listener);
683 }
684
685 public final javax.faces.event.FacesListener [] listErrorListeners() {
686 return getFacesListeners(org.rcfaces.core.event.IErrorListener.class);
687 }
688
689 public java.lang.String getAriaLabel() {
690 return getAriaLabel(null);
691 }
692
693
694
695
696 public java.lang.String getAriaLabel(javax.faces.context.FacesContext facesContext) {
697 return engine.getStringProperty(Properties.ARIA_LABEL, facesContext);
698 }
699
700
701
702
703
704 public final boolean isAriaLabelSetted() {
705 return engine.isPropertySetted(Properties.ARIA_LABEL);
706 }
707
708 public void setAriaLabel(java.lang.String ariaLabel) {
709 engine.setProperty(Properties.ARIA_LABEL, ariaLabel);
710 }
711
712 public int getAriaLevel() {
713 return getAriaLevel(null);
714 }
715
716
717
718
719 public int getAriaLevel(javax.faces.context.FacesContext facesContext) {
720 return engine.getIntProperty(Properties.ARIA_LEVEL,0, facesContext);
721 }
722
723
724
725
726
727 public final boolean isAriaLevelSetted() {
728 return engine.isPropertySetted(Properties.ARIA_LEVEL);
729 }
730
731 public void setAriaLevel(int ariaLevel) {
732 engine.setProperty(Properties.ARIA_LEVEL, ariaLevel);
733 }
734
735 public java.lang.String getWaiRole() {
736 return getWaiRole(null);
737 }
738
739
740
741
742 public java.lang.String getWaiRole(javax.faces.context.FacesContext facesContext) {
743 return engine.getStringProperty(Properties.WAI_ROLE, facesContext);
744 }
745
746
747
748
749
750 public final boolean isWaiRoleSetted() {
751 return engine.isPropertySetted(Properties.WAI_ROLE);
752 }
753
754 public void setWaiRole(java.lang.String waiRole) {
755 engine.setProperty(Properties.WAI_ROLE, waiRole);
756 }
757
758 public int getBottom() {
759 return getBottom(null);
760 }
761
762
763
764
765 public int getBottom(javax.faces.context.FacesContext facesContext) {
766 return engine.getIntProperty(Properties.BOTTOM,0, facesContext);
767 }
768
769
770
771
772
773 public final boolean isBottomSetted() {
774 return engine.isPropertySetted(Properties.BOTTOM);
775 }
776
777 public void setBottom(int bottom) {
778 engine.setProperty(Properties.BOTTOM, bottom);
779 }
780
781 public int getLeft() {
782 return getLeft(null);
783 }
784
785
786
787
788 public int getLeft(javax.faces.context.FacesContext facesContext) {
789 return engine.getIntProperty(Properties.LEFT,0, facesContext);
790 }
791
792
793
794
795
796 public final boolean isLeftSetted() {
797 return engine.isPropertySetted(Properties.LEFT);
798 }
799
800 public void setLeft(int left) {
801 engine.setProperty(Properties.LEFT, left);
802 }
803
804 public int getRight() {
805 return getRight(null);
806 }
807
808
809
810
811 public int getRight(javax.faces.context.FacesContext facesContext) {
812 return engine.getIntProperty(Properties.RIGHT,0, facesContext);
813 }
814
815
816
817
818
819 public final boolean isRightSetted() {
820 return engine.isPropertySetted(Properties.RIGHT);
821 }
822
823 public void setRight(int right) {
824 engine.setProperty(Properties.RIGHT, right);
825 }
826
827 public int getTop() {
828 return getTop(null);
829 }
830
831
832
833
834 public int getTop(javax.faces.context.FacesContext facesContext) {
835 return engine.getIntProperty(Properties.TOP,0, facesContext);
836 }
837
838
839
840
841
842 public final boolean isTopSetted() {
843 return engine.isPropertySetted(Properties.TOP);
844 }
845
846 public void setTop(int top) {
847 engine.setProperty(Properties.TOP, top);
848 }
849
850 public final void addMouseOutListener(org.rcfaces.core.event.IMouseOutListener listener) {
851 addFacesListener(listener);
852 }
853
854 public final void removeMouseOutListener(org.rcfaces.core.event.IMouseOutListener listener) {
855 removeFacesListener(listener);
856 }
857
858 public final javax.faces.event.FacesListener [] listMouseOutListeners() {
859 return getFacesListeners(org.rcfaces.core.event.IMouseOutListener.class);
860 }
861
862 public final void addMouseOverListener(org.rcfaces.core.event.IMouseOverListener listener) {
863 addFacesListener(listener);
864 }
865
866 public final void removeMouseOverListener(org.rcfaces.core.event.IMouseOverListener listener) {
867 removeFacesListener(listener);
868 }
869
870 public final javax.faces.event.FacesListener [] listMouseOverListeners() {
871 return getFacesListeners(org.rcfaces.core.event.IMouseOverListener.class);
872 }
873
874 public java.lang.String getUnlockedClientAttributeNames() {
875 return getUnlockedClientAttributeNames(null);
876 }
877
878
879
880
881 public java.lang.String getUnlockedClientAttributeNames(javax.faces.context.FacesContext facesContext) {
882 return engine.getStringProperty(Properties.UNLOCKED_CLIENT_ATTRIBUTE_NAMES, facesContext);
883 }
884
885
886
887
888
889 public final boolean isUnlockedClientAttributeNamesSetted() {
890 return engine.isPropertySetted(Properties.UNLOCKED_CLIENT_ATTRIBUTE_NAMES);
891 }
892
893 public void setUnlockedClientAttributeNames(java.lang.String unlockedClientAttributeNames) {
894 engine.setProperty(Properties.UNLOCKED_CLIENT_ATTRIBUTE_NAMES, unlockedClientAttributeNames);
895 }
896
897 public final void addInitListener(org.rcfaces.core.event.IInitListener listener) {
898 addFacesListener(listener);
899 }
900
901 public final void removeInitListener(org.rcfaces.core.event.IInitListener listener) {
902 removeFacesListener(listener);
903 }
904
905 public final javax.faces.event.FacesListener [] listInitListeners() {
906 return getFacesListeners(org.rcfaces.core.event.IInitListener.class);
907 }
908
909 public final void addPropertyChangeListener(org.rcfaces.core.event.IPropertyChangeListener listener) {
910 addFacesListener(listener);
911 }
912
913 public final void removePropertyChangeListener(org.rcfaces.core.event.IPropertyChangeListener listener) {
914 removeFacesListener(listener);
915 }
916
917 public final javax.faces.event.FacesListener [] listPropertyChangeListeners() {
918 return getFacesListeners(org.rcfaces.core.event.IPropertyChangeListener.class);
919 }
920
921 public int getHiddenMode() {
922 return getHiddenMode(null);
923 }
924
925
926
927
928 public int getHiddenMode(javax.faces.context.FacesContext facesContext) {
929 return engine.getIntProperty(Properties.HIDDEN_MODE,IHiddenModeCapability.DEFAULT_HIDDEN_MODE, facesContext);
930 }
931
932
933
934
935
936 public final boolean isHiddenModeSetted() {
937 return engine.isPropertySetted(Properties.HIDDEN_MODE);
938 }
939
940 public void setHiddenMode(int hiddenMode) {
941 engine.setProperty(Properties.HIDDEN_MODE, hiddenMode);
942 }
943
944 public String[] listServerDataKeys() {
945
946
947 return listServerDataKeys(null);
948
949 }
950
951 public Map getServerDataMap() {
952
953
954 return getServerDataMap(null);
955
956 }
957
958 public int getServerDataCount() {
959
960
961 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", false);
962 if (dataMapAccessor==null) {
963 return 0;
964 }
965
966 return dataMapAccessor.getDataCount();
967
968 }
969
970 public Object getServerData(String name) {
971
972
973 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", false);
974 if (dataMapAccessor==null) {
975 return null;
976 }
977
978 return dataMapAccessor.getData(name, null);
979
980 }
981
982 public Object removeServerData(String name) {
983
984
985 IDataMapAccessor dataMapAccessor=engine.getDataMapAccessor(null, "serverData", false);
986 if (dataMapAccessor==null) {
987 return null;
988 }
989
990 return dataMapAccessor.removeData(name, null);
991
992 }
993
994 protected Set getCameliaFields() {
995 return CAMELIA_ATTRIBUTES;
996 }
997 }