public class AttrValueSupport extends Object
AttributeValue.| Constructor and Description |
|---|
AttrValueSupport() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkSetMasked(Map<String,AttributeValue> attrMap,
Set<String> maskedKeySet)
Updates the specified
AttributeMap by updating each masked flag depending on the maskedKeySet. |
static AttributeMap |
convert(Map<String,Object> srcMap,
boolean maskAll)
Converts the specified map to an
AttributeMap by calling make(Object) on each map value. |
static AttributeMap |
convert(Map<String,Object> srcMap,
boolean maskAll,
boolean trim)
Converts the specified map to an
AttributeMap by calling make(Object, boolean) on each map value. |
static AttributeMap |
convert(Map<String,Object> srcMap,
Set<String> maskedKeySet,
boolean maskOgnlValues)
Converts the specified map to an
AttributeMap by calling make(Object, boolean) on each map value. |
static AttributeValue |
make(Collection<?> objs)
Creates an
AttributeValue from the Collection of objects. |
static AttributeValue |
make(Collection<?> objs,
boolean trimValues)
Creates an
AttributeValue from the Collection of objects. |
static AttributeValue |
make(Object obj)
Creates an
AttributeValue from the String representation of the specified object. |
static AttributeValue |
make(Object obj,
boolean trim)
Creates an
AttributeValue from the String representation of the specified object. |
static AttributeMap |
setMasked(AttributeMap srcMap,
Set<String> maskedKeySet,
boolean maskOgnlValues)
Returns a new
AttributeMap with each of its AttributeValue updated with the appropriate mask
setting. |
static void |
setMasked(AttributeValue attributeValue)
Helper method to set the specified attribute value's masked flag to true.
|
public static AttributeValue make(Object obj)
AttributeValue from the String representation of the specified object. The String
representation is not trimmed.obj - The value of the returned AttributeValue.AttributeValue or obj if obj is an instance of AttributeValue.public static AttributeValue make(Object obj, boolean trim)
AttributeValue from the String representation of the specified object.obj - The value of the returned AttributeValue.trim - Whether the value should be trimmed.AttributeValue or obj if obj is an instance of AttributeValue.public static AttributeValue make(Collection<?> objs)
AttributeValue from the Collection of objects. The String representation each object is added
as a value. The String representations are not trimmed.objs - The values of the returned AttributeValue.AttributeValue.public static AttributeValue make(Collection<?> objs, boolean trimValues)
AttributeValue from the Collection of objects. The String representation each object is added
as a value.objs - The values of the returned AttributeValue.trimValues - Whether the values should be trimmed.AttributeValue.public static AttributeMap convert(Map<String,Object> srcMap, boolean maskAll)
AttributeMap by calling make(Object) on each map value. Ognl values
are not masked.srcMap - The map to convert.maskAll - Whether all the values should be masked.AttributeMap.public static AttributeMap convert(Map<String,Object> srcMap, boolean maskAll, boolean trim)
AttributeMap by calling make(Object, boolean) on each map value.
Ognl values are not masked.srcMap - The map to convert.maskAll - Whether all the values should be masked.trim - Whether or not each value should be trimmed.AttributeMap.public static AttributeMap convert(Map<String,Object> srcMap, Set<String> maskedKeySet, boolean maskOgnlValues)
AttributeMap by calling make(Object, boolean) on each map value.
Ognl values are not masked.srcMap - The map to convert.maskedKeySet - A set of field names that should have their values masked.maskOgnlValues - Whether all the values should be masked.AttributeMap.public static AttributeMap setMasked(AttributeMap srcMap, Set<String> maskedKeySet, boolean maskOgnlValues)
AttributeMap with each of its AttributeValue updated with the appropriate mask
setting.srcMap - The source AttributeMap.maskedKeySet - A set of attribute names, whose values should be masked.maskOgnlValues - Whether or not the mask the Ognl values.AttributeMap with the appropriate masked flags.public static void checkSetMasked(Map<String,AttributeValue> attrMap, Set<String> maskedKeySet)
AttributeMap by updating each masked flag depending on the maskedKeySet.attrMap - The AttributeMap to be updated.maskedKeySet - A set of attribute names, whose values should be masked. For any values not in this
set the masked flag is cleared.public static void setMasked(AttributeValue attributeValue)
attributeValue - The attribute value to mask.Copyright 2019 Ping Identity Corp. All rights reserved.