tauZaman
v0.1

tauzaman.property
Class PropertyRepository

java.lang.Object
  |
  +--tauzaman.property.PropertyRepository

public class PropertyRepository
extends java.lang.Object

PropertyRepository class manages a pool of Properties. For example:

    PropertyRepository cr = new PropertyRepository();
    // null means load every single Property in the url
    cr.loadProperty(new URL("http://www.eecs.wsu.edu/~cdyreson/pub/tauZaman/defaultProperties.xml"), null);
 
For now it does not have unloadProperty() behavior.

See Also:
Property
Status:
design complete, implementation complete

Constructor Summary
PropertyRepository()
          Constructs a PropertyRepository object.
 
Method Summary
 boolean isValidPropertyName(java.lang.String propertyName)
          Returns true if given property name is one of the valid names.
 Property[] loadProperty(java.net.URL url, java.lang.String[] names)
          Loads Property(ies) into this PropertyRepository and also returns them.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyRepository

public PropertyRepository()
Constructs a PropertyRepository object.

Method Detail

isValidPropertyName

public boolean isValidPropertyName(java.lang.String propertyName)
Returns true if given property name is one of the valid names. False otherwise.

Parameters:
propertyName - String name of the Property being checked
Returns:
boolean, which is true if given property name is valid false otherwise

loadProperty

public Property[] loadProperty(java.net.URL url,
                               java.lang.String[] names)
                        throws PropertyFormationException
Loads Property(ies) into this PropertyRepository and also returns them.

Parameters:
url - URL pointing to Property Specification file
names - String names of the Property(ies) that are wanted to be loaded
Returns:
an array of Property(ies) loaded
Throws:
PropertyFormationException - if any abnormal condition occurs when forming Property(ies)

tauZaman
v0.1

Submit a bug or feature

tauZaman is an open-source, publicly avaliable project