KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.springframework.webflow.definition.FlowDefinition;
19
20 /**
21  * A container of flow definitions. Extends the {@link FlowDefinitionRegistryMBean}
22  * management interface exposing registry monitoring and management operations.
23  * Also extends {@link FlowDefinitionLocator} for accessing registered Flow
24  * definitions for execution at runtime.
25  * <p>
26  * Flow definition registries can be configured with a "parent" registry to provide a hook
27  * into a larger flow definition registry hierarchy.
28  *
29  * @author Keith Donald
30  */

31 public interface FlowDefinitionRegistry extends FlowDefinitionLocator, FlowDefinitionRegistryMBean {
32
33     /**
34      * Sets this registry's parent registry. When asked by a client to locate a
35      * flow definition this registry will query it's parent if it cannot
36      * fullfill the lookup request itself.
37      * @param parent the parent flow definition registry, may be null
38      */

39     public void setParent(FlowDefinitionRegistry parent);
40
41     /**
42      * Return all flow definitions registered in this registry. Note that this
43      * will trigger flow assemply for all registered flow definitions (which may
44      * be expensive).
45      * @return the flow definitions
46      * @throws FlowDefinitionConstructionException if there is a problem constructing
47      * one of the registered flow definitions
48      */

49     public FlowDefinition[] getFlowDefinitions() throws FlowDefinitionConstructionException;
50
51     /**
52      * Register a flow definition in this registry. Registers a "holder", not
53      * the Flow definition itself. This allows the actual Flow definition to be
54      * loaded lazily only when needed, and also rebuilt at runtime when its
55      * underlying resource changes without redeploy.
56      * @param flowHolder a holder holding the flow definition to register
57      */

58     public void registerFlowDefinition(FlowDefinitionHolder flowHolder);
59
60 }
Popular Tags