org.jtheque.core.managers
Class AbstractManager

java.lang.Object
  extended by org.jtheque.core.managers.AbstractManager
All Implemented Interfaces:
IManager
Direct Known Subclasses:
AbstractActivableManager, BeansManager, ErrorManager, EventManager, FeatureManager, MessageManager, ModuleManager, ResourceManager, StateManager, UpdateManager, ViewManager

public abstract class AbstractManager
extends Object
implements IManager

An abstract manager.

Author:
Baptiste Wicht

Constructor Summary
AbstractManager()
           
 
Method Summary
 void close()
          Close the manager.
protected static IErrorManager getErrorManager()
          Return the error manager.
protected static org.jdesktop.swingx.event.WeakEventListenerList getListeners()
          Return the listeners of the manager.
protected  IJThequeLogger getLogger()
          Return the logger of the manager.
protected static
<T> T
getManager(Class<T> managerClass)
          Return the manager with the specific class.
protected static String getMessage(String key)
          Return the internationalized message.
protected static String getMessage(String key, Object... replaces)
          Return the internationalized message.
protected static IStateManager getStates()
          Return the state manager.
 void init()
          Init the manager.
 void preInit()
          Pre-init the manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractManager

public AbstractManager()
Method Detail

getListeners

protected static org.jdesktop.swingx.event.WeakEventListenerList getListeners()
Return the listeners of the manager. The listener's list is static so shared to all the managers.

Returns:
The listeners of the manager.

getLogger

protected final IJThequeLogger getLogger()
Return the logger of the manager.

Returns:
The logger of the manager.

getErrorManager

protected static IErrorManager getErrorManager()
Return the error manager.

Returns:
The error manager.

getStates

protected static IStateManager getStates()
Return the state manager.

Returns:
The state manager.

getMessage

protected static String getMessage(String key)
Return the internationalized message.

Parameters:
key - The internationalization key.
Returns:
The internationalized message.

getMessage

protected static String getMessage(String key,
                                   Object... replaces)
Return the internationalized message.

Parameters:
key - The internationalization key.
replaces - The objects to use for the replaces.
Returns:
The internationalized message.

getManager

protected static <T> T getManager(Class<T> managerClass)
Return the manager with the specific class.

Type Parameters:
T - The type of manager.
Parameters:
managerClass - The class of the manager.
Returns:
The manager.

preInit

public void preInit()
Description copied from interface: IManager
Pre-init the manager. This operation is called before modules pre plug.

Specified by:
preInit in interface IManager

init

public void init()
          throws ManagerException
Description copied from interface: IManager
Init the manager. This operation is called after modules pre plug but before module plug.

Specified by:
init in interface IManager
Throws:
ManagerException - If an error occurs during the init process.

close

public void close()
Description copied from interface: IManager
Close the manager.

Specified by:
close in interface IManager


Copyright © 2010 JTheque. All Rights Reserved.