org.apache.muse.tools.generator.util
Class ConfigurationData

java.lang.Object
  extended by org.apache.muse.tools.generator.util.ConfigurationData
All Implemented Interfaces:
Cloneable

public class ConfigurationData
extends Object
implements Cloneable

Represents an object that is passed between phases of code generation. It contains the results of the phases of code generation as well as any component-specific data. The reason this is so abstract is because the various pieces (projectizers, synthesizers, analyzers) can all be so drastically different and can be replaced on a whim. This class also contains static definitions of the parameter keys (this thing is basically just wrapping a hash map) and metadata about the parameters. Again, since we don't want to have these parameters pollute the code-generation APIs then we need at least some sanity-checking. This is done with checkConfiguration which takes a Configurable (which all code-generation components implement) and a ConfigurationData and then makes sure the values passed in match in class against what's expected. This isn't perfect but it's a decent start. The idea here is also to put in metadata that is human-readable so that these objects can be used to populate option menus and show command-line options dynamically.

Author:
Andrew Eberbach (aeberbac)

Field Summary
static String CAPABILITIES_MAP_LIST
           
static ConfigurationDataDescriptor CAPABILITIES_MAP_LIST_CONFIGURATION
           
static String DESCRIPTOR_DOCUMENT
           
static ConfigurationDataDescriptor DESCRIPTOR_DOCUMENT_CONFIGURATION
           
static String FILES_MAP_LIST
           
static ConfigurationDataDescriptor FILES_MAP_LIST_CONFIGURATION
           
static String GENERATE_CUSTOM_HEADERS
           
static ConfigurationDataDescriptor GENERATE_CUSTOM_HEADERS_CONFIGURATION
           
static String IGNORE_SET_LIST
           
static ConfigurationDataDescriptor IGNORE_SET_LIST_CONFIGURATION
           
static String METADATA_DESCRIPTOR_LIST
           
static ConfigurationDataDescriptor METADATA_DESCRIPTOR_LIST_CONFIGURATION
           
static String OVERWRITE
           
static ConfigurationDataDescriptor OVERWRITE_CONFIGURATION
           
static String TARGET_DIRECTORY
           
static ConfigurationDataDescriptor TARGET_DIRECTORY_CONFIGURATION
           
static String WSDL_DOCUMENT_LIST
           
static ConfigurationDataDescriptor WSDL_DOCUMENT_LIST_CONFIGURATION
           
 
Constructor Summary
ConfigurationData()
           
 
Method Summary
 void addParameter(String parameter, Object value)
           
static void checkConfiguration(Configurable configurable, ConfigurationData configuration)
          Given a Configurable and a ConfigurationData check to make sure that the Configurable's required parameters are all present and are of the correct class.
 Object clone()
          This is a shallow clone of the map that backs this object.
 Object getParameter(String parameter)
           
 Map getProperties()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSDL_DOCUMENT_LIST

public static final String WSDL_DOCUMENT_LIST
See Also:
Constant Field Values

WSDL_DOCUMENT_LIST_CONFIGURATION

public static ConfigurationDataDescriptor WSDL_DOCUMENT_LIST_CONFIGURATION

DESCRIPTOR_DOCUMENT

public static final String DESCRIPTOR_DOCUMENT
See Also:
Constant Field Values

DESCRIPTOR_DOCUMENT_CONFIGURATION

public static ConfigurationDataDescriptor DESCRIPTOR_DOCUMENT_CONFIGURATION

OVERWRITE

public static final String OVERWRITE
See Also:
Constant Field Values

OVERWRITE_CONFIGURATION

public static final ConfigurationDataDescriptor OVERWRITE_CONFIGURATION

CAPABILITIES_MAP_LIST

public static final String CAPABILITIES_MAP_LIST
See Also:
Constant Field Values

CAPABILITIES_MAP_LIST_CONFIGURATION

public static final ConfigurationDataDescriptor CAPABILITIES_MAP_LIST_CONFIGURATION

FILES_MAP_LIST

public static final String FILES_MAP_LIST
See Also:
Constant Field Values

FILES_MAP_LIST_CONFIGURATION

public static final ConfigurationDataDescriptor FILES_MAP_LIST_CONFIGURATION

TARGET_DIRECTORY

public static final String TARGET_DIRECTORY
See Also:
Constant Field Values

TARGET_DIRECTORY_CONFIGURATION

public static final ConfigurationDataDescriptor TARGET_DIRECTORY_CONFIGURATION

GENERATE_CUSTOM_HEADERS

public static final String GENERATE_CUSTOM_HEADERS
See Also:
Constant Field Values

GENERATE_CUSTOM_HEADERS_CONFIGURATION

public static final ConfigurationDataDescriptor GENERATE_CUSTOM_HEADERS_CONFIGURATION

IGNORE_SET_LIST

public static final String IGNORE_SET_LIST
See Also:
Constant Field Values

IGNORE_SET_LIST_CONFIGURATION

public static final ConfigurationDataDescriptor IGNORE_SET_LIST_CONFIGURATION

METADATA_DESCRIPTOR_LIST

public static final String METADATA_DESCRIPTOR_LIST
See Also:
Constant Field Values

METADATA_DESCRIPTOR_LIST_CONFIGURATION

public static final ConfigurationDataDescriptor METADATA_DESCRIPTOR_LIST_CONFIGURATION
Constructor Detail

ConfigurationData

public ConfigurationData()
Method Detail

addParameter

public void addParameter(String parameter,
                         Object value)

getParameter

public Object getParameter(String parameter)

clone

public Object clone()
This is a shallow clone of the map that backs this object.

Overrides:
clone in class Object
See Also:
Object.clone()

checkConfiguration

public static void checkConfiguration(Configurable configurable,
                                      ConfigurationData configuration)
                               throws Exception
Given a Configurable and a ConfigurationData check to make sure that the Configurable's required parameters are all present and are of the correct class.

Parameters:
configurable - The object whose configuration we're checking
configuration - The configuration we're checking
Throws:
Exception

getProperties

public Map getProperties()


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.