SWF-403 - Define custom expression parser inside flow-builder-services element.

This commit is contained in:
Jeremy Grelle
2008-02-21 19:41:18 +00:00
parent 60fcba39c5
commit f63b5907eb
5 changed files with 410 additions and 292 deletions

View File

@@ -0,0 +1,63 @@
package org.springframework.webflow.config;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.util.StringUtils;
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;
import org.springframework.webflow.mvc.MvcViewFactoryCreator;
import org.w3c.dom.Element;
/**
* {@link BeanDefinitionParser} for the <code>&lt;flow-builder-services&gt;</code> tag.
*
* @author Jeremy Grelle
*/
public class FlowBuilderServicesBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
private static final String EXPRESSION_PARSER_ATTRIBUTE = "expression-parser";
private static final String EXPRESSION_PARSER_PROPERTY = "expressionParser";
private static final String VIEW_FACTORY_CREATOR_ATTRIBUTE = "view-factory-creator";
private static final String VIEW_FACTORY_CREATOR_PROPERTY = "viewFactoryCreator";
private static final String CONVERSION_SERVICE_ATTRIBUTE = "conversion-service";
private static final String CONVERSION_SERVICE_PROPERTY = "conversionService";
protected Class getBeanClass(Element element) {
return FlowBuilderServices.class;
}
protected void doParse(Element element, BeanDefinitionBuilder definitionBuilder) {
parseExpressionParser(element, definitionBuilder);
parseViewFactoryCreator(element, definitionBuilder);
parseConversionService(element, definitionBuilder);
}
private void parseConversionService(Element element, BeanDefinitionBuilder definitionBuilder) {
String conversionService = element.getAttribute(CONVERSION_SERVICE_ATTRIBUTE);
if (StringUtils.hasText(conversionService)) {
definitionBuilder.addPropertyReference(CONVERSION_SERVICE_PROPERTY, conversionService);
}
}
private void parseViewFactoryCreator(Element element, BeanDefinitionBuilder definitionBuilder) {
String viewFactoryCreator = element.getAttribute(VIEW_FACTORY_CREATOR_ATTRIBUTE);
if (StringUtils.hasText(viewFactoryCreator)) {
definitionBuilder.addPropertyReference(VIEW_FACTORY_CREATOR_PROPERTY, viewFactoryCreator);
} else {
definitionBuilder.addPropertyValue(VIEW_FACTORY_CREATOR_PROPERTY, new MvcViewFactoryCreator());
}
}
private void parseExpressionParser(Element element, BeanDefinitionBuilder definitionBuilder) {
String expressionParser = element.getAttribute(EXPRESSION_PARSER_ATTRIBUTE);
if (StringUtils.hasText(expressionParser)) {
definitionBuilder.addPropertyReference(EXPRESSION_PARSER_PROPERTY, expressionParser);
}
}
}

View File

@@ -28,6 +28,7 @@ import org.springframework.webflow.engine.builder.RefreshableFlowDefinitionHolde
import org.springframework.webflow.engine.builder.support.FlowBuilderContextImpl;
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;
import org.springframework.webflow.engine.builder.xml.XmlFlowBuilder;
import org.springframework.webflow.mvc.MvcViewFactoryCreator;
/**
* A factory for a flow definition registry. Is a Spring FactoryBean, for provision by the flow definition registry bean
@@ -35,6 +36,7 @@ import org.springframework.webflow.engine.builder.xml.XmlFlowBuilder;
* higher-level webflow-config Spring 2.x configuration namespace.
*
* @author Keith Donald
* @author Jeremy Grelle
*/
class FlowRegistryFactoryBean implements FactoryBean, ResourceLoaderAware, BeanFactoryAware, InitializingBean {
@@ -206,5 +208,6 @@ class FlowRegistryFactoryBean implements FactoryBean, ResourceLoaderAware, BeanF
flowBuilderServices = new FlowBuilderServices();
flowBuilderServices.setResourceLoader(resourceLoader);
flowBuilderServices.setBeanFactory(beanFactory);
flowBuilderServices.setViewFactoryCreator(new MvcViewFactoryCreator());
}
}

View File

