javax.rad.genui
Class UIFactoryManager

java.lang.Object
  extended by javax.rad.genui.UIFactoryManager

public class UIFactoryManager
extends Object

Platform and technology independent UIFactoryManager. This is a static provider for the current IFactory.


Constructor Summary
protected UIFactoryManager()
          Creation of UIFactoryManager is not allowed.
 
Method Summary
static
<UI> UI
cloneResource(UI pSourceResource)
          Creates a clone of the given resource.
static IFactory getFactory()
          Gets the global IFactory singleton instance.
static IFactory getFactoryInstance(Class pFactoryClass)
          Creates the global IFactory singleton instance.
static void registerThreadFactoryInstance(IFactory pFactory)
          Registers the IFactory instance for the current Thread.
static void setFactoryInstance(IFactory pFactory)
          Sets the global IFactory singleton instance.
static void unregisterThreadFactoryInstance()
          Unregisters the IFactory instance for the current Thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIFactoryManager

protected UIFactoryManager()
Creation of UIFactoryManager is not allowed.

Method Detail

getFactory

public static IFactory getFactory()
Gets the global IFactory singleton instance.

Returns:
the global IFactory singleton instance.
See Also:
IFactory

setFactoryInstance

public static void setFactoryInstance(IFactory pFactory)
Sets the global IFactory singleton instance.

Parameters:
pFactory - the factory

getFactoryInstance

public static IFactory getFactoryInstance(Class pFactoryClass)
Creates the global IFactory singleton instance.

Parameters:
pFactoryClass - the factory class.
Returns:
the singleton IFactory instance.
See Also:
IFactory

registerThreadFactoryInstance

public static void registerThreadFactoryInstance(IFactory pFactory)
Registers the IFactory instance for the current Thread.

Parameters:
pFactory - the factory.
See Also:
IFactory

unregisterThreadFactoryInstance

public static void unregisterThreadFactoryInstance()
Unregisters the IFactory instance for the current Thread. If the factory is not unregistered, it is overwritten in the next registration of any Factory in this thread. The factories are stored in a weak hash map. But anyway it is the best way to finally unregister the Factory if it should not be used anymore, to get deterministic behaviour.

See Also:
IFactory

cloneResource

public static <UI> UI cloneResource(UI pSourceResource)
Creates a clone of the given resource.

Type Parameters:
UI - the IResource type
Parameters:
pSourceResource - the technology dependent resource
Returns:
the clone


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.