com.levigo.jadice.swing.util
Class DebugActionCreationFailureLogger

java.lang.Object
  extended by com.levigo.util.swing.action.CommandCreationAdapter
      extended by com.levigo.jadice.swing.util.DebugActionCreationFailureLogger
All Implemented Interfaces:
ActionCreationListener, CommandCreationListener, MenuComponentCreationListener

public class DebugActionCreationFailureLogger
extends CommandCreationAdapter
implements ActionCreationListener, MenuComponentCreationListener

This singleton should be registered at the DefaultActionFactory, at the DefaultCommandFactory and at the DefaultMenuComponentFactory to propagate informations or failure messages of actions and command creation process into the logging framework.

This could be useful for debugging purposes while development time.

See Also:
DefaultActionFactory, DefaultActionFactory.addActionCreationListener(ActionCreationListener), DefaultActionFactory.removeActionCreationListener(ActionCreationListener), DefaultCommandFactory, DefaultCommandFactory.addCommandCreationListener(com.levigo.util.swing.action.CommandCreationListener), DefaultCommandFactory.removeCommandCreationListener(com.levigo.util.swing.action.CommandCreationListener), DefaultMenuComponentFactory.addMenuComponentCreationListener(MenuComponentCreationListener), DefaultMenuComponentFactory.removeLinkedMenuComponentFactory(com.levigo.util.swing.action.BasicMenuComponentFactory)

Method Summary
 void creationFailure(NamedActionFactory source, String message, String key, Throwable t)
          This method will be called if a failure occurred while action creation.
 void creationFailure(NamedCommandFactory source, String message, String key, Throwable t)
          This method will be called if a failure occurred while command or command factory creation.
 void creationFailure(NamedMenuComponentFactory source, String message, String key, Throwable t)
          This method will be called if a failure occurred while menu component creation.
 void creationInformation(NamedActionFactory source, String message, String key)
          This method will be called when ever informational messages should be provided while an action creation.
 void creationInformation(NamedMenuComponentFactory source, String message, String key)
          This method will be called when ever informational messages should be provided while a menu component creation.
 void creationWarning(NamedActionFactory source, String message, String key)
          This method will be called if something happens while action creation, which should be notified as a warning indicating a potential problem.
 void creationWarning(NamedMenuComponentFactory source, String message, String key)
          This method will be called if something happens while menu component creation, which should be notified as a warning indicating a potential problem.
static DebugActionCreationFailureLogger getInstance()
           
 
Methods inherited from class com.levigo.util.swing.action.CommandCreationAdapter
creationInformation, creationWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final DebugActionCreationFailureLogger getInstance()

creationFailure

public void creationFailure(NamedActionFactory source,
                            String message,
                            String key,
                            Throwable t)
Description copied from interface: ActionCreationListener
This method will be called if a failure occurred while action creation.

Specified by:
creationFailure in interface ActionCreationListener
Parameters:
source - The source object where the failure occurred.
message - A failure description
key - (optional) The key of the problematic action or null
t - (optional) the occurred Throwable or null

creationInformation

public void creationInformation(NamedActionFactory source,
                                String message,
                                String key)
Description copied from interface: ActionCreationListener
This method will be called when ever informational messages should be provided while an action creation.

Specified by:
creationInformation in interface ActionCreationListener
Parameters:
source - The source object which propagates the information.
message - A message
key - (optional) The key of the action or null

creationWarning

public void creationWarning(NamedActionFactory source,
                            String message,
                            String key)
Description copied from interface: ActionCreationListener
This method will be called if something happens while action creation, which should be notified as a warning indicating a potential problem.

Specified by:
creationWarning in interface ActionCreationListener
Parameters:
source - The source object where the problem occurred.
message - A problem description
key - (optional) The key of the problematic action or null

creationFailure

public void creationFailure(NamedCommandFactory source,
                            String message,
                            String key,
                            Throwable t)
Description copied from interface: CommandCreationListener
This method will be called if a failure occurred while command or command factory creation.

Specified by:
creationFailure in interface CommandCreationListener
Overrides:
creationFailure in class CommandCreationAdapter
Parameters:
source - The source object where the failure occurred or null if the command factory could not be created.
message - A failure description
key - The key of the problematic command or the name of the problematic command factory
t - (optional) the occurred Throwable or null

creationFailure

public void creationFailure(NamedMenuComponentFactory source,
                            String message,
                            String key,
                            Throwable t)
Description copied from interface: MenuComponentCreationListener
This method will be called if a failure occurred while menu component creation.

Specified by:
creationFailure in interface MenuComponentCreationListener
Parameters:
source - The source object where the failure occurred.
message - A failure description
key - (optional) The key of the problematic menu structure or null
t - (optional) the occurred Throwable or null

creationWarning

public void creationWarning(NamedMenuComponentFactory source,
                            String message,
                            String key)
Description copied from interface: MenuComponentCreationListener
This method will be called if something happens while menu component creation, which should be notified as a warning indicating a potential problem.

Specified by:
creationWarning in interface MenuComponentCreationListener
Parameters:
source - The source object where the problem occurred.
message - A problem description
key - (optional) The key of the problematic menu structure or null

creationInformation

public void creationInformation(NamedMenuComponentFactory source,
                                String message,
                                String key)
Description copied from interface: MenuComponentCreationListener
This method will be called when ever informational messages should be provided while a menu component creation.

Specified by:
creationInformation in interface MenuComponentCreationListener
Parameters:
source - The source object which propagates the information.
message - A message
key - (optional) The key of the menu structure or null


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.