KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > facelets > compiler > UILeaf


1 /**
2  * Licensed under the Common Development and Distribution License,
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://www.sun.com/cddl/
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11  * implied. See the License for the specific language governing
12  * permissions and limitations under the License.
13  */

14
15 package com.sun.facelets.compiler;
16
17 import java.io.IOException JavaDoc;
18 import java.util.Collections JavaDoc;
19 import java.util.HashMap JavaDoc;
20 import java.util.Iterator JavaDoc;
21 import java.util.List JavaDoc;
22 import java.util.Map JavaDoc;
23
24 import javax.el.ValueExpression;
25 import javax.faces.component.UIComponent;
26 import javax.faces.component.UIComponentBase;
27 import javax.faces.context.FacesContext;
28 import javax.faces.context.ResponseWriter;
29 import javax.faces.el.ValueBinding;
30 import javax.faces.event.AbortProcessingException;
31 import javax.faces.event.FacesEvent;
32 import javax.faces.event.FacesListener;
33 import javax.faces.render.Renderer;
34
35 import com.sun.facelets.el.ELText;
36
37 class UILeaf extends UIComponentBase {
38     
39     private final static Map JavaDoc facets = new HashMap JavaDoc(){
40     
41         public void putAll(Map JavaDoc map) {
42             // do nothing
43
}
44     
45         public Object JavaDoc put(Object JavaDoc name, Object JavaDoc value) {
46             return null;
47         }
48     };
49     
50     private UIComponent parent;
51
52     public ValueBinding getValueBinding(String JavaDoc binding) {
53         return null;
54     }
55
56     public void setValueBinding(String JavaDoc name, ValueBinding binding) {
57         // do nothing
58
}
59
60     public ValueExpression getValueExpression(String JavaDoc name) {
61         return null;
62     }
63
64     public void setValueExpression(String JavaDoc name, ValueExpression arg1) {
65         // do nothing
66
}
67
68     public String JavaDoc getFamily() {
69         return "facelets.LiteralText";
70     }
71
72     public UIComponent getParent() {
73         return this.parent;
74     }
75
76     public void setParent(UIComponent parent) {
77         this.parent = parent;
78     }
79
80     public boolean isRendered() {
81         return true;
82     }
83
84     public void setRendered(boolean rendered) {
85         // do nothing
86
}
87
88     public String JavaDoc getRendererType() {
89         return null;
90     }
91
92     public void setRendererType(String JavaDoc rendererType) {
93         // do nothing
94
}
95
96     public boolean getRendersChildren() {
97         return true;
98     }
99
100     public List JavaDoc getChildren() {
101         return Collections.EMPTY_LIST;
102     }
103
104     public int getChildCount() {
105         return 0;
106     }
107
108     public UIComponent findComponent(String JavaDoc id) {
109         return null;
110     }
111
112     public Map JavaDoc getFacets() {
113         return facets;
114     }
115
116     public int getFacetCount() {
117         return 0;
118     }
119
120     public UIComponent getFacet(String JavaDoc name) {
121         return null;
122     }
123
124     public Iterator JavaDoc getFacetsAndChildren() {
125         return Collections.EMPTY_LIST.iterator();
126     }
127
128     public void broadcast(FacesEvent event) throws AbortProcessingException {
129         // do nothing
130
}
131
132     public void decode(FacesContext faces) {
133         // do nothing
134
}
135
136     public void encodeBegin(FacesContext faces) throws IOException JavaDoc {
137         // do nothing
138
}
139
140     public void encodeChildren(FacesContext faces) throws IOException JavaDoc {
141         // do nothing
142
}
143
144     public void encodeEnd(FacesContext faces) throws IOException JavaDoc {
145         // do nothing
146
}
147
148     public void encodeAll(FacesContext faces) throws IOException JavaDoc {
149         this.encodeBegin(faces);
150     }
151
152     protected void addFacesListener(FacesListener faces) {
153         // do nothing
154
}
155
156     protected FacesListener[] getFacesListeners(Class JavaDoc faces) {
157         return null;
158     }
159
160     protected void removeFacesListener(FacesListener faces) {
161         // do nothing
162
}
163
164     public void queueEvent(FacesEvent event) {
165         // do nothing
166
}
167
168     public void processRestoreState(FacesContext faces, Object JavaDoc state) {
169         // do nothing
170
}
171
172     public void processDecodes(FacesContext faces) {
173         // do nothing
174
}
175
176     public void processValidators(FacesContext faces) {
177         // do nothing
178
}
179
180     public void processUpdates(FacesContext faces) {
181         // do nothing
182
}
183
184     public Object JavaDoc processSaveState(FacesContext faces) {
185         return null;
186     }
187
188     protected FacesContext getFacesContext() {
189         return FacesContext.getCurrentInstance();
190     }
191
192     protected Renderer getRenderer(FacesContext faces) {
193         return null;
194     }
195
196     public Object JavaDoc saveState(FacesContext faces) {
197         return null;
198     }
199
200     public void restoreState(FacesContext faces, Object JavaDoc state) {
201         // do nothing
202
}
203
204     public boolean isTransient() {
205         return true;
206     }
207
208     public void setTransient(boolean tranzient) {
209         // do nothing
210
}
211
212 }
213
Popular Tags