de.smartics.exceptions.i18n
Class I18nExceptionContextManager

Package class diagram package I18nExceptionContextManager
java.lang.Object
  extended by de.smartics.exceptions.runtime.AbstractExceptionContextManager<I18nExceptionContext>
      extended by de.smartics.exceptions.i18n.I18nExceptionContextManager

public final class I18nExceptionContextManager
     
     
extends AbstractExceptionContextManager< I18nExceptionContext>

Provides configuration information for exceptions per class loader.


Constructor Summary
I18nExceptionContextManager()
           
 
Method Summary
protected  I18nExceptionContext fetchContextFromService(ClassLoader classLoader)
          Returns the context configured by the service framework.
static de.smartics.messages.core.BundleProvider getBundleProvider(ClassLoader classLoader)
          Convenience method to access the bundle provider for the given class loader.
protected  I18nExceptionContext getDefaultExceptionContext()
          Returns the default context provided by the subclass.
static IdFactory getFactory(ClassLoader classLoader)
          Convenience method to access the ID factory for the given class loader.
static I18nCodeMessageFormatter getFormatter(ClassLoader classLoader)
          Convenience method to access the formatter for code messages for the given class loader.
static I18nExceptionContextManager getInstance()
          Returns the reference to the singleton.
static MessageComposer getMessageComposer(ClassLoader classLoader)
          Convenience method to access the message composer for the given class loader.
 
Methods inherited from class de.smartics.exceptions.runtime.AbstractExceptionContextManager
fetchContext, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nExceptionContextManager

public I18nExceptionContextManager()
Method Detail

getInstance

public static I18nExceptionContextManager getInstance()
Returns the reference to the singleton.

Returns:
the reference to the singleton.

fetchContextFromService

protected I18nExceptionContext fetchContextFromService(ClassLoader classLoader)
Description copied from class: AbstractExceptionContextManager
Returns the context configured by the service framework.

Specified by:
fetchContextFromService in class AbstractExceptionContextManager<I18nExceptionContext>
Parameters:
classLoader - the class loader to use.
Returns:
the context configured by the service framework.

getDefaultExceptionContext

protected I18nExceptionContext getDefaultExceptionContext()
Returns the default context provided by the subclass.

Returns the default exception context.

new DefaultI18nExceptionContext( new UuidFactory(), new ClassPathBundleProvider(), new DefaultMessageComposer());

Specified by:
getDefaultExceptionContext in class AbstractExceptionContextManager<I18nExceptionContext>
Returns:
the default context configured.

getFactory

public static IdFactory getFactory(ClassLoader classLoader)
Convenience method to access the ID factory for the given class loader.

Parameters:
classLoader - the class loader whose ID factory is requested.
Returns:
the ID factory for the given class loader.

getBundleProvider

public static de.smartics.messages.core.BundleProvider getBundleProvider(ClassLoader classLoader)
Convenience method to access the bundle provider for the given class loader.

Parameters:
classLoader - the class loader whose bundle provider is requested.
Returns:
the bundle provider for the given class loader.

getMessageComposer

public static MessageComposer getMessageComposer(ClassLoader classLoader)
Convenience method to access the message composer for the given class loader.

Parameters:
classLoader - the class loader whose message composer is requested.
Returns:
the message composer for the given class loader.

getFormatter

public static I18nCodeMessageFormatter getFormatter(ClassLoader classLoader)
Convenience method to access the formatter for code messages for the given class loader.

Parameters:
classLoader - the class loader whose formatter for code messages is requested.
Returns:
the formatter for code messages for the given class loader.


Copyright © 2007-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.