From 50cd595762e88efcea47c29dc7bc419233efed20 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 24 Jun 2010 16:29:11 +0000 Subject: [PATCH] SWF-1261 Move methods that belong to FlowApplication from Jsf2FlowApplication --- spring-faces/ivy.xml | 6 +-- .../faces/webflow/FlowApplication.java | 44 +++++++++++++++++++ .../faces/webflow/Jsf2FlowApplication.java | 43 ------------------ 3 files changed, 47 insertions(+), 46 deletions(-) diff --git a/spring-faces/ivy.xml b/spring-faces/ivy.xml index adcdca12..2f194238 100644 --- a/spring-faces/ivy.xml +++ b/spring-faces/ivy.xml @@ -41,12 +41,12 @@ - + - + @@ -66,7 +66,7 @@ - + diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowApplication.java b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowApplication.java index c05a4967..e84d4298 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowApplication.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowApplication.java @@ -20,7 +20,13 @@ import static org.springframework.faces.webflow.JsfRuntimeInformation.isAtLeastJ import java.util.Collection; import java.util.Iterator; import java.util.Locale; +import java.util.ResourceBundle; +import javax.el.ELContextListener; +import javax.el.ELException; +import javax.el.ELResolver; +import javax.el.ExpressionFactory; +import javax.el.ValueExpression; import javax.faces.FacesException; import javax.faces.application.Application; import javax.faces.application.NavigationHandler; @@ -81,6 +87,10 @@ public class FlowApplication extends Application { return delegate; } + public ELContextListener[] getELContextListeners() { + return getDelegate().getELContextListeners(); + } + /** * Inserts {@link FlowViewStateManager} in front of the given StateManager (if not already done). */ @@ -117,6 +127,14 @@ public class FlowApplication extends Application { delegate.addConverter(targetClass, converterClass); } + public void addELContextListener(ELContextListener listener) { + getDelegate().addELContextListener(listener); + } + + public void addELResolver(ELResolver resolver) { + getDelegate().addELResolver(resolver); + } + public void addValidator(String validatorId, String validatorClass) { delegate.addValidator(validatorId, validatorClass); } @@ -130,6 +148,11 @@ public class FlowApplication extends Application { return delegate.createComponent(componentBinding, context, componentType); } + public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) + throws FacesException { + return getDelegate().createComponent(componentExpression, context, componentType); + } + public Converter createConverter(String converterId) { return delegate.createConverter(converterId); } @@ -150,6 +173,11 @@ public class FlowApplication extends Application { return delegate.createValueBinding(ref); } + public T evaluateExpressionGet(FacesContext context, String expression, Class expectedType) + throws ELException { + return getDelegate().evaluateExpressionGet(context, expression, expectedType); + } + public ActionListener getActionListener() { return delegate.getActionListener(); } @@ -174,6 +202,14 @@ public class FlowApplication extends Application { return delegate.getDefaultRenderKitId(); } + public ELResolver getELResolver() { + return getDelegate().getELResolver(); + } + + public ExpressionFactory getExpressionFactory() { + return getDelegate().getExpressionFactory(); + } + public String getMessageBundle() { return delegate.getMessageBundle(); } @@ -186,6 +222,10 @@ public class FlowApplication extends Application { return delegate.getPropertyResolver(); } + public ResourceBundle getResourceBundle(FacesContext ctx, String name) { + return getDelegate().getResourceBundle(ctx, name); + } + public StateManager getStateManager() { return delegate.getStateManager(); } @@ -206,6 +246,10 @@ public class FlowApplication extends Application { return delegate.getViewHandler(); } + public void removeELContextListener(ELContextListener listener) { + getDelegate().removeELContextListener(listener); + } + public void setActionListener(ActionListener listener) { delegate.setActionListener(listener); } diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java index 115cf4e7..0fd91129 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowApplication.java @@ -17,12 +17,7 @@ package org.springframework.faces.webflow; import java.util.Iterator; import java.util.Map; -import java.util.ResourceBundle; -import javax.el.ELContextListener; -import javax.el.ELException; -import javax.el.ELResolver; -import javax.el.ExpressionFactory; import javax.el.ValueExpression; import javax.faces.FacesException; import javax.faces.application.Application; @@ -57,14 +52,6 @@ public class Jsf2FlowApplication extends FlowApplication { getDelegate().addDefaultValidatorId(validatorId); } - public void addELContextListener(ELContextListener listener) { - getDelegate().addELContextListener(listener); - } - - public void addELResolver(ELResolver resolver) { - getDelegate().addELResolver(resolver); - } - public Behavior createBehavior(String behaviorId) throws FacesException { return getDelegate().createBehavior(behaviorId); } @@ -82,16 +69,6 @@ public class Jsf2FlowApplication extends FlowApplication { return getDelegate().createComponent(componentExpression, context, componentType, rendererType); } - public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) - throws FacesException { - return getDelegate().createComponent(componentExpression, context, componentType); - } - - public T evaluateExpressionGet(FacesContext context, String expression, Class expectedType) - throws ELException { - return getDelegate().evaluateExpressionGet(context, expression, expectedType); - } - public Iterator getBehaviorIds() { return getDelegate().getBehaviorIds(); } @@ -100,26 +77,10 @@ public class Jsf2FlowApplication extends FlowApplication { return getDelegate().getDefaultValidatorInfo(); } - public ELContextListener[] getELContextListeners() { - return getDelegate().getELContextListeners(); - } - - public ELResolver getELResolver() { - return getDelegate().getELResolver(); - } - - public ExpressionFactory getExpressionFactory() { - return getDelegate().getExpressionFactory(); - } - public ProjectStage getProjectStage() { return getDelegate().getProjectStage(); } - public ResourceBundle getResourceBundle(FacesContext ctx, String name) { - return getDelegate().getResourceBundle(ctx, name); - } - public ResourceHandler getResourceHandler() { return getDelegate().getResourceHandler(); } @@ -133,10 +94,6 @@ public class Jsf2FlowApplication extends FlowApplication { getDelegate().publishEvent(context, systemEventClass, source); } - public void removeELContextListener(ELContextListener listener) { - getDelegate().removeELContextListener(listener); - } - public void setResourceHandler(ResourceHandler resourceHandler) { getDelegate().setResourceHandler(resourceHandler); }