Open SiteSearch 4.1.1
Final

ORG.oclc.util
Interface RichProperties

All Known Implementing Classes:
BerProperties, IniFile

public abstract interface RichProperties

An interface for accessing IniFiles and BerProperties


Method Summary
 boolean getBooleanValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 boolean getBooleanValue(String mainKey, String subKey, boolean defaultValue)
          Given a section name, return the boolean value(true/false) specified for the input key
 byte getByteValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 byte getByteValue(String mainKey, String subKey, byte defaultValue)
          Given a section name, return the value specified for the input key
 double getDoubleValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 double getDoubleValue(String mainKey, String subKey, double defaultValue)
          Given a section name, return the value specified for the input key
 float getFloatValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 float getFloatValue(String mainKey, String subKey, float defaultValue)
          Given a section name, return the Float value specified for the input key - use for numeric values
 int getIntValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 int getIntValue(String mainKey, String subKey, int defaultValue)
          Given a section name, return the Integer value specified for the input key - use for numeric values
 long getLongValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 long getLongValue(String mainKey, String subKey, long defaultValue)
          Given a section name, return the value specified for the input key
 Enumeration getSectionKeys(String mainKey)
          Retrieve all the variables in a section
 Enumeration getSections()
          Get all the section names in the inifile
 short getShortValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 short getShortValue(String mainKey, String subKey, short defaultValue)
          Given a section name, return the value specified for the input key
 String getStringValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 String getStringValue(String mainKey, String subKey, String defaultValue)
          Given a section name, return the value specified for the input key
 String getValue(String mainKey, String subKey)
          Given a section name, return the value specified for the input key
 String getValue(String mainKey, String subKey, String defaultValue)
          Given a section name, return the value specified for the input key.
 

Method Detail

getValue

public String getValue(String mainKey,
                       String subKey)
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
String the key value or null if the key value does not exist

getValue

public String getValue(String mainKey,
                       String subKey,
                       String defaultValue)
Given a section name, return the value specified for the input key. If the value doesn't exist return the default.
Parameters:
mainKey - the section name
subKey - the key to look for
defaultValue - the default value
Returns:
String the key value

getStringValue

public String getStringValue(String mainKey,
                             String subKey)
                      throws IniMissingSectionException,
                             IniMissingValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
String the key value or null if the key value does not exist
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section.

getStringValue

public String getStringValue(String mainKey,
                             String subKey,
                             String defaultValue)
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
String the key value or the defaultValue if the key value does not exist

getIntValue

public int getIntValue(String mainKey,
                       String subKey)
                throws IniMissingSectionException,
                       IniMissingValueException,
                       IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
int the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not a valid int

getIntValue

public int getIntValue(String mainKey,
                       String subKey,
                       int defaultValue)
Given a section name, return the Integer value specified for the input key - use for numeric values
Parameters:
mainKey - the section name
subKey - the key to look for
defaultValue - the value to return if the key is not found
Returns:
integer the key value

getFloatValue

public float getFloatValue(String mainKey,
                           String subKey)
                    throws IniMissingSectionException,
                           IniMissingValueException,
                           IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
int the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not a valid float

getFloatValue

public float getFloatValue(String mainKey,
                           String subKey,
                           float defaultValue)
Given a section name, return the Float value specified for the input key - use for numeric values
Parameters:
mainKey - the section name
subKey - the key to look for
defaultValue - the value to return if the key is not found
Returns:
float the key value

getBooleanValue

public boolean getBooleanValue(String mainKey,
                               String subKey)
                        throws IniMissingSectionException,
                               IniMissingValueException,
                               IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
int the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not set to true or false

getBooleanValue

public boolean getBooleanValue(String mainKey,
                               String subKey,
                               boolean defaultValue)
Given a section name, return the boolean value(true/false) specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
defaultValue - the value to return if the key is not found
Returns:
float the key value

getByteValue

public byte getByteValue(String mainKey,
                         String subKey)
                  throws IniMissingSectionException,
                         IniMissingValueException,
                         IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
byte the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not a valid byte

getByteValue

public byte getByteValue(String mainKey,
                         String subKey,
                         byte defaultValue)
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
byte the key value or defaultValue if a key value can't be found

getShortValue

public short getShortValue(String mainKey,
                           String subKey)
                    throws IniMissingSectionException,
                           IniMissingValueException,
                           IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
byte the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not a valid short

getShortValue

public short getShortValue(String mainKey,
                           String subKey,
                           short defaultValue)
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
short the key value or defaultValue if a key value can't be found

getLongValue

public long getLongValue(String mainKey,
                         String subKey)
                  throws IniMissingSectionException,
                         IniMissingValueException,
                         IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
long the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not a valid long

getLongValue

public long getLongValue(String mainKey,
                         String subKey,
                         long defaultValue)
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
long the key value or defaultValue if a key value can't be found

getDoubleValue

public double getDoubleValue(String mainKey,
                             String subKey)
                      throws IniMissingSectionException,
                             IniMissingValueException,
                             IniInvalidValueException
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
double the key value
Throws:
IniMissingSectionException - if the section name is not found
IniMissingValueException - if the subKey value is not found within the section
IniInvalidValueException - if the subKey value is not a valid double

getDoubleValue

public double getDoubleValue(String mainKey,
                             String subKey,
                             double defaultValue)
Given a section name, return the value specified for the input key
Parameters:
mainKey - the section name
subKey - the key to look for
Returns:
double the key value or defaultValue if a key value can't be found

getSectionKeys

public Enumeration getSectionKeys(String mainKey)
Retrieve all the variables in a section
Parameters:
mainKey - the section name
Returns:
IniFileSection the section variables

getSections

public Enumeration getSections()
Get all the section names in the inifile
Returns:
Enumeration the enumeration of all the section name strings

Open SiteSearch 4.1.1
Final