cz.cuni.amis.utils.configuration
Class PropertyProvider

java.lang.Object
  extended by cz.cuni.amis.utils.configuration.PropertyProvider
All Implemented Interfaces:
java.lang.Comparable<PropertyProvider>
Direct Known Subclasses:
AbstractPropertiesProvider, CustomPropertiesProvider, EnvironmentVariableProvider, JVMOptionsProvider

public abstract class PropertyProvider
extends java.lang.Object
implements java.lang.Comparable<PropertyProvider>

Property provider is responsible for one type of property storage. Eg. some specific file.


Constructor Summary
PropertyProvider()
           
 
Method Summary
 int compareTo(PropertyProvider o)
           
abstract  int getPriority()
          Priority of this provider.
abstract  java.lang.String getProperty(java.lang.String key)
          Searches for given property key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyProvider

public PropertyProvider()
Method Detail

getPriority

public abstract int getPriority()
Priority of this provider. It will be asked for property value before all providers with lower priority.

Returns:

getProperty

public abstract java.lang.String getProperty(java.lang.String key)
Searches for given property key.

Parameters:
key -
Returns:
null if the property wasn't found

compareTo

public int compareTo(PropertyProvider o)
Specified by:
compareTo in interface java.lang.Comparable<PropertyProvider>