PageRenderTime 59ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/jboss-as-7.1.1.Final/weld/src/main/java/org/jboss/as/weld/webtier/jsf/ForwardingApplication.java

#
Java | 396 lines | 307 code | 69 blank | 20 comment | 0 complexity | 01cb393e2e5b839d9fbf40756efd8cfa MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2008, Red Hat Middleware LLC, and individual contributors
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package org.jboss.as.weld.webtier.jsf;
  18. import javax.el.ELContextListener;
  19. import javax.el.ELException;
  20. import javax.el.ELResolver;
  21. import javax.el.ExpressionFactory;
  22. import javax.el.ValueExpression;
  23. import javax.faces.FacesException;
  24. import javax.faces.application.Application;
  25. import javax.faces.application.NavigationHandler;
  26. import javax.faces.application.ProjectStage;
  27. import javax.faces.application.Resource;
  28. import javax.faces.application.ResourceHandler;
  29. import javax.faces.application.StateManager;
  30. import javax.faces.application.ViewHandler;
  31. import javax.faces.component.UIComponent;
  32. import javax.faces.component.behavior.Behavior;
  33. import javax.faces.context.FacesContext;
  34. import javax.faces.convert.Converter;
  35. import javax.faces.el.MethodBinding;
  36. import javax.faces.el.PropertyResolver;
  37. import javax.faces.el.ReferenceSyntaxException;
  38. import javax.faces.el.ValueBinding;
  39. import javax.faces.el.VariableResolver;
  40. import javax.faces.event.ActionListener;
  41. import javax.faces.event.SystemEvent;
  42. import javax.faces.event.SystemEventListener;
  43. import javax.faces.validator.Validator;
  44. import java.util.Collection;
  45. import java.util.Iterator;
  46. import java.util.Locale;
  47. import java.util.Map;
  48. import java.util.ResourceBundle;
  49. /**
  50. * @author pmuir
  51. *
  52. */
  53. @SuppressWarnings({"deprecation"})
  54. public abstract class ForwardingApplication extends Application {
  55. protected abstract Application delegate();
  56. public void addBehavior(String behaviorId, String behaviorClass) {
  57. delegate().addBehavior(behaviorId, behaviorClass);
  58. }
  59. public void addComponent(String componentType, String componentClass) {
  60. delegate().addComponent(componentType, componentClass);
  61. }
  62. public void addConverter(String converterId, String converterClass) {
  63. delegate().addConverter(converterId, converterClass);
  64. }
  65. @SuppressWarnings("unchecked")
  66. @Override
  67. public void addConverter(Class targetClass, String converterClass) {
  68. delegate().addConverter(targetClass, converterClass);
  69. }
  70. @Override
  71. public void addDefaultValidatorId(String validatorId) {
  72. delegate().addDefaultValidatorId(validatorId);
  73. }
  74. @Override
  75. public void addELContextListener(ELContextListener listener) {
  76. delegate().addELContextListener(listener);
  77. }
  78. @Override
  79. public void addELResolver(ELResolver resolver) {
  80. delegate().addELResolver(resolver);
  81. }
  82. @Override
  83. public void addValidator(String validatorId, String validatorClass) {
  84. delegate().addValidator(validatorId, validatorClass);
  85. }
  86. @Override
  87. public Behavior createBehavior(String behaviorId) throws FacesException {
  88. return delegate().createBehavior(behaviorId);
  89. }
  90. @Override
  91. public UIComponent createComponent(FacesContext context, Resource componentResource) {
  92. return delegate().createComponent(context, componentResource);
  93. }
  94. @Override
  95. public UIComponent createComponent(FacesContext context, String componentType, String rendererType) {
  96. return delegate().createComponent(context, componentType, rendererType);
  97. }
  98. @Override
  99. public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType)
  100. throws FacesException {
  101. return delegate().createComponent(componentExpression, context, componentType);
  102. }
  103. @Override
  104. public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType,
  105. String rendererType) {
  106. return delegate().createComponent(componentExpression, context, componentType, rendererType);
  107. }
  108. @Override
  109. public UIComponent createComponent(String componentType) throws FacesException {
  110. return delegate().createComponent(componentType);
  111. }
  112. @Override
  113. @Deprecated
  114. public UIComponent createComponent(ValueBinding componentBinding, FacesContext context, String componentType)
  115. throws FacesException {
  116. return delegate().createComponent(componentBinding, context, componentType);
  117. }
  118. @Override
  119. public Converter createConverter(String converterId) {
  120. return delegate().createConverter(converterId);
  121. }
  122. @SuppressWarnings("unchecked")
  123. @Override
  124. public Converter createConverter(Class targetClass) {
  125. return delegate().createConverter(targetClass);
  126. }
  127. @SuppressWarnings("unchecked")
  128. @Deprecated
  129. @Override
  130. public MethodBinding createMethodBinding(String ref, Class[] params) throws ReferenceSyntaxException {
  131. return delegate().createMethodBinding(ref, params);
  132. }
  133. @Override
  134. public Validator createValidator(String validatorId) throws FacesException {
  135. return delegate().createValidator(validatorId);
  136. }
  137. @Override
  138. @Deprecated
  139. public ValueBinding createValueBinding(String ref) throws ReferenceSyntaxException {
  140. return delegate().createValueBinding(ref);
  141. }
  142. @Override
  143. public <T> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType)
  144. throws ELException {
  145. return delegate().evaluateExpressionGet(context, expression, expectedType);
  146. }
  147. @Override
  148. public ActionListener getActionListener() {
  149. return delegate().getActionListener();
  150. }
  151. @Override
  152. public Iterator<String> getBehaviorIds() {
  153. return delegate().getBehaviorIds();
  154. }
  155. @Override
  156. public Iterator<String> getComponentTypes() {
  157. return delegate().getComponentTypes();
  158. }
  159. @Override
  160. public Iterator<String> getConverterIds() {
  161. return delegate().getConverterIds();
  162. }
  163. @SuppressWarnings("unchecked")
  164. @Override
  165. public Iterator<Class<?>> getConverterTypes() {
  166. return delegate().getConverterTypes();
  167. }
  168. @Override
  169. public Locale getDefaultLocale() {
  170. return delegate().getDefaultLocale();
  171. }
  172. @Override
  173. public String getDefaultRenderKitId() {
  174. return delegate().getDefaultRenderKitId();
  175. }
  176. @Override
  177. public Map<String, String> getDefaultValidatorInfo() {
  178. return delegate().getDefaultValidatorInfo();
  179. }
  180. @Override
  181. public ELContextListener[] getELContextListeners() {
  182. return delegate().getELContextListeners();
  183. }
  184. @Override
  185. public ELResolver getELResolver() {
  186. return delegate().getELResolver();
  187. }
  188. @Override
  189. public ExpressionFactory getExpressionFactory() {
  190. return delegate().getExpressionFactory();
  191. }
  192. @Override
  193. public String getMessageBundle() {
  194. return delegate().getMessageBundle();
  195. }
  196. @Override
  197. public NavigationHandler getNavigationHandler() {
  198. return delegate().getNavigationHandler();
  199. }
  200. @Override
  201. @Deprecated
  202. public PropertyResolver getPropertyResolver() {
  203. return delegate().getPropertyResolver();
  204. }
  205. @Override
  206. public ProjectStage getProjectStage() {
  207. return delegate().getProjectStage();
  208. }
  209. @Override
  210. public ResourceBundle getResourceBundle(FacesContext ctx, String name) {
  211. return delegate().getResourceBundle(ctx, name);
  212. }
  213. @Override
  214. public ResourceHandler getResourceHandler() {
  215. return delegate().getResourceHandler();
  216. }
  217. @Override
  218. public StateManager getStateManager() {
  219. return delegate().getStateManager();
  220. }
  221. @Override
  222. public Iterator<Locale> getSupportedLocales() {
  223. return delegate().getSupportedLocales();
  224. }
  225. @Override
  226. public Iterator<String> getValidatorIds() {
  227. return delegate().getValidatorIds();
  228. }
  229. @Override
  230. @Deprecated
  231. public VariableResolver getVariableResolver() {
  232. return delegate().getVariableResolver();
  233. }
  234. @Override
  235. public ViewHandler getViewHandler() {
  236. return delegate().getViewHandler();
  237. }
  238. @Override
  239. public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType,
  240. Object source) {
  241. delegate().publishEvent(context, systemEventClass, sourceBaseType, source);
  242. }
  243. @Override
  244. public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source) {
  245. delegate().publishEvent(context, systemEventClass, source);
  246. }
  247. @Override
  248. public void removeELContextListener(ELContextListener listener) {
  249. delegate().removeELContextListener(listener);
  250. }
  251. @Override
  252. public void setActionListener(ActionListener listener) {
  253. delegate().setActionListener(listener);
  254. }
  255. @Override
  256. public void setDefaultLocale(Locale locale) {
  257. delegate().setDefaultLocale(locale);
  258. }
  259. @Override
  260. public void setDefaultRenderKitId(String renderKitId) {
  261. delegate().setDefaultRenderKitId(renderKitId);
  262. }
  263. @Override
  264. public void setMessageBundle(String bundle) {
  265. delegate().setMessageBundle(bundle);
  266. }
  267. @Override
  268. public void setNavigationHandler(NavigationHandler handler) {
  269. delegate().setNavigationHandler(handler);
  270. }
  271. @Override
  272. @Deprecated
  273. public void setPropertyResolver(PropertyResolver resolver) {
  274. delegate().setPropertyResolver(resolver);
  275. }
  276. @Override
  277. public void setResourceHandler(ResourceHandler resourceHandler) {
  278. delegate().setResourceHandler(resourceHandler);
  279. }
  280. @Override
  281. public void setStateManager(StateManager manager) {
  282. delegate().setStateManager(manager);
  283. }
  284. @Override
  285. public void setSupportedLocales(Collection<Locale> locales) {
  286. delegate().setSupportedLocales(locales);
  287. }
  288. @Override
  289. @Deprecated
  290. public void setVariableResolver(VariableResolver resolver) {
  291. delegate().setVariableResolver(resolver);
  292. }
  293. @Override
  294. public void setViewHandler(ViewHandler handler) {
  295. delegate().setViewHandler(handler);
  296. }
  297. @Override
  298. public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass,
  299. SystemEventListener listener) {
  300. delegate().subscribeToEvent(systemEventClass, sourceClass, listener);
  301. }
  302. @Override
  303. public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener) {
  304. delegate().subscribeToEvent(systemEventClass, listener);
  305. }
  306. @Override
  307. public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass,
  308. SystemEventListener listener) {
  309. delegate().unsubscribeFromEvent(systemEventClass, sourceClass, listener);
  310. }
  311. @Override
  312. public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener) {
  313. delegate().unsubscribeFromEvent(systemEventClass, listener);
  314. }
  315. @Override
  316. public boolean equals(Object obj) {
  317. return delegate().equals(obj);
  318. }
  319. @Override
  320. public int hashCode() {
  321. return delegate().hashCode();
  322. }
  323. @Override
  324. public String toString() {
  325. return delegate().toString();
  326. }
  327. }