|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.deepthought.sidious.util.RuleProperty
public class RuleProperty
This class retrieves the appropriate properties for a given Rule
.
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
logger
Logger for this class |
private java.util.Properties |
properties
Internal properties file. |
private static java.lang.String |
RULES_PROPERTIES_PATH
The path to the folder where properties files for the Rules
are stored. |
Constructor Summary | |
---|---|
RuleProperty(java.util.Properties properties)
Constructs a new RuleProperty from the input Properties . |
|
RuleProperty(java.lang.String className)
Constructs a new RuleProperty from the input class name. |
Method Summary | |
---|---|
double |
getFloat(java.lang.String key,
double defaultValue)
Method returns the value of the specified key. |
SuperLinkID |
getID(java.lang.String key)
Method returns the value of the specified key. |
int |
getInt(java.lang.String key,
int defaultValue)
Method returns the value of the specified key. |
private java.util.Properties |
readProperties(java.lang.String prefixName)
Method returns the Properties object specified by the
input name . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log logger
private final java.util.Properties properties
private static final java.lang.String RULES_PROPERTIES_PATH
Rules
are stored.
Constructor Detail |
---|
public RuleProperty(java.lang.String className)
className
- the name of the classpublic RuleProperty(java.util.Properties properties)
Properties
.
properties
- the propertiesMethod Detail |
---|
private java.util.Properties readProperties(java.lang.String prefixName)
Properties
object specified by the
input name
.
prefixName
- prefix of the properties file
public double getFloat(java.lang.String key, double defaultValue)
key
- the keydefaultValue
- the default value, if retrieved value was not a
double
public int getInt(java.lang.String key, int defaultValue)
NOTE: The RuleProperty.getFloat()
is utilized for retrieval.
key
- the keydefaultValue
- the default value, if retrieved value was not an
int
public SuperLinkID getID(java.lang.String key)
key
- the key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |