org.springframework.webflow.config.WebFlowConfigNamespaceHandler Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2004-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.webflow.config;
import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
* NamespaceHandler
for the webflow-config
namespace.
*
* Provides {@link BeanDefinitionParser bean definition parsers} for the <executor>
and
* <registry>
tags. An executor
tag can include an execution-listeners
* tag and a registry
tag can include location
tags.
*
* Using the executor
tag you can configure a {@link FlowExecutorFactoryBean} that creates a
* {@link org.springframework.webflow.executor.FlowExecutor}. The executor
tag allows you to specify the
* repository type and a reference to a registry.
*
*
* <flow:executor id="registry" registry-ref="registry" repository-type="continuation" >
* <flow:execution-listeners>
* <flow:listener ref="listener1" />
* <flow:listener ref="listener2" ref="*" />
* <flow:listener ref="listener3" ref="flow1, flow2, flow3" />
* <flow:execution-listeners />
* </flow:executor>
*
*
*
* Using the registry
tag you can configure an
* {@link org.springframework.webflow.engine.builder.xml.XmlFlowRegistryFactoryBean} to create a registry for use by any
* number of executor
s. The registry
tag supports in-line flow definition locations.
*
*
* <flow:registry id="registry">
* <flow:location path="/path/to/flow.xml" />
* <flow:location path="/path/with/wildcards/*-flow.xml" />
* </flow:registry>
*
*
* @author Ben Hale
*/
public class WebFlowConfigNamespaceHandler extends NamespaceHandlerSupport {
public void init() {
registerBeanDefinitionParser("execution-attributes", new ExecutionAttributesBeanDefinitionParser());
registerBeanDefinitionParser("execution-listeners", new ExecutionListenersBeanDefinitionParser());
registerBeanDefinitionParser("executor", new ExecutorBeanDefinitionParser());
registerBeanDefinitionParser("registry", new RegistryBeanDefinitionParser());
}
}