Package org.apache.camel.util
Class OrderedLocationProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- org.apache.camel.util.OrderedLocationProperties
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
public final class OrderedLocationProperties extends Properties
AnOrderedPropertiesthat also keeps track from which location the properties are sourced from. This can be used to track all the various sources for configuration that a Camel application uses (properties file, ENV variables, hardcoded in java, spring-boot, quarkus, camel-k modeline, camel-yaml-dsl etc. Important: Use the put method that takes location as argument to store location information.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description OrderedLocationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>asMap()voidclear()protected ObjectdoPut(String key, String value)Set<Map.Entry<Object,Object>>entrySet()Objectget(Object key)StringgetLocation(Object key)StringgetProperty(String key)StringgetProperty(String key, String defaultValue)booleanisEmpty()Enumeration<Object>keys()Set<Object>keySet()Objectput(Object key, Object value)voidput(String location, Object key, Object value)voidputAll(String location, Map<Object,Object> map)voidputAll(String location, Properties properties)voidputAll(Map<?,?> t)voidputAll(OrderedLocationProperties other)Objectremove(Object key)intsize()Set<String>stringPropertyNames()StringtoString()Collection<Object>values()-
Methods inherited from class java.util.Properties
clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, equals, forEach, getOrDefault, hashCode, list, list, load, load, loadFromXML, merge, propertyNames, putIfAbsent, rehash, remove, replace, replace, replaceAll, save, setProperty, store, store, storeToXML, storeToXML, storeToXML
-
-
-
-
Constructor Detail
-
OrderedLocationProperties
public OrderedLocationProperties()
-
-
Method Detail
-
putAll
public void putAll(OrderedLocationProperties other)
-
putAll
public void putAll(String location, Properties properties)
-
getLocation
public String getLocation(Object key)
-
putAll
public void putAll(Map<?,?> t)
-
isEmpty
public boolean isEmpty()
-
getProperty
public String getProperty(String key)
- Overrides:
getPropertyin classProperties
-
getProperty
public String getProperty(String key, String defaultValue)
- Overrides:
getPropertyin classProperties
-
keys
public Enumeration<Object> keys()
- Overrides:
keysin classProperties
-
size
public int size()
-
stringPropertyNames
public Set<String> stringPropertyNames()
- Overrides:
stringPropertyNamesin classProperties
-
values
public Collection<Object> values()
-
toString
public String toString()
- Overrides:
toStringin classProperties
-
-