net.sourceforge.esw.properties
Class PropertyFactory

java.lang.Object
  |
  +--net.sourceforge.esw.properties.PropertyFactory

public class PropertyFactory
extends java.lang.Object

Responsible for the creation of IPropertyAggregator and IPropertySource instances.

"Pluggable factories" allow the application to add its own custom implementations of the IPropertySource and/or IPropertyAggregator interfaces to the framework in a consitent, simple way. Custom implementations of the IPropertySource and/or IPropertyAggregator interfaces can thus be used as if they were a standard part of the framework.

The default implementation returns the ESW implementation of the IPropertyAggregator and IPropertySource interfaces.

Examples:

   MyCustomPropertyFactory customFactory = new MyCustomPropertyFactory();
   PropertyFactory.setPropertyFactory( customFactory );
 

See Also:
PropertyManager

Field Summary
protected static IPropertyFactory factory
          The IPropertyFactory instance to which creation is delegated.
 
Constructor Summary
PropertyFactory()
           
 
Method Summary
static IPropertyAggregator createPropertyAggregator()
          Returns a new IPropertyAggregator instance.
static IPropertySource createPropertySource(ITransducer aTransducer)
          Returns a new IPropertySource instance with the specified ITransducer instance.
static IPropertySource createPropertySource(ITransducer aTransducer, boolean bWriteable)
          Returns a new IPropertySource instance with the specified ITransducer instance.
static IPropertyFactory getPropertyFactory()
          Returns the IPropertyFactory instance being used by this PropertyFactory.
static void setPropertyFactory(IPropertyFactory aPropertyFactory)
          Sets the IPropertyFactory instance to be used by this PropertyFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected static IPropertyFactory factory
The IPropertyFactory instance to which creation is delegated.
Constructor Detail

PropertyFactory

public PropertyFactory()
Method Detail

createPropertyAggregator

public static IPropertyAggregator createPropertyAggregator()
Returns a new IPropertyAggregator instance.

createPropertySource

public static IPropertySource createPropertySource(ITransducer aTransducer)
Returns a new IPropertySource instance with the specified ITransducer instance.
Parameters:
aTransducer - the ITransducer instance for the created IPropertySource instance.

createPropertySource

public static IPropertySource createPropertySource(ITransducer aTransducer,
                                                   boolean bWriteable)
Returns a new IPropertySource instance with the specified ITransducer instance.
Parameters:
aTransducer - the ITransducer instance for the created IPropertySource instance.
aWriteable - if true, the IPropertySource instance will be created as being writable, otherwise, the IPropertySource instance will be read-only.

setPropertyFactory

public static void setPropertyFactory(IPropertyFactory aPropertyFactory)
Sets the IPropertyFactory instance to be used by this PropertyFactory.
Parameters:
aPropertyFactory - the IPropertyFactory instance to be used.

getPropertyFactory

public static IPropertyFactory getPropertyFactory()
Returns the IPropertyFactory instance being used by this PropertyFactory.


Copyright 2002 Free Software Foundation. All Rights Reserved.