Class MaskedProperty
java.lang.Object
java.util.Dictionary<Object,Object>
java.util.Hashtable<Object,Object>
java.util.Properties
org.hibernate.search.backend.configuration.MaskedProperty
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
A wrapper to Properties, to restrict the availability of
values to only those which have a key beginning with some
masking String.
Supported methods to enumerate the list of properties are:
- propertyNames()
- keySet()
- keys()
Other methods including methods returning Entries and values are not supported
- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
ConstructorsConstructorDescriptionMaskedProperty(Properties propsToMask, String mask) Provides a view to the provided Properties hiding all keys not starting with some [mask.].MaskedProperty(Properties propsToMask, String mask, Properties propsFallBack) Provides a view to the provided Properties hiding all keys not starting with some [mask.]. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()booleanbooleancontainsKey(Object key) booleancontainsValue(Object value) elements()entrySet()booleangetProperty(String key) getProperty(String key, String defaultValue) inthashCode()booleanisEmpty()keys()keySet()voidlist(PrintStream out) voidlist(PrintWriter out) voidload(InputStream inStream) voidEnumeration<?> voidprotected voidrehash()voidsave(OutputStream out, String comments) setProperty(String key, String value) intsize()voidstore(OutputStream out, String comments) voidstoreToXML(OutputStream os, String comment) voidstoreToXML(OutputStream os, String comment, String encoding) toString()values()Methods inherited from class java.util.Properties
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, load, merge, putIfAbsent, remove, replace, replace, replaceAll, store, storeToXML, stringPropertyNames
-
Constructor Details
-
MaskedProperty
Provides a view to the provided Properties hiding all keys not starting with some [mask.].- Parameters:
propsToMask- the Properties containing the values.mask-
-
MaskedProperty
Provides a view to the provided Properties hiding all keys not starting with some [mask.]. If no value is found then a value is returned from propsFallBack, without masking.- Parameters:
propsToMask-mask-propsFallBack-
-
-
Method Details
-
getProperty
- Overrides:
getPropertyin classProperties
-
containsKey
- Specified by:
containsKeyin interfaceMap<Object,Object> - Overrides:
containsKeyin classProperties- Throws:
IllegalArgumentException- if the key is not a String instance
-
getProperty
- Overrides:
getPropertyin classProperties
-
list
- Overrides:
listin classProperties- Throws:
UnsupportedOperationException
-
list
- Overrides:
listin classProperties- Throws:
UnsupportedOperationException
-
load
- Overrides:
loadin classProperties- Throws:
UnsupportedOperationExceptionIOException
-
loadFromXML
- Overrides:
loadFromXMLin classProperties- Throws:
UnsupportedOperationExceptionIOExceptionInvalidPropertiesFormatException
-
propertyNames
- Overrides:
propertyNamesin classProperties
-
save
- Overrides:
savein classProperties- Throws:
UnsupportedOperationException
-
setProperty
- Overrides:
setPropertyin classProperties- Throws:
UnsupportedOperationException
-
store
- Overrides:
storein classProperties- Throws:
UnsupportedOperationExceptionIOException
-
storeToXML
- Overrides:
storeToXMLin classProperties- Throws:
UnsupportedOperationExceptionIOException
-
storeToXML
- Overrides:
storeToXMLin classProperties- Throws:
UnsupportedOperationExceptionIOException
-
clear
public void clear()- Specified by:
clearin interfaceMap<Object,Object> - Overrides:
clearin classProperties- Throws:
UnsupportedOperationException
-
clone
- Overrides:
clonein classProperties- Throws:
UnsupportedOperationException
-
contains
- Overrides:
containsin classProperties
-
containsValue
- Specified by:
containsValuein interfaceMap<Object,Object> - Overrides:
containsValuein classProperties- Throws:
UnsupportedOperationException
-
elements
- Overrides:
elementsin classProperties- Throws:
UnsupportedOperationException
-
entrySet
- Specified by:
entrySetin interfaceMap<Object,Object> - Overrides:
entrySetin classProperties- Throws:
UnsupportedOperationException
-
get
- Specified by:
getin interfaceMap<Object,Object> - Overrides:
getin classProperties- Throws:
UnsupportedOperationException
-
isEmpty
public boolean isEmpty() -
keys
- Overrides:
keysin classProperties- Throws:
UnsupportedOperationException
-
keySet
-
put
- Specified by:
putin interfaceMap<Object,Object> - Overrides:
putin classProperties- Throws:
UnsupportedOperationException
-
putAll
- Specified by:
putAllin interfaceMap<Object,Object> - Overrides:
putAllin classProperties- Throws:
UnsupportedOperationException
-
rehash
protected void rehash()- Overrides:
rehashin classProperties- Throws:
UnsupportedOperationException
-
remove
- Specified by:
removein interfaceMap<Object,Object> - Overrides:
removein classProperties- Throws:
UnsupportedOperationException
-
size
public int size()- Specified by:
sizein interfaceMap<Object,Object> - Overrides:
sizein classProperties- Throws:
UnsupportedOperationException
-
toString
- Overrides:
toStringin classProperties
-
values
- Specified by:
valuesin interfaceMap<Object,Object> - Overrides:
valuesin classProperties- Throws:
UnsupportedOperationException
-
hashCode
public int hashCode() -
equals
-