01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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,
32: FlowDefinitionRegistryMBean {
33:
34: /**
35: * Sets this registry's parent registry. When asked by a client to locate a
36: * flow definition this registry will query it's parent if it cannot
37: * fullfill the lookup request itself.
38: * @param parent the parent flow definition registry, may be null
39: */
40: public void setParent(FlowDefinitionRegistry parent);
41:
42: /**
43: * Return all flow definitions registered in this registry. Note that this
44: * will trigger flow assemply for all registered flow definitions (which may
45: * be expensive).
46: * @return the flow definitions
47: * @throws FlowDefinitionConstructionException if there is a problem constructing
48: * one of the registered flow definitions
49: */
50: public FlowDefinition[] getFlowDefinitions()
51: throws FlowDefinitionConstructionException;
52:
53: /**
54: * Register a flow definition in this registry. Registers a "holder", not
55: * the Flow definition itself. This allows the actual Flow definition to be
56: * loaded lazily only when needed, and also rebuilt at runtime when its
57: * underlying resource changes without redeploy.
58: * @param flowHolder a holder holding the flow definition to register
59: */
60: public void registerFlowDefinition(FlowDefinitionHolder flowHolder);
61:
62: }
|