KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > actionflow > config > NamespaceBuilder


1 /*
2  * Copyright (c) 2002, Inversoft Corporation, All Rights Reserved
3  */

4 package com.inversoft.verge.mvc.controller.actionflow.config;
5
6
7 import java.util.Map JavaDoc;
8
9 import org.jdom.Element;
10
11 import com.inversoft.config.ConfigurationException;
12 import com.inversoft.config.component.ComponentConfigBuilderRegistry;
13
14
15 /**
16  * This interface describes the factory that builds the
17  * {@link Namespace Namespace} objects.
18  * These objects are constructed from the XML configuration
19  * file.
20  *
21  * @author Brian Pontarelli
22  * @since 2.0
23  * @version 2.0
24  */

25 public interface NamespaceBuilder {
26
27     /**
28      * Builds an <code>Namespace</code> instance from the Element given.
29      * The Element should contain all the information necessary to build the
30      * instance.
31      *
32      * @param element The Element to build the Namespace instance from
33      * @return The newly constructed Namespace
34      * @throws ConfigurationException If there was any problems during the build
35      */

36     Namespace build(Element element) throws ConfigurationException;
37
38     /**
39      * Called by the builder so that the factory and likewise the Namespace can
40      * handle any post building tests or configuration necessary. This method
41      * only gets passed the Namespace Object and therefore, if the implementation
42      * needs the original Element, it will need to store this somewhere, usually
43      * inside the Namespace itself.
44      *
45      * @param namespace The Namespace to postBuild
46      * @param actionRegistry The ActionFlowConfigRegistry if needed
47      * @param registries A Map of all the other available registries
48      * @param builderRegistry A registry that contains the component builders
49      * which can be called if needed to do more validation
50      * @throws ConfigurationException If anything went wrong while postBuilding
51      */

52     void validate(Namespace namespace, ActionFlowConfigRegistry actionRegistry,
53             Map JavaDoc registries, ComponentConfigBuilderRegistry builderRegistry)
54     throws ConfigurationException;
55 }
56
Popular Tags