net.sourceforge.esw.properties
Class DefaultPropertyFactory

java.lang.Object
  |
  +--net.sourceforge.esw.properties.DefaultPropertyFactory
All Implemented Interfaces:
IPropertyFactory

public class DefaultPropertyFactory
extends java.lang.Object
implements IPropertyFactory

Defines the methods for creation of IPropertySource and/or IPropertyAggregator instances.

This is the Abstract Factory of the Abstract Factory design pattern.

"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.

Examples:

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


Constructor Summary
DefaultPropertyFactory()
           
 
Method Summary
 IPropertyAggregator createPropertyAggregator()
          Returns a new IPropertyAggregator instance.
 IPropertySource createPropertySource(ITransducer aTransducer)
          Returns a new IPropertySource instance with the specified ITransducer instance.
 IPropertySource createPropertySource(ITransducer aTransducer, boolean bWriteable)
          Returns a new IPropertySource instance with the specified ITransducer instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertyFactory

public DefaultPropertyFactory()
Method Detail

createPropertyAggregator

public IPropertyAggregator createPropertyAggregator()
Returns a new IPropertyAggregator instance.
Specified by:
createPropertyAggregator in interface IPropertyFactory

createPropertySource

public IPropertySource createPropertySource(ITransducer aTransducer)
Returns a new IPropertySource instance with the specified ITransducer instance.
Specified by:
createPropertySource in interface IPropertyFactory
Parameters:
aTransducer - the ITransducer instance for the created IPropertySource instance.

createPropertySource

public IPropertySource createPropertySource(ITransducer aTransducer,
                                            boolean bWriteable)
Returns a new IPropertySource instance with the specified ITransducer instance.
Specified by:
createPropertySource in interface IPropertyFactory
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.


Copyright 2002 Free Software Foundation. All Rights Reserved.