⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flowbuilder.java

📁 spring的WEB开发插件,支持多状态WEB开发
💻 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.webflow.Flow;

/**
 * Builder interface used to build flows.
 * <p>
 * Implementations should encapsulate flow construction logic, either for a
 * specific kind of flow, for example, an <code>EditUsersMasterFlowBuilder</code>
 * built in Java code, or a generic flow builder strategy, like the
 * <code>XmlFlowBuilder</code>, for building flows from an XML-definition.
 * <p>
 * Flow builders are executed by the <code>FlowFactoryBean</code>, which acts
 * as an assembler (director). This is the classic GoF Builder pattern.
 * 
 * @see org.springframework.webflow.config.AbstractFlowBuilder
 * @see org.springframework.webflow.config.XmlFlowBuilder
 * @see org.springframework.webflow.config.FlowFactoryBean
 * 
 * @author Keith Donald
 * @author Erwin Vervaet
 */
public interface FlowBuilder {

	/**
	 * Initialize this builder and return a handle to the flow under construction.
	 * <p>
	 * Note: the returned <code>Flow</code> handle is needed to avoid infinite
	 * loops in the build process. The returned flow object is still under
	 * construction and not yet ready for use. The only property that is
	 * guaranteed to be filled is the id of the flow.
	 * @return the initialized (but yet to be built) flow
	 * @throws FlowBuilderException an exception occured building the flow
	 */
	public Flow init() throws FlowBuilderException;

	/**
	 * Creates and adds all states to the flow built by this builder.
	 * @throws FlowBuilderException an exception occured building the flow
	 */
	public void buildStates() throws FlowBuilderException;

	/**
	 * Get the fully constructed and configured Flow object - called by the
	 * builder's assembler (director) after assembly. Note that this method will
	 * return the same Flow object as that returned from the <code>init()</code>
	 * method. However, when this method is called by the assembler, flow
	 * construction will have completed and the returned flow is ready for use.
	 */
	public Flow getResult();

	/**
	 * Shutdown the builder, releasing any resources it holds. A new flow
	 * construction process should start with another call to the
	 * <code>init()</code> method.
	 */
	public void dispose();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -