KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > webflow > definition > registry > FlowDefinitionRegistrar


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.springframework.webflow.definition.registry;
17
18 /**
19  * A strategy to use to populate a flow definition registry with one or more flow
20  * definitions.
21  * <p>
22  * Flow definition registrars encapsulate the knowledge about the source of a set of flow
23  * definition resources and the behavior necessary to add those resources to a
24  * flow definition registry.
25  * <p>
26  * The typical usage pattern is as follows:
27  * <ol>
28  * <li>Create a new (initially empty) flow definition registry.
29  * <li>Use any number of flow definition registrars to populate the registry by calling
30  * {@link #registerFlowDefinitions(FlowDefinitionRegistry)}.
31  * </ol>
32  * <p>
33  * This design where various registrars populate a generic registry was
34  * inspired by Spring's GenericApplicationContext, which can use any number of
35  * BeanDefinitionReaders to drive context population.
36  *
37  * @see FlowDefinitionRegistry
38  *
39  * @author Keith Donald
40  */

41 public interface FlowDefinitionRegistrar {
42
43     /**
44      * Register flow definition resources managed by this registrar in the
45      * registry provided.
46      * @param registry the registry to register flow definitions in
47      */

48     public void registerFlowDefinitions(FlowDefinitionRegistry registry);
49 }
Popular Tags