Class DeprecationAwareExtProperties

    • Field Detail

      • logger

        protected static org.slf4j.Logger logger
        Deprecated.

        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 or runtime.log.name settings.

    • Constructor Detail

      • DeprecationAwareExtProperties

        public DeprecationAwareExtProperties()
        Deprecated.
    • Method Detail

      • warnDeprecated

        protected void warnDeprecated​(String oldName,
                                      String newName)
        Deprecated.
        Emit a warning in the log for adeprecated property name
        Parameters:
        oldName - old property name
        newName - new property name
      • translateKey

        protected String translateKey​(String key)
        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

        public Object get​(String key)
        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

        public Object put​(String key,
                          Object value)
        Deprecated.
        Property setter which checks deprecated property keys
        Specified by:
        put in interface Map<String,​Object>
        Overrides:
        put in class Hashtable<String,​Object>
        Parameters:
        key - provided key
        value - provided value
        Returns:
        previous found value, if any
      • containsKey

        public boolean containsKey​(String key)
        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