net.commerce.zocalo.service
Class PropertyHelper

java.lang.Object
  extended by net.commerce.zocalo.service.PropertyHelper

public class PropertyHelper
extends java.lang.Object

some methods for parsing Property files, and converting results to useful values.


Constructor Summary
PropertyHelper()
           
 
Method Summary
static java.lang.String assetsPlusBonusLabel(java.util.Properties props)
           
static java.lang.String averagePriceLabel(java.util.Properties props)
           
static org.apache.log4j.Logger configLogger()
           
static java.lang.String dividendAddedToCashLabel(java.util.Properties props)
           
static java.lang.String dividendsPlusBonusLabel(java.util.Properties props)
           
static java.lang.String divSubtractedLabel(java.util.Properties props)
           
static java.lang.String dottedWords(java.lang.String firstPart, java.lang.String secondPart)
           
static boolean getBetterPriceRequired(java.util.Properties props)
           
static Quantity getMaxDividend(java.util.Properties props)
           
static Quantity getMaxTradingPrice(java.util.Properties props)
           
static boolean getRequireReserves(java.util.Properties props)
           
static int getSliderInputStepSize(java.util.Properties props)
           
static int getSliderLabelStepSize(java.util.Properties props)
           
static boolean getUnaryAssets(java.util.Properties props)
           
static boolean getWholeShareTradingOnly(java.util.Properties props)
           
static java.lang.String indirectPropertyForRound(java.lang.String propName, int round, java.util.Properties props)
           
static boolean parseBoolean(java.lang.String propertyName, java.util.Properties props, boolean defaultValue)
           
static java.math.BigDecimal parseDecimal(java.lang.String propertyName, java.util.Properties props)
           
static java.math.BigDecimal parseDecimal(java.lang.String propertyName, java.util.Properties props, java.math.BigDecimal defaultValue)
           
static Quantity parseDecimalQuantity(java.lang.String propertyName, java.util.Properties props, Quantity defaultValue)
           
static double parseDouble(java.lang.String propertyName, java.util.Properties props)
           
static double parseDouble(java.lang.String propertyName, java.util.Properties props, double defaultValue)
           
static Quantity parseDoubleNoWarn(java.lang.String propertyName, java.util.Properties props)
           
static java.lang.Integer parseInteger(java.lang.String propertyName, java.util.Properties props)
           
static java.lang.Integer parseInteger(java.lang.String propertyName, java.util.Properties props, java.lang.Integer defaultValue)
           
static int parseTimeStringAsSeconds(java.lang.String timeString)
           
static java.lang.String privateValueLabel(java.util.Properties props)
           
static java.lang.String totalDividendLabel(java.util.Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyHelper

public PropertyHelper()
Method Detail

indirectPropertyForRound

public static java.lang.String indirectPropertyForRound(java.lang.String propName,
                                                        int round,
                                                        java.util.Properties props)

parseDouble

public static double parseDouble(java.lang.String propertyName,
                                 java.util.Properties props)

parseDouble

public static double parseDouble(java.lang.String propertyName,
                                 java.util.Properties props,
                                 double defaultValue)

parseInteger

public static java.lang.Integer parseInteger(java.lang.String propertyName,
                                             java.util.Properties props,
                                             java.lang.Integer defaultValue)

parseInteger

public static java.lang.Integer parseInteger(java.lang.String propertyName,
                                             java.util.Properties props)

parseDecimalQuantity

public static Quantity parseDecimalQuantity(java.lang.String propertyName,
                                            java.util.Properties props,
                                            Quantity defaultValue)

parseDecimal

public static java.math.BigDecimal parseDecimal(java.lang.String propertyName,
                                                java.util.Properties props,
                                                java.math.BigDecimal defaultValue)

parseDecimal

public static java.math.BigDecimal parseDecimal(java.lang.String propertyName,
                                                java.util.Properties props)

parseDoubleNoWarn

public static Quantity parseDoubleNoWarn(java.lang.String propertyName,
                                         java.util.Properties props)

parseBoolean

public static boolean parseBoolean(java.lang.String propertyName,
                                   java.util.Properties props,
                                   boolean defaultValue)

dottedWords

public static java.lang.String dottedWords(java.lang.String firstPart,
                                           java.lang.String secondPart)

getUnaryAssets

public static boolean getUnaryAssets(java.util.Properties props)

getMaxTradingPrice

public static Quantity getMaxTradingPrice(java.util.Properties props)

configLogger

public static org.apache.log4j.Logger configLogger()

getBetterPriceRequired

public static boolean getBetterPriceRequired(java.util.Properties props)

getWholeShareTradingOnly

public static boolean getWholeShareTradingOnly(java.util.Properties props)

parseTimeStringAsSeconds

public static int parseTimeStringAsSeconds(java.lang.String timeString)

getRequireReserves

public static boolean getRequireReserves(java.util.Properties props)

getMaxDividend

public static Quantity getMaxDividend(java.util.Properties props)

getSliderInputStepSize

public static int getSliderInputStepSize(java.util.Properties props)

getSliderLabelStepSize

public static int getSliderLabelStepSize(java.util.Properties props)

privateValueLabel

public static java.lang.String privateValueLabel(java.util.Properties props)

averagePriceLabel

public static java.lang.String averagePriceLabel(java.util.Properties props)

totalDividendLabel

public static java.lang.String totalDividendLabel(java.util.Properties props)

dividendsPlusBonusLabel

public static java.lang.String dividendsPlusBonusLabel(java.util.Properties props)

assetsPlusBonusLabel

public static java.lang.String assetsPlusBonusLabel(java.util.Properties props)

dividendAddedToCashLabel

public static java.lang.String dividendAddedToCashLabel(java.util.Properties props)

divSubtractedLabel

public static java.lang.String divSubtractedLabel(java.util.Properties props)