Class SimpleLookupValueProvider
- java.lang.Object
-
- com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
-
- com.xebialabs.deployit.plugin.api.udm.lookup.SimpleLookupValueProvider
-
- All Implemented Interfaces:
ConfigurationItem
,LookupValueProvider
,java.io.Serializable
,java.lang.Comparable<BaseConfigurationItem>
@Metadata(root=CONFIGURATION, description="A LookupValueProvider that stores values in the database.") public class SimpleLookupValueProvider extends BaseConfigurationItem implements LookupValueProvider
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowEncryptedForNonPassword
protected java.util.Map<java.lang.String,java.lang.String>
encryptedEntries
protected java.util.Map<java.lang.String,java.lang.String>
entries
-
Fields inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
id, syntheticProperties, type
-
Fields inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
SYNTHETIC_PROPERTIES_FIELD, TYPE_FIELD
-
-
Constructor Summary
Constructors Constructor Description SimpleLookupValueProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
lookup(java.lang.String key, boolean password)
Lookup an external value by key.-
Methods inherited from class com.xebialabs.deployit.plugin.api.udm.base.BaseConfigurationItem
compareTo, equals, get$ciAttributes, get$externalProperties, get$internalId, get$securedCi, get$token, get$validationMessages, getId, getName, getProperty, getPropertyDescriptor, getType, hashCode, hasProperty, set$ciAttributes, set$externalProperties, set$internalId, set$securedCi, set$token, set$validationMessages, setId, setProperty, setType, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
get$internalId, get$securedCi, get$validationMessages, getId, getName, getProperty, getType, hasProperty, setId, setProperty
-
Methods inherited from interface com.xebialabs.deployit.plugin.api.udm.lookup.LookupValueProvider
isHealthy
-
-
-
-
Field Detail
-
entries
@Property(description="The lookup value entries", required=false) protected java.util.Map<java.lang.String,java.lang.String> entries
-
encryptedEntries
@Property(description="The encrypted lookup value entries", required=false, password=true) protected java.util.Map<java.lang.String,java.lang.String> encryptedEntries
-
allowEncryptedForNonPassword
@Property(description="Allow encrypted entries for non password properties.", defaultValue="false") protected boolean allowEncryptedForNonPassword
-
-
Method Detail
-
lookup
public java.lang.String lookup(java.lang.String key, boolean password) throws java.lang.Exception
Description copied from interface:LookupValueProvider
Lookup an external value by key.- Specified by:
lookup
in interfaceLookupValueProvider
- Parameters:
key
- The key to findpassword
- Whether it is used for a password property.- Returns:
- The value found
- Throws:
java.lang.Exception
- when the lookup cannot be performed or the provider cannot provide a value, e.g. when a secret is requested for a non password field.
-
-