public class PropertyNameTransformer extends Object implements org.springframework.vault.core.util.PropertyTransformer
PropertyTransformer to transform a Map of properties by applying key
name translation.
Existing keys will be transformed to a target key name while retaining the original value. Key name translation will leave other, not specified key names untouched.
| Constructor and Description |
|---|
PropertyNameTransformer()
Create a new
PropertyNameTransformer. |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyTransformation(String sourceKeyName,
String targetKeyName)
Adds a key name transformation by providing a
sourceKeyName and a
targetKeyName. |
org.springframework.vault.core.util.PropertyTransformer |
andThen(org.springframework.vault.core.util.PropertyTransformer after) |
Map<String,String> |
transformProperties(Map<String,String> input) |
public PropertyNameTransformer()
PropertyNameTransformer.public void addKeyTransformation(String sourceKeyName, String targetKeyName)
sourceKeyName and a
targetKeyName.sourceKeyName - must not be empty or null.targetKeyName - must not be empty or null.public Map<String,String> transformProperties(Map<String,String> input)
transformProperties in interface org.springframework.vault.core.util.PropertyTransformerpublic org.springframework.vault.core.util.PropertyTransformer andThen(org.springframework.vault.core.util.PropertyTransformer after)
andThen in interface org.springframework.vault.core.util.PropertyTransformerCopyright © 2018 Pivotal Software, Inc.. All rights reserved.