org.base.apps.xml.elem
Class ElementFactory

java.lang.Object
  extended by org.base.apps.util.factory.BaseFactory
      extended by org.base.apps.util.factory.ConfigurableFactory
          extended by org.base.apps.xml.elem.ElementFactory
All Implemented Interfaces:
Factory, Named

public class ElementFactory
extends ConfigurableFactory

Author:
Kevan Simpson

Field Summary
static String ELEMENT_CONFIGURATION
          The name of this factory's configuration.
 
Constructor Summary
protected ElementFactory()
          Void constructor.
protected ElementFactory(Named cfg)
          Constructor with configuration override.
 
Method Summary
 Element createElement()
          Creates an Element with an ElementContext from this factory.
static ElementFactory getInstance()
          Fetches the singleton factory instance.
 String getName()
          Fetches the name of this instance.
static ElementFactory newInstance(Named configuration)
          Creates a new ElementFactory with the given named configuration.
 
Methods inherited from class org.base.apps.util.factory.ConfigurableFactory
create, rMgr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_CONFIGURATION

public static final String ELEMENT_CONFIGURATION
The name of this factory's configuration.

See Also:
Constant Field Values
Constructor Detail

ElementFactory

protected ElementFactory()
Void constructor.


ElementFactory

protected ElementFactory(Named cfg)
Constructor with configuration override.

Parameters:
cfg - The factory configuration.
Method Detail

createElement

public Element createElement()
                      throws Exception
Creates an Element with an ElementContext from this factory.

Returns:
a custom Element with a custom ElementContext.
Throws:
Exception - if an error occurs during creation.

getName

public String getName()
Description copied from interface: Named
Fetches the name of this instance.

Returns:
the name of this instance.
See Also:
Named.getName()

getInstance

public static ElementFactory getInstance()
Fetches the singleton factory instance.


newInstance

public static ElementFactory newInstance(Named configuration)
Creates a new ElementFactory with the given named configuration.

Parameters:
configuration - The named configuration.
Returns:
a new ElementFactory.

Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)