Package org.apache.velocity.util
Class DeprecationAwareExtProperties
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
Object>
- Direct Known Subclasses:
ExtProperties
Deprecated.
it will disappear along with deprecated key names in 3.0.
This class extends ExtProperties to handle deprecated propery key names.
- Since:
- 2.1
- Version:
- $Revision: $, $Id: DeprecationAwareExtProperties.java$
- Author:
- Claude Brisson
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.slf4j.Logger
Deprecated.Logger used to log the use of deprecated properties names. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(String key) Deprecated.Property getter which checks deprecated property keysDeprecated.Property getter which checks deprecated property keysDeprecated.Property setter which checks deprecated property keysprotected String
translateKey
(String key) Deprecated.Translate if needed a deprecated key into its replacement key, and emit a warning for deprecated keysprotected void
warnDeprecated
(String oldName, String newName) Deprecated.Emit a warning in the log for adeprecated property nameMethods inherited from class java.util.Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
-
Field Details
-
logger
protected static org.slf4j.Logger loggerDeprecated.Logger used to log the use of deprecated properties names.
Since at the time Velocity properties are set Velocity is not yet initialized, this logger namespace can only be a child of the default logger name:
org.apache.velocity.deprecation
.It won't honor the
runtime.log.instance
orruntime.log.name
settings.
-
-
Constructor Details
-
DeprecationAwareExtProperties
public DeprecationAwareExtProperties()Deprecated.
-
-
Method Details
-
warnDeprecated
Deprecated.Emit a warning in the log for adeprecated property name- Parameters:
oldName
- old property namenewName
- new property name
-
translateKey
Deprecated.Translate if needed a deprecated key into its replacement key, and emit a warning for deprecated keys- Parameters:
key
- provided key- Returns:
- translated key
-
get
Deprecated.Property getter which checks deprecated property keys- Parameters:
key
- provided key- Returns:
- found value under this key or under the corresponding deprecated one, if any
-
put
Deprecated.Property setter which checks deprecated property keys -
containsKey
Deprecated.Property getter which checks deprecated property keys- Parameters:
key
- provided key- Returns:
- found value under this key or under the corresponding deprecated one, if any
-