org.argouml.application.notation
Class NotationProviderFactory

java.lang.Object
  extended byorg.argouml.application.notation.NotationProviderFactory
All Implemented Interfaces:
ArgoEventListener, ArgoModuleEventListener, EventListener

public final class NotationProviderFactory
extends Object
implements ArgoModuleEventListener

Provides a factory for handling notation providers.

Since:
0.9.4

Field Summary
private  NotationProvider2 defaultProvider
           
private static Logger LOG
          Logger.
private  List providers
           
private static NotationProviderFactory SINGLETON
          The singleton representing this class.
 
Constructor Summary
private NotationProviderFactory()
          Constructor to disallow other to create this.
 
Method Summary
 void finalize()
          Remove the notation change listener.
private  void fireEvent(int eventType, NotationProvider2 provider)
          Send an event to the ArgoEventPump.
 NotationProvider2 getDefaultProvider()
           
static NotationProviderFactory getInstance()
           
 List getNotations()
           
 NotationProvider2 getProvider(NotationName nn)
           
 List getProviders()
           
 void moduleDisabled(ArgoModuleEvent event)
          Invoked when a module has been disabled.
 void moduleEnabled(ArgoModuleEvent event)
          Invoked when a module has been enabled.
 void moduleLoaded(ArgoModuleEvent event)
          Invoked when a module has been loaded.
 void moduleUnloaded(ArgoModuleEvent event)
          Invoked when a module has been unloaded.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Logger LOG
Logger.


SINGLETON

private static final NotationProviderFactory SINGLETON
The singleton representing this class.


providers

private List providers

defaultProvider

private NotationProvider2 defaultProvider
Constructor Detail

NotationProviderFactory

private NotationProviderFactory()
Constructor to disallow other to create this.

Method Detail

getInstance

public static NotationProviderFactory getInstance()
Returns:
the singleton

finalize

public void finalize()
              throws Throwable
Remove the notation change listener. finalize should never happen, but play it safe.

Throws:
Throwable - if something goes wrong in the super finalize.

getProvider

public NotationProvider2 getProvider(NotationName nn)
Parameters:
nn - the name of the notation
Returns:
the notation provider class

getProviders

public List getProviders()
Returns:
the list of all providers

getNotations

public List getNotations()
Returns:
the list of all notations

getDefaultProvider

public NotationProvider2 getDefaultProvider()
Returns:
the default notation provider

moduleLoaded

public void moduleLoaded(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been loaded.

Specified by:
moduleLoaded in interface ArgoModuleEventListener
Parameters:
event - the event
See Also:
ArgoModuleEventListener.moduleLoaded(org.argouml.application.events.ArgoModuleEvent)

moduleUnloaded

public void moduleUnloaded(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been unloaded.

Specified by:
moduleUnloaded in interface ArgoModuleEventListener
Parameters:
event - the event
See Also:
ArgoModuleEventListener.moduleUnloaded(org.argouml.application.events.ArgoModuleEvent)

moduleEnabled

public void moduleEnabled(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been enabled.

Specified by:
moduleEnabled in interface ArgoModuleEventListener
Parameters:
event - the event
See Also:
ArgoModuleEventListener.moduleEnabled(org.argouml.application.events.ArgoModuleEvent)

moduleDisabled

public void moduleDisabled(ArgoModuleEvent event)
Description copied from interface: ArgoModuleEventListener
Invoked when a module has been disabled.

Specified by:
moduleDisabled in interface ArgoModuleEventListener
Parameters:
event - the event
See Also:
ArgoModuleEventListener.moduleDisabled(org.argouml.application.events.ArgoModuleEvent)

fireEvent

private void fireEvent(int eventType,
                       NotationProvider2 provider)
Send an event to the ArgoEventPump.

Parameters:
eventType - The event type.
provider - The source of the event.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook