📄 xmlflowfactorybean.java
字号:
/*
* Copyright 2002-2005 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.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
/**
* Convenient specialization of FlowFactoryBean that uses an XmlFlowBuilder to
* build flows from an XML file.
* <p>
* <b>Exposed configuration properties: </b> <br>
* <table border="1">
* <tr>
* <td><b>name</b></td>
* <td><b>default</b></td>
* <td><b>description</b></td>
* </tr>
* <tr>
* <td>location</td>
* <td><i>null</i></td>
* <td>Specifies the XML file location from which the flow definition is loaded.
* This is a required property.</td>
* </tr>
* </table>
*
* @see org.springframework.webflow.config.XmlFlowBuilder
* @see org.springframework.webflow.config.FlowFactoryBean
*
* @author Keith Donald
* @author Erwin Vervaet
*/
public class XmlFlowFactoryBean extends FlowFactoryBean implements BeanFactoryAware {
/**
* Creates an XML flow factory bean.
*/
public XmlFlowFactoryBean() {
super(new XmlFlowBuilder());
}
/**
* Set the resource from which an XML flow definition will be read.
* @param location the resource location
*/
public void setLocation(Resource location) {
getXmlFlowBuilder().setLocation(location);
}
public void setFlowBuilder(FlowBuilder flowBuilder) {
Assert.isInstanceOf(XmlFlowBuilder.class, flowBuilder);
super.setFlowBuilder(flowBuilder);
}
public void setBeanFactory(BeanFactory beanFactory) {
getXmlFlowBuilder().setBeanFactory(beanFactory);
}
/**
* Returns the XML based flow builder used by this factory bean.
*/
protected XmlFlowBuilder getXmlFlowBuilder() {
return (XmlFlowBuilder)getFlowBuilder();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -