com.acsinet_solutions.cetia4.controller.support
Class ConfigurationBuilder

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.support.ConfigurationBuilder
All Implemented Interfaces:
Builder

public final class ConfigurationBuilder
extends java.lang.Object
implements Builder

An object that builds a configuration instance

Author:
Santiago Arriaga

Constructor Summary
ConfigurationBuilder(java.util.Map<java.lang.String,java.lang.String> params)
          Constructor
 
Method Summary
 void enterObject(java.lang.String name, java.lang.String className)
          Add a new object to the builder
 void exitObject()
          Exit the current object instance.
 java.lang.Object getObject()
          Get the built object.
 void setValue(java.lang.String name, java.lang.Object value)
          Set a value to the current target object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationBuilder

public ConfigurationBuilder(java.util.Map<java.lang.String,java.lang.String> params)
Constructor

Method Detail

enterObject

public final void enterObject(java.lang.String name,
                              java.lang.String className)
                       throws BuildException
Description copied from interface: Builder
Add a new object to the builder

Specified by:
enterObject in interface Builder
Parameters:
name - The not-null not-empty name of the type instance
className - The maybe-null class type of the instance
Throws:
BuildException - Thrown if any building error occurs

setValue

public final void setValue(java.lang.String name,
                           java.lang.Object value)
                    throws BuildException
Description copied from interface: Builder
Set a value to the current target object

Specified by:
setValue in interface Builder
Parameters:
name - The not-null not-empty name of the attribute to be set
value - The maybe-null value of the given attribute
Throws:
BuildException - Thrown if any building error occurs

exitObject

public final void exitObject()
                      throws BuildException
Description copied from interface: Builder
Exit the current object instance. Every exitObject() call is issued for a call of enterObject();

Specified by:
exitObject in interface Builder
Throws:
BuildException - Thrown if any building error occurs

getObject

public final java.lang.Object getObject()
                                 throws BuildException
Description copied from interface: Builder
Get the built object.

Specified by:
getObject in interface Builder
Returns:
A not-null not-empty Object instance
Throws:
BuildException - Thrown if any building error occurs