SWF-1261 Move methods that belong to FlowApplication from Jsf2FlowApplication

This commit is contained in:
Rossen Stoyanchev
2010-06-24 16:29:11 +00:00
parent 4e3a3ccb5e
commit 50cd595762
3 changed files with 47 additions and 46 deletions

View File

@@ -41,12 +41,12 @@
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="latest.integration" conf="compile->runtime"/>
<dependency org="org.springframework.webflow" name="org.springframework.webflow" rev="latest.integration" conf="compile->runtime"/>
<!-- JSF 2.0 Mojarra dependencies (no ivy configuration: downloaded from maven repository) -->
<!-- JSF 2.0 Mojarra dependencies -->
<dependency org="javax.faces" name="jsf-api" rev="2.0" conf="provided, mojarra20->runtime(*)" />
<dependency org="com.sun.faces" name="jsf-impl" rev="2.0.2" conf="provided, mojarra20->runtime(*)" />
<dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="1.2.0" conf="test, mojarra20->runtime"/>
<!-- JSF 2.0 MyFaces dependencies (no ivy configuration: downloaded from maven repository) -->
<!-- JSF 2.0 MyFaces dependencies -->
<dependency org="org.apache.myfaces.core" name="myfaces-api" rev="2.0.1-SNAPSHOT" conf="provided, myfaces20->runtime(*)" />
<dependency org="org.apache.myfaces.core" name="myfaces-impl" rev="2.0.1-SNAPSHOT" conf="provided, myfaces20->runtime(*)" />
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.discovery" rev="0.4.0" conf="provided, myfaces20->runtime(*)" />
@@ -66,7 +66,7 @@
<dependency org="org.apache.myfaces" name="com.springsource.org.apache.myfaces.javax.faces" rev="1.1.5" conf="jsf11->runtime" />
<dependency org="org.apache.myfaces" name="com.springsource.org.apache.myfaces" rev="1.1.5" conf="jsf11->runtime" />
<!-- MyFaces JSF-Portlet Bridge for Portlet 2.0 and JSF 1.2 (no ivy configuration: downloaded via maven) -->
<!-- MyFaces JSF-Portlet Bridge for Portlet 2.0 and JSF 1.2 -->
<dependency org="org.apache.myfaces.portlet-bridge" name="portlet-bridge-api" rev="2.0.0-alpha-2" conf="provided, myfacesPortlet20->runtime(*)" />
<dependency org="org.apache.myfaces.portlet-bridge" name="portlet-bridge-impl" rev="2.0.0-alpha-2" conf="provided, myfacesPortlet20->runtime(*)" />

View File

@@ -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> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> 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);
}

View File

@@ -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> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType)
throws ELException {
return getDelegate().evaluateExpressionGet(context, expression, expectedType);
}
public Iterator<String> 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);
}