Class SecureProperties

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,​java.lang.Object>
    Direct Known Subclasses:
    SqlProperties

    @Vetoed
    public class SecureProperties
    extends java.util.Properties
    Author:
    Michael Remijan mjremijan@yahoo.com @mjremijan
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Optional<Rsa> rsa  
      • Fields inherited from class java.util.Properties

        defaults
    • Constructor Summary

      Constructors 
      Constructor Description
      SecureProperties​(java.io.File file, java.util.Optional<Rsa> rsa)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getProperty​(java.lang.String key)  
      java.lang.Object setPropertyIfNull​(java.lang.String key, java.lang.String value)
      Similar to #setPropery() but the value is set iff a value doesn't already exist.
      • Methods inherited from class java.util.Properties

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • rsa

        protected java.util.Optional<Rsa> rsa
    • Constructor Detail

      • SecureProperties

        public SecureProperties​(java.io.File file,
                                java.util.Optional<Rsa> rsa)
    • Method Detail

      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Overrides:
        getProperty in class java.util.Properties
      • setPropertyIfNull

        public java.lang.Object setPropertyIfNull​(java.lang.String key,
                                                  java.lang.String value)
        Similar to #setPropery() but the value is set iff a value doesn't already exist.
        Parameters:
        key - - The key to be placed into this property list.
        value - - The value corresponding to key.
        Returns:
        The previous value of the specified key in this property list, or null if it did not have one.