com.arsdigita.util
Class JavaPropertyReader

java.lang.Object
  extended bycom.arsdigita.util.JavaPropertyReader
All Implemented Interfaces:
ParameterReader
Direct Known Subclasses:
JavaPropertyLoader

public class JavaPropertyReader
extends Object
implements ParameterReader

Subject to change. An implementation of ParameterReader that uses standard Java properties to retrieve values.

Version:
$Id: //core-platform/dev/src/com/arsdigita/util/JavaPropertyReader.java#5 $
Author:
Justin Ross <jross@redhat.com>
See Also:
ParameterReader, JavaPropertyWriter

Field Summary
static String versionId
           
 
Constructor Summary
JavaPropertyReader(Properties props)
          Constructs a parameter reader that uses props.
 
Method Summary
 void load(InputStream in)
          Loads the internal Properties object using in.
 String read(Parameter param, ErrorList errors)
          Reads a String value back for a param.
 String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

JavaPropertyReader

public JavaPropertyReader(Properties props)
Constructs a parameter reader that uses props.

Parameters:
props - The Properties object that stores property values; it cannot be null
Method Detail

load

public final void load(InputStream in)
Loads the internal Properties object using in.

Parameters:
in - The InputStream that has the source properties; it cannot be null

read

public final String read(Parameter param,
                         ErrorList errors)
Reads a String value back for a param.

Specified by:
read in interface ParameterReader
Parameters:
param - The Parameter whose value is requested; it cannot be null
errors - An ErrorList to trap any errors encountered when reading; it cannot be null
Returns:
The String value for param; it can be null

toString

public String toString()
Returns a String representation of this object.

Returns:
super.toString() + "," + properties.size()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC