org.infinispan.util
Class LegacyKeySupportTypedProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by org.infinispan.util.TypedProperties
                  extended by org.infinispan.util.LegacyKeySupportTypedProperties
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class LegacyKeySupportTypedProperties
extends TypedProperties

An extension of TypedProperties that has support for legacy keys. Construct this Properties type with mappings of currently expected keys to their legacy, deprecated counterparts and you will simply have to look up the new, updated keys and still be able to support the legacy keys, while logging a message that an old key was used.

Version:
4.1
Author:
Manik Surtani
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
LegacyKeySupportTypedProperties(Map<String,String> legacyKeyMapping)
           
LegacyKeySupportTypedProperties(Properties p, Map<String,String> legacyKeyMapping)
           
 
Method Summary
 boolean getBooleanProperty(String key, boolean defaultValue)
           
 int getIntProperty(String key, int defaultValue)
           
 long getLongProperty(String key, long defaultValue)
           
 String getProperty(String key)
           
 String getProperty(String key, String defaultValue)
           
 
Methods inherited from class org.infinispan.util.TypedProperties
getBooleanProperty, getIntProperty, getLongProperty, getProperty, toTypedProperties
 
Methods inherited from class java.util.Properties
list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
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
 

Constructor Detail

LegacyKeySupportTypedProperties

public LegacyKeySupportTypedProperties(Properties p,
                                       Map<String,String> legacyKeyMapping)

LegacyKeySupportTypedProperties

public LegacyKeySupportTypedProperties(Map<String,String> legacyKeyMapping)
Method Detail

getProperty

public String getProperty(String key)
Overrides:
getProperty in class Properties

getProperty

public String getProperty(String key,
                          String defaultValue)
Overrides:
getProperty in class Properties

getIntProperty

public int getIntProperty(String key,
                          int defaultValue)
Overrides:
getIntProperty in class TypedProperties

getLongProperty

public long getLongProperty(String key,
                            long defaultValue)
Overrides:
getLongProperty in class TypedProperties

getBooleanProperty

public boolean getBooleanProperty(String key,
                                  boolean defaultValue)
Overrides:
getBooleanProperty in class TypedProperties

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.