org.jmonks.batch.framework.config
Class ConfigurationException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.jmonks.batch.framework.config.ConfigurationException
All Implemented Interfaces:
java.io.Serializable

public class ConfigurationException
extends java.lang.RuntimeException

ConfigurationException defines the problems in either framework configuration or job configuration. Since the configuration exceptions are cannot be detected untile the runtime, this has been defined as Runtime exception. This will have the component name identifies either framework configuration or job configuration and the message explains the complete problem.

Since:
1.0
Version:
1.0
Author:
Suresh Pragada
See Also:
Serialized Form

Field Summary
static java.lang.String FRAMEWORK_CONFIG
          Constant defines the source of framework config component.
static java.lang.String JOB_CONFIG
          Constant defines the source of job config component.
static java.lang.String JOB_CONFIG_FACTORY_CONFIG
          Constant defines the source of job config factory config component.
static java.lang.String JOB_CONNECTOR_CONFIG
          Constant defines the source of job connector config component.
static java.lang.String JOB_CONTROLLER_CONFIG
          Constant defines the source of controller config component.
static java.lang.String LOGGING_CONFIG
          Constant defines the source of logging config component.
static java.lang.String REPOSITORY_CONFIG
          Constant defines the source of repository config component.
 
Constructor Summary
ConfigurationException(java.lang.String exceptionComponent, java.lang.String message)
          Constructs an instance of ConfigurationException with the specified component name and the message.
 
Method Summary
 ErrorCode getErrorCode()
          Traslates the configuration exception into error code to be retruned to the clients.
 java.lang.String getExceptionComponent()
          Returns the componenet caused this exception.
 java.lang.String toString()
           Returns the string representation of ConfigurationException class in the format
{ConfigurationException [component = value] [message = value]}
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAMEWORK_CONFIG

public static final java.lang.String FRAMEWORK_CONFIG
Constant defines the source of framework config component.

See Also:
Constant Field Values

JOB_CONFIG

public static final java.lang.String JOB_CONFIG
Constant defines the source of job config component.

See Also:
Constant Field Values

JOB_CONFIG_FACTORY_CONFIG

public static final java.lang.String JOB_CONFIG_FACTORY_CONFIG
Constant defines the source of job config factory config component.

See Also:
Constant Field Values

JOB_CONTROLLER_CONFIG

public static final java.lang.String JOB_CONTROLLER_CONFIG
Constant defines the source of controller config component.

See Also:
Constant Field Values

LOGGING_CONFIG

public static final java.lang.String LOGGING_CONFIG
Constant defines the source of logging config component.

See Also:
Constant Field Values

REPOSITORY_CONFIG

public static final java.lang.String REPOSITORY_CONFIG
Constant defines the source of repository config component.

See Also:
Constant Field Values

JOB_CONNECTOR_CONFIG

public static final java.lang.String JOB_CONNECTOR_CONFIG
Constant defines the source of job connector config component.

See Also:
Constant Field Values
Constructor Detail

ConfigurationException

public ConfigurationException(java.lang.String exceptionComponent,
                              java.lang.String message)
Constructs an instance of ConfigurationException with the specified component name and the message.

Parameters:
exceptionComponent - Specifies the source component of this exception.
message - Messages states the problem.
Throws:
java.lang.IllegalArgumentException - If exceptionComponent argument is null.
Method Detail

getExceptionComponent

public java.lang.String getExceptionComponent()
Returns the componenet caused this exception.

Returns:
Returns the component name.

getErrorCode

public ErrorCode getErrorCode()
Traslates the configuration exception into error code to be retruned to the clients.

Returns:
Retruns the error code.

toString

public java.lang.String toString()

Returns the string representation of ConfigurationException class in the format
{ConfigurationException [component = value] [message = value]}

Returns:
Returns the string representation of ConfigurationException.