BEA Systems, Inc.

com.beasys.commerce.axiom.util.helper
Class CommercePropertiesHelper

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--com.beasys.commerce.axiom.util.TypedProperties
                          |
                          +--com.beasys.commerce.axiom.util.helper.CommercePropertiesHelper

public class CommercePropertiesHelper
extends TypedProperties

Subclass of the typed properties class, that will return properties as longs, strings, double, etc. Also implements a way to find keys that start with a value. e.g. find me all of the keys that start with personalization.portal.

See Also:
Serialized Form

Field Summary
static java.lang.String SYSTEM_PROPERTY_KEY
           
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
CommercePropertiesHelper()
           
 
Method Summary
static CommercePropertiesHelper getInstance()
          Get the singleton instance.
 java.lang.String[] getKeysFor(java.lang.String startsWith)
          Get all of the keys for the properties table that start with the given string.
 void load()
          Load.
static void main(java.lang.String[] args)
           
 
Methods inherited from class com.beasys.commerce.axiom.util.TypedProperties
getPropertyAsArray, getPropertyAsBool, getPropertyAsBool, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyHexAsInt, getPropertyHexAsInt
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SYSTEM_PROPERTY_KEY

public static final java.lang.String SYSTEM_PROPERTY_KEY
Constructor Detail

CommercePropertiesHelper

public CommercePropertiesHelper()
Method Detail

getInstance

public static CommercePropertiesHelper getInstance()
Get the singleton instance.
Returns:
CommercePropertiesHelper

load

public void load()
          throws java.io.IOException
Load. You may also use this if you change the properties file and you don't want to restart the server.

getKeysFor

public java.lang.String[] getKeysFor(java.lang.String startsWith)
Get all of the keys for the properties table that start with the given string. e.g. getKeysFor("personalization.portal") would return "personalization.portal.backgroundColor", "personalization.portal.foregroundColor", etc.
Parameters:
startsWith -  
Returns:
String[]

main

public static void main(java.lang.String[] args)

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved