1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.trinidad.component;
20
21 import java.io.IOException;
22 import java.util.Iterator;
23 import java.util.List;
24 import java.util.Map;
25 import javax.faces.component.UIComponent;
26
27 import javax.faces.context.FacesContext;
28 import javax.faces.el.MethodBinding;
29 import javax.faces.event.FacesListener;
30 import org.apache.myfaces.trinidad.bean.FacesBean;
31 import org.apache.myfaces.trinidad.event.AttributeChangeListener;
32
33 /**
34 * Pure abstract base class for all UIX components.
35 */
36 abstract public class UIXComponent extends UIComponent
37 {
38 /**
39 * Returns the FacesBean used for storing the component's state.
40 */
41 abstract public FacesBean getFacesBean();
42
43 /**
44 * Adds an AttributeChangeListener. Attribute change events are not
45 * delivered for any programmatic change to a property. They are only
46 * delivered when a renderer changes a property without the application's
47 * specific request. An example of an attribute change events might
48 * include the width of a column that supported client-side resizing.
49 */
50 abstract public void addAttributeChangeListener(AttributeChangeListener acl);
51
52 /**
53 * Removes an AttributeChangeListener. Attribute change events are not
54 * delivered for any programmatic change to a property. They are only
55 * delivered when a renderer changes a property without the application's
56 * specific request. An example of an attribute change events might
57 * include the width of a column that supported client-side resizing.
58 */
59 abstract public void removeAttributeChangeListener(AttributeChangeListener acl);
60
61 /**
62 * Gets the registered AttributeChangeListeners.
63 */
64 abstract public AttributeChangeListener[] getAttributeChangeListeners();
65
66 /**
67 * Sets a method binding to an AttributeChangeListener. Attribute
68 * change events are not
69 * delivered for any programmatic change to a property. They are only
70 * delivered when a renderer changes a property without the application's
71 * specific request. An example of an attribute change events might
72 * include the width of a column that supported client-side resizing.
73 */
74 abstract public void setAttributeChangeListener(MethodBinding mb);
75
76 /**
77 * Gets the method binding to an AttributeChangeListener. Attribute
78 * change events are not
79 * delivered for any programmatic change to a property. They are only
80 * delivered when a renderer changes a property without the application's
81 * specific request. An example of an attribute change events might
82 * include the width of a column that supported client-side resizing.
83 */
84 abstract public MethodBinding getAttributeChangeListener();
85
86 abstract public void markInitialState();
87
88
89 abstract public int getFacetCount();
90 abstract public void encodeAll(FacesContext context) throws IOException;
91
92
93
94
95 @SuppressWarnings("unchecked")
96 @Override
97 public abstract Map getAttributes();
98
99 @SuppressWarnings("unchecked")
100 @Override
101 public abstract List getChildren();
102
103 @SuppressWarnings("unchecked")
104 @Override
105 public abstract Map getFacets();
106
107 @SuppressWarnings("unchecked")
108 @Override
109 public abstract Iterator getFacetsAndChildren();
110
111 @SuppressWarnings("unchecked")
112 @Override
113 protected abstract FacesListener[] getFacesListeners(Class clazz);
114
115 public abstract Object saveState(FacesContext context);
116 public abstract void restoreState(FacesContext context, Object state);
117 public abstract boolean isTransient();
118 public abstract void setTransient(boolean trans);
119 }