net.sourceforge.esw.properties
Interface IPropertyAggregator

All Superinterfaces:
java.lang.Cloneable, ICloneable, INode, IPropertySource, ISupportObject, java.io.Serializable
All Known Implementing Classes:
DefaultPropertyAggregator

public interface IPropertyAggregator
extends IPropertySource

Provides aggregation acrosss multiple IPropertySource instances based on a ranking of those IPropertySource instances.

To provide the same abilities of a IPropertySource instance, this IPropertyAggregator instance extends the IPropertySource interface. The IPropertyAggregator instance decorates a collection of IPropertySource instances, delegating method calls the first IPropertySource instance with the highest ranking that returns a valid value.

Properties are any persistent data source that parameterizes behavior of a running application. That data source could be XML, a relational database, or even a URL.

To load properties from their data source, call the load method.

Properties can be read-only or writable. The setWriteable and isWriteable methods determine whether an IPropertySource instance is writeable.

If the properties represented by this IPropertySource instance are writable, then the save method saves the properties to the represented property source.

To allow easy access to Properties, this IPropertySource interface extends the INode interface.

This interface is the root of the Properties framework. It provides the container for the storage and manipulation of properties.

See Also:
PropertyManager

Method Summary
 void addPropertySource(int aRank, IPropertySource aPropertySource)
          Adds the specified IPropertySource instance to this IPropertyAggregator instance at the specified ranking, replacing the IPropertySource instance that was in that rank, if any.
 void addPropertySource(IPropertySource aPropertySource)
          Adds the specified IPropertySource instance to this IPropertyAggregator instance at the lowest ranking (at the end of the aggregate list).
 IPropertySource getPropertySource(int aRank)
          Returns the specified IPropertySource instance from this IPropertyAgregator instance at the specified ranking.
 IPropertySource getPropertySource(java.lang.Object aID)
          Returns the specified IPropertySource instance from this IPropertyAgregator instance with the specified identifier.
 java.util.Iterator getPropertySources()
          Returns the IPropertySource instances from this IPropertyAgregator instance.
 void removePropertySource(IPropertySource aPropertySource)
          Removes the specified IPropertySource instance from this IPropertyAgregator instance.
 
Methods inherited from interface net.sourceforge.esw.properties.IPropertySource
isWriteable, load, save, setWriteable
 
Methods inherited from interface net.sourceforge.esw.graph.INode
acceptVisitor, add, add, addParent, clear, containsID, get, get, getList, getParents, getValue, isEmpty, iterator, remove, removeParent, setValue, size
 
Methods inherited from interface net.sourceforge.esw.util.ISupportObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getID, getProperty, getPropertySize, propertyKeys, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setID, setProperty
 
Methods inherited from interface net.sourceforge.esw.util.ICloneable
clone
 

Method Detail

addPropertySource

public void addPropertySource(int aRank,
                              IPropertySource aPropertySource)
Adds the specified IPropertySource instance to this IPropertyAggregator instance at the specified ranking, replacing the IPropertySource instance that was in that rank, if any.
Parameters:
aRank - the rank the specifed IPropertySource instance should be added.
aPropertySource - the IPropertySource instance to be added.

addPropertySource

public void addPropertySource(IPropertySource aPropertySource)
Adds the specified IPropertySource instance to this IPropertyAggregator instance at the lowest ranking (at the end of the aggregate list).
Parameters:
aPropertySource - the IPropertySource instance to be added.

getPropertySource

public IPropertySource getPropertySource(java.lang.Object aID)
Returns the specified IPropertySource instance from this IPropertyAgregator instance with the specified identifier.
Parameters:
aID - the identifier of the IPropertySource instance to return.
Returns:
the IPropertySource instance with the specified identifier.

getPropertySource

public IPropertySource getPropertySource(int aRank)
Returns the specified IPropertySource instance from this IPropertyAgregator instance at the specified ranking.
Parameters:
aRank - the rank for which to return an IPropertySource instance
Returns:
the IPropertySource instance with the specified identifier.

getPropertySources

public java.util.Iterator getPropertySources()
Returns the IPropertySource instances from this IPropertyAgregator instance.
Returns:
an Iterator over the IPropertySource instanced contained by this IPropertyAgregator instance.

removePropertySource

public void removePropertySource(IPropertySource aPropertySource)
Removes the specified IPropertySource instance from this IPropertyAgregator instance.
Parameters:
aPropertySource - the IPropertySource instance to remove.


Copyright 2002 Free Software Foundation. All Rights Reserved.