@@ -22,12 +22,14 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
*
* @author Keith Donald
* @author Ben Hale
* @author Jeremy Grelle
*/
public class WebFlowConfigNamespaceHandler extends NamespaceHandlerSupport {
public void init() {
registerBeanDefinitionParser("flow-executor", new FlowExecutorBeanDefinitionParser());
registerBeanDefinitionParser("flow-execution-listeners", new FlowExecutionListenerLoaderBeanDefinitionParser());
registerBeanDefinitionParser("flow-registry", new FlowRegistryBeanDefinitionParser());
registerBeanDefinitionParser("flow-builder-services", new FlowBuilderServicesBeanDefinitionParser());
registerBeanDefinitionParser("enable-flow-scopes", new EnableFlowScopesBeanDefinitionParser());
}
}

View File

@@ -1,63 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema
xmlns="http://www.springframework.org/schema/webflow-config"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:beans="http://www.springframework.org/schema/beans"
targetNamespace="http://www.springframework.org/schema/webflow-config"
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="2.0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Spring Web Flow Configuration Schema
Authors: Keith Donald, Ben Hale
<br>
Provides an easy way to configure a flow executor and an XML flow definition registry.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" />
<xsd:element name="flow-registry">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys a flow definition registry. A flow definition registry contains a set of flow definitions.
A flow definition is typically built from externalized resource location such as a .xml file.
<br>
Each flow definition registered in this registry is assigned a unique identifier. By default,
this identifier is the name of the externalized resource minus its file extension. For example,
a registry containing flow definitions built from the files "orderitem-flow.xml" and "shipping-flow.xml"
would index those definitions by "orderitem-flow" and "shipping-flow" by default.
<br>
A flow registry is used by a flow executor at runtime to launch new executions of flow definitions.
]]>
</xsd:documentation>
</xsd:annotation>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema
xmlns="http://www.springframework.org/schema/webflow-config"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:beans="http://www.springframework.org/schema/beans"
targetNamespace="http://www.springframework.org/schema/webflow-config"
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="2.0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Spring Web Flow Configuration Schema
Authors: Keith Donald, Ben Hale, Jeremy Grelle
<br>
Provides an easy way to configure a flow executor and an XML flow definition registry.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" />
<xsd:element name="flow-registry">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys a flow definition registry. A flow definition registry contains a set of flow definitions.
A flow definition is typically built from externalized resource location such as a .xml file.
<br>
Each flow definition registered in this registry is assigned a unique identifier. By default,
this identifier is the name of the externalized resource minus its file extension. For example,
a registry containing flow definitions built from the files "orderitem-flow.xml" and "shipping-flow.xml"
would index those definitions by "orderitem-flow" and "shipping-flow" by default.
<br>
A flow registry is used by a flow executor at runtime to launch new executions of flow definitions.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="beans:identifiedType">
<xsd:sequence>
<xsd:element name="flow-location" type="flowLocationType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Specifies a path to a externalized flow definition resource. The flow definition built from this
resource will be registered in this registry.
<br>
Individual paths such as:
<pre>
/WEB-INF/booking.xml
</pre>
... are supported as well as wildcard paths such as:
<pre>
/WEB-INF/flows/**/*-flow.xml
</pre>
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="flow-location" type="flowLocationType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Specifies a path to a externalized flow definition resource. The flow definition built from this
resource will be registered in this registry.
<br>
Individual paths such as:
<pre>
/WEB-INF/booking.xml
</pre>
... are supported as well as wildcard paths such as:
<pre>
/WEB-INF/flows/**/*-flow.xml
</pre>
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="flow-builder" type="flowBuilderType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
@@ -67,7 +67,7 @@ Specifies a flow builder implementation to register in the registry.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="flow-builder-services" type="xsd:string">
<xsd:annotation>
@@ -79,10 +79,10 @@ The idref of the flow builder services instance this flow definition registry sh
</xsd:annotation>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="flowLocationType">
<xsd:sequence>
<xsd:element name="flow-definition-attributes" type="flowDefinitionAttributesType" minOccurs="0">
@@ -94,30 +94,30 @@ Attributes to assign to the flow definition that may influence flow execution.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The id to the externalized flow definition resource. This only needs to be populated for explict declaration of flow
identifiers. If not populated this id of the flow is equal to the filename of the underlying definition resource, minus
the filename extension. This value cannot be set if an ANT-style path expression that matches multiple resources is
used in path attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="path" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The path to the externalized flow definition resource. May be a path to a single resource or a ANT-style path expression
that matches multiple resources.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The id to the externalized flow definition resource. This only needs to be populated for explict declaration of flow
identifiers. If not populated this id of the flow is equal to the filename of the underlying definition resource, minus
the filename extension. This value cannot be set if an ANT-style path expression that matches multiple resources is
used in path attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:attribute name="path" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The path to the externalized flow definition resource. May be a path to a single resource or a ANT-style path expression
that matches multiple resources.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="flowBuilderType">
<xsd:sequence>
@@ -150,64 +150,64 @@ The fully qualified class name of the flow builder implementation.
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:element name="flow-executor">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys a flow executor. A flow executor executes flow definitions. More specifically, an executor
is responsible for launching new flow executions as well as resuming paused flow executions.
A flow execution that spans more than one request is said to have 'paused' and is stored in
an execution repository.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="beans:identifiedType">
<xsd:sequence>
<xsd:element name="flow-execution-repository" type="flowExecutionRepositoryType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Explicit repository configuration for this executor. This element is used if configuration needs
to be more fine grained than the repositoryType attribute on executor.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="flow-execution-attributes" type="flowExecutionAttributesType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Execution attributes to associate with new flow executions launched by this executor.
These attributes may influence execution behavior.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="flow-execution-listeners" type="flowExecutionListenersType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The listeners eligible for observing the lifecycle of executions launched by this executor.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="flow-registry" type="xsd:string" default="flowRegistry">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref to the registry this executor will use to locate flow definitions for execution.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="flow-executor">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys a flow executor. A flow executor executes flow definitions. More specifically, an executor
is responsible for launching new flow executions as well as resuming paused flow executions.
A flow execution that spans more than one request is said to have 'paused' and is stored in
an execution repository.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="beans:identifiedType">
<xsd:sequence>
<xsd:element name="flow-execution-repository" type="flowExecutionRepositoryType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Explicit repository configuration for this executor. This element is used if configuration needs
to be more fine grained than the repositoryType attribute on executor.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="flow-execution-attributes" type="flowExecutionAttributesType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Execution attributes to associate with new flow executions launched by this executor.
These attributes may influence execution behavior.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="flow-execution-listeners" type="flowExecutionListenersType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The listeners eligible for observing the lifecycle of executions launched by this executor.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="flow-registry" type="xsd:string" default="flowRegistry">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref to the registry this executor will use to locate flow definitions for execution.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="enable-flow-scopes">
@@ -218,51 +218,97 @@ Allows access to the Spring Web Flow scopes (request, flash, flow, conversation)
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:element>
<xsd:complexType name="flowExecutionRepositoryType">
<xsd:attribute name="type" type="flowExecutionRepositoryTypeAttribute" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The type of flow execution repository to use. The repository is responsible for managing flow execution
persistence between requests.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="max-conversations" type="xsd:integer">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The maximum number of concurrent conversations allowed by this repository. It is illegal to set this
attribute if you are also setting the 'conversation-manager' attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="max-continuations" type="xsd:integer">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The maximum number of flow execution continuations (snapshots) allowed by this repository per conversation.
This attribute is only relevant when the repository type is 'continuation'.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="conversation-manager" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref of the conversation manager this repository should use. Setting this attribute
allows full control over the conversation manager implementation and configuration.
When used, any value for the 'max-conversations' attribute is ignored.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:element name="flow-builder-services">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys the flow builder services, including the ViewFactoryCreator, ExpressionParser, and ConversionService to
be used by a flow definition registry.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="beans:identifiedType">
<xsd:attribute name="expression-parser" use="optional">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref of the expression parser instance that should be used. If not provided, the default OGNL expression parser
will be used.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="view-factory-creator" use="optional">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref of the view factory creator that should be used. The view factory creator is specific to the view technology
being used. If not provided, the default Spring MVC view factory creator will be used.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="conversion-service" use="optional">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref of the conversion service that should be used. If not provided, the default conversion service will be used.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="flowExecutionRepositoryType">
<xsd:attribute name="type" type="flowExecutionRepositoryTypeAttribute" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The type of flow execution repository to use. The repository is responsible for managing flow execution
persistence between requests.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="max-conversations" type="xsd:integer">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The maximum number of concurrent conversations allowed by this repository. It is illegal to set this
attribute if you are also setting the 'conversation-manager' attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="max-continuations" type="xsd:integer">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The maximum number of flow execution continuations (snapshots) allowed by this repository per conversation.
This attribute is only relevant when the repository type is 'continuation'.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="conversation-manager" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref of the conversation manager this repository should use. Setting this attribute
allows full control over the conversation manager implementation and configuration.
When used, any value for the 'max-conversations' attribute is ignored.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:simpleType name="flowExecutionRepositoryTypeAttribute">
<xsd:restriction base="xsd:string">
@@ -308,81 +354,81 @@ constant throughout the life of the execution.
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="flowExecutionListenersType">
<xsd:sequence>
<xsd:element name="listener" type="flowExecutionListenerType" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys a single flow execution listener that will observe the execution lifecycle of one or more
flow definitions. The flow definitions this listener applies to may be restricted by specifying criteria.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="flowExecutionListenerType">
<xsd:attribute name="ref" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref to your flow execution listener.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="criteria" type="xsd:string" default="*">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The flow definitions your listener should apply to, delimited by commas or '*' for "all".
Example: 'flow1,flow2,flow3'.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="flowExecutionAttributesType">
<xsd:sequence>
<xsd:element name="alwaysRedirectOnPause" type="alwaysRedirectOnPauseType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Sets the 'alwaysRedirectOnPause' execution attribute value. 'alwaysRedirectOnPause' allows
control over whether each time a flow execution pauses a browser redirect is performed. If
not specified the default value is 'true' unless explicitly set otherwise.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
A single attribute describing an element. Attributes have string keys and object values.
An attribute's type may be specified using the 'type' attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="alwaysRedirectOnPauseType">
<xsd:attribute name="value" type="xsd:boolean" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
true = always redirect on pause; false = do not, only redirect when explicitly instructed by the flow definition.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="flowExecutionListenersType">
<xsd:sequence>
<xsd:element name="listener" type="flowExecutionListenerType" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Deploys a single flow execution listener that will observe the execution lifecycle of one or more
flow definitions. The flow definitions this listener applies to may be restricted by specifying criteria.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="flowExecutionListenerType">
<xsd:attribute name="ref" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The idref to your flow execution listener.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="criteria" type="xsd:string" default="*">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The flow definitions your listener should apply to, delimited by commas or '*' for "all".
Example: 'flow1,flow2,flow3'.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="flowExecutionAttributesType">
<xsd:sequence>
<xsd:element name="alwaysRedirectOnPause" type="alwaysRedirectOnPauseType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Sets the 'alwaysRedirectOnPause' execution attribute value. 'alwaysRedirectOnPause' allows
control over whether each time a flow execution pauses a browser redirect is performed. If
not specified the default value is 'true' unless explicitly set otherwise.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
A single attribute describing an element. Attributes have string keys and object values.
An attribute's type may be specified using the 'type' attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="alwaysRedirectOnPauseType">
<xsd:attribute name="value" type="xsd:boolean" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
true = always redirect on pause; false = do not, only redirect when explicitly instructed by the flow definition.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="flowDefinitionAttributesType">
<xsd:sequence>
@@ -399,34 +445,34 @@ An attribute's type may be specified using the 'type' attribute.
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="attributeType">
<xsd:attribute name="name" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The name of the attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="type" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The attribute's type, used to perform a from-string type conversion if specified.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="value" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The attribute value, subject to type conversion if the 'type' attribute is defined.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="attributeType">
<xsd:attribute name="name" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The name of the attribute.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="type" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The attribute's type, used to perform a from-string type conversion if specified.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="value" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The attribute value, subject to type conversion if the 'type' attribute is defined.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:schema>

View File

@@ -29,6 +29,10 @@ public class WebFlowELExpressionParser extends ELExpressionParser {
putContextFactory(MutableAttributeMap.class, new AttributeMapELContextFactory());
}
public WebFlowELExpressionParser() {
this(ExpressionFactory.newInstance());
}
private static class RequestContextELContextFactory implements ELContextFactory {
public ELContext getELContext(Object target) {
List customResolvers = new ArrayList();